Re: [PATCH v8 2/2] fs: ext4: Modify inode-test.c to use KUnit parameterized testing feature

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

 



Hi Arpitha,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on ext4/dev]
[also build test WARNING on linus/master v5.10-rc3 next-20201113]
[cannot apply to tytso-fscrypt/master]
[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/Arpitha-Raghunandan/kunit-Support-for-Parameterized-Testing/20201116-030137
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: microblaze-randconfig-r031-20201115 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.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/0day-ci/linux/commit/002a7d4700bd033cceff2f2ab10bcc4a440f1377
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Arpitha-Raghunandan/kunit-Support-for-Parameterized-Testing/20201116-030137
        git checkout 002a7d4700bd033cceff2f2ab10bcc4a440f1377
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze 

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

All warnings (new ones prefixed by >>):

   In function 'timestamp_expectation_to_desc',
       inlined from 'ext4_inode_gen_params' at fs/ext4/inode-test.c:223:1:
>> fs/ext4/inode-test.c:219:2: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
     219 |  strncpy(desc, t->test_case_name, desc_length);
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ext4/inode-test.c: In function 'ext4_inode_gen_params':
   fs/ext4/inode-test.c:217:20: note: length computed here
     217 |  int desc_length = strlen(t->test_case_name);
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~

vim +/strncpy +219 fs/ext4/inode-test.c

   213	
   214	static void timestamp_expectation_to_desc(const struct timestamp_expectation *t,
   215						  char *desc)
   216	{
   217		int desc_length = strlen(t->test_case_name);
   218	
 > 219		strncpy(desc, t->test_case_name, desc_length);
   220		desc[desc_length] = '\0';
   221	}
   222	

---
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