oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [jimc:maph 1/1] lib/test_map_h.c:28:2: error: call to __compiletime_assert_174 declared with 'error' attribute: BUILD_BUG_ON failed: __builtin_memcmp(debug_cats_slist[0], "DRMx_CORE", sizeof("DRMx_CORE") - 1)
@ 2023-03-20 20:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-20 20:34 UTC (permalink / raw)
  To: Jim Cromie; +Cc: oe-kbuild-all

tree:   https://github.com/jimc/linux.git maph
head:   4ca8648cb8696436472c03ed39c97dee528596fc
commit: 4ca8648cb8696436472c03ed39c97dee528596fc [1/1] include/linux/map.h: add new header, test it with test_map_h.c (RFC)
config: i386-randconfig-a002 (https://download.01.org/0day-ci/archive/20230321/202303210403.BRMYWSmz-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/jimc/linux/commit/4ca8648cb8696436472c03ed39c97dee528596fc
        git remote add jimc https://github.com/jimc/linux.git
        git fetch --no-tags jimc maph
        git checkout 4ca8648cb8696436472c03ed39c97dee528596fc
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash lib/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303210403.BRMYWSmz-lkp@intel.com/

All errors (new ones prefixed by >>):

>> lib/test_map_h.c:28:2: error: call to __compiletime_assert_174 declared with 'error' attribute: BUILD_BUG_ON failed: __builtin_memcmp(debug_cats_slist[0], "DRMx_CORE", sizeof("DRMx_CORE") - 1)
           BUILD_BUG_STREQ(debug_cats, 0, "DRMx_CORE");
           ^
   lib/test_map_h.c:24:2: note: expanded from macro 'BUILD_BUG_STREQ'
           BUILD_BUG_ON(__builtin_memcmp(_var##_slist[idx], ref, sizeof(ref) - 1))
           ^
   include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
           BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
           ^
   include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
   #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                       ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:385:2: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:378:4: note: expanded from macro '__compiletime_assert'
                           prefix ## suffix();                             \
                           ^
   <scratch space>:15:1: note: expanded from here
   __compiletime_assert_174
   ^
>> lib/test_map_h.c:29:2: error: call to __compiletime_assert_175 declared with 'error' attribute: BUILD_BUG_ON failed: __builtin_memcmp(debug_cats_slist[1], "DRMx_DRIVER", sizeof("DRMx_DRIVER") - 1)
           BUILD_BUG_STREQ(debug_cats, 1, "DRMx_DRIVER");
           ^
   lib/test_map_h.c:24:2: note: expanded from macro 'BUILD_BUG_STREQ'
           BUILD_BUG_ON(__builtin_memcmp(_var##_slist[idx], ref, sizeof(ref) - 1))
           ^
   include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
           BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
           ^
   include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
   #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                       ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:385:2: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:378:4: note: expanded from macro '__compiletime_assert'
                           prefix ## suffix();                             \
                           ^
   <scratch space>:20:1: note: expanded from here
   __compiletime_assert_175
   ^
>> lib/test_map_h.c:30:2: error: call to __compiletime_assert_176 declared with 'error' attribute: BUILD_BUG_ON failed: __builtin_memcmp(debug_cats_slist[2], "DRMx_KMS", sizeof("DRMx_KMS") - 1)
           BUILD_BUG_STREQ(debug_cats, 2, "DRMx_KMS");
           ^
   lib/test_map_h.c:24:2: note: expanded from macro 'BUILD_BUG_STREQ'
           BUILD_BUG_ON(__builtin_memcmp(_var##_slist[idx], ref, sizeof(ref) - 1))
           ^
   include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
           BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
           ^
   include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
   #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                       ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:385:2: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:378:4: note: expanded from macro '__compiletime_assert'
                           prefix ## suffix();                             \
                           ^
   <scratch space>:25:1: note: expanded from here
   __compiletime_assert_176
   ^
   3 errors generated.


vim +28 lib/test_map_h.c

    22	
    23	#define BUILD_BUG_STREQ(_var, idx, ref) \
    24		BUILD_BUG_ON(__builtin_memcmp(_var##_slist[idx], ref, sizeof(ref) - 1))
    25	
    26	static void __used MAPH_BUILD_BUG(void)
    27	{
  > 28		BUILD_BUG_STREQ(debug_cats, 0, "DRMx_CORE");
  > 29		BUILD_BUG_STREQ(debug_cats, 1, "DRMx_DRIVER");
  > 30		BUILD_BUG_STREQ(debug_cats, 2, "DRMx_KMS");
    31	#if 0
    32		/* properly breaks compile */
    33		BUILD_BUG_STREQ(debug_cats, 1, "'not-in-map'");
    34	#endif
    35	}
    36	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-20 20:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20 20:34 [jimc:maph 1/1] lib/test_map_h.c:28:2: error: call to __compiletime_assert_174 declared with 'error' attribute: BUILD_BUG_ON failed: __builtin_memcmp(debug_cats_slist[0], "DRMx_CORE", sizeof("DRMx_CORE") - 1) kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).