Module Name: src Committed By: rillig Date: Sat Jan 18 22:31:23 UTC 2025
Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.tests src/tests/usr.bin: Makefile Added Files: src/tests/usr.bin/gcov: Makefile t_gcov.sh Log Message: tests/gcov: demonstrate wrong coverage report after vfork/exec Discovered in usr.bin/make, function Cmd_Exec. The coverage test I ran on 2024-07-13 was still good. I don't remember the exact version of NetBSD-current I was running back then. With NetBSD-current from 2025-01-17, gcov does not report full coverage data after a vfork/exec call. Running the test program inside ktrace shows that after a vfork call, the child process writes its coverage data back, probably right before the exec call, but the parent process doesn't. Running a child process through system(3) is not affected; there, posix_spawn is used instead of vfork/exec. To generate a diff of this commit: cvs rdiff -u -r1.1356 -r1.1357 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.209 -r1.210 src/etc/mtree/NetBSD.dist.tests cvs rdiff -u -r1.42 -r1.43 src/tests/usr.bin/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/gcov/Makefile \ src/tests/usr.bin/gcov/t_gcov.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.