Commit Graph

280205 Commits

Author SHA1 Message Date
rillig
faae3ee83c make(1): fix the :u modifier, which was broken for almost a day
Big thanks go to sjg, who discovered the bug and did the main work to
track it down.

In the unit tests for the :u modifier from the previous commit, I had
forgotten to actually add the :u modifier at the end.  I added it now
and also added a few other tests.  It's better to have a few more tests
than too few.
2020-08-31 17:41:38 +00:00
rillig
c119b05bf3 make(1): add test for the currently broken :u variable modifier
The :u modifier had been broken in var.c 1.479 from 2020.08.30.19.56.02.
The code that implements the :u modifier was well-covered in the unit
tests, except for the single line that actually deals with adjacent
duplicate words.

The "refactoring" commit that replaced brk_string with Str_Words had not
taken into account that the number of words (in ac) had to be passed to
WordList_JoinFree.  Instead, the number of words was always preserved,
and the words at the end were therefore duplicated in the result.

The fix for this bug will be in the follow-up commit.
2020-08-31 17:32:13 +00:00
rillig
28423acec1 make(1): document the purpose of the test variants 2020-08-31 17:25:29 +00:00
rillig
93031f070d make(1): add test driver for different build options
This program's purpose is to reduce the build failures of the whole
build.sh just because one of the many possible configurations fails.
2020-08-31 16:51:17 +00:00
rillig
490b9ed0a1 make(1): fix compilation for -DNDEBUG and -O3
The -O3 option of GCC 5.5 is unsure about whether s and t are always
defined, since SuffParseTransform only defines them if it returns TRUE.

Therefore assert that it does.  When compiled with -NDEBUG, this would
result in an unused variable, therefore use it using the well-known
cast-to-void pattern.
2020-08-31 16:44:25 +00:00
rillig
38e9e4c9c6 make(1): improve documentation for Buffer fields 2020-08-31 16:42:10 +00:00
rillig
1b001ba380 make(1): fix compilation with GCC 8 2020-08-31 16:41:19 +00:00
sjg
95f6f1e60d Add test case for FLAGS dependent on .TARGET 2020-08-31 16:20:00 +00:00
christos
ac669aab65 Unlike done() childwait() returns, found by clang. 2020-08-31 15:32:15 +00:00
msaitoh
8a46808207 Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional change. 2020-08-31 14:12:50 +00:00
martin
fb1355a7bc Skip timeout tests, pointing to PR 55632. 2020-08-31 14:03:56 +00:00
bouyer
6e9b47ae29 Add back <xen/xenio3.h>, it's needed by xentools413 2020-08-31 11:32:01 +00:00
msaitoh
167aba13e5 If an SFP+ module is not inserted, don't try to access SFP+ EEPROM.
This change eliminate long timeout.

 Reduce code duplication using with ixgbe_sfp_cage_full(hw).
2020-08-31 11:19:54 +00:00
rillig
90a952c9c5 make(1): fix copy-and-paste mistake for compiling with GCC10 2020-08-31 06:44:12 +00:00
msaitoh
5f74388146 Fix typo in comment. 2020-08-31 06:23:19 +00:00
rillig
e0ec26a690 make(1): parenthesize macro arguments
Just in case anyone wants to use them for copy-and-paste.

The invocations of these macros are left cautious since the
system-provided definition of these macros may have forgotten the
parentheses as well.
2020-08-31 06:21:07 +00:00
msaitoh
148c2fef57 Fix 82598 SFP+ problems.
On 82598, SFP+'s MOD_ABS isn't connected to the MAC's GPIO pin, so we can't
call ixgbe_sfp_cage_full(). Always issue TASK_MOD from ixgbe_handle_timer()
on 82598.

 Fix ixgbe_identify_sfp_module_generic() for ixgbe_phy_nl. In the driver,
hw->phy.type sometimes be compared with ixgbe_phy_nl.
In ixgbe_identify_sfp_module_generic(), hw->phy.type may be overridden with
another value. For ixgbe_phy_nl, some code don't override phy.type but others
were not. Make it consistently keep ixgbe_phy_nl. This change fixes a problem
that ixgbe_is_sfp() change the return value true to false when any SFP+
devices are connected to the cage on 82598 and never recover from it.

 Don't schedule MSF(multi speed fiber) task from ixgbe_handle_mod() on 82598.
