Content-Type: multipart/mixed; boundary="===============3858790145878518813==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH] lib/test_string.c: Add test for strlen() Date: Mon, 31 Jan 2022 04:13:30 +0800 Message-ID: <202201310303.HQlCsvvd-lkp@intel.com> In-Reply-To: <20220130183653.491292-1-keescook@chromium.org> List-Id: --===============3858790145878518813== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Kees, I love your patch! Yet something to improve: [auto build test ERROR on linux/master] [also build test ERROR on linus/master kees/for-next/pstore v5.17-rc2 next-= 20220128] [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/Kees-Cook/lib-test_string-= c-Add-test-for-strlen/20220131-023726 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git = 2c271fe77d52a0555161926c232cd5bc07178b39 config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220131/2= 02201310303.HQlCsvvd-lkp(a)intel.com/config) compiler: sh4-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/0day-ci/linux/commit/d22fe883339c5141953dbca98= 0b51466ac3e2329 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Kees-Cook/lib-test_string-c-Add-te= st-for-strlen/20220131-023726 git checkout d22fe883339c5141953dbca980b51466ac3e2329 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dsh SHELL=3D/bin/bash M=3Dlib/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> lib/test_string.c:188:30: error: initializer element is not constant 188 | static const int strlen_ce =3D strlen("tada, a constant expressi= on"); | ^~~~~~ vim +188 lib/test_string.c 181 = 182 /* 183 * Unlike many other string functions, strlen() can be used in 184 * static initializers when string lengths are known at compile 185 * time. (i.e. Under these conditions, strlen() is a constant 186 * expression.) Make sure it can be used this way. 187 */ > 188 static const int strlen_ce =3D strlen("tada, a constant expression"); 189 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============3858790145878518813==--