13 Aug, 2020
1 commit
-
Currently, the bitops test consists of two parts: one part is executed
during module load, the second part during module unload. This is
cumbersome for the user, as he has to perform two steps to execute all
tests, and is different from most (all?) other tests.Merge the two parts, so both are executed during module load.
Signed-off-by: Geert Uytterhoeven
Signed-off-by: Andrew Morton
Reviewed-by: Andy Shevchenko
Cc: Wei Yang
Cc: Jesse Brandeburg
Link: http://lkml.kernel.org/r/20200706112900.7097-1-geert@linux-m68k.org
Signed-off-by: Linus Torvalds
11 Jun, 2020
1 commit
-
Add some tests for get_count_order/long in test_bitops.c.
[akpm@linux-foundation.org: define local `i']
[akpm@linux-foundation.org: enhancement, warning fix, cleanup per Geert]
[akpm@linux-foundation.org: fix loop bound, per Wei Yang]Signed-off-by: Wei Yang
Signed-off-by: Andrew Morton
Reviewed-by: Andy Shevchenko
Cc: Christian Brauner
Cc: Geert Uytterhoeven
Link: http://lkml.kernel.org/r/20200602223728.32722-1-richard.weiyang@gmail.com
Signed-off-by: Linus Torvalds
05 Jun, 2020
1 commit
-
Test some bit clears/sets to make sure assembly doesn't change, and that
the set_bit and clear_bit functions work and don't cause sparse warnings.Instruct Kbuild to build this file with extra warning level -Wextra, to
catch new issues, and also doesn't hurt to build with C=1.This was used to test changes to arch/x86/include/asm/bitops.h.
In particular, sparse (C=1) was very concerned when the last bit before a
natural boundary, like 7, or 31, was being tested, as this causes sign
extension (0xffffff7f) for instance when clearing bit 7.Recommended usage:
make defconfig
scripts/config -m CONFIG_TEST_BITOPS
make modules_prepare
make C=1 W=1 lib/test_bitops.ko
objdump -S -d lib/test_bitops.ko
insmod lib/test_bitops.ko
rmmod lib/test_bitops.ko, there should be no compiler/sparse warnings and no
error messages in log.Link: http://lkml.kernel.org/r/20200310221747.2848474-2-jesse.brandeburg@intel.com
Signed-off-by: Jesse Brandeburg
Reviewed-by: Andy Shevchenko
Cc: Thomas Gleixner
CcL Ingo Molnar
Signed-off-by: Andrew Morton
Cc: Borislav Petkov
Cc: Rasmus Villemoes
Cc: Dan Williams
Cc: Peter Zijlstra
Cc: Wei Yang
Cc: Christian Brauner
Signed-off-by: Linus Torvalds