Re: [linux-next:master 11199/11507] init/initramfs_test.c:580:15: error: call to undeclared function '__override_init_fs'; ISO C99 and later do not support implicit function declarations

David Disseldorp <[email protected]> Mon, 3 Aug 2026 14:55:12 +1000
Newsgroups dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
Thanks for the report.

The vfs-7.3.misc commit da46f0e1053c9 ("initramfs_test: use test
init/exit hooks to override init fs") is bogus: it is supposed to be
applied / squashed atop Christian's ("kunit: use scoped_with_init_fs()
in tests that resolve paths") change, which includes fs_struct.h .

Christian's vfs-7.3.kthread branch has a correctly squashed version as:
b4343aebd3a4d ("initramfs_test: use test init/exit hooks to override
init fs").

@Christian: could you pleasee fix or drop the bogus da46f0e1053c9
vfs-7.3.misc commit?

Cheers, David

On Sat, 01 Aug 2026 10:26:10 +0800, kernel test robot wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   415606a7be939835db9b0d6b711887586646346d
> commit: da46f0e1053c98355c2d7803ff1cc46617ca81bf [11199/11507] initramfs_test: use test init/exit hooks to override init fs
> config: arm64-randconfig-001-20260801 (https://download.01.org/0day-ci/archive/20260801/[email protected]/config)
> compiler: clang version 21.1.8 (https://github.com/llvm/llvm-project 2078da43e25a4623cab2d0d60decddf709aaea28)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260801/[email protected]/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 <[email protected]>
> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> 
> Note: the linux-next/master HEAD 415606a7be939835db9b0d6b711887586646346d builds fine.
>       It may have been fixed somewhere.
> 
> All errors (new ones prefixed by >>):
> 
> >> init/initramfs_test.c:580:15: error: call to undeclared function '__override_init_fs'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]  
>      580 |         test->priv = __override_init_fs();
>          |                      ^
> >> init/initramfs_test.c:580:13: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]  
>      580 |         test->priv = __override_init_fs();
>          |                    ^ ~~~~~~~~~~~~~~~~~~~~
> >> init/initramfs_test.c:586:2: error: call to undeclared function '__revert_init_fs'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]  
>      586 |         __revert_init_fs(test->priv);
>          |         ^
>    3 errors generated.
> 
> 
> vim +/__override_init_fs +580 init/initramfs_test.c
> 
>    576	
>    577	/* Tests run in a nullfs kthread; always use the init fs for path resolution. */
>    578	static int __init initramfs_test_init(struct kunit *test)
>    579	{
>  > 580		test->priv = __override_init_fs();  
>    581		return 0;
>    582	}
>    583	
>    584	static void __init initramfs_test_exit(struct kunit *test)
>    585	{
>  > 586		__revert_init_fs(test->priv);  
>    587	}
>    588	
> 
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki