Skip to contentSkip to conversation

syscalls: quotactl04, statx05: Fix TWARN on missing mkfs

PATCH New Cyril Hrubis 2 participants 2 messages Nov 24, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 syscalls: quotactl04, statx05: Fix TWARN on missing mkfs

When mkfs.ext4 was missing we would get TWARN because the setup will fail to parse the mkfs version followed by TCONF from the library function that attempts format the device.

Fix this by requiring the mkfs.ext4 in the tst_test structure which will exit the test before we attempt to parse the mkfs version.

---
 testcases/kernel/syscalls/quotactl/quotactl04.c | 4 ++++
 testcases/kernel/syscalls/statx/statx05.c       | 4 ++++
 2 files changed, 8 insertions(+)
testcases/kernel/syscalls/quotactl/quotactl04.c +4 -0
index 3cc2b974f..8b17b1fbc 100644
@@ -170,4 +170,8 @@ static struct tst_test test = {
 	.needs_device = 1,
 	.dev_fs_type = "ext4",
 	.mntpoint = MNTPOINT,
+	.needs_cmds = (const char *[]) {
+		"mkfs.ext4",
+		NULL
+	}
 };
testcases/kernel/syscalls/statx/statx05.c +4 -0
index d7ac24418..81a5bcbf2 100644
@@ -135,4 +135,8 @@ static struct tst_test test = {
 	.needs_device = 1,
 	.mntpoint = MNTPOINT,
 	.dev_fs_type = "ext4",
+	.needs_cmds = (const char *[]) {
+		"mkfs.ext4",
+		NULL
+	}
 };
Signature · 1 line
2.26.2
Applied
#1 lore raw

PATCH 2/2 syscalls: quotactl04, statx05: Fix TWARN on missing mkfs

Quoted 9 lines · Cyril Hrubis

When mkfs.ext4 was missing we would get TWARN because the setup will fail to
parse the mkfs version followed by TCONF from the library function that attempts format the device.

Fix this by requiring the mkfs.ext4 in the tst_test structure which will exit
the test before we attempt to parse the mkfs version.

Merged, thanks~

Signature · 5 lines
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20201124/a338f0f7/attachment.htm>