Skip to contentSkip to conversation

syscalls/fspick: Call fsconfig with FSCONFIG_CMD_RECONFIGURE

PATCH New Viresh Kumar 2 participants 3 messages Mar 20, 2020 – Mar 23, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 syscalls/fspick: Call fsconfig with FSCONFIG_CMD_RECONFIGURE

Make sure mountpoint is reconfigured after all the recent changes by calling fsconfig() with FSCONFIG_CMD_RECONFIGURE.

---
 testcases/kernel/syscalls/fspick/fspick01.c | 6 ++++++
 1 file changed, 6 insertions(+)
testcases/kernel/syscalls/fspick/fspick01.c +6 -0
index 3b3635b20195..b5a35bf61e2c 100644
@@ -43,6 +43,12 @@ static void run(unsigned int n)
 		goto out;
 	}
 
+	TEST(fsconfig(fspick_fd, FSCONFIG_CMD_RECONFIGURE, NULL, NULL, 0));
+	if (TST_RET == -1) {
+		tst_res(TFAIL | TTERRNO, "fsconfig() failed");
+		goto out;
+	}
+
 	tst_res(TPASS, "%s: fspick() passed", tc->name);
 
 out:
Signature · 1 line
2.21.0.rc0.269.g1a574e7a288b
#1 lore raw

PATCH 1/1 syscalls/fspick: Call fsconfig with FSCONFIG_CMD_RECONFIGURE

Hi Viresh,

Quoted 2 lines

Make sure mountpoint is reconfigured after all the recent changes by calling fsconfig() with FSCONFIG_CMD_RECONFIGURE.

Thanks, merged.

BTW how about print flag on failure? (just to improve readability, although there are line numbers so not required).

Kind regards,
Petr

kernel/syscalls/fspick/fspick01.c +3 -3
index b5a35bf61..c84723805 100644
@@ -33,19 +33,19 @@ static void run(unsigned int n)
 
 	TEST(fsconfig(fspick_fd, FSCONFIG_SET_STRING, "sync", "false", 0));
 	if (TST_RET == -1) {
-		tst_res(TFAIL | TTERRNO, "fsconfig() failed");
+		tst_res(TFAIL | TTERRNO, "fsconfig(FSCONFIG_SET_STRING) failed");
 		goto out;
 	}
 
 	TEST(fsconfig(fspick_fd, FSCONFIG_SET_FLAG, "ro", NULL, 0));
 	if (TST_RET == -1) {
-		tst_res(TFAIL | TTERRNO, "fsconfig() failed");
+		tst_res(TFAIL | TTERRNO, "fsconfig(FSCONFIG_SET_FLAG) failed");
 		goto out;
 	}
 
 	TEST(fsconfig(fspick_fd, FSCONFIG_CMD_RECONFIGURE, NULL, NULL, 0));
 	if (TST_RET == -1) {
-		tst_res(TFAIL | TTERRNO, "fsconfig() failed");
+		tst_res(TFAIL | TTERRNO, "fsconfig(FSCONFIG_CMD_RECONFIGURE) failed");
 		goto out;
 	}
 
#2 lore raw

PATCH 1/1 syscalls/fspick: Call fsconfig with FSCONFIG_CMD_RECONFIGURE

Quoted 9 lines · Petr Vorel

Hi Viresh,

Quoted 2 lines

Make sure mountpoint is reconfigured after all the recent changes by calling fsconfig() with FSCONFIG_CMD_RECONFIGURE.

Thanks, merged.

BTW how about print flag on failure? (just to improve readability, although there are line numbers so not required).

Yeah, I have been relying on line numbers mostly for this. Though I can add more descriptive messages if you want :)

Signature · 1 line
viresh