aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform/surface/aggregator/ssh_parser.h
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2022-10-21 08:03:40 +0200
committerPaul E. McKenney <paulmck@kernel.org>2022-10-28 15:17:22 -0700
commitc80b5a0a22b673d5a02e64626a8dfc2f738be7d9 (patch)
treefe958a285adaee54e1931e2cd6d013b628971df1 /drivers/platform/surface/aggregator/ssh_parser.h
parentb3f4f51ea68a495f8a5956064c33dce711a2df91 (diff)
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 'drivers/platform/surface/aggregator/ssh_parser.h')
0 files changed, 0 insertions, 0 deletions