resolv_test: Fix racy exit check, remove mutexes, and reduce outputInstead of polling nleft[i] (without appropriate memory barriers!) andusing sleep() to detect the exit just call pthread_join() o
resolv_test: Fix racy exit check, remove mutexes, and reduce outputInstead of polling nleft[i] (without appropriate memory barriers!) andusing sleep() to detect the exit just call pthread_join() on all threads.Also replace the use of a mutex that guarding the increments with atomicfetch_add. This should reduce the runtime of this test on SMP systems.Finally, remove all the debug printfs unless DEBUG_OUTPUT is set inthe environment.Test Plan: still fails sometimes on qemu (but maybe less often?)Reviewed By: jhbDifferential Revision: https://reviews.freebsd.org/D29390(cherry picked from commit 85425bdc5a80c948f99aa046f9c48512466806dd)
show more ...
libc/resolv: attempt to fix the test under WARNS=6In a side-change that I'm working on to start defaulting src builds toWARNS=6 where WARNS isn't otherwise specified, GCC6 (and clang, to a lesser
libc/resolv: attempt to fix the test under WARNS=6In a side-change that I'm working on to start defaulting src builds toWARNS=6 where WARNS isn't otherwise specified, GCC6 (and clang, to a lesserextent) pointed out a number of issues with the resolv tests:- Global method variable that gets shadowed in run_tests()- Signed/unsigned comparison between i in run_tests() and hosts->sl_curThe shadowed variable looks like it might actually be bogus as written, aswe pass it to RUN_TESTS -> run_tests, but other parts use the global methodinstead. This change is mainly geared towards correcting that by removingthe global and plumbing the method through from run_tests -> run into thenew thread.For the signed/unsigned comparison, there's no compelling reason to not justswitch i/nthreads/nhosts to size_t.The review also included a change to the load() function that was betteraddressed by jhb in r365302.Reviewed by: ngie, pstefMFC after: 1 weekDifferential Revision: https://reviews.freebsd.org/D24844
Various fixes to the load() function.- Use getline() instead of fgetln(). This ensures the returned string is always null-terminated without losing the last character if the last line in a fil
Various fixes to the load() function.- Use getline() instead of fgetln(). This ensures the returned string is always null-terminated without losing the last character if the last line in a file doesn't have a newline. Also, while fgetln says the returned buffer can be modified, that doesn't actually seem safe as the current implementation means you are modifying stdio's internal buffer.- Remove a spurious if before an ATF_REQUIRE that was clearly supposed to be non-optional.- Remove a pointless compare of 'ptr' against '\0' (really NULL) that duplicated the middle condition in the for().- Once a comment is found, skip the rest of the line, not just the current word.Reviewed by: kevansObtained from: CheriBSDSponsored by: DARPADifferential Revision: https://reviews.freebsd.org/D26278
Fix a buffer overrun.getln() returns 'len' valid characters. line[len] is out of bounds.Reported by: CHERIReviewed by: brooksObtained from: CheriBSDMFC after: 2 weeksSponsored by: DARPADiff
Fix a buffer overrun.getln() returns 'len' valid characters. line[len] is out of bounds.Reported by: CHERIReviewed by: brooksObtained from: CheriBSDMFC after: 2 weeksSponsored by: DARPADifferential Revision: https://reviews.freebsd.org/D26197
DIRDEPS_BUILD: Update dependencies.Sponsored by: Dell EMC Isilon
Increase timeout from 10 minutes to 20 minutes for all testsOn particular slow networks, it can (on average) take longer toresolve hosts to IP* addresses. 20 minutes seemed reasonable formy work
Increase timeout from 10 minutes to 20 minutes for all testsOn particular slow networks, it can (on average) take longer toresolve hosts to IP* addresses. 20 minutes seemed reasonable formy work networkThis will be solved in a more meaningful way (if possible) usingconcurrency in the near futureMFC after: 2 weeksSponsored by: EMC / Isilon Storage Division
Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedafter r298107Summary of changes:- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that na
Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedafter r298107Summary 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 examplesso it's clear that ${PACKAGES}FILES is the suggested way forward in terms ofreplacing FILES. share/mk/bsd.README didn't seem like the appropriate methodof communicating that info.MFC after: never probablyX-MFC with: r298107PR: 209114Relnotes: yesTested with: buildworld, installworld, checkworld; buildworld, packageworldSponsored by: EMC / Isilon Storage Division
DIRDEPS_BUILD: Connect MK_TESTS.Sponsored by: EMC / Isilon Storage Division
Avoid adding the '-release' suffix to non-debug kernel packages.Sponsored by: The FreeBSD Foundation
Increase the timeout for resolv_test from the default (300 seconds) to450 secondsThis is required on slower network connections, and on older releases(stable/10 seems to be slower as far as name
Increase the timeout for resolv_test from the default (300 seconds) to450 secondsThis is required on slower network connections, and on older releases(stable/10 seems to be slower as far as name resolution goes.. not surewhy yet).Remove an outdated comment in the Makefile from when I was working onthis code over a year ago on githubMFC after: 1 weekSponsored by: EMC / Isilon Storage Division
Add Makefile accidentally missed in r292317MFC after: 1 weekX-MFC with: r292317Sponsored by: EMC / Isilon Storage Division
Integrate tools/regression/lib/libc/resolv into the FreeBSD test suite aslib/libc/tests/resolvConvert the testcases to ATFMFC after: 1 weekSponsored by: EMC / Isilon Storage Division