[LTP] [PATCH 2/2] lib: build check parameters for tst_brk()

Cyril Hrubis chrubis@suse.cz
Mon Jan 7 19:25:14 CET 2019


Hi!
> > We can always name the BUILD_BUG_ON() macro to be
> > TST_BRK_ONLY_SUPPORTS_TCONF_TBROK_TFAIL() and be done with it.
> > 
> > I would rather avoided playing with specific compiler features etc. So
> > this version looks good to me.
> 
> Pushed the original version for now.

FYI looks like we need to rename the BUILD_BUG_ON() after all:

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition  -Illtp -o quotactl03
In file included from ../../../../include/tst_test.h:29:0,
                 from quotactl03.c:53:
../../../../include/tst_common.h:68:0: warning: "BUILD_BUG_ON" redefined
 #define BUILD_BUG_ON(condition) \
 
In file included from /usr/include/xfs/xqm.h:21:0,
                 from quotactl03.c:50:
/usr/include/xfs/xfs.h:68:0: note: this is the location of the previous definiti
 #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
 
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition  -Illtp -o quotactl01
In file included from quotactl01.c:56:0:
quotactl01.c: In function 'setup':
../../../../include/tst_test.h:85:3: warning: this statement may fall through [-
   tst_brk_(__FILE__, __LINE__, (ttype), (arg_fmt), ##__VA_ARGS__);\
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
quotactl01.c:169:3: note: in expansion of macro 'tst_brk'
   tst_brk(TCONF, "quotacheck binary not installed");
   ^~~~~~~
quotactl01.c:170:2: note: here
  default:
  ^~~~~~~


-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list