Skip to contentSkip to conversation

statmount/listmount testing suites

PATCH New Andrea Cervesato 2 participants 12 messages May 15, 2024 – May 16, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover statmount/listmount testing suites

From: Andrea Cervesato <[email protected]>

This patch-set is adding new testing suites for statmount() and listmount() syscalls, which have been recently added in kernel v6.8.
To find out more information, please read the following documentation since there's no man pages yet:

https://lwn.net/Articles/950569/
https://lore.kernel.org/lkml/[email protected]/T/

Along with kernel source code:

https://github.com/torvalds/linux/blob/1b294a1f35616977caddaddf3e9d28e576a1adbc/include/uapi/linux/mount.h#L155
https://github.com/torvalds/linux/blob/1b294a1f35616977caddaddf3e9d28e576a1adbc/tools/testing/selftests/filesystems/statmount/statmount_test.c

Andrea Cervesato (10):
Add SAFE_STATX macro
Add listmount/statmount fallback declarations
Add listmount01 test
Add listmount02 test
Add stamount01 test
Add statmount02 test
Add statmount03 test
Add statmount04 test
Add statmount05 test
Add statmount06 test

 configure.ac                                  |   5 +
 include/lapi/mount.h                          |  70 +++++++++
 include/lapi/stat.h                           |  10 +-
 include/lapi/syscalls/aarch64.in              |   2 +
 include/lapi/syscalls/arc.in                  |   2 +
 include/lapi/syscalls/arm.in                  |   2 +
 include/lapi/syscalls/hppa.in                 |   2 +
 include/lapi/syscalls/i386.in                 |   2 +
 include/lapi/syscalls/ia64.in                 |   2 +
 include/lapi/syscalls/loongarch.in            |   2 +
 include/lapi/syscalls/mips_n32.in             |   2 +
 include/lapi/syscalls/mips_n64.in             |   2 +
 include/lapi/syscalls/mips_o32.in             |   2 +
 include/lapi/syscalls/powerpc.in              |   2 +
 include/lapi/syscalls/powerpc64.in            |   2 +
 include/lapi/syscalls/s390.in                 |   2 +
 include/lapi/syscalls/s390x.in                |   2 +
 include/lapi/syscalls/sh.in                   |   2 +
 include/lapi/syscalls/sparc.in                |   2 +
 include/lapi/syscalls/sparc64.in              |   2 +
 include/lapi/syscalls/x86_64.in               |   2 +
 include/tst_safe_macros.h                     |   7 +
 lib/tst_safe_macros.c                         |  22 +++
 runtest/syscalls                              |  10 ++
 .../kernel/syscalls/listmount/.gitignore      |   2 +
 testcases/kernel/syscalls/listmount/Makefile  |   7 +
 .../kernel/syscalls/listmount/listmount.h     |  26 ++++
 .../kernel/syscalls/listmount/listmount01.c   |  66 +++++++++
 .../kernel/syscalls/listmount/listmount02.c   | 106 ++++++++++++++
 .../kernel/syscalls/statmount/.gitignore      |   6 +
 testcases/kernel/syscalls/statmount/Makefile  |   7 +
 .../kernel/syscalls/statmount/statmount.h     |  26 ++++
 .../kernel/syscalls/statmount/statmount01.c   |  69 +++++++++
 .../kernel/syscalls/statmount/statmount02.c   |  76 ++++++++++
 .../kernel/syscalls/statmount/statmount03.c   |  99 +++++++++++++
 .../kernel/syscalls/statmount/statmount04.c   | 133 +++++++++++++++++
 .../kernel/syscalls/statmount/statmount05.c   | 138 ++++++++++++++++++
 .../kernel/syscalls/statmount/statmount06.c   |  73 +++++++++
 38 files changed, 993 insertions(+), 1 deletion(-)
 create mode 100644 testcases/kernel/syscalls/listmount/.gitignore
 create mode 100644 testcases/kernel/syscalls/listmount/Makefile
 create mode 100644 testcases/kernel/syscalls/listmount/listmount.h
 create mode 100644 testcases/kernel/syscalls/listmount/listmount01.c
 create mode 100644 testcases/kernel/syscalls/listmount/listmount02.c
 create mode 100644 testcases/kernel/syscalls/statmount/.gitignore
 create mode 100644 testcases/kernel/syscalls/statmount/Makefile
 create mode 100644 testcases/kernel/syscalls/statmount/statmount.h
 create mode 100644 testcases/kernel/syscalls/statmount/statmount01.c
 create mode 100644 testcases/kernel/syscalls/statmount/statmount02.c
 create mode 100644 testcases/kernel/syscalls/statmount/statmount03.c
 create mode 100644 testcases/kernel/syscalls/statmount/statmount04.c
 create mode 100644 testcases/kernel/syscalls/statmount/statmount05.c
 create mode 100644 testcases/kernel/syscalls/statmount/statmount06.c
