lib: test_bitmap: add bitmap_print_bitmask/list_to_buf test cases
authorBarry Song <song.bao.hua@hisilicon.com>
Fri, 6 Aug 2021 11:02:48 +0000 (23:02 +1200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Aug 2021 08:27:49 +0000 (10:27 +0200)
commit291f93ca339f5b5e6e90ad037bb8271f0f618165
treef366b035c17cd85dcece8a8d43138eeae5666c22
parent1fae562983ca5c7eb36d4974be5e235374661806
lib: test_bitmap: add bitmap_print_bitmask/list_to_buf test cases

The added test items cover both cases where bitmap buf of the printed
result is greater than and less than 4KB.
And it also covers the case where offset for printing is non-zero
which will happen when printed buf is larger than one page in
sysfs bin_attribute.

Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Link: https://lore.kernel.org/r/20210806110251.560-3-song.bao.hua@hisilicon.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/test_bitmap.c