Skip to content

Commit 517c7b5

Browse files
committed
lapi/stat.h: Remove deprecated STATX_ALL macro
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. statx06.c verifies various timestamps including stx_btime so we should call STATX_BASIC_STATS | STATX_BTIME. statx07.c just needs to get stx_mode so STATX_BASIC_STATS is enough. Reviewed-by: Xiao Yang <[email protected]> Signed-off-by: Yang Xu <[email protected]>
1 parent b573db4 commit 517c7b5

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

include/lapi/stat.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,6 @@ static inline int statx(int dirfd, const char *pathname, unsigned int flags,
182182
# define STATX_DIOALIGN 0x00002000U
183183
#endif
184184

185-
#ifndef STATX_ALL
186-
# define STATX_ALL 0x00000fffU
187-
#endif
188-
189185
#ifndef STATX__RESERVED
190186
# define STATX__RESERVED 0x80000000U
191187
#endif

testcases/kernel/syscalls/statx/statx06.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ static void test_statx(unsigned int test_nr)
111111
clock_wait_tick();
112112
SAFE_CLOCK_GETTIME(CLOCK_REALTIME_COARSE, &after_time);
113113

114-
TEST(statx(AT_FDCWD, TEST_FILE, 0, STATX_ALL, &buff));
114+
TEST(statx(AT_FDCWD, TEST_FILE, 0, STATX_BASIC_STATS | STATX_BTIME, &buff));
115115
if (TST_RET != 0) {
116116
tst_brk(TFAIL | TTERRNO,
117-
"statx(AT_FDCWD, %s, 0, STATX_ALL, &buff)",
117+
"statx(AT_FDCWD, %s, 0, STATX_BASIC_STATS | STATX_BTIME, &buff)",
118118
TEST_FILE);
119119
}
120120

testcases/kernel/syscalls/statx/statx07.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ static int get_mode(char *file_name, int flag_type, char *flag_name)
6363
{
6464
struct statx buf;
6565

66-
TEST(statx(AT_FDCWD, file_name, flag_type, STATX_ALL, &buf));
66+
TEST(statx(AT_FDCWD, file_name, flag_type, STATX_BASIC_STATS, &buf));
6767

6868
if (TST_RET == -1) {
6969
tst_brk(TFAIL | TST_ERR,
70-
"statx(AT_FDCWD, %s, %s, STATX_ALL, &buf)",
70+
"statx(AT_FDCWD, %s, %s, STATX_BASIC_STATS, &buf)",
7171
file_name, flag_name);
7272
}
7373

74-
tst_res(TINFO, "statx(AT_FDCWD, %s, %s, STATX_ALL, &buf) = %o",
74+
tst_res(TINFO, "statx(AT_FDCWD, %s, %s, STATX_BASIC_STATS, &buf) = %o",
7575
file_name, flag_name, buf.stx_mode);
7676

7777
return buf.stx_mode;

0 commit comments

Comments
 (0)