linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Gow <davidgow@google.com>,
	Brendan Higgins <brendanhiggins@google.com>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: kbuild-all@lists.01.org, Arpitha Raghunandan <98.arpi@gmail.com>,
	Daniel Latypov <dlatypov@google.com>,
	linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
	linux-kernel@vger.kernel.org, David Gow <davidgow@google.com>
Subject: Re: [PATCH] kunit: Print test statistics on failure
Date: Sat, 12 Dec 2020 04:22:26 +0800	[thread overview]
Message-ID: <202012120459.AGKKTOzx-lkp@intel.com> (raw)
In-Reply-To: <20201211072319.533803-1-davidgow@google.com>

[-- Attachment #1: Type: text/plain, Size: 7372 bytes --]

Hi David,

I love your patch! Yet something to improve:

[auto build test ERROR on 5f6b99d0287de2c2d0b5e7abcb0092d553ad804a]

url:    https://github.com/0day-ci/linux/commits/David-Gow/kunit-Print-test-statistics-on-failure/20201211-153009
base:    5f6b99d0287de2c2d0b5e7abcb0092d553ad804a
config: c6x-randconfig-r004-20201210 (attached as .config)
compiler: c6x-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=c6x 

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

All errors (new ones prefixed by >>):

>> lib/kunit/test.c:27:53: error: expected ')' before 'int'
      27 | core_param(kunit_stats_enabled, kunit_stats_enabled, int, 0644);
         |                                                     ^~~~
         |                                                     )
   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)",

vim +27 lib/kunit/test.c

    19	
    20	/*
    21	 * KUnit statistic mode:
    22	 * 0 - disabled
    23	 * 1 - only when there is at least one failure, and more than one subtest
    24	 * 2 - enabled
    25	 */
    26	static int kunit_stats_enabled = 1;
  > 27	core_param(kunit_stats_enabled, kunit_stats_enabled, int, 0644);
    28	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26912 bytes --]

  parent reply	other threads:[~2020-12-11 21:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11  7:23 [PATCH] kunit: Print test statistics on failure David Gow
2020-12-11 20:16 ` kernel test robot
2020-12-11 20:22 ` kernel test robot [this message]
2020-12-11 23:41 ` Daniel Latypov
2021-02-05 23:27 ` Brendan Higgins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202012120459.AGKKTOzx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=98.arpi@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=dlatypov@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).