linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] selftests: Remove ARRAY_SIZE duplicate defines
@ 2021-12-10 17:33 Shuah Khan
  2021-12-10 17:33 ` [PATCH 01/12] tools: fix ARRAY_SIZE defines in tools and selftests hdrs Shuah Khan
                   ` (11 more replies)
  0 siblings, 12 replies; 18+ messages in thread
From: Shuah Khan @ 2021-12-10 17:33 UTC (permalink / raw)
  To: catalin.marinas, will, shuah, keescook, mic, davem, kuba, peterz,
	paulmck, boqun.feng, akpm
  Cc: Shuah Khan, linux-kselftest, linux-security-module, netdev, linux-mm

ARRAY_SIZE is defined in several selftests. There are about 25+
duplicate defines in various selftests source and header files.
This patch series removes the duplicated defines.

Several tests that define ARRAY_SIZE also include kselftest.h or
kselftest_harness.h. Remove ARRAY_SIZE defines from them.

Some tests that define ARRAY_SIZE don't include headers that define
it. Remove ARRAY_SIZE define and include kselftest.h

The first patch in this series:

- Adds ARRAY_SIZE define to kselftest.h
- Adds ifndef guard around ARRAY_SIZE define in
  tools/include/linux/kernel.h and kselftest_harness.h
- Patches 2-12 do the cleanup and depend on patch 1, hence
  will have to go through kselftest tree.

Shuah Khan (12):
  tools: fix ARRAY_SIZE defines in tools and selftests hdrs
  selftests/arm64: remove ARRAY_SIZE define from vec-syscfg.c
  selftests/cgroup: remove ARRAY_SIZE define from cgroup_util.h
  selftests/core: remove ARRAY_SIZE define from close_range_test.c
  selftests/ir: remove ARRAY_SIZE define from ir_loopback.c
  selftests/landlock: remove ARRAY_SIZE define from common.h
  selftests/net: remove ARRAY_SIZE define from individual tests
  selftests/rseq: remove ARRAY_SIZE define from individual tests
  selftests/seccomp: remove ARRAY_SIZE define from seccomp_benchmark
  selftests/sparc64: remove ARRAY_SIZE define from adi-test
  selftests/timens: remove ARRAY_SIZE define from individual tests
  selftests/vm: remove ARRAY_SIZE define from individual tests

 tools/include/linux/kernel.h                          | 2 ++
 tools/testing/selftests/arm64/fp/vec-syscfg.c         | 2 --
 tools/testing/selftests/cgroup/cgroup_util.h          | 4 ++--
 tools/testing/selftests/core/close_range_test.c       | 4 ----
 tools/testing/selftests/ir/ir_loopback.c              | 1 -
 tools/testing/selftests/kselftest.h                   | 4 ++++
 tools/testing/selftests/kselftest_harness.h           | 2 ++
 tools/testing/selftests/landlock/common.h             | 4 ----
 tools/testing/selftests/net/gro.c                     | 3 ++-
 tools/testing/selftests/net/ipsec.c                   | 1 -
 tools/testing/selftests/net/reuseport_bpf.c           | 4 +---
 tools/testing/selftests/net/rxtimestamp.c             | 2 +-
 tools/testing/selftests/net/socket.c                  | 3 ++-
 tools/testing/selftests/net/tcp_fastopen_backup_key.c | 6 ++----
 tools/testing/selftests/rseq/basic_percpu_ops_test.c  | 3 +--
 tools/testing/selftests/rseq/rseq.c                   | 3 +--
 tools/testing/selftests/seccomp/seccomp_benchmark.c   | 2 +-
 tools/testing/selftests/sparc64/drivers/adi-test.c    | 4 ----
 tools/testing/selftests/timens/procfs.c               | 2 --
 tools/testing/selftests/timens/timens.c               | 2 --
 tools/testing/selftests/vm/mremap_test.c              | 1 -
 tools/testing/selftests/vm/pkey-helpers.h             | 3 ++-
 tools/testing/selftests/vm/va_128TBswitch.c           | 2 +-
 23 files changed, 24 insertions(+), 40 deletions(-)

-- 
2.32.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-12-13 20:38 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10 17:33 [PATCH 00/12] selftests: Remove ARRAY_SIZE duplicate defines Shuah Khan
2021-12-10 17:33 ` [PATCH 01/12] tools: fix ARRAY_SIZE defines in tools and selftests hdrs Shuah Khan
2021-12-13 20:38   ` Kees Cook
2021-12-10 17:33 ` [PATCH 02/12] selftests/arm64: remove ARRAY_SIZE define from vec-syscfg.c Shuah Khan
2021-12-13 15:45   ` Will Deacon
2021-12-10 17:33 ` [PATCH 03/12] selftests/cgroup: remove ARRAY_SIZE define from cgroup_util.h Shuah Khan
2021-12-10 17:33 ` [PATCH 04/12] selftests/core: remove ARRAY_SIZE define from close_range_test.c Shuah Khan
2021-12-10 17:33 ` [PATCH 05/12] selftests/ir: remove ARRAY_SIZE define from ir_loopback.c Shuah Khan
2021-12-10 17:33 ` [PATCH 06/12] selftests/landlock: remove ARRAY_SIZE define from common.h Shuah Khan
2021-12-13 15:36   ` Mickaël Salaün
2021-12-10 17:33 ` [PATCH 07/12] selftests/net: remove ARRAY_SIZE define from individual tests Shuah Khan
2021-12-11  3:03   ` Jakub Kicinski
2021-12-10 17:33 ` [PATCH 08/12] selftests/rseq: " Shuah Khan
2021-12-10 17:33 ` [PATCH 09/12] selftests/seccomp: remove ARRAY_SIZE define from seccomp_benchmark Shuah Khan
2021-12-13 20:38   ` Kees Cook
2021-12-10 17:33 ` [PATCH 10/12] selftests/sparc64: remove ARRAY_SIZE define from adi-test Shuah Khan
2021-12-10 17:33 ` [PATCH 11/12] selftests/timens: remove ARRAY_SIZE define from individual tests Shuah Khan
2021-12-10 17:33 ` [PATCH 12/12] selftests/vm: " Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).