359754 |
09-Apr-2020 |
kevans |
MFC -fno-common fixes: r359389, r359394, r359397-r359399, r359403-r359404, r359406, r359413-r359416, r359425, r359427, r359432-r359433, r359443, r359675-r359677
Note: this is not necessarily a complete fix to get these programs to build with -fno-common applied.
r359389: config(8): fixes for -fno-common
Move this handful of definitions into main.c, properly declare these as extern in config.h. This fixes the config(8) build with -fno-common.
Unexplained in my previous commit to gas, -fno-common will become the default in GCC10 and LLVM11, so it's worth addressing these in advance.
r359394: MFV r359393: tcsh: import 6974bc35a5cd
This removes an extra variable definition that causes the -fno-common build to fail, which will be a new default in GCC10/LLVM11.
r359397: zfs: fix -fno-common issues
A similar (or identical?) fix has already landed in OpenZFS.
-fno-common will become the default in GCC10/LLVM11.
r359398: sh: remove duplicate el definition
el is declared extern in myhistedit.h and defined in histedit.c. Remove the duplicate definition in input.c to appease the -fno-common build.
-fno-common will become the default in GCC10/LLVM11.
r359399: telnet: remove some duplicate definitions, mark terminaltype extern
Most of these were already properly declared and defined elsewhere, this is effectively just a minor cleanup that fixes the -fno-common build.
-fno-common will become the default in GCC10/LLVM11.
r359403: Revert 359399: telnet -fno-common bits
There was a large misfire from my local diff that I need to investigate, and this version committed did not build.
r359404: Re-apply r359399: telnet -fno-common fix
line and auth_level's redefinitions are just extraneous
telnetd will #define extern and then include ext.h to allocate storage for all of these extern'd vars; however, two of them are actually defined in libtelnet instead. Instead of doing an #ifdef extern dance around those function pointers, just add an EXTERN macro to make it easier to differentiate by sight which ones will get allocated in globals.c and which ones are defined elsewhere.
r359406: telnet: kill off remaining duplicate definition
r359413: ipfilter: remove duplicate definition of 'thishost'
thishost is already defined in lib/initparse.c; no need for this one. This fixes the ipfilter build with -fno-common.
-fno-common will become the default in GCC10/LLVM11.
r359414: iscontrol: move definition of vflag/iscsidev to iscontrol.c
Mark the declaration extern as these are used elsewhere; this fixes the build with -fno-common.
r359415: userboot: mark host_fsops as extern
This is already defined elsewhere; mark this declaration extern to the fix the -fno-common build.
r359416: systat: remove redundant definition of kd
kd is already properly declared in extern.h and defined in main.c, rendering this definition useless. This fixes the -fno-common build.
r359425: locate: fix -fno-common build
Just a single variable declaration to extern and define elsewhere here, myctype.
-fno-common will become a default in GCC10/LLVM11.
r359427: fsck_ffs/fsdb: fix -fno-common build
This one is also a small list:
- 3x duplicate definition (ufs2_zino, returntosingle, nflag) - 5x 'needs extern', 3/5 of which are referenced in fsdb
-fno-common will become the default in GCC10/LLVM11.
r359432: gdb: compile with -fcommon explicitly
As described in the comment, gdb relies on some of the linker magic that happens with -fcommon. I suspect the life expectancy of gdb-in-base is low enough that this isn't worth spending much time addressing, especially given the vintage. Hit it with the -fcommon hammer so that it continues to just work.
r359433: bmake: fix -fno-common build
debug was declared extern, but debug_file was not; correct this and define debug_file in main.c (as debug is) to fix the -fno-common build.
-fno-common will become the default with GCC10/LLVM11.
r359443: MFV r359442: bmake: import -fno-common fix build back from upstream
sjg@ committed the local patch previously committed upstream; pull it in to vendor/ to ease any potential stress of future imports.
r359675: kqueue tests: fix -fno-common build
vnode_fd and kqfd are both shared among multiple CU; define them exactly once.
In the case of vnode_fd, it was simply the declaration that needed correction.
-fno-common will become the default in GCC10/LLVM11.
r359676: ntpd: fix build with -fno-common
Only a small nit here: psl should be declared extern and defined exactly once.
-fno-common will become the default in GCC10/LLVM11.
r359677: yp*: fix -fno-common build
This is mostly two problems spread out far and wide: - ypldap_process should be declared properly - debug is defined differently in many programs
For the latter, just extern it and define it everywhere that actually needs it. This mostly works out nicely for ^/libexec/ypxfr, which can remove the assignment at the beginning of main in favor of defining it properly.
-fno-common will become the default in GCC10/LLVM11. |
341275 |
30-Nov-2018 |
dab |
MFC r337812,r337814,r337820,r341068:
Fix several memory leaks (r337812 & r337814).
The libkqueue tests have several places that leak memory by using an idiom like:
puts(kevent_to_str(kevp));
Rework to save the pointer returned from kevent_to_str() and then free() it after it has been used.
r337812 also fixed a bug in the netmap kevent code. The inclusion of that fix was an oversight that I didn't notice until this MFC. Reference the code review and PR here in the MFC for completeness.
r337820 & r341068 were white-space only changes as a follow-up to r337812 & r337814:
After r337820, which "corrected" some spaces-instead-of-tab whitespace issues in the libkqueue tests, jmg@ pointed out that these files were originally space-based, not tab-spaced, and so the correction should have been to get rid of the tabs that had been introduced in previous changes, not the spaces. This change does that. This is a whitespace only change; no functional change is intended.
PR: 206053 Differential Revision: https://reviews.freebsd.org/D16531 Sponsored by: Dell EMC Isilon |
337418 |
07-Aug-2018 |
dab |
MFC r336761 & r336781:
Allow a EVFILT_TIMER kevent to be updated.
If a timer is updated (re-added) with a different time period (specified in the .data field of the kevent), the new time period has no effect; the timer will not expire until the original time has elapsed. This violates the documented behavior as the kqueue(2) man page says (in part) "Re-adding an existing event will modify the parameters of the original event, and not result in a duplicate entry."
This modification, adapted from a patch submitted by cem@ to PR214987, fixes the kqueue system to allow updating a timer entry. The kevent timer behavior is changed to:
* When a timer is re-added, update the timer parameters to and re-start the timer using the new parameters. * Allow updating both active and already expired timers. * When the timer has already expired, dequeue any undelivered events and clear the count of expirations.
All of these changes address the original PR and also bring the FreeBSD and macOS kevent timer behaviors into agreement.
A few other changes were made along the way:
* Update the kqueue(2) man page to reflect the new timer behavior. * Fix man page style issues in kqueue(2) diagnosed by igor. * Update the timer libkqueue system test to test for the updated timer behavior. * Fix the (test) libkqueue common.h file so that it includes config.h which defines various HAVE_* feature defines, before the #if tests for such variables in common.h. This enables the use of the actual err(3) family of functions. * Fix the usages of the err(3) functions in the tests for incorrect type of variables. Those were formerly undiagnosed due to the disablement of the err(3) functions (see previous bullet point).
PR: 214987 Relnotes: yes Sponsored by: Dell EMC |
324404 |
07-Oct-2017 |
ngie |
MFC note: tests/sys/kern/coredump_phnum_test.sh changes omitted
MFC r322214:
Make test scripts under tests/... non-executable
Executable bits should be set at install time instead of in the repo. Setting executable bits on files triggers false positives with Phabricator. |
309469 |
03-Dec-2016 |
ngie |
MFC r304797,r305467,r305468,r305483:
r304797 (by jmmv):
Make use of Kyua's work directories.
Change the vnode tests to use the current directory when creating temporary files, which we can assume is a volatile work directory, and then make the kqueue_test.sh driver _not_ abandon the directory created by Kyua.
This makes the various kqueue tests independent of each other, and ensures the temporary file is cleaned up on failure.
Problem spotted by asomers@ when reviewing D4254.
r305467:
Move tests/sys/kqueue/... to tests/sys/kqueue/libkqueue/...
This is being done to clearly distinguish the libkqueue tests from the (soon to be imported) NetBSD tests.
r305468:
Port contrib/netbsd-tests/kernel/kqueue/... as tests/sys/kqueue/...
proc2_test must be skipped because the invariant tested (`ke.fflags & NOTE_TRACKERR`) doesn't pass.
r305483:
Fix tests/sys/kqueue NetBSD tests on 32-bit platforms by using proper format specifier for pointers when printing them out with printf(3)
Pointyhat to: ngie |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
299094 |
04-May-2016 |
ngie |
Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed after r298107
Summary of changes:
- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)
Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info.
MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division
|
298107 |
16-Apr-2016 |
gjb |
Merge the projects/release-pkg branch to head.
This allows packaging the base system with pkg(8), including but not limited to providing the ability to provide upstream binary update possibilities for non-tier-1 architectures.
This merge is a requirement of the 11.0-RELEASE, and as such, thank you to everyone that has tested the project branch.
Documentation in build(7) etc. is still somewhat sparse, but updates to those parts will follow.
Sponsored by: The FreeBSD Foundation
|
296587 |
09-Mar-2016 |
bdrewery |
DIRDEPS_BUILD: Connect MK_TESTS.
Sponsored by: EMC / Isilon Storage Division
|
295786 |
19-Feb-2016 |
markj |
Ensure that we test the event condition when a disabled kevent is enabled.
r274560 modified kqueue_register() to only test the event condition if the corresponding knote is not disabled. However, this check takes place before the EV_ENABLE flag is used to clear the KN_DISABLED flag on the knote, so enabling a previously-disabled kevent would not result in a notification for a triggered event. This change fixes the problem by testing for EV_ENABLED before possibly checking the event condition.
This change also updates a kqueue regression test to exercise this case.
PR: 206368 Reviewed by: kib Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5307
|
295012 |
28-Jan-2016 |
vangyzen |
kqueue EVFILT_PROC: avoid collision between NOTE_CHILD and NOTE_EXIT
NOTE_CHILD and NOTE_EXIT return something in kevent.data: the parent pid (ppid) for NOTE_CHILD and the exit status for NOTE_EXIT. Do not let the two events be combined, since one would overwrite the other's data.
PR: 180385 Submitted by: David A. Bright <david_a_bright@dell.com> Reviewed by: jhb MFC after: 1 month Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D4900
|
288683 |
05-Oct-2015 |
ngie |
Revert r288682
I meant to do this on ^/user/ngie/more-tests
Pointyhat to: ngie (use svn info next time...)
|
282063 |
27-Apr-2015 |
ngie |
Integrate tools/regression/kqueue into the FreeBSD test suite as tests/sys/kqueue
MFC after: 1 week
|
281427 |
11-Apr-2015 |
ngie |
Integrate tools/regression/kqueue into the FreeBSD test suite as tests/sys/kqueue
|
281414 |
11-Apr-2015 |
ngie |
Integrate more tests into the FreeBSD test suite from tools/regression, etc
|
264400 |
13-Apr-2014 |
imp |
NO_MAN= has been deprecated in favor of MAN= for some time, go ahead and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit.
|
223865 |
08-Jul-2011 |
jonathan |
Clarify the meaning of a test.
Rather than using err() if either of two failure conditions fires (which can produce spurious error messages), just use errx() if the one condition that really matters fires.
In practice, this single test is enough to detect the failure mode we're looking for (kqueue being inherited across fork).
Approved by: mentor (rwatson), re (Capsicum blanket) Sponsored by: Google Inc
|
223845 |
07-Jul-2011 |
jonathan |
Ensure that kqueue is not inherited across fork().
Modify the existing unit test (from libkqueue) which already exercises process events via fork() and kill(). Now, the child process simply checks that the 'kqfd' descriptor is invalid.
Some minor modifications were required to make err() work correctly. It seems that this test was imported using the output of a configure script, but config.h was not included in key places, nor was its syntax correct (need '#define HAVE_FOO 1' rather than '#define HAVE_FOO').
Finally, change main() to run the "proc" suite by default, but widened the '#if TODO' in proc.c to include the non-functioning test event_trigger().
Approved by: mentor (rwatson), re (Capsicum blanket) Sponsored by: Google Inc
|
204585 |
02-Mar-2010 |
uqs |
Always assign WARNS using ?=
- fix some nearby style bugs - include Makefile.inc where it makes sense and reduces duplication
Approved by: ed (co-mentor)
|
200573 |
15-Dec-2009 |
rwatson |
Merge libkqueue test suite through r119
Submitted by: Mark Heily <mark@heily.com>
|
200483 |
13-Dec-2009 |
rwatson |
Add Mark Heily's libkqueue test suite as a general kqueue test suite to tools/regression. It tests a number of aspects of kqueue behavior, although not all currently pass (possibly bugs in the test suite?).
Submitted by: Mark Heily <mark at heily.com> Obtained from: svn://mark.heily.com/libkqueue/trunk/test (r114)
|