2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/tools/testing
Sean Christopherson dce1b33ed7 selftests: harness: Rename is_signed_type() to avoid collision with overflow.h
Rename is_signed_type() to is_signed_var() to avoid colliding with a macro
of the same name defined by tools' linux/overflow.h.  This fixes warnings
(and presumably potential test failures) in tests that utilize the
selftests harness and happen to (indirectly) include overflow.h.

  In file included from tools/include/linux/bits.h:34,
                   from tools/include/linux/bitops.h:14,
                   from tools/include/linux/hashtable.h:13,
                   from include/kvm_util.h:11,
                   from x86/userspace_msr_exit_test.c:11:
  tools/include/linux/overflow.h:31:9: error: "is_signed_type" redefined [-Werror]
     31 | #define is_signed_type(type)       (((type)(-1)) < (type)1)
        |         ^~~~~~~~~~~~~~
  In file included from include/kvm_test_harness.h:11,
                   from x86/userspace_msr_exit_test.c:9:
  ../kselftest_harness.h:754:9: note: this is the location of the previous definition
    754 | #define is_signed_type(var)       (!!(((__typeof__(var))(-1)) < (__typeof__(var))1))
        |         ^~~~~~~~~~~~~~

Use a separate definition, at least for now, as many selftests build
without tools/include in their include path.

Fixes: fc92099902 ("tools headers: Synchronize linux/bits.h with the kernel sources")
Cc: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20250624231930.583689-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2025-08-20 08:04:09 -07:00
..
crypto/chacha20-s390 crypto: lib/chacha - strongly type the ChaCha state 2025-05-12 13:32:53 +08:00
cxl cxl for v6.17 2025-08-01 15:47:06 -07:00
fault-injection failcmd: make failcmd.sh executable 2024-09-01 20:43:32 -07:00
ktest ktest.pl: Add new PATCHCHECK_SKIP option to skip testing individual commits 2025-07-29 09:30:08 -04:00
kunit Revert "kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests" 2025-06-03 11:20:21 +02:00
memblock memblock: add MEMBLOCK_RSRV_KERN flag 2025-05-12 23:50:38 -07:00
nvdimm mm: remove callers of pfn_t functionality 2025-07-09 22:42:19 -07:00
radix-tree tools/testing/radix-tree: test maple tree chaining mas_preallocate() calls 2025-07-09 22:42:12 -07:00
rbtree lib/interval_tree: add test case for span iteration 2025-03-17 12:17:01 -07:00
scatterlist
selftests selftests: harness: Rename is_signed_type() to avoid collision with overflow.h 2025-08-20 08:04:09 -07:00
shared test suite: use %zu to print size_t 2025-04-11 17:32:35 -07:00
vma Significant patch series in this pull request: 2025-08-05 16:02:07 +03:00
vsock vsock/test: fix vsock_ioctl_int() check for unsupported ioctl 2025-07-16 16:14:00 -07:00