mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Liu Shixin <liushixin2@huawei.com>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Iurii Zaikin <yzaikin@google.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, Liu Shixin <liushixin2@huawei.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: Re: [PATCH] kernel/sysctl-test: use SYSCTL_{ZERO/ONE_HUNDRED} instead of i_{zero/one_hundred}
Date: Tue, 6 Sep 2022 02:45:18 +0800	[thread overview]
Message-ID: <202209060226.JaYG1goK-lkp@intel.com> (raw)
In-Reply-To: <20220905124856.2233973-1-liushixin2@huawei.com>

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@intel.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

  reply	other threads:[~2022-09-05 18:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05 12:48 Liu Shixin
2022-09-05 18:45 ` kernel test robot [this message]
2022-09-05 19:36 ` kernel test robot
2022-09-05 21:58 ` kernel test robot

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=202209060226.JaYG1goK-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liushixin2@huawei.com \
    --cc=mcgrof@kernel.org \
    --cc=wangkefeng.wang@huawei.com \
    --cc=yzaikin@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®