Skip to contentSkip to conversation

syscalls: add file_attr05 test

PATCH In review Andrea Cervesato 3 participants 4 messages Jan 20 – Jan 21

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 syscalls: add file_attr05 test

From: Andrea Cervesato <[email protected]>

Verify that file_setattr is correctly raising EOPNOTSUPP when filesystem doesn't support FSX operations.

Regression test for 474b155adf392 ("fs: make vfs_fileattr_[get|set] return -EOPNOTSUPP").

---
Changes in v4:
- use tag for the linux commit that is tested
- Link to v3: https://lore.kernel.org/r/[email protected]

---
 runtest/syscalls                                  |  1 +
 testcases/kernel/syscalls/file_attr/.gitignore    |  1 +
 testcases/kernel/syscalls/file_attr/file_attr05.c | 64 +++++++++++++++++++++++
 3 files changed, 66 insertions(+)
runtest/syscalls +1 -0
index a1ef7548b58a1a8d51d8eec347d5772edbf0a953..12b4f3949c794b8747ccc827a1a66b6332e44673 100644
@@ -253,6 +253,7 @@ file_attr01 file_attr01
 file_attr02 file_attr02
 file_attr03 file_attr03
 file_attr04 file_attr04
+file_attr05 file_attr05
 
 #posix_fadvise test cases
 posix_fadvise01                      posix_fadvise01
testcases/kernel/syscalls/file_attr/.gitignore +1 -0
index 3fcb9004dd301ef4ee8cc1067c6a3763acb8d299..42f830a7e477cf42a967f5b14b7e4b6902c4f0e3 100644
@@ -2,3 +2,4 @@ file_attr01
 file_attr02
 file_attr03
 file_attr04
+file_attr05
testcases/kernel/syscalls/file_attr/file_attr05.c new file +64 -0

64 lines not on this page · raw message

---
base-commit: 36b915cef08adaa833af79301780cdd45a38f0e2
change-id: 20260119-file_attr05-eebcc81b9d46

Best regards,

Signature · 5 lines
Andrea Cervesato <[email protected]>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by on v4 1/1
#1 lore raw

Hi Andrea,

testcases/kernel/syscalls/file_attr/file_attr05.c line 49

Quoted 9 lines
testcases/kernel/syscalls/file_attr/file_attr05.c new file +8 -0
+static struct tst_test test = {
+	.test_all = run,
+	.setup = setup,
+	.mntpoint = MNTPOINT,
+	.needs_root = 1,
+	.mount_device = 1,
+	.all_filesystems = 1,
 
+	.format_device = 1,

testcases/kernel/syscalls/file_attr/file_attr05.c: useless tag: format_device

very nit: please remove it (.mount_device implies it).

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw
Quoted 12 lines · Petr Vorel

Hi Andrea,

Quoted 7 lines
testcases/kernel/syscalls/file_attr/file_attr05.c new file +7 -0
+static struct tst_test test = {
+	.test_all = run,
+	.setup = setup,
+	.mntpoint = MNTPOINT,
+	.needs_root = 1,
+	.mount_device = 1,
+	.all_filesystems = 1,
Quoted 7 lines

testcases/kernel/syscalls/file_attr/file_attr05.c line 49

Quoted 1 line
testcases/kernel/syscalls/file_attr/file_attr05.c new file +1 -0
+	.format_device = 1,

testcases/kernel/syscalls/file_attr/file_attr05.c: useless tag: format_device

very nit: please remove it (.mount_device implies it).

Kind regards,
Petr

Merged with this small modification. Thanks

Signature · 7 lines
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]


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