Signature · 5 lines
2.35.3


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

PATCH v2 1/10 Add SAFE_STATX macro

From: Andrea Cervesato <[email protected]>

---
 include/tst_safe_macros.h |  7 +++++++
 lib/tst_safe_macros.c     | 22 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)
include/tst_safe_macros.h +7 -0
index 8de8ef106..43ff50a33 100644
@@ -503,4 +503,11 @@ int safe_sscanf(const char *file, const int lineno, const char *restrict buffer,
 #define SAFE_SSCANF(buffer, format, ...) \
 	safe_sscanf(__FILE__, __LINE__, (buffer), (format),	##__VA_ARGS__)
 
+struct statx;
+int safe_statx(const char *file, const int lineno,
+	int dirfd, const char *pathname, int flags, unsigned int mask,
+	struct statx *buf);
+#define SAFE_STATX(dirfd, pathname, flags, mask, buf) \
+	safe_statx(__FILE__, __LINE__, (dirfd), (pathname), (flags), (mask), (buf))
+
 #endif /* TST_SAFE_MACROS_H__ */
lib/tst_safe_macros.c +22 -0
index 39b8cc924..f50a7bcc2 100644
@@ -20,6 +20,7 @@
 #include "tst_safe_macros.h"
 #include "lapi/personality.h"
 #include "lapi/pidfd.h"
+#include "lapi/stat.h"
 
 int safe_access(const char *file, const int lineno,
 	    const char *pathname, int mode)
@@ -710,3 +711,24 @@ int safe_mprotect(const char *file, const int lineno,
 
 	return rval;
 }
+
+int safe_statx(const char *file, const int lineno,
+	int dirfd, const char *pathname, int flags, unsigned int mask,
+	struct statx *buf)
+{
+	int rval;
+
+	rval = statx(dirfd, pathname, flags, mask, buf);
+
+	if (rval == -1) {
+		tst_brk_(file, lineno, TBROK | TERRNO,
+			"statx(%d,%s,%d,%u,%p) failed", dirfd, pathname, flags, mask, buf);
+	} else if (rval) {
+		tst_brk_(file, lineno, TBROK | TERRNO,
+			"Invalid statx(%d,%s,%d,%u,%p) return value %d",
+			dirfd, pathname, flags, mask, buf,
+			rval);
+	}
+
+	return rval;
+}
Signature · 5 lines
2.35.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw

PATCH v2 2/10 Add listmount/statmount fallback declarations

In reply to Andrea Cervesato

From: Andrea Cervesato <[email protected]>

---
 configure.ac                       |  5 +++
 include/lapi/mount.h               | 70 ++++++++++++++++++++++++++++++
 include/lapi/stat.h                | 10 ++++-
 include/lapi/syscalls/aarch64.in   |  2 +
 include/lapi/syscalls/arc.in       |  2 +
 include/lapi/syscalls/arm.in       |  2 +
 include/lapi/syscalls/hppa.in      |  2 +
 include/lapi/syscalls/i386.in      |  2 +
 include/lapi/syscalls/ia64.in      |  2 +
 include/lapi/syscalls/loongarch.in |  2 +
 include/lapi/syscalls/mips_n32.in  |  2 +
 include/lapi/syscalls/mips_n64.in  |  2 +
 include/lapi/syscalls/mips_o32.in  |  2 +
 include/lapi/syscalls/powerpc.in   |  2 +
 include/lapi/syscalls/powerpc64.in |  2 +
 include/lapi/syscalls/s390.in      |  2 +
 include/lapi/syscalls/s390x.in     |  2 +
 include/lapi/syscalls/sh.in        |  2 +
 include/lapi/syscalls/sparc.in     |  2 +
 include/lapi/syscalls/sparc64.in   |  2 +
 include/lapi/syscalls/x86_64.in    |  2 +
 21 files changed, 120 insertions(+), 1 deletion(-)
configure.ac +5 -0
index 1f7aa70bd..95c91c6af 100644
@@ -113,6 +113,7 @@ AC_CHECK_FUNCS_ONCE([ \
     io_uring_register \
     io_uring_enter \
     kcmp \
+    listmount \
     mallinfo \
     mallinfo2 \
     mallopt \
@@ -142,6 +143,7 @@ AC_CHECK_FUNCS_ONCE([ \
     setns \
     sigpending \
     splice \
+    statmount \
     statx \
     stime \
     sync_file_range \
@@ -232,6 +234,9 @@ AC_CHECK_TYPES([struct mount_attr],,,[
 #endif
 ])
 
+AC_CHECK_TYPES([struct mnt_id_req],,,[#include <linux/mount.h>])
+AC_CHECK_TYPES([struct statmount],,,[#include <linux/mount.h>])
+
 # Tools knobs
 
 # Bash
include/lapi/mount.h +70 -0

86 lines not on this page · raw message

include/lapi/stat.h +9 -1
index 3606c9eb0..84dc76faf 100644
@@ -95,7 +95,11 @@ struct statx {
 	uint32_t	stx_dev_major;
 	uint32_t	stx_dev_minor;
 	/* 0x90 */
-	uint64_t	__spare2[14];
+	__u64	stx_mnt_id;
+	__u32	stx_dio_mem_align;
+	__u32	stx_dio_offset_align;
+	/* 0xa0 */
+	__u64	__spare3[12];
 	/* 0x100 */
 };
 #endif
@@ -229,4 +233,8 @@ static inline int statx(int dirfd, const char *pathname, unsigned int flags,
 # define STATX_ATTR_VERITY	0x00100000
 #endif
 
+#ifndef STATX_MNT_ID_UNIQUE
+# define STATX_MNT_ID_UNIQUE  0x00004000U
+#endif
+
 #endif /* LAPI_STAT_H__ */
include/lapi/syscalls/aarch64.in +2 -0
index 2cb6c2d87..3b32a3b2a 100644
@@ -297,4 +297,6 @@ faccessat2 439
 epoll_pwait2 441
 quotactl_fd 443
 futex_waitv 449
+statmount 457
+listmount 458
 _sysctl 1078
include/lapi/syscalls/arc.in +2 -0
index 3e2ee9061..1a3a908e4 100644
@@ -317,3 +317,5 @@ faccessat2 439
 epoll_pwait2 441
 quotactl_fd 443
 futex_waitv 449
+statmount 457
+listmount 458
include/lapi/syscalls/arm.in +2 -0
index 7bdbca533..78d84549f 100644
@@ -395,3 +395,5 @@ faccessat2 (__NR_SYSCALL_BASE+439)
 epoll_pwait2 (__NR_SYSCALL_BASE+441)
 quotactl_fd (__NR_SYSCALL_BASE+443)
 futex_waitv (__NR_SYSCALL_BASE+449)
+statmount (__NR_SYSCALL_BASE+457)
+listmount (__NR_SYSCALL_BASE+458)
include/lapi/syscalls/hppa.in +2 -0
index 8ebdafafb..1f01a4a0c 100644
@@ -44,3 +44,5 @@ faccessat2 439
 epoll_pwait2 441
 quotactl_fd 443
 futex_waitv 449
+statmount 457
+listmount 458
include/lapi/syscalls/i386.in +2 -0
index 1472631c4..f4e6589ab 100644
@@ -431,3 +431,5 @@ faccessat2 439
 epoll_pwait2 441
 quotactl_fd 443
 futex_waitv 449
+statmount 457
+listmount 458
include/lapi/syscalls/ia64.in +2 -0
index 0ea6e9722..dd8b8c79f 100644
@@ -344,3 +344,5 @@ faccessat2 1463
 epoll_pwait2 1465
 quotactl_fd 1467
 futex_waitv 1473
+statmount 1481
+listmount 1482
include/lapi/syscalls/loongarch.in +2 -0
index 301f611f6..f48c0658c 100644
@@ -305,3 +305,5 @@ memfd_secret 447
 process_mrelease 448
 futex_waitv 449
 set_mempolicy_home_node 450
+statmount 457
+listmount 458
include/lapi/syscalls/mips_n32.in +2 -0
index e818c9d92..af5928c0e 100644
@@ -371,3 +371,5 @@ epoll_pwait2 6441
 mount_setattr 6442
 quotactl_fd 6443
 futex_waitv 6449
+statmount 6457
+listmount 6458
include/lapi/syscalls/mips_n64.in +2 -0
index 6e15f43b3..a6d83e2e0 100644
@@ -347,3 +347,5 @@ epoll_pwait2 5441
 mount_setattr 5442
 quotactl_fd 5443
 futex_waitv 5449
+statmount 5457
+listmount 5458
include/lapi/syscalls/mips_o32.in +2 -0
index 921d5d331..eda7388a3 100644
@@ -417,3 +417,5 @@ epoll_pwait2 4441
 mount_setattr 4442
 quotactl_fd 4443
 futex_waitv 4449
+statmount 4457
+listmount 4458
include/lapi/syscalls/powerpc.in +2 -0
index 545d9d3d6..1b40ea53d 100644
@@ -424,3 +424,5 @@ faccessat2 439
 epoll_pwait2 441
 quotactl_fd 443
 futex_waitv 449
+statmount 457
+listmount 458
include/lapi/syscalls/powerpc64.in +2 -0
index 545d9d3d6..1b40ea53d 100644
@@ -424,3 +424,5 @@ faccessat2 439
 epoll_pwait2 441
 quotactl_fd 443
 futex_waitv 449
+statmount 457
+listmount 458
include/lapi/syscalls/s390.in +2 -0
index 7213ac5f8..6593a4ff7 100644
@@ -411,3 +411,5 @@ faccessat2 439
 epoll_pwait2 441
 quotactl_fd 443
 futex_waitv 449
+statmount 457
+listmount 458
include/lapi/syscalls/s390x.in +2 -0
index 879012e2b..b98e727d6 100644
@@ -359,3 +359,5 @@ faccessat2 439
 epoll_pwait2 441
 quotactl_fd 443
 futex_waitv 449
+statmount 457
+listmount 458
include/lapi/syscalls/sh.in +2 -0
index 7d5192a27..59178113e 100644
@@ -405,3 +405,5 @@ faccessat2 439
 epoll_pwait2 441
 quotactl_fd 443
 futex_waitv 449
+statmount 457
+listmount 458
include/lapi/syscalls/sparc.in +2 -0
index 91d2fb1c2..56a244ceb 100644
@@ -410,3 +410,5 @@ faccessat2 439
 epoll_pwait2 441
 quotactl_fd 443
 futex_waitv 449
+statmount 457
+listmount 458
include/lapi/syscalls/sparc64.in +2 -0
index 1f2fc59b7..84051a600 100644
@@ -375,3 +375,5 @@ faccessat2 439
 epoll_pwait2 441
 quotactl_fd 443
 futex_waitv 449
+statmount 457
+listmount 458
include/lapi/syscalls/x86_64.in +2 -0
index dc61aa56e..935c5d7bc 100644
@@ -352,6 +352,8 @@ faccessat2 439
 epoll_pwait2 441
 quotactl_fd 443
 futex_waitv 449
+statmount 457
+listmount 458
 rt_sigaction 512
 rt_sigreturn 513
 ioctl 514
Signature · 5 lines
2.35.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw

PATCH v2 3/10 Add listmount01 test

In reply to Andrea Cervesato

From: Andrea Cervesato <[email protected]>

This test verifies that listmount() is properly recognizing a mounted root directory using LSMT_ROOT flag.

---
 runtest/syscalls                              |  2 +
 .../kernel/syscalls/listmount/.gitignore      |  1 +
 testcases/kernel/syscalls/listmount/Makefile  |  7 ++
 .../kernel/syscalls/listmount/listmount.h     | 26 ++++++++
 .../kernel/syscalls/listmount/listmount01.c   | 66 +++++++++++++++++++
 5 files changed, 102 insertions(+)
 create mode 100644 testcases/kernel/syscalls/listmount/.gitignore
 create mode 100644 testcases/kernel/syscalls/listmount/Makefile
 create mode 100644 testcases/kernel/syscalls/listmount/listmount.h
 create mode 100644 testcases/kernel/syscalls/listmount/listmount01.c
runtest/syscalls +2 -0
index d9cf37510..8fd4a9a0a 100644
@@ -706,6 +706,8 @@ linkat02 linkat02
 
 listen01 listen01
 
+listmount01 listmount01
+
 listxattr01 listxattr01
 listxattr02 listxattr02
 listxattr03 listxattr03
testcases/kernel/syscalls/listmount/.gitignore new file +1 -0
new file mode 100644
index 000000000..5257b298c
@@ -0,0 +1 @@
+listmount01
testcases/kernel/syscalls/listmount/Makefile new file +7 -0
new file mode 100644
index 000000000..8cf1b9024
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (C) 2024 SUSE LLC Andrea Cervesato <[email protected]>
+
+top_srcdir		?= ../../../..
+
+include $(top_srcdir)/include/mk/testcases.mk
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/syscalls/listmount/listmount.h new file +26 -0
new file mode 100644
index 000000000..93766cd33
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2024 SUSE LLC Andrea Cervesato <[email protected]>
+ */
+
+#ifndef LISTMOUNT_H
+
+#define _GNU_SOURCE
+
+#include "tst_test.h"
+#include "lapi/mount.h"
+#include "lapi/syscalls.h"
+
+static inline ssize_t listmount(uint64_t mnt_id, uint64_t last_mnt_id,
+			 uint64_t list[], size_t num, unsigned int flags)
+{
+	struct mnt_id_req req = {
+		.size = MNT_ID_REQ_SIZE_VER0,
+		.mnt_id = mnt_id,
+		.param = last_mnt_id,
+	};
+
+	return tst_syscall(__NR_listmount, &req, list, num, flags);
+}
+
+#endif
testcases/kernel/syscalls/listmount/listmount01.c new file +66 -0

66 lines not on this page · raw message

Signature · 5 lines
2.35.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#4 lore raw

Re: [LTP] [PATCH v2 03/10] Add listmount01 test

Hi Andrea,

...

testcases/kernel/syscalls/listmount/listmount01.c line 6

Quoted 8 lines

+++ b/testcases/kernel/syscalls/listmount/listmount01.c

testcases/kernel/syscalls/listmount/listmount01.c new file +6 -0
@@ -0,0 +1,66 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (C) 2024 SUSE LLC Andrea Cervesato <[email protected]>
+ */
+
+/**

This is for kerneldoc, but for docparse it must be: /*\
Your version causes that the description is not in the documentation. The same applies for whole source.
BTW it's worth to run the doc generation locally.

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#5 lore raw

PATCH v2 4/10 Add listmount02 test

In reply to Andrea Cervesato

From: Andrea Cervesato <[email protected]>

This test verifies that listmount() is properly reading groups of mount IDs.

---
 runtest/syscalls                              |   1 +
 .../kernel/syscalls/listmount/.gitignore      |   1 +
 .../kernel/syscalls/listmount/listmount02.c   | 106 ++++++++++++++++++
 3 files changed, 108 insertions(+)
 create mode 100644 testcases/kernel/syscalls/listmount/listmount02.c
runtest/syscalls +1 -0
index 8fd4a9a0a..355c182f8 100644
@@ -707,6 +707,7 @@ linkat02 linkat02
 listen01 listen01
 
 listmount01 listmount01
+listmount02 listmount02
 
 listxattr01 listxattr01
 listxattr02 listxattr02
testcases/kernel/syscalls/listmount/.gitignore +1 -0
index 5257b298c..30bbf9f02 100644
@@ -1 +1,2 @@
 listmount01
+listmount02
testcases/kernel/syscalls/listmount/listmount02.c new file +106 -0

106 lines not on this page · raw message

Signature · 5 lines
2.35.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#6 lore raw

PATCH v2 5/10 Add stamount01 test

In reply to Andrea Cervesato

From: Andrea Cervesato <[email protected]>

This test verifies that statmount() is working with no mask flags.

---
 runtest/syscalls                              |  2 +
 .../kernel/syscalls/statmount/.gitignore      |  1 +
 testcases/kernel/syscalls/statmount/Makefile  |  7 ++
 .../kernel/syscalls/statmount/statmount.h     | 26 +++++++
 .../kernel/syscalls/statmount/statmount01.c   | 69 +++++++++++++++++++
 5 files changed, 105 insertions(+)
 create mode 100644 testcases/kernel/syscalls/statmount/.gitignore
 create mode 100644 testcases/kernel/syscalls/statmount/Makefile
 create mode 100644 testcases/kernel/syscalls/statmount/statmount.h
 create mode 100644 testcases/kernel/syscalls/statmount/statmount01.c
runtest/syscalls +2 -0
index 355c182f8..407cae890 100644
@@ -1537,6 +1537,8 @@ stat03_64 stat03_64
 stat04 symlink01 -T stat04
 stat04_64 symlink01 -T stat04_64
 
+statmount01 statmount01
+
 statfs01 statfs01
 statfs01_64 statfs01_64
 statfs02 statfs02
testcases/kernel/syscalls/statmount/.gitignore new file +1 -0
new file mode 100644
index 000000000..f1529eb29
@@ -0,0 +1 @@
+statmount01
testcases/kernel/syscalls/statmount/Makefile new file +7 -0
new file mode 100644
index 000000000..8cf1b9024
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (C) 2024 SUSE LLC Andrea Cervesato <[email protected]>
+
+top_srcdir		?= ../../../..
+
+include $(top_srcdir)/include/mk/testcases.mk
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/syscalls/statmount/statmount.h new file +26 -0
new file mode 100644
index 000000000..e807c8288
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2024 SUSE LLC Andrea Cervesato <[email protected]>
+ */
+
+#ifndef STATMOUNT_H
+
+#define _GNU_SOURCE
+
+#include "tst_test.h"
+#include "lapi/mount.h"
+#include "lapi/syscalls.h"
+
+static inline int statmount(uint64_t mnt_id, uint64_t mask, struct statmount *buf,
+		     size_t bufsize, unsigned int flags)
+{
+	struct mnt_id_req req = {
+		.size = MNT_ID_REQ_SIZE_VER0,
+		.mnt_id = mnt_id,
+		.param = mask,
+	};
+
+	return tst_syscall(__NR_statmount, &req, buf, bufsize, flags);
+}
+
+#endif
testcases/kernel/syscalls/statmount/statmount01.c new file +69 -0

69 lines not on this page · raw message

Signature · 5 lines
2.35.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#7 lore raw

PATCH v2 6/10 Add statmount02 test

In reply to Andrea Cervesato

From: Andrea Cervesato <[email protected]>

This test verifies that statmount() is correctly reading basic filesystem info using STATMOUNT_SB_BASIC.

---
 runtest/syscalls                              |  1 +
 .../kernel/syscalls/statmount/.gitignore      |  1 +
 .../kernel/syscalls/statmount/statmount02.c   | 76 +++++++++++++++++++
 3 files changed, 78 insertions(+)
 create mode 100644 testcases/kernel/syscalls/statmount/statmount02.c
runtest/syscalls +1 -0
index 407cae890..5f1df42ca 100644
@@ -1538,6 +1538,7 @@ stat04 symlink01 -T stat04
 stat04_64 symlink01 -T stat04_64
 
 statmount01 statmount01
+statmount02 statmount02
 
 statfs01 statfs01
 statfs01_64 statfs01_64
testcases/kernel/syscalls/statmount/.gitignore +1 -0
index f1529eb29..a30b9565f 100644
@@ -1 +1,2 @@
 statmount01
+statmount02
testcases/kernel/syscalls/statmount/statmount02.c new file +76 -0

76 lines not on this page · raw message

Signature · 5 lines
2.35.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#8 lore raw

PATCH v2 7/10 Add statmount03 test

In reply to Andrea Cervesato

From: Andrea Cervesato <[email protected]>

This test verifies that statmount() is correctly reading mount information (mount id, parent mount id, mount attributes etc.) using STATMOUNT_MNT_BASIC.

---
 runtest/syscalls                              |  1 +
 .../kernel/syscalls/statmount/.gitignore      |  1 +
 .../kernel/syscalls/statmount/statmount03.c   | 99 +++++++++++++++++++
 3 files changed, 101 insertions(+)
 create mode 100644 testcases/kernel/syscalls/statmount/statmount03.c
runtest/syscalls +1 -0
index 5f1df42ca..116106521 100644
@@ -1539,6 +1539,7 @@ stat04_64 symlink01 -T stat04_64
 
 statmount01 statmount01
 statmount02 statmount02
+statmount03 statmount03
 
 statfs01 statfs01
 statfs01_64 statfs01_64
testcases/kernel/syscalls/statmount/.gitignore +1 -0
index a30b9565f..2a02bf721 100644
@@ -1,2 +1,3 @@
 statmount01
 statmount02
+statmount03
testcases/kernel/syscalls/statmount/statmount03.c new file +99 -0

99 lines not on this page · raw message

Signature · 5 lines
2.35.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#9 lore raw

PATCH v2 8/10 Add statmount04 test

In reply to Andrea Cervesato

From: Andrea Cervesato <[email protected]>

This test verifies that statmount() is correctly reading propagation from what mount in current namespace using STATMOUNT_PROPAGATE_FROM.

---
 runtest/syscalls                              |   1 +
 .../kernel/syscalls/statmount/.gitignore      |   1 +
 .../kernel/syscalls/statmount/statmount04.c   | 133 ++++++++++++++++++
 3 files changed, 135 insertions(+)
 create mode 100644 testcases/kernel/syscalls/statmount/statmount04.c
runtest/syscalls +1 -0
index 116106521..3c262ca3e 100644
@@ -1540,6 +1540,7 @@ stat04_64 symlink01 -T stat04_64
 statmount01 statmount01
 statmount02 statmount02
 statmount03 statmount03
+statmount04 statmount04
 
 statfs01 statfs01
 statfs01_64 statfs01_64
testcases/kernel/syscalls/statmount/.gitignore +1 -0
index 2a02bf721..e720050b5 100644
@@ -1,3 +1,4 @@
 statmount01
 statmount02
 statmount03
+statmount04
testcases/kernel/syscalls/statmount/statmount04.c new file +133 -0

133 lines not on this page · raw message

Signature · 5 lines
2.35.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#10 lore raw

PATCH v2 9/10 Add statmount05 test

In reply to Andrea Cervesato

From: Andrea Cervesato <[email protected]>

This test verifies STATMOUNT_MNT_ROOT and STATMOUNT_MNT_POINT functionalities of statmount().

---
 runtest/syscalls                              |   1 +
 .../kernel/syscalls/statmount/.gitignore      |   1 +
 .../kernel/syscalls/statmount/statmount05.c   | 138 ++++++++++++++++++
 3 files changed, 140 insertions(+)
 create mode 100644 testcases/kernel/syscalls/statmount/statmount05.c
runtest/syscalls +1 -0
index 3c262ca3e..2984117e6 100644
@@ -1541,6 +1541,7 @@ statmount01 statmount01
 statmount02 statmount02
 statmount03 statmount03
 statmount04 statmount04
+statmount05 statmount05
 
 statfs01 statfs01
 statfs01_64 statfs01_64
testcases/kernel/syscalls/statmount/.gitignore +1 -0
index e720050b5..f64763242 100644
@@ -2,3 +2,4 @@ statmount01
 statmount02
 statmount03
 statmount04
+statmount05
testcases/kernel/syscalls/statmount/statmount05.c new file +138 -0

138 lines not on this page · raw message

Signature · 5 lines
2.35.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#11 lore raw

PATCH v2 10/10 Add statmount06 test

In reply to Andrea Cervesato

From: Andrea Cervesato <[email protected]>

This test verifies that statmount() is correctly reading name of the filesystem type using STATMOUNT_FS_TYPE.

---
 runtest/syscalls                              |  1 +
 .../kernel/syscalls/statmount/.gitignore      |  1 +
 .../kernel/syscalls/statmount/statmount06.c   | 73 +++++++++++++++++++
 3 files changed, 75 insertions(+)
 create mode 100644 testcases/kernel/syscalls/statmount/statmount06.c
runtest/syscalls +1 -0
index 2984117e6..86e253f77 100644
@@ -1542,6 +1542,7 @@ statmount02 statmount02
 statmount03 statmount03
 statmount04 statmount04
 statmount05 statmount05
+statmount06 statmount06
 
 statfs01 statfs01
 statfs01_64 statfs01_64
testcases/kernel/syscalls/statmount/.gitignore +1 -0
index f64763242..03a75bd40 100644
@@ -3,3 +3,4 @@ statmount02
 statmount03
 statmount04
 statmount05
+statmount06
testcases/kernel/syscalls/statmount/statmount06.c new file +73 -0

73 lines not on this page · raw message

Signature · 5 lines
2.35.3


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