selftests/timens: remove ARRAY_SIZE define from individual tests
authorShuah Khan <skhan@linuxfoundation.org>
Thu, 9 Dec 2021 23:27:45 +0000 (16:27 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Sat, 11 Dec 2021 00:51:20 +0000 (17:51 -0700)
ARRAY_SIZE is defined in several selftests. Remove definitions from
individual test files and include header file for the define instead.
ARRAY_SIZE define is added in a separate patch to prepare for this
change.

Remove ARRAY_SIZE from timens tests and pickup the one defined in
kselftest.h.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/timens/procfs.c
tools/testing/selftests/timens/timens.c

index f2519154208a08aeeb65b4c59bfc91afbac3e710..1833ca97eb247b1b45b7a86f0ca800d4a6e58c74 100644 (file)
@@ -24,8 +24,6 @@
 #define DAY_IN_SEC                     (60*60*24)
 #define TEN_DAYS_IN_SEC                        (10*DAY_IN_SEC)
 
-#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-
 static int child_ns, parent_ns;
 
 static int switch_ns(int fd)
index 52b6a1185f52a2dde0ba87a6cfb7ff31cda2ca8a..387220791a052e6013bd0fb4162f123d85152183 100644 (file)
@@ -22,8 +22,6 @@
 #define DAY_IN_SEC                     (60*60*24)
 #define TEN_DAYS_IN_SEC                        (10*DAY_IN_SEC)
 
-#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-
 struct test_clock {
        clockid_t id;
        char *name;