public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
* [akpm-mm:mm-unstable 121/130] tools/testing/selftests/kselftest.h:427:13: error: implicit declaration of function 'vasprintf'; did you mean 'vsprintf'?
@ 2026-03-31  9:27 kernel test robot
  2026-03-31 18:23 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2026-03-31  9:27 UTC (permalink / raw)
  To: Chunyu Hu
  Cc: oe-kbuild-all, David Hildenbrand, Andrew Morton,
	Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   24e341657c283c965e3bfee0baa9ed0376127973
commit: cc0b04b10a7b98fd8df2fd539177e94e0f83a5c3 [121/130] selftests: ksft_exit_fail_perror: support printf style arguments
config: arm64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260331/202603311105.ysUeYPSZ-lkp@intel.com/config)
compiler: aarch64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260331/202603311105.ysUeYPSZ-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603311105.ysUeYPSZ-lkp@intel.com/

Note: the akpm-mm/mm-unstable HEAD 24e341657c283c965e3bfee0baa9ed0376127973 builds fine.
      It only hurts bisectability.

All errors (new ones prefixed by >>):

   In file included from za-fork.c:12:
   ../../kselftest.h: In function 'ksft_exit_fail_perror':
>> ../../kselftest.h:427:13: error: implicit declaration of function 'vasprintf'; did you mean 'vsprintf'? [-Wimplicit-function-declaration]
     427 |         if (vasprintf(&buf, msg, args) == -1) {
         |             ^~~~~~~~~
         |             vsprintf
--
   In file included from basic-gcs.c:16:
   tools/testing/selftests/kselftest.h: In function 'ksft_exit_fail_perror':
>> tools/testing/selftests/kselftest.h:427:13: error: implicit declaration of function 'vasprintf'; did you mean 'vsprintf'? [-Wimplicit-function-declaration]
     427 |         if (vasprintf(&buf, msg, args) == -1) {
         |             ^~~~~~~~~
         |             vsprintf


vim +427 tools/testing/selftests/kselftest.h

   419	
   420	static inline __noreturn __printf(1, 2) void ksft_exit_fail_perror(const char *msg, ...)
   421	{
   422		va_list args;
   423		char *buf = NULL;
   424		int saved_errno = errno;
   425	
   426		va_start(args, msg);
 > 427		if (vasprintf(&buf, msg, args) == -1) {
   428			va_end(args);
   429			ksft_exit_fail_msg("vasprintf failed: %s (%d)\n", strerror(saved_errno),
   430					saved_errno);
   431		}
   432		va_end(args);
   433	
   434		errno = saved_errno;
   435		ksft_exit_fail_msg("%s: %s (%d)\n", buf, strerror(errno), errno);
   436	
   437		free(buf);
   438	}
   439	

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-01  6:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31  9:27 [akpm-mm:mm-unstable 121/130] tools/testing/selftests/kselftest.h:427:13: error: implicit declaration of function 'vasprintf'; did you mean 'vsprintf'? kernel test robot
2026-03-31 18:23 ` Andrew Morton
2026-04-01  6:00   ` Philip Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox