Skip to content

Commit 7121437

Browse files
musamaanjumbrauner
authored andcommitted
selftests: fchmodat2: remove duplicate unneeded defines
These duplicate defines should automatically be picked up from kernel headers. Use KHDR_INCLUDES to add kernel header files. Signed-off-by: Muhammad Usama Anjum <[email protected]> Message-Id: <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 5daeb41 commit 7121437

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0-or-later
22

3-
CFLAGS += -Wall -O2 -g -fsanitize=address -fsanitize=undefined
3+
CFLAGS += -Wall -O2 -g -fsanitize=address -fsanitize=undefined $(KHDR_INCLUDES)
44
TEST_GEN_PROGS := fchmodat2_test
55

66
include ../lib.mk

tools/testing/selftests/fchmodat2/fchmodat2_test.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,6 @@
99

1010
#include "../kselftest.h"
1111

12-
#ifndef __NR_fchmodat2
13-
#if defined __alpha__
14-
#define __NR_fchmodat2 562
15-
#elif defined _MIPS_SIM
16-
#if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */
17-
#define __NR_fchmodat2 (452 + 4000)
18-
#endif
19-
#if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */
20-
#define __NR_fchmodat2 (452 + 6000)
21-
#endif
22-
#if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */
23-
#define __NR_fchmodat2 (452 + 5000)
24-
#endif
25-
#elif defined __ia64__
26-
#define __NR_fchmodat2 (452 + 1024)
27-
#else
28-
#define __NR_fchmodat2 452
29-
#endif
30-
#endif
31-
3212
int sys_fchmodat2(int dfd, const char *filename, mode_t mode, int flags)
3313
{
3414
int ret = syscall(__NR_fchmodat2, dfd, filename, mode, flags);

0 commit comments

Comments
 (0)