Re: [PATCH 2/3] kselftest: add support for skipped tests

From: kernel test robot
Date: Wed Feb 10 2021 - 04:16:14 EST


Hi Timur,

I love your patch! Yet something to improve:

[auto build test ERROR on kselftest/next]
[also build test ERROR on linus/master hnaz-linux-mm/master v5.11-rc7 next-20210125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Timur-Tabi/add-support-for-never-printing-hashed-addresses/20210210-131927
base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
config: h8300-randconfig-s031-20210209 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://github.com/0day-ci/linux/commit/4387344bd9c51be401880f17c193e4956036c067
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Timur-Tabi/add-support-for-never-printing-hashed-addresses/20210210-131927
git checkout 4387344bd9c51be401880f17c193e4956036c067
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=h8300

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from lib/test_bitmap.c:17:
lib/test_bitmap.c: In function 'test_bitmap_init':
>> lib/../tools/testing/selftests/kselftest_module.h:45:48: error: 'skipped_tests' undeclared (first use in this function); did you mean 'failed_tests'?
45 | return kstm_report(total_tests, failed_tests, skipped_tests); \
| ^~~~~~~~~~~~~
lib/test_bitmap.c:637:1: note: in expansion of macro 'KSTM_MODULE_LOADERS'
637 | KSTM_MODULE_LOADERS(test_bitmap);
| ^~~~~~~~~~~~~~~~~~~
lib/../tools/testing/selftests/kselftest_module.h:45:48: note: each undeclared identifier is reported only once for each function it appears in
45 | return kstm_report(total_tests, failed_tests, skipped_tests); \
| ^~~~~~~~~~~~~
lib/test_bitmap.c:637:1: note: in expansion of macro 'KSTM_MODULE_LOADERS'
637 | KSTM_MODULE_LOADERS(test_bitmap);
| ^~~~~~~~~~~~~~~~~~~
lib/test_bitmap.c:637:1: error: control reaches end of non-void function [-Werror=return-type]
637 | KSTM_MODULE_LOADERS(test_bitmap);
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors


vim +45 lib/../tools/testing/selftests/kselftest_module.h

39
40 #define KSTM_MODULE_LOADERS(__module) \
41 static int __init __module##_init(void) \
42 { \
43 pr_info("loaded.\n"); \
44 selftest(); \
> 45 return kstm_report(total_tests, failed_tests, skipped_tests); \
46 } \
47 static void __exit __module##_exit(void) \
48 { \
49 pr_info("unloaded.\n"); \
50 } \
51 module_init(__module##_init); \
52 module_exit(__module##_exit)
53

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip