[LTP] [PATCH 3/3] lapi/stat.h: Remove deprecated STATX_ALL macro
Yang Xu
xuyang2018.jy@fujitsu.com
Thu Mar 30 10:22:49 CEST 2023
Since kernel 5.10-rc1 commit 581701b7efd6 ("uapi: deprecate STATX_ALL"),
this flag has been mark as deprecated.
Kernel should keep this macro for compatibility, but ltp doesn't think
about it. So remove it.
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
include/lapi/stat.h | 4 ----
testcases/kernel/syscalls/statx/statx06.c | 4 ++--
testcases/kernel/syscalls/statx/statx07.c | 6 +++---
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/include/lapi/stat.h b/include/lapi/stat.h
index c2db8a589..7c9a7a00c 100644
--- a/include/lapi/stat.h
+++ b/include/lapi/stat.h
@@ -188,10 +188,6 @@ static inline int statx(int dirfd, const char *pathname, unsigned int flags,
# define STATX_DIOALIGN 0x00002000U
#endif
-#ifndef STATX_ALL
-# define STATX_ALL 0x00000fffU
-#endif
-
#ifndef STATX__RESERVED
# define STATX__RESERVED 0x80000000U
#endif
diff --git a/testcases/kernel/syscalls/statx/statx06.c b/testcases/kernel/syscalls/statx/statx06.c
index ce82b905b..60e736c5a 100644
--- a/testcases/kernel/syscalls/statx/statx06.c
+++ b/testcases/kernel/syscalls/statx/statx06.c
@@ -111,10 +111,10 @@ static void test_statx(unsigned int test_nr)
clock_wait_tick();
SAFE_CLOCK_GETTIME(CLOCK_REALTIME_COARSE, &after_time);
- TEST(statx(AT_FDCWD, TEST_FILE, 0, STATX_ALL, &buff));
+ TEST(statx(AT_FDCWD, TEST_FILE, 0, STATX_BASIC_STATS | STATX_BTIME, &buff));
if (TST_RET != 0) {
tst_brk(TFAIL | TTERRNO,
- "statx(AT_FDCWD, %s, 0, STATX_ALL, &buff)",
+ "statx(AT_FDCWD, %s, 0, STATX_BASIC_STATS | STATX_BTIME, &buff)",
TEST_FILE);
}
diff --git a/testcases/kernel/syscalls/statx/statx07.c b/testcases/kernel/syscalls/statx/statx07.c
index b13c11f72..c798c7a10 100644
--- a/testcases/kernel/syscalls/statx/statx07.c
+++ b/testcases/kernel/syscalls/statx/statx07.c
@@ -62,15 +62,15 @@ static int get_mode(char *file_name, int flag_type, char *flag_name)
{
struct statx buf;
- TEST(statx(AT_FDCWD, file_name, flag_type, STATX_ALL, &buf));
+ TEST(statx(AT_FDCWD, file_name, flag_type, STATX_BASIC_STATS | STATX_BTIME, &buf));
if (TST_RET == -1) {
tst_brk(TFAIL | TST_ERR,
- "statx(AT_FDCWD, %s, %s, STATX_ALL, &buf)",
+ "statx(AT_FDCWD, %s, %s, STATX_BASIC_STATS | STATX_BTIME, &buf)",
file_name, flag_name);
}
- tst_res(TINFO, "statx(AT_FDCWD, %s, %s, STATX_ALL, &buf) = %o",
+ tst_res(TINFO, "statx(AT_FDCWD, %s, %s, STATX_BASIC_STATS | STATX_BTIME, &buf) = %o",
file_name, flag_name, buf.stx_mode);
return buf.stx_mode;
--
2.39.1
More information about the ltp
mailing list