summaryrefslogtreecommitdiff
path: root/tests/lib
AgeCommit message (Collapse)Author
2023-07-08clock_gettime(2): Fix CLOCK_PROCESS/THREAD_CPUTIME_ID.riastradh
Use same calculation as getrusage, not some ad-hoc arithmetic of internal scheduler parameters that are periodically rewound. PR kern/57512 XXX pullup-8 XXX pullup-9 XXX pullup-10
2023-07-08t_timerfd: Sprinkle slightly more diagnostics.riastradh
Might help us to see if we're off by just a little bit (maybe a tiny jitter between the hardclock timer and the monotonic clock), or if something is seriously amiss when the timerfd_block test fails sporadically.
2023-07-08t_clock_gettime: Add test for PR kern/57512.riastradh
2023-07-06t_sig_backtrace: Flush stdout before writing to STDOUT_FILENO.riastradh
Avoids confusing ordering of output.
2023-07-05t_posix_memalign: Simplify.riastradh
No functional change intended.
2023-07-05t_posix_memalign: Fix this to reflect restriction lifted in C17.riastradh
2023-07-04t_posix_memalign: Expand test cases and properties.riastradh
- Test cartesian product of a sampling of sizes and a sampling of alignments. - Verify all the edge cases I could find in posix_memalign and aligned_alloc, including failure modes. - Test an unreasonably large (but aligned) allocation size. - Use ATF_CHECK_* instead of ATF_REQUIRE_* so all failures will be reported, not just the first one. - While here, build with -fno-builtin-aligned_alloc and with -fno-builtin-posix_memalign to make sure the compiler doesn't try any shenanigans. XXX pullup-10
2023-06-03bsd.own.mk: rename GCC_NO_* to CC_WNO_*lukem
Rename compiler-warning-disable variables from GCC_NO_warning to CC_WNO_warning where warning is the full warning name as used by the compiler. GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH Using the convention CC_compilerflag, where compilerflag is based on the full compiler flag name.
2023-06-03bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBERlukem
Provide a single variable CC_WNO_ADDRESS_OF_PACKED_MEMBER with options for both clang and gcc, to replace CLANG_NO_ADDR_OF_PACKED_MEMBER CC_NO_ADDR_OF_PACKED_MEMBER GCC_NO_ADDR_OF_PACKED_MEMBER Using the convention CC_compilerflag, where compilerflag is based on the full compiler flag name.
2023-06-02follow the steps of Andrew Doran (ad) commit and fix more s/loose/lose/ typos.andvar
also s/beyound/beyond/ and few others along the way, mainly in comments.
2023-05-28Add RUMPHIJACK option "blanket=/DEV" so mount_ffs may canonicalisehannken
and mount the device path. Cannot use "/rump/DEV" here as the device path is embedded in "struct ufs_args" where it doesnt get hijacked.
2023-05-24no more md5 for you.christos
2023-05-17t_ptm.c: add a test case that passes extra flagsgutteridge
Validate that O_NONBLOCK and O_CLOEXEC are actually set by posix_openpt(3), as until circa 9.99.101 they were not. If/when other flags are added like close-on-fork, this test could be adjusted. The current concern is with supporting the expectations of components like vte3, used by various graphical terminal clients.
2023-05-10t_getopt.sh: fix naming of head() of getopt_optval test casegutteridge
2023-05-07RISC-V support that works on QEMU with a single hart.skrll
Thanks for Simon Burge for plic(4).
2023-04-04Fix the test for "inf" output, also include newline in printf format...he
2023-04-04Add a test for PR/57250 from Havard Eidneschristos
2023-03-20Adjust pc/npc before syscall allowing EJUSTRETURN to returnhannken
to the next instruction. Only ERESTART should return to the same instruction. Differences to sparc64 reduced. Test t_ptrace_wait:syscallemu1 now passes on sparc. Fixes PR kern/52166 "syscallemu does not work on sparc (32-bit)" Ok: Martin Husemann
2023-02-20New optval test from des @ FreeBSDchristos
2023-01-30PR/57205: Dag-Erling Smørgrav: Add tests strchrnul(3), fix strchr pastochristos
from strlen.
2022-12-28swab(3): Rewrite this to be understandable.riastradh
And make the tests work, and exercise all lengths up to 100. Evidently the previous definition, presumably tightly optimized for 1980s-era compilers and CPUs, was too hard to understand, because it was incorrectly tested for two decades and broken for years. PR lib/57141 XXX pullup-8 XXX pullup-9 XXX pullup-10
2022-12-21adapt mbstowcs_basic test for unicode table updatewiz
reformat so it's easier to find which result data belongs to which input
2022-12-11This test makes (made) a false assumption about the way thatkre
process scheduling works. That a process (or in this case, a thread) is no longer blocked at time T does not mean that it will resume execution at time T. The OS is free to devote resources to other processes/threads instead - all we should normally be able to expect is that if it is not unblocked before time T, that it will not start running before then. In general though, the pthread_cond_*wait() functions don't guarantee even that - but for this test, the possibility of something else randomly signalling the condvar isn't believable, so don't worry about that possibility (but do fail without calling strerror(0) on the off chance it does happen). Once we cease testing that the process resumed running before some particular time, we can stop dealing with qemu timekeeping issues, it might (seem to) take qemu twice as long as was requested before the thread resumes, but that's OK - the same thing could happen on a loaded system for other reasons. Beyond that, the test also has (had) a race condition. When using CLOCK_REALTIME though that clock needed to have advanced to T before the ETIMEDOUT should happen, there is no guarantee that it will stay >T (CLOCK_REALTIME is allowed to be reset backwards). So, only test that the current time (after ETIMEDOUT) >= T when we're using CLOCK_MONOTONIC - for CLOCK_REALTIME the time might have stepped back between when the ETIMEDOUT happened and when the thread obtains the current clock reading. For that case, all we can test is that the ETIMEDOUT actually happens. With much of what was there now gone, the code can be simplified, we no longer need to do timespec arithmetic, just one comparison (simpler to test that Tend >= Tstart+period than Tend-Tstart > period as we need Tstart+period for the abstime value for the timeout anyway). Note that this still tests for the issue reported in PR lib/47703 which is where the test came from in the first place. ps: we seem to be missing pthread_cond_clockwait() which is the same as pthread_cond_timedwait() except that the clock to use is passed as a parameter, rather than as an attribute of the condition variable.
2022-12-05Update check files due to reversion of a libcurses change.blymn
2022-12-04allow testing of files other than those in /etcjschauma
To test e.g., the file "/some/where/protocols" instead of "/etc/protocols", set TEST_FILE=/some/where/protocols in your environment. Note: this now compares the contents of the file you gave versus what getprotoent(3)/getservent(3) uses (which still is /etc/protocols via h_protoent.c / /etc/services or /var/db/services.cdb via h_servent.c). When you have expected changes in the services or protocols file that you're generating, this necessarily produces a difference. To really allow testing the file versus what the library function returns, you'd have to install the file on the system running the test, but at least with this change you can now generate the file and verify that it didn't caused unexpected differences.
2022-12-04whitespacejschauma
2022-11-30Update the check files due to bug fix in libcurses.blymn
2022-11-28whoops, we don't want an extra space herejschauma
(erroneously introduced in my previous commit)
2022-11-28whitespacejschauma
2022-11-23fix vaxchristos
2022-11-22Sync style between Lua script and C source code.rin
Fix false positive for some tests.
2022-11-21lua libm API from Phil Rulonchristos
2022-11-10Uncomment the waddstr call that was returning ERR, this is actuallyblymn
correct so make the expected return ERR then repeat the call with scrollok set to true to validate. Do refreshes on the window instead of stdscr so we get the window contents reported and update the check files with the expected output.
2022-11-08* Uncomment the slk_wset test which was previously commented out dueblymn
to incorrect output as this bug has been fixed. * Added a check file to verify the slk_wset output.
2022-11-07Sync with if_dl.h rev. 1.31's change.msaitoh
2022-11-04Update check files to allow for changes due to fixes to libcurses.blymn
2022-10-27Revert for if_dl.h's change.msaitoh
2022-10-24Sync with if_dl.h rev. 1.29's change.msaitoh
2022-10-19Updates to account for changes resulting from fixes to libcurses.blymn
2022-10-06add tests for PR/57046.ryo
2022-08-27Add sincos{,f,l} from FreeBSDchristos
2022-08-12membar(3): Fix t_spinlock for machines with hash-locked atomics.riastradh
Regular stores don't participate in the hash-locking scheme, so use atomic_swap instead of a regular store here.
2022-08-01Provide _GNU_SOURCE for t_clone now that is required to make clone()kre
visible.
2022-07-25t_sig_backtrace: Pacify vfork clobber warning with volatile.riastradh
2022-07-25execinfo(3): Mark sig_backtrace_jump test as xfail.riastradh
PR lib/56940
2022-07-25execinfo: Fix mistake in previous: match `the_loop*' as prefix.riastradh
Now that there are two functions we need to catch either one.
2022-07-25execinfo: Test stack traces through null pointer jump too.riastradh
2022-07-18Make kqueue event status for vnodes shareable, and for stacked file systemsthorpej
like nullfs, make the upper vnode share that status with the lower vnode. And, lo, NetBSD 9.99.99. Fixes PR kern/56713.
2022-06-22test: fix typo and improve wordingwiz
2022-06-21Support ifunc on aarch64. The tests pass at least.skrll