All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Gow <davidgow@google.com>,
	Benjamin Berg <benjamin@sipsolutions.net>,
	Brendan Higgins <brendan.higgins@linux.dev>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Rae Moar <rmoar@google.com>, Daniel Latypov <dlatypov@google.com>
Cc: oe-kbuild-all@lists.linux.dev, David Gow <davidgow@google.com>,
	maxime@cerno.tech, Stephen Boyd <sboyd@kernel.org>,
	kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, Sadiya Kazi <sadiyakazi@google.com>
Subject: Re: [PATCH v3 1/4] kunit: Always run cleanup from a test kthread
Date: Fri, 21 Apr 2023 15:06:29 +0800	[thread overview]
Message-ID: <202304211445.r8UQGW3F-lkp@intel.com> (raw)
In-Reply-To: <20230421040218.2156548-1-davidgow@google.com>

Hi David,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.3-rc7 next-20230420]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/David-Gow/Documentation-kunit-Note-that-assertions-should-not-be-used-in-cleanup/20230421-120437
patch link:    https://lore.kernel.org/r/20230421040218.2156548-1-davidgow%40google.com
patch subject: [PATCH v3 1/4] kunit: Always run cleanup from a test kthread
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230421/202304211445.r8UQGW3F-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/e6f2b343739c4656e2090449ad7eac10db57dde9
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review David-Gow/Documentation-kunit-Note-that-assertions-should-not-be-used-in-cleanup/20230421-120437
        git checkout e6f2b343739c4656e2090449ad7eac10db57dde9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 olddefconfig
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash lib/kunit/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304211445.r8UQGW3F-lkp@intel.com/

All warnings (new ones prefixed by >>):

   lib/kunit/test.c: In function 'kunit_catch_run_case':
>> lib/kunit/test.c:440:29: warning: unused variable 'suite' [-Wunused-variable]
     440 |         struct kunit_suite *suite = ctx->suite;
         |                             ^~~~~


vim +/suite +440 lib/kunit/test.c

e6f2b343739c46 David Gow       2023-04-21  434  
e6f2b343739c46 David Gow       2023-04-21  435  
5f3e06208920ee Brendan Higgins 2019-09-23  436  static void kunit_catch_run_case(void *data)
5f3e06208920ee Brendan Higgins 2019-09-23  437  {
5f3e06208920ee Brendan Higgins 2019-09-23  438  	struct kunit_try_catch_context *ctx = data;
5f3e06208920ee Brendan Higgins 2019-09-23  439  	struct kunit *test = ctx->test;
5f3e06208920ee Brendan Higgins 2019-09-23 @440  	struct kunit_suite *suite = ctx->suite;
5f3e06208920ee Brendan Higgins 2019-09-23  441  	int try_exit_code = kunit_try_catch_get_result(&test->try_catch);
5f3e06208920ee Brendan Higgins 2019-09-23  442  
5f3e06208920ee Brendan Higgins 2019-09-23  443  	if (try_exit_code) {
5f3e06208920ee Brendan Higgins 2019-09-23  444  		kunit_set_failure(test);
5f3e06208920ee Brendan Higgins 2019-09-23  445  		/*
5f3e06208920ee Brendan Higgins 2019-09-23  446  		 * Test case could not finish, we have no idea what state it is
5f3e06208920ee Brendan Higgins 2019-09-23  447  		 * in, so don't do clean up.
5f3e06208920ee Brendan Higgins 2019-09-23  448  		 */
5f3e06208920ee Brendan Higgins 2019-09-23  449  		if (try_exit_code == -ETIMEDOUT) {
5f3e06208920ee Brendan Higgins 2019-09-23  450  			kunit_err(test, "test case timed out\n");
5f3e06208920ee Brendan Higgins 2019-09-23  451  		/*
5f3e06208920ee Brendan Higgins 2019-09-23  452  		 * Unknown internal error occurred preventing test case from
5f3e06208920ee Brendan Higgins 2019-09-23  453  		 * running, so there is nothing to clean up.
5f3e06208920ee Brendan Higgins 2019-09-23  454  		 */
5f3e06208920ee Brendan Higgins 2019-09-23  455  		} else {
5f3e06208920ee Brendan Higgins 2019-09-23  456  			kunit_err(test, "internal error occurred preventing test case from running: %d\n",
5f3e06208920ee Brendan Higgins 2019-09-23  457  				  try_exit_code);
5f3e06208920ee Brendan Higgins 2019-09-23  458  		}
5f3e06208920ee Brendan Higgins 2019-09-23  459  		return;
5f3e06208920ee Brendan Higgins 2019-09-23  460  	}
5f3e06208920ee Brendan Higgins 2019-09-23  461  }
5f3e06208920ee Brendan Higgins 2019-09-23  462  

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

  parent reply	other threads:[~2023-04-21  7:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  4:02 [PATCH v3 1/4] kunit: Always run cleanup from a test kthread David Gow
2023-04-21  4:02 ` [PATCH v3 2/4] Documentation: kunit: Note that assertions should not be used in cleanup David Gow
2023-04-25  5:56   ` Sadiya Kazi
2023-04-21  4:02 ` [PATCH v3 3/4] Documentation: kunit: Warn that exit functions run even if init fails David Gow
2023-04-25  5:48   ` Sadiya Kazi
2023-04-21  4:02 ` [PATCH v3 4/4] kunit: example: Provide example exit functions David Gow
2023-04-25 19:11   ` Rae Moar
2023-04-21  7:06 ` kernel test robot [this message]
2023-04-21  8:52 ` [PATCH v3 1/4] kunit: Always run cleanup from a test kthread Benjamin Berg
2023-04-25 15:47 ` Maxime Ripard

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=202304211445.r8UQGW3F-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=benjamin@sipsolutions.net \
    --cc=brendan.higgins@linux.dev \
    --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=maxime@cerno.tech \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rmoar@google.com \
    --cc=sadiyakazi@google.com \
    --cc=sboyd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.