[LTP] [PATCH] syscalls/mkdir09: rewrite in new LTP API

Petr Vorel pvorel@suse.cz
Thu Jan 27 15:04:09 CET 2022


Hi Jan,

> 'jump' variable is not initialized, which I suspect is behind
> rare failures of this test. The original test is using longjmp,
> processes and signals to sychronize couple processes that
> exercise mkdir/rmdir calls.

> Rewrite it using threads and new LTP API, drop all parameters,
> because no runtest is using them, and make new default test time
> just 1 second.

> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
> It's based on original test, but I question its usefulness,
> since it's just mkdir/rmdir in loop over same directory.
> So, I decided to port it with just 1 second test time, but
> I'm not opposed to dropping this test entirely. Thoughts?

Not sure about usefulness. Also how about use .all_filesystems to have smoke
test for all supported filesystems?

Kind regards,
Petr

+++ testcases/kernel/syscalls/mkdir/mkdir09.c
@@ -14,9 +14,10 @@
 #include "tst_test.h"
 #include "tst_safe_pthread.h"
 
+#define MNTPOINT "mntpoint"
 #define MODE_RWX	07770
-#define DIR_NAME	"./X.%d"
-#define DIR_NAME_GROUP	"./X.%d.%d"
+#define DIR_NAME	MNTPOINT "/X.%d"
+#define DIR_NAME_GROUP	MNTPOINT "/X.%d.%d"
 #define NCHILD		3
 
 static int child_groups = 2;
@@ -166,4 +167,7 @@ static struct tst_test test = {
 	.test_all = verify_mkdir,
 	.needs_tmpdir = 1,
 	.setup = setup,
+	.mount_device = 1,
+	.mntpoint = MNTPOINT,
+	.all_filesystems = 1,
 };


More information about the ltp mailing list