Module Name: src Committed By: kamil Date: Thu Apr 4 10:53:20 UTC 2019
Modified Files: src/tests/modules: t_kcov.c Log Message: Fix flaky check for the /dev/kcov device in t_kcov Add a top-level check for the KCOV device, instead of deferring it ot each thread. The thread-based solution was flaky. PR kern/54064 by Andreas Gustafsson To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/modules/t_kcov.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/modules/t_kcov.c diff -u src/tests/modules/t_kcov.c:1.8 src/tests/modules/t_kcov.c:1.9 --- src/tests/modules/t_kcov.c:1.8 Sun Mar 10 22:34:14 2019 +++ src/tests/modules/t_kcov.c Thu Apr 4 10:53:20 2019 @@ -514,6 +514,14 @@ kcov_multiple_threads(size_t N) { pthread_t thread[32]; size_t i; + int fd; + + /* + * Check if /dev/kcov is available, if not bail out. + * Verifying it on a per-thread basis is flaky. + */ + fd = open_kcov(); + ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(__arraycount(thread) >= N);