279891 Commits

Author SHA1 Message Date
rillig
174f1c2ffa make(1): make Arch_MemMTime ready for WARNS=6 2020-08-23 18:53:13 +00:00
riastradh
1830cb4bb2 Initialize peers early on for error branch. 2020-08-23 18:52:53 +00:00
rillig
38885a7509 make(1): make brk_string return size_t for the number of words 2020-08-23 18:26:35 +00:00
rillig
fe6807ec25 make(1): prepare str.c for WARNS=6
The next step is to make brk_string return size_t instead of int.
2020-08-23 18:03:35 +00:00
rillig
b3ea8e45d1 make(1): in archive test, use wildcard that matches more than 1 file
This is to make sure that the buffer used for "archive(member)" is
properly reset after each member.
2020-08-23 17:51:24 +00:00
riastradh
bbfb23c92a Split getrandom tests into several cases to find out which ones hang. 2020-08-23 17:50:19 +00:00
rillig
692b84894d make(1): replace tricky malloc+realloc+strlen+snprintf with Buffer
The code for handling archives is not widely used.  Therefore it does
not need to be fast.  Clarity of the code is more important.  Therefore
replace the malloc + strlen + realloc + snprintf string processing with
the Buffer type, which removes a lot of redundancy.

In the wildcard loop, the "if (sz > nsz)" looked like a mistake.  Why
should it be useful to first allocate a large buffer and then resize it
to a smaller buffer, but still twice as large as necessary?
2020-08-23 17:49:37 +00:00
rillig
f1bf7abefe make(1): add test for wildcards in archive dependency 2020-08-23 17:34:46 +00:00
rillig
95444f19ea make(1): allow to run only selected tests via the command line 2020-08-23 17:22:52 +00:00
rillig
e8986ff18b make(1): remove unused declarations from header files 2020-08-23 17:04:21 +00:00
rillig
57ebcb1d76 make(1): remove parameter names from function prototypes
Thanks kre for noticing.
2020-08-23 16:59:44 +00:00
rillig
27d66938d5 make(1): reverse order of the Lst_Find parameters
The other callbacks all have (function, param), only the Lst_Find had
(param, function), which was inconsistent.
2020-08-23 16:58:02 +00:00
rillig
4b0e7734a8 make(1): define aliases for function types in list processing
This makes the prototypes of the functions clearer.
2020-08-23 16:43:34 +00:00
riastradh
3a2006068f Adjust sp, not fp, to allocate a 32-byte temporary.
Costs another couple MOV instructions, but we can't skimp on this --
there's no red zone below sp for interrupts on arm, so we can't touch
anything there.  So just use fp to save sp and then adjust sp itself,
rather than using fp as a temporary register to point just below sp.

Should fix PR port-arm/55598 -- previously the ChaCha self-test
failed 33/10000 trials triggered by sysctl during running system;
with the patch it has failed 0/10000 trials.

(Presumably it happened more often at boot time, leading to 5/26
failures in the test bed, because we just enabled interrupts and some
devices are starting to deliver interrupts.)
2020-08-23 16:39:06 +00:00
rillig
7b7c4788df make(1): make navigating lists in debugging mode easier
Lst is an untyped list of pointers.  During debugging, it is often
necessary to inspect the content of the list.  To do this without manual
typecasting, add a few aliases for the LstNode.datum pointer, for
inspecting GNodes and strings.
2020-08-23 16:18:12 +00:00
perseant
5e1ae64c39 Expand test to cover more failure cases. Change from skipped to expect fail
in anticipation of working roll-forward code.
2020-08-23 16:03:54 +00:00
ryo
8c1c74cde8 adjust the number of spaces to match the current df(1) output.
fix NetBSD PR/55600

