History log of /src/usr.bin/make/unit-tests/opt-jobs-internal.exp |
Revision | | Date | Author | Comments |
1.12 |
| 02-Jul-2025 |
rillig | make: shorten diagnostic for invalid -J option
In the manual page, there's more space to properly explain the complexity behind the warning.
|
1.11 |
| 16-Jun-2025 |
rillig | make: in a warning without location information, print the stack trace
Without further context, a warning like the following is hard to track back:
> nbmake[4]: warning: Invalid character " " in variable name > "if ,"LSAN_OPTIONS=""
|
1.10 |
| 13-Jun-2025 |
rillig | make: new sentence, new line
|
1.9 |
| 05-Jun-2025 |
rillig | make: remove empty line from diagnostic, add tests for output handling
The warning for the invalid internal option "-J" does not need a trailing newline, as that is provided by Parse_Error already.
Having this newline in the output demonstrated a previously unknown bug in handling the output of child commands in parallel mode. There, empty lines are randomly discarded, depending on the chunks in which the output from the child process is copied to make's stdout. See job-output.mk for a demonstration.
The test for the Korn shell did not run the Korn shell in error handling mode, as the error handling mode only affects the parallel mode but the test didn't switch to that mode.
After fixing the shell-ksh.mk test, the single '"' in the output looked suspicious, and indeed, the shell-csh.mk test had the same problem of filtering more characters from the output than intended.
|
1.8 |
| 28-May-2025 |
sjg | make: delay warning about bogus -J flag
In MainParseArgJobsInternal just set bogusJflag to indicate that the descriptors passed were invalid.
By the time we get to InitMaxJobs the command line and indeed the makefile have had a chance to put us in compat mode, in which case the warning is unnecessary. Add suggestion of -B if compat mode is desired in the sub-make.
Reviewed by: rillig
|
1.7 |
| 26-May-2025 |
rillig | make: show contents of MAKEFLAGS in the stack trace
When the internal -J option refers to a closed file descriptor, it's helpful to know what the MAKEFLAGS environment variable contains, in addition to the executed command line. Same for parse errors in variable assignments from the command line.
|
1.6 |
| 23-May-2025 |
rillig | make: add current directory to error messages from MAKEFLAGS
While parsing the additional command line arguments from the MAKEFLAGS environment variable, the current directory was not initialized yet, so swap the order.
As a side effect, this change would allow a "-m .../share/mk" option, with a literal magic "...", thus looking up the system directory in any ancestor directory of the current directory. This idea sounds unreliable enough that probably nobody will try this in practice.
|
1.5 |
| 23-May-2025 |
rillig | make: warn when falling from parallel mode back to compat mode
Falling back may run fewer jobs than intended, thus increasing the build's wall time.
Falling back may run more jobs than intended, when a sub-make creates its own and independent token pool, thus overloading the system.
Warn in both cases. Since the -J option is internal, it is not obvious how to fix the situation, so provide detailed instructions on the possible fixes and their effects.
|
1.4 |
| 11-May-2025 |
rillig | make: clean up error message for malformed internal -J option
There's no point printing the usage, as the problem is typically somewhere else. Reword the message to be easier to parse.
|
1.3 |
| 11-May-2025 |
rillig | tests/make: document internal option for parallel mode
In several places in the NetBSD build, a subdir target invokes ${MAKEDIRTARGET}, assuming that this sub-make would coordinate the number of parallel jobs with its parent make. But since that command neither contains the plain word "make" nor the expression "${MAKE}", the sub-make falls back to compat mode.
|
1.2 |
| 23-Jan-2022 |
rillig | tests/make: extend test suite, move old tests to 2020 scheme
The tests from envfirst.mk are now in opt-env.mk. The tests from modword.mk are now in varmod-select-words.mk.
|
1.1 |
| 16-Aug-2020 |
rillig | make(1): add dummies for fine-grained tests, one per single feature
The test names have been derived from the current manual page.
All these tests are dummies right now, and the code from the existing tests will be moved into the new tests step by step.
This is done to prevent modmisc, escape, varmod-edge and varmisc from growing without any bounds, and to reduce the side-effects of one test to the others.
|