test_bitmap: unit tests for lib/bitmap.c

This is mainly testing bitmap construction and conversion to/from u32[]
for now.

Tested:
  qemu i386, x86_64, ppc, ppc64 BE and LE, ARM.

Signed-off-by: David Decotigny <decot@googlers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David Decotigny
2016-02-19 09:24:00 -05:00
committed by David S. Miller
parent e52bc7c28a
commit 5fd003f56c
5 changed files with 378 additions and 1 deletions

View File

@@ -3,6 +3,6 @@
# No binaries, but make sure arg-less "make" doesn't trigger "run_tests"
all:
TEST_PROGS := printf.sh
TEST_PROGS := printf.sh bitmap.sh
include ../lib.mk

View File

@@ -0,0 +1,10 @@
#!/bin/sh
# Runs bitmap infrastructure tests using test_bitmap kernel module
if /sbin/modprobe -q test_bitmap; then
/sbin/modprobe -q -r test_bitmap
echo "bitmap: ok"
else
echo "bitmap: [FAIL]"
exit 1
fi