This task is only for devices which support multi speed fiber and 82598
doesn't support it. Before ixgbe.c rev. 1.237, ixgbe_handle_mod() isn't
called on 82598 because 82598 has no SFP+ module insertion/removal interrupt.
ixgbe.c rev. 1.237 changed to call the function via timer on 82598.
This change fixes a bug that 82598 DA interface's link flaps.
2020-08-31 06:20:06 +00:00
rillig
52ac672935 make(1): fix unbalanced Lst_Open/Lst_Close in SuffFindCmds
This bug had been there since the initial import of make, on 1993-03-21.
It just never broke the build because of the missing assertion.

https://mail-index.netbsd.org/tech-toolchain/2020/08/30/msg003847.html

The error message "cd: can't cd to include" that I got when I first
applied the fix was unrelated.  It was caused by an extra directory
"include" in src/tools/compat that didn't belong there.  With that
directory removed, running "./build.sh -j8 tools" succeeds as expected.
2020-08-31 05:56:02 +00:00
rillig
eddd7f4268 make(1): fix comment for Lst_Destroy 2020-08-30 21:20:06 +00:00
christos
5cba22b413 include bsd.init.mk to avoid:
make: Bad conditional expression ` != "no"' in  != "no"? -DINET6 :
2020-08-30 21:12:45 +00:00
wiz
12b01adf5d Mark up path with Pa and use Ev for environment variable. 2020-08-30 20:14:07 +00:00
rillig
dcafa71348 make(1): remove unreachable code from CompatRunCommand
At the point where Str_Words is called, the string contains no
meta-characters.  This means that the parameter "expand" in Str_Words is
never looked at.  This in turn means that this parameter can be set to
FALSE, thereby making it impossible that Str_Words returns NULL.
2020-08-30 20:08:47 +00:00
rillig
5dd250059b make(1): replace brk_string with Str_Words
The API is much simpler, and there is less detail that is exposed by
default and fewer punctuation to type on the caller's side.  To see that
there is some memory to be freed, one would have to look into the
struct.  Having part of the return value as the actual return value and
the rest in output parameters was unnecessarily asymmetrical.
2020-08-30 19:56:02 +00:00
kre
8ad9ebd911 Since "struct job" gained a pgrp member some time ago now, use it
instead of simply assuming that the pid of the first (leftmost) process
in a pipeline is the pgrp - someday we may switch things around and
create pipelines right to left instead, which has several advantages,
but which would invalidate the assumption which was being made here.
2020-08-30 19:45:05 +00:00
kre
538f77560c Note that negative pid args are permitted (indicating to send to the pgrp
abs(pid)) and indicate that -- is (strictly) needed if the first pid arg
(there often is only one) is negative - though this implementation works
without it if a signal to send has been explicitly given, but whereas
'kill 1234" is valid (send SIGTERM to pid 1234) "kill -1234" will generate
a usage error from the attempt to send signal 1234 to nothing, to send
SIGTERM to pgrp 1234 it needs to be "kill -- -1234" (or "kill -s term -1234").

While here do a couple of markup improvements, and allow for the
possibility that users might be running the builtin kill from some
shell other than csh or sh.
2020-08-30 19:41:39 +00:00
kre
4d4d16423c Every integer that fits within a pid_t is a potential "pid" arg to kill.
That means we cannot use (pid_t)-1 as an error indicator, as that's a
valid pid to use (described as working in kill(1) - yet it wasn't working
in /bin/kill (nor sh's builtin kill, which is essentially the same code).
This is even required to work by POSIX.

So change processnum() (the parser/validator for the pid args) to take
a pointer to a pid_t and return the pid that way, leaving the return value
of the (now int) function to indicate just ok/error.  While here, fix
the validation a little ('' is no longer an accepted alias for 0) and in
case of an error from kill(2) have the error message indicate whether the
kill was targeted at a pid of a pgrp.
2020-08-30 19:35:09 +00:00
rillig
1465c374a8 make(1): add debug macros to suff.c
This reduces the visual space that the debugging statements need.
2020-08-30 18:26:41 +00:00
thorpej
f73bd5175e When initializing the PROM interface, check to see if we're running
inside Qemu by consulting the system serial number, and quickly abort
calls into the PROM if we are.

This is a temporary measure until I can figure out why calling into
the Qemu PROM interface blows up.
2020-08-30 16:26:56 +00:00
kre
075741c09c Use the POSIX specified format if POSIXLY_CORRECT is set in the
environment, rather than the nicer layout that is normally used.

Note this applies to /bin/kill only, the builtin kill in sh uses its
"posix" option for the same purpose, the one in csh only ever uses
POSIX format.
2020-08-30 16:10:40 +00:00
rillig
75c5a5daf7 make(1): extend test for .ifmake and .MAKEFLAGS 2020-08-30 14:25:45 +00:00
rillig
f8cb0fda82 make(1): rename GNode.iParents to implicitParents
The i alone was too ambiguous.  It could have meant ignore, implicit,
interactive, and probably many more.
2020-08-30 14:11:42 +00:00
rillig
2b7542e41b make(1): remove ineffective malloc_options variable
According to jemalloc(3), the variable must be called _malloc_options,
with a leading underscore, to have an effect.

Renaming the variable indeed enables the option.  There's not much point
having this variable around though, since it neither detects a trivial
double-free nor freeing an invalid pointer in the following code
snippet:

	char *asdf = bmake_malloc(10);
	fprintf(stderr, "%c\n", *asdf);
	free(asdf + 8);
	free(asdf);
	free(asdf);
	exit(1);

Instead, it just crashes with a segmentation fault.
2020-08-30 13:53:02 +00:00
dholland
f4a1f58587 typo in comment 2020-08-30 11:16:17 +00:00
rillig
eb0c83b502 make(1): rename Lst_Datum to LstNode_Datum 2020-08-30 11:15:05 +00:00
rillig
2d4a05ee59 make(1): rename Lst_Memeber to Lst_FindDatum
The new name nicely aligns with Lst_Find and Lst_FindFrom.
2020-08-30 11:12:05 +00:00
skrll
c0fe0ae21d Add some debug options to help find why the automated tests are failing.
XXX turn off on release branch
2020-08-30 07:09:02 +00:00
skrll
41655ae023 Trailing whitespace 2020-08-30 07:08:13 +00:00
mrg
48bad64f01 install dmxproto.pc and dpmsproto.pc 2020-08-30 04:51:03 +00:00
macallan
63d26f4e1f make us.apple the default USB keyboard layout 2020-08-29 23:00:10 +00:00
thorpej
a63d213ab6 G/C GET_IDLE_PCB -- it hasn't been used for some time. 2020-08-29 22:50:27 +00:00
macallan
1035fefe6e provide KB_APPLE layout variant which uses Command-F* to switch console screens
mostly for consistent behaviour across *Books which may have ADB or USB
keyboards
2020-08-29 22:42:53 +00:00
macallan
f905729269 properly map left Command to Meta_L and left Option to Alt_L
Mostly for correctness, should help non-US layouts
2020-08-29 22:33:53 +00:00
uwe
9158e53999 Minor wording tweaks from Dan Plassche. 2020-08-29 21:42:25 +00:00
rillig
31e761ac2c make(1): use loops instead of Lst_ForEach for propagating to cohorts
For one-liners, Lst_ForEach creates a lot of overhead, both at runtime
and for reading and understanding the code.

In this simple case where the structure of the traversed nodes is not
modified, a simple loop is enough.  This avoids a lot of conversions to
void * and thus prevents type mistakes.
2020-08-29 20:20:44 +00:00
thorpej
b0669daa38 Bump UBC_WINSHIFT to 16 (64KB), and UBC_NWINS to 4096 (256MB total).
Alpha has plenty of KVA to use for this.
2020-08-29 20:08:08 +00:00
thorpej
13c5b655f2 - Centralize per-CPU pmap initialization into a new pmap_init_cpu()
function.  Call in from pmap_bootstrap() for the boot CPU, and
  from cpu_hatch() for secondaary CPUs.
- Eliminiate the dedicated I-stream memory barrier IPI; handle it all from
  the TLB shootdown IPI.  Const poison, and add some additional memory
  barriers and a TBIA to the PAUSE IPI.
- Completly rewrite TLB management in the alpha pmap module, borrowing
  somoe ideas from the x86 pmap and adapting them to the alpha environment.
  See the comments for theory of operation.  Add a bunch of stats that
  can be reported (disabled by default).
- Add some additional symbol decorations to improve cache behavior on
  MP systems.  Ensure coherency unit alignment for several structures
  in the pmap module.  Use hashed locks for pmap structures.
- Start out all new processes on the kernel page tables until their
  first trip though pmap_activate() to avoid the potential of polluting
  the current ASN in TLB with cross-process mappings.
2020-08-29 20:06:59 +00:00
rillig
f52782ac02 make(1): fix sh-dots test
The exact output depends on the shell.  Some shells prefix the error
message with their name, some don't.
2020-08-29 19:35:38 +00:00
christos
0a22125dca Make the "interesting" flags match the netstat ones, so:
route show -inet
    netstat -r -f inet

outputs match.
2020-08-29 19:28:32 +00:00
christos
ce43f29fa9 Instead of defining RTF_LLINFO, use RTF_LLDATA 2020-08-29 19:27:40 +00:00
christos
ad93f4b708 Document 'L' 2020-08-29 19:27:08 +00:00