Module Name:    src
Committed By:   riastradh
Date:           Thu Aug 27 18:51:20 UTC 2020

Modified Files:
        src/usr.sbin/npf/npftest/libnpftest: npf_gc_test.c

Log Message:
npftest: Wait at least one tick in each gc busy wait iteration.

Otherwise the busy wait loop runs a little too fast for the gc about
half the times I run the test.

XXX We should really arrange mstohz to round up!


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c
diff -u src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c:1.1 src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c:1.2
--- src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c:1.1	Sat May 30 14:16:57 2020
+++ src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c	Thu Aug 27 18:51:20 2020
@@ -222,7 +222,7 @@ run_worker_tests(npf_t *npf)
 		/* Wait for the task to be done. */
 		while (!atomic_load_acquire(&task_done) && retry--) {
 			npf_worker_signal(test_npf);
-			kpause("gctest", false, mstohz(1), NULL);
+			kpause("gctest", false, MAX(1, mstohz(1)), NULL);
 		}
 
 		CHECK_TRUE(atomic_load_acquire(&task_done));

Reply via email to