public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Rae Moar <rmoar@google.com>,
	brendanhiggins@google.com, davidgow@google.com,
	dlatypov@google.com
Cc: oe-kbuild-all@lists.linux.dev, skhan@linuxfoundation.org,
	kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, Rae Moar <rmoar@google.com>
Subject: Re: [PATCH v1 1/3] kunit: fix bug in debugfs logs of parameterized tests
Date: Wed, 1 Feb 2023 07:14:36 +0800	[thread overview]
Message-ID: <202302010709.7ZmEen4w-lkp@intel.com> (raw)
In-Reply-To: <20230131220355.1603527-2-rmoar@google.com>

Hi Rae,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on 766f4f2514d2d18bcbd60a058188fb502dea5ddf]

url:    https://github.com/intel-lab-lkp/linux/commits/Rae-Moar/kunit-fix-bug-in-debugfs-logs-of-parameterized-tests/20230201-060537
base:   766f4f2514d2d18bcbd60a058188fb502dea5ddf
patch link:    https://lore.kernel.org/r/20230131220355.1603527-2-rmoar%40google.com
patch subject: [PATCH v1 1/3] kunit: fix bug in debugfs logs of parameterized tests
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230201/202302010709.7ZmEen4w-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/c8b669e1d139e1ee08121b184d859e45d7a02940
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Rae-Moar/kunit-fix-bug-in-debugfs-logs-of-parameterized-tests/20230201-060537
        git checkout c8b669e1d139e1ee08121b184d859e45d7a02940
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash lib/

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

All warnings (new ones prefixed by >>):

   lib/kunit/test.c: In function '__kunit_fail_current_test_impl':
   lib/kunit/test.c:40:9: warning: function '__kunit_fail_current_test_impl' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
      40 |         len = vsnprintf(NULL, 0, fmt, args) + 1;
         |         ^~~
   lib/kunit/test.c:48:9: warning: function '__kunit_fail_current_test_impl' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
      48 |         vsnprintf(buffer, len, fmt, args);
         |         ^~~~~~~~~
   lib/kunit/test.c: In function 'kunit_log_append':
>> lib/kunit/test.c:133:1: warning: the frame size of 1500 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     133 | }
         | ^


vim +133 lib/kunit/test.c

acd8e8407b8fcc David Gow    2021-08-03  110  
e2219db280e3fe Alan Maguire 2020-03-26  111  /*
e2219db280e3fe Alan Maguire 2020-03-26  112   * Append formatted message to log, size of which is limited to
e2219db280e3fe Alan Maguire 2020-03-26  113   * KUNIT_LOG_SIZE bytes (including null terminating byte).
e2219db280e3fe Alan Maguire 2020-03-26  114   */
e2219db280e3fe Alan Maguire 2020-03-26  115  void kunit_log_append(char *log, const char *fmt, ...)
e2219db280e3fe Alan Maguire 2020-03-26  116  {
e2219db280e3fe Alan Maguire 2020-03-26  117  	char line[KUNIT_LOG_SIZE];
e2219db280e3fe Alan Maguire 2020-03-26  118  	va_list args;
e2219db280e3fe Alan Maguire 2020-03-26  119  	int len_left;
e2219db280e3fe Alan Maguire 2020-03-26  120  
e2219db280e3fe Alan Maguire 2020-03-26  121  	if (!log)
e2219db280e3fe Alan Maguire 2020-03-26  122  		return;
e2219db280e3fe Alan Maguire 2020-03-26  123  
e2219db280e3fe Alan Maguire 2020-03-26  124  	len_left = KUNIT_LOG_SIZE - strlen(log) - 1;
e2219db280e3fe Alan Maguire 2020-03-26  125  	if (len_left <= 0)
e2219db280e3fe Alan Maguire 2020-03-26  126  		return;
e2219db280e3fe Alan Maguire 2020-03-26  127  
e2219db280e3fe Alan Maguire 2020-03-26  128  	va_start(args, fmt);
e2219db280e3fe Alan Maguire 2020-03-26  129  	vsnprintf(line, sizeof(line), fmt, args);
e2219db280e3fe Alan Maguire 2020-03-26  130  	va_end(args);
e2219db280e3fe Alan Maguire 2020-03-26  131  
e2219db280e3fe Alan Maguire 2020-03-26  132  	strncat(log, line, len_left);
e2219db280e3fe Alan Maguire 2020-03-26 @133  }
e2219db280e3fe Alan Maguire 2020-03-26  134  EXPORT_SYMBOL_GPL(kunit_log_append);
e2219db280e3fe Alan Maguire 2020-03-26  135  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

  reply	other threads:[~2023-01-31 23:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 22:03 [PATCH v1 0/3] kunit: fix bugs in debugfs logs Rae Moar
2023-01-31 22:03 ` [PATCH v1 1/3] kunit: fix bug in debugfs logs of parameterized tests Rae Moar
2023-01-31 23:14   ` kernel test robot [this message]
2023-02-03  6:52   ` kernel test robot
2023-02-09  5:06   ` David Gow
2023-02-10 20:02     ` Rae Moar
2023-01-31 22:03 ` [PATCH v1 2/3] kunit: fix bug in the order of lines in debugfs logs Rae Moar
2023-02-09  5:06   ` David Gow
2023-02-10 19:28     ` Rae Moar
2023-01-31 22:03 ` [PATCH v1 3/3] kunit: fix bug of extra newline characters " Rae Moar
2023-02-09  5:06   ` David Gow
2023-02-10 19:46     ` Rae Moar

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=202302010709.7ZmEen4w-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=dlatypov@google.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rmoar@google.com \
    --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