[PATCH 2/4] selftests/namespace: fix unintentional skip in ns_active_ref_test.c
From: Yohei Kojima
Date: Sun Apr 05 2026 - 12:55:00 EST
Fix ESTALE from open_by_handle_at() in ns_multiple_children_same_parent
when child processes exit before the parent run it.
Signed-off-by: Yohei Kojima <yk@xxxxxxxxx>
---
tools/testing/selftests/namespaces/ns_active_ref_test.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/namespaces/ns_active_ref_test.c b/tools/testing/selftests/namespaces/ns_active_ref_test.c
index 093268f0efaa..29d96a6e8100 100644
--- a/tools/testing/selftests/namespaces/ns_active_ref_test.c
+++ b/tools/testing/selftests/namespaces/ns_active_ref_test.c
@@ -1193,6 +1193,10 @@ TEST(ns_multiple_children_same_parent)
write(pipefd[1], &c1_id, sizeof(c1_id));
write(pipefd[1], &c2_id, sizeof(c2_id));
close(pipefd[1]);
+
+ /* give parent a time to run open_by_handle_at() */
+ usleep(10000);
+
exit(0);
}
--
2.52.0