TODO: it should not be dependent on the number of spaces.
2020-08-23 15:51:30 +00:00
rillig
13749176b7 make(1): move tests for the :tu and :_ modifiers into separate files 2020-08-23 15:18:43 +00:00
rillig
2070e56d26 make(1): move tests for :hash :range :localtime into separate files 2020-08-23 15:13:21 +00:00
rillig
81e2228996 make(1): move tests for :H :E :R :T into separate files 2020-08-23 15:09:15 +00:00
rillig
c3c39b1bcc make(1): move some of the SysV modifier tests into another file 2020-08-23 14:52:06 +00:00
rillig
e79e3f3211 make(1): add test for + commands with the -n command line option 2020-08-23 14:46:33 +00:00
rillig
33c205ea77 make(1): add tests for the -i -k -v -V -W options 2020-08-23 14:28:04 +00:00
rillig
cf72596e06 make(1): add tests for functions in .if conditions 2020-08-23 14:07:20 +00:00
rillig
482afa8a7b make(1): add tests for numeric comparisons in .if directives 2020-08-23 13:50:17 +00:00
ryoon
27be0897f2 Link to i386/pnpbios(4) instead of pnpbios(4)
And bump date.
2020-08-23 13:35:46 +00:00
rillig
f50dcd4678 make(1): remove another piece of code for circular lists 2020-08-23 11:13:08 +00:00
gson
bd4d304f2b Expect failure only when running under qemu's TCG CPU emulation, not
when running under hardware virtualization such as qemu -accel nvmm.
2020-08-23 11:04:58 +00:00
gson
3b030f477c Provide separate functions to check for running under qemu in general
and for running under qemu's built-in TCG CPU emulation (as opposed to
hardware virtualization via NVMM or KVM).
2020-08-23 11:00:18 +00:00
rillig
a36e095453 make(1): handle special case of a list containing null pointers
GNode.commands is the only place in make where a list can contain null
pointers.  That's unexpected, and memory management in CompatRunCommand
looks suspicous enough to warrant extensive documentation.
2020-08-23 10:53:27 +00:00
rillig
59a99a52fd make(1): save a variable lookup when adding a read-only variable 2020-08-23 10:27:22 +00:00
simonb
370a0b4cd9 Use a 16kB USPACE (and larger kernel stack) for LP64 kernels. Invert
the logic for setting the USPACE size.  Define a desired USPACE size
(16kB for LP64, 8kB otherwise) then divide by PAGE_SIZE to get UPAGES.

Fixes random segmap lossage, since the uarea usually sits immediately
above the segmap for a process.  Thanks to mrg@, skrll@ and dholland@
for testing, debugging and general help tracking down this problem.
2020-08-23 10:23:38 +00:00
wiz
1f2c862562 Fix editor mistake in previous. 2020-08-23 09:55:58 +00:00
rillig
75e915cbf7 make(1): fix assertion failure in debug output for read-only variables 2020-08-23 09:28:52 +00:00
rillig
95cca86b4e make(1): add test for the newly added .SHELL variable 2020-08-23 09:18:25 +00:00
rillig
c981a63851 make(1): improve variable name in ApplyModifiers
The bare q was too unspecific.
2020-08-23 08:32:57 +00:00
rillig
d19ceafe95 make(1): use local variable in ApplyModifier_Path
Without this variable, it might seem as if st->newVal could become NULL
in some code paths.
2020-08-23 08:31:07 +00:00
rillig
23631efa02 make(1): add assertions for non-nullness of strings
Verified by manually inspecting all call sites.
2020-08-23 08:29:18 +00:00
rillig
2ae277de3b make(1): use proper data type for GNode.type
Theoretically this should show the enum constant names when displaying
the field in the debugger.  This only happens for GNode.flags though,
but not for GNode.type.  Not sure what the exact cause is.
2020-08-23 08:26:03 +00:00
rillig
e60129a61d make(1): clean up code in buf.c 2020-08-23 08:21:50 +00:00
rillig
a093fb66b6 make(1): add test for the :P variable modifier 2020-08-23 08:10:49 +00:00
rillig
6b7ddbf117 make(1): unroll loop in SuffFindArchiveDeps
The compiler had unrolled this loop anyway, and for humans it is more
readable as well.

The comments "must be first" and "must be second" came from a time when
the variables were stored in a linked list instead of a hash table.
Maybe this "must" was about performance back then.  Anyway, the tests
run fine with either order, and there is absolutely no evidence that the
order of these variables could have any effect.
2020-08-23 06:54:01 +00:00
rillig
450eb8e3e7 make(1): use common MAX macro instead of self-defined 2020-08-23 06:12:52 +00:00
isaki
6da107a348 Improve debug messages. 2020-08-23 04:20:01 +00:00
isaki
bb4723b2fb Improve and update comments. 2020-08-23 04:14:57 +00:00
isaki
910d1610f8 Style fixes. 2020-08-23 04:07:23 +00:00
simonb
b60880f7ca Document the MIPs "mips machine {cpu,nmi,watch,unwatch}" commands.
Add commented out stubs for the mfcr and mtcr commands.
2020-08-23 03:23:53 +00:00
simonb
36d16c5b18 Add /v to show only valid TLBs.
Align tlb display nicely if > 100 TLBs.
Sort commands in the command dispatch function.
2020-08-23 03:21:57 +00:00
simonb
5ec8357b74 Use upper-case "CPU" consistently in all text except DDB command names. 2020-08-23 03:17:00 +00:00
rillig
43c60c497e make(1): migrate Lst_AtFront to Lst_PrependS
This makes Lst_AtFront unused, as well as LstInsertBefore.
2020-08-22 23:06:51 +00:00