linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Daniel Latypov <dlatypov@google.com>
Cc: kbuild@lists.01.org, Brendan Higgins <brendanhiggins@google.com>,
	David Gow <davidgow@google.com>,
	lkp@intel.com, kbuild-all@lists.01.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH 1/3] kunit: add kunit.filter_glob cmdline option to filter suites
Date: Mon, 8 Feb 2021 14:12:23 +0300	[thread overview]
Message-ID: <20210208111223.GK20820@kadam> (raw)
In-Reply-To: <CAGS_qxpOWG_chZEAtKFPPbcfet=ZQYeo9_3k5tHSj4WHCfMToA@mail.gmail.com>

On Thu, Feb 04, 2021 at 09:30:43AM -0800, Daniel Latypov wrote:
> On Wed, Feb 3, 2021 at 11:13 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> >
> > Hi Daniel,
> >
> > url:    https://github.com/0day-ci/linux/commits/Daniel-Latypov/kunit-support-running-subsets-of-test-suites-from/20210204-074405 
> > base:   88bb507a74ea7d75fa49edd421eaa710a7d80598
> > config: x86_64-randconfig-m001-20210202 (attached as .config)
> > compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > smatch warnings:
> > lib/kunit/executor.c:110 kunit_run_all_tests() error: double free of 'suite_set.start'
> >
> > vim +110 lib/kunit/executor.c
> >
> > 8c0d884986ba22 Brendan Higgins 2020-08-04   96  int kunit_run_all_tests(void)
> > aac35468ca20a3 Alan Maguire    2020-08-04   97  {
> > aac35468ca20a3 Alan Maguire    2020-08-04   98          struct kunit_suite * const * const *suites;
> > aac35468ca20a3 Alan Maguire    2020-08-04   99
> > d5554dd78a454b Daniel Latypov  2021-02-03  100          struct suite_set suite_set = kunit_filter_suites();
> > 45dcbb6f5ef78b Brendan Higgins 2020-08-04  101
> > d5554dd78a454b Daniel Latypov  2021-02-03  102          kunit_print_tap_header(&suite_set);
> > d5554dd78a454b Daniel Latypov  2021-02-03  103
> > d5554dd78a454b Daniel Latypov  2021-02-03  104          for (suites = suite_set.start; suites < suite_set.end; suites++)
> > aac35468ca20a3 Alan Maguire    2020-08-04  105                  __kunit_test_suites_init(*suites);
> > aac35468ca20a3 Alan Maguire    2020-08-04  106
> > d5554dd78a454b Daniel Latypov  2021-02-03  107          if (filter_glob) { /* a copy was made of each array */
> > d5554dd78a454b Daniel Latypov  2021-02-03  108                  for (suites = suite_set.start; suites < suite_set.end; suites++)
> >                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^
> > This will free "suite_set.start" will in the first iteration through the
> > loop
> 
> Ah, the loop is supposed to contain `kfree(*suites)`.
> I'll fix the patch and resend.
> 
> I'm not familiar with conventions but it feels like adding Reported-by
> on the amended patch would almost imply the report suggested the need
> for the ability to filter suites.
> So I'll add an informal attribution in the cover letter.
> 
> Thanks!

These emails are autogenerated by the kbuild bot and I just look them
over and hit forward.

regards,
dan carpenter


  reply	other threads:[~2021-02-08 11:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 23:41 [PATCH 0/3] kunit: support running subsets of test suites from Daniel Latypov
2021-02-03 23:41 ` [PATCH 1/3] kunit: add kunit.filter_glob cmdline option to filter suites Daniel Latypov
2021-02-04  7:11   ` Dan Carpenter
2021-02-04 17:30     ` Daniel Latypov
2021-02-08 11:12       ` Dan Carpenter [this message]
2021-02-03 23:41 ` [PATCH 2/3] kunit: tool: add support for filtering suites by glob Daniel Latypov
2021-02-03 23:41 ` [PATCH 3/3] kunit: tool: fix unintentional statefulness in run_kernel() Daniel Latypov

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=20210208111223.GK20820@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=dlatypov@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lkp@intel.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;
as well as URLs for NNTP newsgroup(s).