Skip to contentSkip to conversation

fault-inject.c:undefined reference to `config_group_init_type_name'

PATCH Applied kernel test robot 5 participants 5 messages Apr 14, 2023 – Apr 16, 2023

Subsystems (2)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-6.4/block
head:   d0b072f4b48953ed56b5a9069ce4bfbfe987e390
commit: 4668c7a2940d134bea50058e138591b97485c5da [72/77] fault-inject: allow configuration via configfs
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20230415/[email protected]/config)
compiler: m68k-linux-gcc (GCC) 12.1.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://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=4668c7a2940d134bea50058e138591b97485c5da
git remote add axboe-block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags axboe-block for-6.4/block
git checkout 4668c7a2940d134bea50058e138591b97485c5da
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

m68k-linux-ld: lib/fault-inject.o: in function `fault_config_init':

>> fault-inject.c:(.text+0x20e): undefined reference to `config_group_init_type_name'
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
#1 lore raw

PATCH 1/1 fault-inject: fix build error when FAULT_INJECTION_CONFIGFS=y and CONFIGFS_FS=m

This fixes a build error when CONFIG_FAULT_INJECTION_CONFIGFS=y and CONFIG_CONFIGFS_FS=m.

Since the fault-injection library cannot built as a module, avoid building configfs as a module.

---
 lib/Kconfig.debug | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/Kconfig.debug +2 -1
index 6f64b49a2a8e..ce51d4dc6803 100644
@@ -1979,7 +1979,8 @@ config FAIL_SUNRPC
 
 config FAULT_INJECTION_CONFIGFS
 	bool "Configfs interface for fault-injection capabilities"
-	depends on FAULT_INJECTION && CONFIGFS_FS
+	depends on FAULT_INJECTION
+	select CONFIGFS_FS
 	help
 	  This option allows configfs-based drivers to dynamically configure
 	  fault-injection via configfs.  Each parameter for driver-specific
Signature · 1 line
2.34.1
maintainer Applied
#2 lore raw

Re: [PATCH -block] fault-inject: fix build error when FAULT_INJECTION_CONFIGFS=y and CONFIGFS_FS=m

Quoted 8 lines · Akinobu Mita

This fixes a build error when CONFIG_FAULT_INJECTION_CONFIGFS=y and CONFIG_CONFIGFS_FS=m.

Since the fault-injection library cannot built as a module, avoid building configfs as a module.

[...]

Applied, thanks!

[1/1] fault-inject: fix build error when FAULT_INJECTION_CONFIGFS=y and CONFIGFS_FS=m

      commit: 5347c9321845e5a94be19ea951746d4f2b8b194f

Best regards,

Signature · 1 line
Jens Axboe
Reviewed-by on v1 1/1
#3 lore raw

Re: [PATCH -block] fault-inject: fix build error when FAULT_INJECTION_CONFIGFS=y and CONFIGFS_FS=m

In reply to Akinobu Mita

Hi Mita-san,

Quoted 9 lines · Akinobu Mita

This fixes a build error when CONFIG_FAULT_INJECTION_CONFIGFS=y and CONFIG_CONFIGFS_FS=m.

Since the fault-injection library cannot built as a module, avoid building configfs as a module.

Thanks for your patch!

lib/Kconfig.debug config FAIL_SUNRPC · line 1983

Quoted 9 lines
lib/Kconfig.debug +2 -1
@@ -1979,7 +1979,8 @@ config FAIL_SUNRPC
 
 config FAULT_INJECTION_CONFIGFS
        bool "Configfs interface for fault-injection capabilities"
-       depends on FAULT_INJECTION && CONFIGFS_FS
+       depends on FAULT_INJECTION
+       select CONFIGFS_FS

My first thought was "please do not select CONFIGFS_FS", but apparently this is what most users do, so I guess it's OK.

The alternative would be to do:

- depends on FAULT_INJECTION && CONFIGFS_FS
+ depends on FAULT_INJECTION && (CONFIGFS_FS=y ||
CONFIGFS_FS=FAULT_INJECTION)

lib/Kconfig.debug config FAIL_SUNRPC · line 1986

Quoted 3 lines
lib/Kconfig.debug +0 -0
        help
          This option allows configfs-based drivers to dynamically configure
          fault-injection via configfs.  Each parameter for driver-specific

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#4 lore raw

Re: [PATCH -block] fault-inject: fix build error when FAULT_INJECTION_CONFIGFS=y and CONFIGFS_FS=m

Quoted 4 lines · Geert Uytterhoeven
(quoted diff) +1 -1
-       depends on FAULT_INJECTION && CONFIGFS_FS
+       depends on FAULT_INJECTION && (CONFIGFS_FS=y ||

CONFIGFS_FS=FAULT_INJECTION)

FAULT_INJECTION is a bool symbol, so the last part is not needed here.

Arnd