aboutsummaryrefslogtreecommitdiff
path: root/tests/sys/netmap/ctrl-api-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sys/netmap/ctrl-api-test.c')
-rw-r--r--tests/sys/netmap/ctrl-api-test.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/sys/netmap/ctrl-api-test.c b/tests/sys/netmap/ctrl-api-test.c
index 8d33b4c58d2a..6b45dbb1cfea 100644
--- a/tests/sys/netmap/ctrl-api-test.c
+++ b/tests/sys/netmap/ctrl-api-test.c
@@ -1596,6 +1596,7 @@ sync_kloop_csb_enable(struct TestContext *ctx)
return sync_kloop_start_stop(ctx);
}
+#if 0
static int
sync_kloop_conflict(struct TestContext *ctx)
{
@@ -1640,6 +1641,14 @@ sync_kloop_conflict(struct TestContext *ctx)
/* Wait for one of the two threads to fail to start the kloop, to
* avoid a race condition where th1 starts the loop and stops,
* and after that th2 starts the loop successfully. */
+ /*
+ * XXX: This doesn't fully close the race. th2 might fail to
+ * start executing since th1 can enter the kernel and hog the
+ * CPU on a single-CPU system until the semaphore timeout
+ * awakens this thread and it calls sync_kloop_stop. Once th1
+ * exits the kernel, th2 can finally run and will then loop
+ * forever in the ioctl handler.
+ */
clock_gettime(CLOCK_REALTIME, &to);
to.tv_sec += 2;
ret = sem_timedwait(&sem, &to);
@@ -1674,6 +1683,7 @@ sync_kloop_conflict(struct TestContext *ctx)
? 0
: -1;
}
+#endif
static int
sync_kloop_eventfds_mismatch(struct TestContext *ctx)
@@ -2079,7 +2089,9 @@ static struct mytest tests[] = {
decltest(sync_kloop_eventfds_all_direct_rx),
decltest(sync_kloop_nocsb),
decltest(sync_kloop_csb_enable),
+#if 0
decltest(sync_kloop_conflict),
+#endif
decltest(sync_kloop_eventfds_mismatch),
decltest(null_port),
decltest(null_port_all_zero),