lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202008031451.DTPNfa1b%lkp@intel.com>
Date:   Mon, 3 Aug 2020 14:16:59 +0800
From:   kernel test robot <lkp@...el.com>
To:     Vitor Massaru Iha <vitor@...saru.org>, kunit-dev@...glegroups.com
Cc:     kbuild-all@...ts.01.org, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org, brendanhiggins@...gle.com,
        skhan@...uxfoundation.org,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        gregkh@...uxfoundation.org, tglx@...utronix.de, fkostenzer@...e.at,
        andriy.shevchenko@...ux.intel.com
Subject: Re: [PATCH v2] lib: kunit: Convert test_sort to KUnit test

Hi Vitor,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on d43c7fb05765152d4d4a39a8ef957c4ea14d8847]

url:    https://github.com/0day-ci/linux/commits/Vitor-Massaru-Iha/lib-kunit-Convert-test_sort-to-KUnit-test/20200730-031404
base:    d43c7fb05765152d4d4a39a8ef957c4ea14d8847
config: x86_64-randconfig-s022-20200803 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-117-g8c7aee71-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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

All errors (new ones prefixed by >>):

   ld: lib/sort_kunit.o: in function `kunit_test_suites_init':
>> lib/sort_kunit.c:47: undefined reference to `__kunit_test_suites_init'
   ld: lib/sort_kunit.o: in function `sort_test':
>> lib/sort_kunit.c:19: undefined reference to `kunit_unary_assert_format'
>> ld: lib/sort_kunit.c:19: undefined reference to `kunit_do_assertion'
>> ld: lib/sort_kunit.c:30: undefined reference to `kunit_fail_assert_format'
   ld: lib/sort_kunit.c:30: undefined reference to `kunit_do_assertion'
   ld: lib/sort_kunit.o: in function `kunit_test_suites_exit':
>> lib/sort_kunit.c:47: undefined reference to `__kunit_test_suites_exit'

vim +47 lib/sort_kunit.c

    13	
    14	static void __init sort_test(struct kunit *test)
    15	{
    16		int *a, i, r = 1;
    17	
    18		a = kmalloc_array(TEST_LEN, sizeof(*a), GFP_KERNEL);
  > 19		KUNIT_ASSERT_FALSE_MSG(test, a == NULL, "kmalloc_array failed");
    20	
    21		for (i = 0; i < TEST_LEN; i++) {
    22			r = (r * 725861) % 6599;
    23			a[i] = r;
    24		}
    25	
    26		sort(a, TEST_LEN, sizeof(*a), cmpint, NULL);
    27	
    28		for (i = 0; i < TEST_LEN-1; i++)
    29			if (a[i] > a[i+1]) {
  > 30				KUNIT_FAIL(test, "test has failed");
    31				goto exit;
    32			}
    33	exit:
    34		kfree(a);
    35	}
    36	
    37	static struct kunit_case __refdata sort_test_cases[] = {
    38		KUNIT_CASE(sort_test),
    39		{}
    40	};
    41	
    42	static struct kunit_suite sort_test_suite = {
    43		.name = "sort",
    44		.test_cases = sort_test_cases,
    45	};
    46	
  > 47	kunit_test_suites(&sort_test_suite);
    48	

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

Download attachment ".config.gz" of type "application/gzip" (31797 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