All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android12-5.4 14381/28554] htmldocs: ./include/kunit/test.h:240: warning: Excess function parameter 'suites' description in 'kunit_test_suites'
Date: Sat, 30 Sep 2023 05:50:28 +0800	[thread overview]
Message-ID: <202309300511.p74AI5M0-lkp@intel.com> (raw)

Hi Alan,

FYI, the error/warning still remains.

tree:   https://android.googlesource.com/kernel/common android12-5.4
head:   a1b9dbe5628adf6bc61b5bb150dd2fb2b286fda0
commit: 7678fa7446929653a803f010955f19dd26d93c80 [14381/28554] UPSTREAM: kunit: allow kunit tests to be loaded as a module
reproduce: (https://download.01.org/0day-ci/archive/20230930/202309300511.p74AI5M0-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309300511.p74AI5M0-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> ./include/kunit/test.h:240: warning: Excess function parameter 'suites' description in 'kunit_test_suites'

vim +240 ./include/kunit/test.h

   199	
   200	/**
   201	 * kunit_test_suites() - used to register one or more &struct kunit_suite
   202	 *			 with KUnit.
   203	 *
   204	 * @suites: a statically allocated list of &struct kunit_suite.
   205	 *
   206	 * Registers @suites with the test framework. See &struct kunit_suite for
   207	 * more information.
   208	 *
   209	 * When builtin,  KUnit tests are all run as late_initcalls; this means
   210	 * that they cannot test anything where tests must run at a different init
   211	 * phase. One significant restriction resulting from this is that KUnit
   212	 * cannot reliably test anything that is initialize in the late_init phase;
   213	 * another is that KUnit is useless to test things that need to be run in
   214	 * an earlier init phase.
   215	 *
   216	 * An alternative is to build the tests as a module.  Because modules
   217	 * do not support multiple late_initcall()s, we need to initialize an
   218	 * array of suites for a module.
   219	 *
   220	 * TODO(brendanhiggins@google.com): Don't run all KUnit tests as
   221	 * late_initcalls.  I have some future work planned to dispatch all KUnit
   222	 * tests from the same place, and at the very least to do so after
   223	 * everything else is definitely initialized.
   224	 */
   225	#define kunit_test_suites(...)						\
   226		static struct kunit_suite *suites[] = { __VA_ARGS__, NULL};	\
   227		static int kunit_test_suites_init(void)				\
   228		{								\
   229			unsigned int i;						\
   230			for (i = 0; suites[i] != NULL; i++)			\
   231				kunit_run_tests(suites[i]);			\
   232			return 0;						\
   233		}								\
   234		late_initcall(kunit_test_suites_init);				\
   235		static void __exit kunit_test_suites_exit(void)			\
   236		{								\
   237			return;							\
   238		}								\
   239		module_exit(kunit_test_suites_exit)
 > 240	

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

                 reply	other threads:[~2023-09-29 21:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202309300511.p74AI5M0-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cros-kernel-buildreports@googlegroups.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.