[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202209060226.JaYG1goK-lkp@intel.com>
Date: Tue, 6 Sep 2022 02:45:18 +0800
From: kernel test robot <lkp@...el.com>
To: Liu Shixin <liushixin2@...wei.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Kees Cook <keescook@...omium.org>,
Iurii Zaikin <yzaikin@...gle.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, Liu Shixin <liushixin2@...wei.com>,
Kefeng Wang <wangkefeng.wang@...wei.com>
Subject: Re: [PATCH] kernel/sysctl-test: use SYSCTL_{ZERO/ONE_HUNDRED}
instead of i_{zero/one_hundred}
Hi Liu,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on kees/for-next/pstore]
[also build test ERROR on linus/master v6.0-rc4]
[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/Liu-Shixin/kernel-sysctl-test-use-SYSCTL_-ZERO-ONE_HUNDRED-instead-of-i_-zero-one_hundred/20220905-201642
base: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/pstore
config: m68k-randconfig-r015-20220905 (https://download.01.org/0day-ci/archive/20220906/202209060226.JaYG1goK-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.0
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
# https://github.com/intel-lab-lkp/linux/commit/798f337855db358192d52c40620c4646856d19bb
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Liu-Shixin/kernel-sysctl-test-use-SYSCTL_-ZERO-ONE_HUNDRED-instead-of-i_-zero-one_hundred/20220905-201642
git checkout 798f337855db358192d52c40620c4646856d19bb
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
m68k-linux-ld: section .rodata VMA [0000000000002000,000000000096449f] overlaps section .text VMA [0000000000000400,0000000000a7156f]
m68k-linux-ld: kernel/sysctl-test.o: in function `sysctl_test_dointvec_read_happy_single_positive':
>> kernel/sysctl-test.c:185: undefined reference to `sysctl_vals'
m68k-linux-ld: kernel/sysctl-test.o: in function `sysctl_test_dointvec_read_happy_single_negative':
kernel/sysctl-test.c:216: undefined reference to `sysctl_vals'
m68k-linux-ld: kernel/sysctl-test.o: in function `sysctl_test_dointvec_write_happy_single_positive':
kernel/sysctl-test.c:245: undefined reference to `sysctl_vals'
m68k-linux-ld: kernel/sysctl-test.o: in function `sysctl_test_dointvec_write_happy_single_negative':
kernel/sysctl-test.c:275: undefined reference to `sysctl_vals'
m68k-linux-ld: kernel/sysctl-test.o: in function `sysctl_test_api_dointvec_null_tbl_data':
kernel/sysctl-test.c:18: undefined reference to `sysctl_vals'
m68k-linux-ld: kernel/sysctl-test.o:kernel/sysctl-test.c:18: more undefined references to `sysctl_vals' follow
`.exit.text' referenced in section `.data' of sound/soc/codecs/tlv320adc3xxx.o: defined in discarded section `.exit.text' of sound/soc/codecs/tlv320adc3xxx.o
vim +185 kernel/sysctl-test.c
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 176
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 177 /*
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 178 * Test that we can read a two digit number in a sufficiently size buffer.
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 179 * Nothing fancy.
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 180 */
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 181 static void sysctl_test_dointvec_read_happy_single_positive(struct kunit *test)
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 182 {
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 183 int data = 0;
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 184 /* Good table. */
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 @185 struct ctl_table table = {
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 186 .procname = "foo",
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 187 .data = &data,
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 188 .maxlen = sizeof(int),
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 189 .mode = 0644,
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 190 .proc_handler = proc_dointvec,
798f337855db358 Liu Shixin 2022-09-05 191 .extra1 = SYSCTL_ZERO,
798f337855db358 Liu Shixin 2022-09-05 192 .extra2 = SYSCTL_ONE_HUNDRED,
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 193 };
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 194 size_t len = 4;
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 195 loff_t pos = 0;
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 196 char *buffer = kunit_kzalloc(test, len, GFP_USER);
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 197 char __user *user_buffer = (char __user *)buffer;
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 198 /* Store 13 in the data field. */
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 199 *((int *)table.data) = 13;
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 200
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 201 KUNIT_EXPECT_EQ(test, 0, proc_dointvec(&table, KUNIT_PROC_READ,
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 202 user_buffer, &len, &pos));
388ca2e024dd5e6 David Gow 2021-05-13 203 KUNIT_ASSERT_EQ(test, 3, len);
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 204 buffer[len] = '\0';
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 205 /* And we read 13 back out. */
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 206 KUNIT_EXPECT_STREQ(test, "13\n", buffer);
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 207 }
2cb80dbbbaba4f2 Iurii Zaikin 2019-09-23 208
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists