[LTP] [RFC PATCH 1/8] lib/tst_test.c: mntpoint implies tmpdir

Cyril Hrubis chrubis@suse.cz
Thu Apr 5 16:01:47 CEST 2018


If mntpoint is set in the test structure we create a directory hence it
should set needs_tmpdir flag so that we are sure we create directory in
the right place.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 lib/tst_test.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/tst_test.c b/lib/tst_test.c
index 8be13327c..5e10460b0 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -743,6 +743,9 @@ static void do_setup(int argc, char *argv[])
 	if (tst_test->all_filesystems)
 		tst_test->needs_device = 1;
 
+	if (tst_test->mntpoint)
+		tst_test->needs_tmpdir = 1;
+
 	setup_ipc();
 
 	if (needs_tmpdir() && !tst_tmpdir_created())
-- 
2.13.6



More information about the ltp mailing list