Skip to content

Commit

Permalink
selftests/rseq: remove ARRAY_SIZE define from individual tests
Browse files Browse the repository at this point in the history
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 rseq tests and pickup the one defined in
kselftest.h.

Signed-off-by: Shuah Khan <[email protected]>
  • Loading branch information
shuahkh committed Dec 11, 2021
1 parent 1329e40 commit 07ad4f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions tools/testing/selftests/rseq/basic_percpu_ops_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
#include <string.h>
#include <stddef.h>

#include "../kselftest.h"
#include "rseq.h"

#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))

struct percpu_lock_entry {
intptr_t v;
} __attribute__((aligned(128)));
Expand Down
3 changes: 1 addition & 2 deletions tools/testing/selftests/rseq/rseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@
#include <signal.h>
#include <limits.h>

#include "../kselftest.h"
#include "rseq.h"

#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))

__thread volatile struct rseq __rseq_abi = {
.cpu_id = RSEQ_CPU_ID_UNINITIALIZED,
};
Expand Down

0 comments on commit 07ad4f7

Please sign in to comment.