summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2022-10-21 09:03:40 +0300
committerPaul E. McKenney <paulmck@kernel.org>2022-10-29 01:17:22 +0300
commitc80b5a0a22b673d5a02e64626a8dfc2f738be7d9 (patch)
treefe958a285adaee54e1931e2cd6d013b628971df1 /scripts/lib/kdoc
parentb3f4f51ea68a495f8a5956064c33dce711a2df91 (diff)
downloadlinux-c80b5a0a22b673d5a02e64626a8dfc2f738be7d9.tar.xz
selftests/nolibc: Add 7 tests for memcmp()
This adds 7 combinations of input values for memcmp() using signed and unsigned bytes, which will trigger on the original code before Rasmus' fix. This is mostly aimed at helping backporters verify their work, and showing how tests for corner cases can be added to the selftests suite. Before the fix it reports: 12 memcmp_20_20 = 0 [OK] 13 memcmp_20_60 = -64 [OK] 14 memcmp_60_20 = 64 [OK] 15 memcmp_20_e0 = 64 [FAIL] 16 memcmp_e0_20 = -64 [FAIL] 17 memcmp_80_e0 = -96 [OK] 18 memcmp_e0_80 = 96 [OK] And after: 12 memcmp_20_20 = 0 [OK] 13 memcmp_20_60 = -64 [OK] 14 memcmp_60_20 = 64 [OK] 15 memcmp_20_e0 = -192 [OK] 16 memcmp_e0_20 = 192 [OK] 17 memcmp_80_e0 = -96 [OK] 18 memcmp_e0_80 = 96 [OK] Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc')
0 files changed, 0 insertions, 0 deletions