Re: [PATCH v3 1/4] kunit: Support skipped tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.13-rc5 next-20210607]
[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]

url:    https://github.com/0day-ci/linux/commits/David-Gow/kunit-Support-skipped-tests/20210608-145216
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 614124bea77e452aa6df7a8714e8bc820b489922
config: s390-randconfig-r021-20210608 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d32cc150feb72f315a5bbd34f92e7beca21a50da)
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
        # install s390 cross compiling tool for clang build
        # apt-get install binutils-s390x-linux-gnu
        # https://github.com/0day-ci/linux/commit/616d7103da7386e89d71208b4df68453790e30ad
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review David-Gow/kunit-Support-skipped-tests/20210608-145216
        git checkout 616d7103da7386e89d71208b4df68453790e30ad
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390 

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

All errors (new ones prefixed by >>):

   lib/kunit/kunit-test.c:458:2: warning: comparison of distinct pointer types ('typeof (__left) *' (aka 'enum kunit_status *') and 'typeof (__right) *' (aka 'int *')) [-Wcompare-distinct-pointer-types]
           KUNIT_EXPECT_EQ(test, fake.status, KUNIT_SUCCESS);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:1325:2: note: expanded from macro 'KUNIT_EXPECT_EQ'
           KUNIT_BINARY_EQ_ASSERTION(test, KUNIT_EXPECTATION, left, right)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:962:2: note: expanded from macro 'KUNIT_BINARY_EQ_ASSERTION'
           KUNIT_BINARY_EQ_MSG_ASSERTION(test,                                    \
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:952:2: note: expanded from macro 'KUNIT_BINARY_EQ_MSG_ASSERTION'
           KUNIT_BASE_EQ_MSG_ASSERTION(test,                                      \
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:863:2: note: expanded from macro 'KUNIT_BASE_EQ_MSG_ASSERTION'
           KUNIT_BASE_BINARY_ASSERTION(test,                                      \
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:839:9: note: expanded from macro 'KUNIT_BASE_BINARY_ASSERTION'
           ((void)__typecheck(__left, __right));                                  \
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
           (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                      ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
>> lib/kunit/kunit-test.c:459:2: error: array initializer must be an initializer list or string literal
           KUNIT_EXPECT_STREQ(test, fake.status_comment, "");
           ^
   include/kunit/test.h:1507:2: note: expanded from macro 'KUNIT_EXPECT_STREQ'
           KUNIT_BINARY_STR_EQ_ASSERTION(test, KUNIT_EXPECTATION, left, right)
           ^
   include/kunit/test.h:1223:2: note: expanded from macro 'KUNIT_BINARY_STR_EQ_ASSERTION'
           KUNIT_BINARY_STR_EQ_MSG_ASSERTION(test,                                \
           ^
   include/kunit/test.h:1216:2: note: expanded from macro 'KUNIT_BINARY_STR_EQ_MSG_ASSERTION'
           KUNIT_BINARY_STR_ASSERTION(test,                                       \
           ^
   include/kunit/test.h:1193:15: note: expanded from macro 'KUNIT_BINARY_STR_ASSERTION'
           typeof(left) __left = (left);                                          \
                        ^
   lib/kunit/kunit-test.c:466:2: error: array initializer must be an initializer list or string literal
           KUNIT_EXPECT_STREQ(test, fake.status_comment, "Accepts format string: YES");
           ^
   include/kunit/test.h:1507:2: note: expanded from macro 'KUNIT_EXPECT_STREQ'
           KUNIT_BINARY_STR_EQ_ASSERTION(test, KUNIT_EXPECTATION, left, right)
           ^
   include/kunit/test.h:1223:2: note: expanded from macro 'KUNIT_BINARY_STR_EQ_ASSERTION'
           KUNIT_BINARY_STR_EQ_MSG_ASSERTION(test,                                \
           ^
   include/kunit/test.h:1216:2: note: expanded from macro 'KUNIT_BINARY_STR_EQ_MSG_ASSERTION'
           KUNIT_BINARY_STR_ASSERTION(test,                                       \
           ^
   include/kunit/test.h:1193:15: note: expanded from macro 'KUNIT_BINARY_STR_ASSERTION'
           typeof(left) __left = (left);                                          \
                        ^
   1 warning and 2 errors generated.


vim +459 lib/kunit/kunit-test.c

   450	
   451	static void kunit_status_mark_skipped_test(struct kunit *test)
   452	{
   453		struct kunit fake;
   454	
   455		kunit_init_test(&fake, "fake test", NULL);
   456	
   457		/* Before: Should be SUCCESS with no comment. */
   458		KUNIT_EXPECT_EQ(test, fake.status, KUNIT_SUCCESS);
 > 459		KUNIT_EXPECT_STREQ(test, fake.status_comment, "");
   460	
   461		/* Mark the test as skipped. */
   462		kunit_mark_skipped(&fake, "Accepts format string: %s", "YES");
   463	
   464		/* After: Should be SKIPPED with our comment. */
   465		KUNIT_EXPECT_EQ(test, fake.status, (enum kunit_status)KUNIT_SKIPPED);
   466		KUNIT_EXPECT_STREQ(test, fake.status_comment, "Accepts format string: YES");
   467	}
   468	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux