WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text)
kernel test robot
build bottree: https://github.com/brauner/linux.git vfs.all head: ea47e99a3a234837d5fea0d1a20bb2ad1eaa6dd4 commit: b6736cfccb582b7c016cba6cd484fbcf30d499af [205/231] initramfs_test: kunit tests for initramfs unpacking config: x86_64-buildonly-randconfig-002-20250304 (https://download.01.org/0day-ci/archive/20250305/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250305/[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]/
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text) >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x30 (section: .data) -> initramfs_test_fname_overrun (section: .init.text) >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x60 (section: .data) -> initramfs_test_data (section: .init.text) >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x90 (section: .data) -> initramfs_test_csum (section: .init.text) >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0xc0 (section: .data) -> initramfs_test_hardlink (section: .init.text) >> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0xf0 (section: .data) -> initramfs_test_many (section: .init.text)
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
[cc'ing linux-kselftest and kunit-dev]
Hi,
Quoted 7 lines · kernel test robot
tree: https://github.com/brauner/linux.git vfs.all head: ea47e99a3a234837d5fea0d1a20bb2ad1eaa6dd4 commit: b6736cfccb582b7c016cba6cd484fbcf30d499af [205/231] initramfs_test: kunit tests for initramfs unpacking config: x86_64-buildonly-randconfig-002-20250304 (https://download.01.org/0day-ci/archive/20250305/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250305/[email protected]/reproduce)
Quoted 13 lines
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]/All warnings (new ones prefixed by >>, old ones prefixed by <<):
Quoted 6 lines
Quoted 6 lines
WARNING: modpost: vmlinux: section mismatch in reference:
initramfs_test_cases+0x0(section: .data) ->initramfs_test_extract(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0x30(section: .data) ->initramfs_test_fname_overrun(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0x60(section: .data) ->initramfs_test_data(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0x90(section: .data) ->initramfs_test_csum(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0xc0(section: .data) ->initramfs_test_hardlink(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0xf0(section: .data) ->initramfs_test_many(section: .init.text)
These new warnings are covered in the commit message. The kunit_test_init_section_suites() registered tests aren't in the .init section as debugfs entries are retained for results reporting (without an ability to rerun them).
IIUC, the __kunit_init_test_suites->CONCATENATE(..., _probe) suffix is intended to suppress the modpost warning - @kunit-dev: any ideas why this isn't working as intended?
Thanks, David
Quoted 27 lines · David Disseldorp
[cc'ing linux-kselftest and kunit-dev]
Hi,
Quoted 7 lines · kernel test robot
tree: https://github.com/brauner/linux.git vfs.all head: ea47e99a3a234837d5fea0d1a20bb2ad1eaa6dd4 commit: b6736cfccb582b7c016cba6cd484fbcf30d499af [205/231] initramfs_test: kunit tests for initramfs unpacking config: x86_64-buildonly-randconfig-002-20250304 (https://download.01.org/0day-ci/archive/20250305/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250305/[email protected]/reproduce)Quoted 13 lines
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]/All warnings (new ones prefixed by >>, old ones prefixed by <<):
Quoted 6 lines
Quoted 6 lines
WARNING: modpost: vmlinux: section mismatch in reference:
initramfs_test_cases+0x0(section: .data) ->initramfs_test_extract(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0x30(section: .data) ->initramfs_test_fname_overrun(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0x60(section: .data) ->initramfs_test_data(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0x90(section: .data) ->initramfs_test_csum(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0xc0(section: .data) ->initramfs_test_hardlink(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0xf0(section: .data) ->initramfs_test_many(section: .init.text)
Quoted 7 lines
These new warnings are covered in the commit message. The
kunit_test_init_section_suites()registered tests aren't in the .init section as debugfs entries are retained for results reporting (without an ability to rerun them).
IIUC, the__kunit_init_test_suites->CONCATENATE(..., _probe)suffix is intended to suppress the modpost warning - @kunit-dev: any ideas why this isn't working as intended?
Stephen Rothwell (cc'ed) mentioned that we might be able to use __refdata for initramfs_test_cases. The __ref* description in init.h does indicate that it's suitable, and I now see that it's present in kunit-example-test.c . I'll propose a patch which can be squashed in with the existing commit.
Thanks, David
Shuah Khan
maintainerQuoted 3 lines · David Disseldorp
Quoted 1 line · David Disseldorp
[cc'ing linux-kselftest and kunit-dev]
+ Adding David and Brendan
David, Brendan, Any thoughts on how this can be fixed?
Quoted 42 lines
Quoted 26 lines
Hi,
Quoted 7 lines · kernel test robot
tree: https://github.com/brauner/linux.git vfs.all head: ea47e99a3a234837d5fea0d1a20bb2ad1eaa6dd4 commit: b6736cfccb582b7c016cba6cd484fbcf30d499af [205/231] initramfs_test: kunit tests for initramfs unpacking config: x86_64-buildonly-randconfig-002-20250304 (https://download.01.org/0day-ci/archive/20250305/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250305/[email protected]/reproduce)Quoted 13 lines
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]/All warnings (new ones prefixed by >>, old ones prefixed by <<):
Quoted 6 lines
Quoted 6 lines
WARNING: modpost: vmlinux: section mismatch in reference:
initramfs_test_cases+0x0(section: .data) ->initramfs_test_extract(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0x30(section: .data) ->initramfs_test_fname_overrun(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0x60(section: .data) ->initramfs_test_data(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0x90(section: .data) ->initramfs_test_csum(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0xc0(section: .data) ->initramfs_test_hardlink(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0xf0(section: .data) ->initramfs_test_many(section: .init.text)Quoted 7 lines
These new warnings are covered in the commit message. The
kunit_test_init_section_suites()registered tests aren't in the .init section as debugfs entries are retained for results reporting (without an ability to rerun them).
IIUC, the__kunit_init_test_suites->CONCATENATE(..., _probe)suffix is intended to suppress the modpost warning - @kunit-dev: any ideas why this isn't working as intended?Stephen Rothwell (cc'ed) mentioned that we might be able to use
__refdataforinitramfs_test_cases. The __ref* description ininit.hdoes indicate that it's suitable, and I now see that it's present inkunit-example-test.c. I'll propose a patch which can be squashed in with the existing commit.Thanks, David
Quoted 38 lines · David Disseldorp
Quoted 27 lines · David Disseldorp
[cc'ing linux-kselftest and kunit-dev]
Hi,
Quoted 7 lines · kernel test robot
tree: https://github.com/brauner/linux.git vfs.all head: ea47e99a3a234837d5fea0d1a20bb2ad1eaa6dd4 commit: b6736cfccb582b7c016cba6cd484fbcf30d499af [205/231] initramfs_test: kunit tests for initramfs unpacking config: x86_64-buildonly-randconfig-002-20250304 (https://download.01.org/0day-ci/archive/20250305/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250305/[email protected]/reproduce)Quoted 13 lines
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]/All warnings (new ones prefixed by >>, old ones prefixed by <<):
Quoted 6 lines
Quoted 6 lines
WARNING: modpost: vmlinux: section mismatch in reference:
initramfs_test_cases+0x0(section: .data) ->initramfs_test_extract(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0x30(section: .data) ->initramfs_test_fname_overrun(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0x60(section: .data) ->initramfs_test_data(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0x90(section: .data) ->initramfs_test_csum(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0xc0(section: .data) ->initramfs_test_hardlink(section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference:initramfs_test_cases+0xf0(section: .data) ->initramfs_test_many(section: .init.text)Quoted 7 lines
These new warnings are covered in the commit message. The
kunit_test_init_section_suites()registered tests aren't in the .init section as debugfs entries are retained for results reporting (without an ability to rerun them).
IIUC, the__kunit_init_test_suites->CONCATENATE(..., _probe)suffix is intended to suppress the modpost warning - @kunit-dev: any ideas why this isn't working as intended?
Quoted 6 lines
Stephen Rothwell (cc'ed) mentioned that we might be able to use
__refdataforinitramfs_test_cases. The __ref* description ininit.hdoes indicate that it's suitable, and I now see that it's present inkunit-example-test.c. I'll propose a patch which can be squashed in with the existing commit.
Yup: __refdata for the test cases array is the way to work around this.
As noted, this is in the example, but probably needs to be documented better.
Cheers,
-- David