All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] mountns01: wait for umount completed in thread_b
@ 2022-07-07  9:38 Li Wang
  2022-07-07 10:02 ` xuyang2018.jy
  2022-07-08  1:40 ` xuyang2018.jy
  0 siblings, 2 replies; 3+ messages in thread
From: Li Wang @ 2022-07-07  9:38 UTC (permalink / raw)
  To: ltp

To get rid of race condition (occurs with umount_folders):

    mountns01.c:42: TPASS: shared mount in parent passed
    mountns01.c:83: TPASS: shared mount in child passed
    tst_device.c:394: TWARN: umount('B') failed with EINVAL
    mountns.h:39: TWARN: umount(B) failed: EINVAL (22)

Signed-off-by: Li Wang <liwang@redhat.com>
---
 testcases/kernel/containers/mountns/mountns01.c | 2 ++
 testcases/kernel/containers/mountns/mountns02.c | 2 ++
 testcases/kernel/containers/mountns/mountns03.c | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/testcases/kernel/containers/mountns/mountns01.c b/testcases/kernel/containers/mountns/mountns01.c
index 452fe1d10..3e9c22ce3 100644
--- a/testcases/kernel/containers/mountns/mountns01.c
+++ b/testcases/kernel/containers/mountns/mountns01.c
@@ -86,6 +86,8 @@ static void run(void)
 
 	TST_CHECKPOINT_WAKE(0);
 
+	SAFE_WAIT(NULL);
+
 	SAFE_UMOUNT(DIRA);
 }
 
diff --git a/testcases/kernel/containers/mountns/mountns02.c b/testcases/kernel/containers/mountns/mountns02.c
index cbd435958..4ef1a61b8 100644
--- a/testcases/kernel/containers/mountns/mountns02.c
+++ b/testcases/kernel/containers/mountns/mountns02.c
@@ -87,6 +87,8 @@ static void run(void)
 
 	TST_CHECKPOINT_WAKE(0);
 
+	SAFE_WAIT(NULL);
+
 	SAFE_UMOUNT(DIRA);
 }
 
diff --git a/testcases/kernel/containers/mountns/mountns03.c b/testcases/kernel/containers/mountns/mountns03.c
index 5c19a96a9..0d8b86f9d 100644
--- a/testcases/kernel/containers/mountns/mountns03.c
+++ b/testcases/kernel/containers/mountns/mountns03.c
@@ -97,6 +97,8 @@ static void run(void)
 
 	TST_CHECKPOINT_WAKE(0);
 
+	SAFE_WAIT(NULL);
+
 	SAFE_UMOUNT(DIRA);
 }
 
-- 
2.35.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-08  1:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-07  9:38 [LTP] [PATCH] mountns01: wait for umount completed in thread_b Li Wang
2022-07-07 10:02 ` xuyang2018.jy
2022-07-08  1:40 ` xuyang2018.jy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.