@@ -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
@@ -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);
}
@@ -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;
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(-)