[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202012120412.8z3Tq5Oi-lkp@intel.com>
Date: Sat, 12 Dec 2020 04:16:06 +0800
From: kernel test robot <lkp@...el.com>
To: David Gow <davidgow@...gle.com>,
Brendan Higgins <brendanhiggins@...gle.com>,
Shuah Khan <skhan@...uxfoundation.org>,
Andy Shevchenko <andy.shevchenko@...il.com>
Cc: kbuild-all@...ts.01.org, Arpitha Raghunandan <98.arpi@...il.com>,
Daniel Latypov <dlatypov@...gle.com>,
linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
linux-kernel@...r.kernel.org, David Gow <davidgow@...gle.com>
Subject: Re: [PATCH] kunit: Print test statistics on failure
Hi David,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 5f6b99d0287de2c2d0b5e7abcb0092d553ad804a]
url: https://github.com/0day-ci/linux/commits/David-Gow/kunit-Print-test-statistics-on-failure/20201211-153009
base: 5f6b99d0287de2c2d0b5e7abcb0092d553ad804a
config: arc-randconfig-r006-20201210 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/2bdf1b55a1b3673a1a02f71457fc52b497fc7223
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review David-Gow/kunit-Print-test-statistics-on-failure/20201211-153009
git checkout 2bdf1b55a1b3673a1a02f71457fc52b497fc7223
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
In file included from lib/kunit/test.c:9:
lib/kunit/test.c: In function 'kunit_print_test_stats':
>> include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:46:12: note: in expansion of macro 'KERN_INFO'
46 | kunit_log(KERN_INFO, test,
| ^~~~~~~~~
lib/kunit/test.c:48:14: note: format string is defined here
48 | "# %s: %lu / %lu test parameters failed",
| ~~^
| |
| long unsigned int
| %u
In file included from lib/kunit/test.c:9:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:46:12: note: in expansion of macro 'KERN_INFO'
46 | kunit_log(KERN_INFO, test,
| ^~~~~~~~~
lib/kunit/test.c:48:20: note: format string is defined here
48 | "# %s: %lu / %lu test parameters failed",
| ~~^
| |
| long unsigned int
| %u
lib/kunit/test.c: In function 'kunit_log_append':
lib/kunit/test.c:72:2: warning: function 'kunit_log_append' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
72 | vsnprintf(line, sizeof(line), fmt, args);
| ^~~~~~~~~
In file included from lib/kunit/test.c:9:
lib/kunit/test.c: In function 'kunit_print_suite_stats':
>> include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:394:12: note: in expansion of macro 'KERN_INFO'
394 | kunit_log(KERN_INFO, suite,
| ^~~~~~~~~
lib/kunit/test.c:395:15: note: format string is defined here
395 | "# %s: (%lu / %lu) tests failed (%lu / %lu test parameters)",
| ~~^
| |
| long unsigned int
| %u
In file included from lib/kunit/test.c:9:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:394:12: note: in expansion of macro 'KERN_INFO'
394 | kunit_log(KERN_INFO, suite,
| ^~~~~~~~~
lib/kunit/test.c:395:21: note: format string is defined here
395 | "# %s: (%lu / %lu) tests failed (%lu / %lu test parameters)",
| ~~^
| |
| long unsigned int
| %u
In file included from lib/kunit/test.c:9:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:394:12: note: in expansion of macro 'KERN_INFO'
394 | kunit_log(KERN_INFO, suite,
| ^~~~~~~~~
lib/kunit/test.c:395:40: note: format string is defined here
395 | "# %s: (%lu / %lu) tests failed (%lu / %lu test parameters)",
| ~~^
| |
| long unsigned int
| %u
In file included from lib/kunit/test.c:9:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/kunit/test.h:621:10: note: in definition of macro 'kunit_log'
621 | printk(lvl fmt, ##__VA_ARGS__); \
| ^~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
14 | #define KERN_INFO KERN_SOH "6" /* informational */
| ^~~~~~~~
lib/kunit/test.c:394:12: note: in expansion of macro 'KERN_INFO'
394 | kunit_log(KERN_INFO, suite,
| ^~~~~~~~~
lib/kunit/test.c:395:46: note: format string is defined here
395 | "# %s: (%lu / %lu) tests failed (%lu / %lu test parameters)",
| ~~^
| |
| long unsigned int
| %u
vim +5 include/linux/kern_levels.h
314ba3520e513a Joe Perches 2012-07-30 4
04d2c8c83d0e3a Joe Perches 2012-07-30 @5 #define KERN_SOH "\001" /* ASCII Start Of Header */
04d2c8c83d0e3a Joe Perches 2012-07-30 6 #define KERN_SOH_ASCII '\001'
04d2c8c83d0e3a Joe Perches 2012-07-30 7
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (32103 bytes)
Powered by blists - more mailing lists