← Back to issue list

kernel unit tests fail in armhf and arm64

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1671192
Type
issue
State
closed
Author
~elopio
Labels
plugin tests
Created
Updated
Closed

Current evaluation

Kernel plugin unit tests failed on armhf/arm64 after snapcore/snapcraft#1148 added DTB build/install args only for ARM; fixed by snapcore/snapcraft#1178 (commit b2a31b957), which made the tests architecture-independent.

Resolution: closed resolved

Reason: Resolving PR snapcore/snapcraft#1178 ("tests: make the kernel unit tests architecture independent.") was merged as commit b2a31b957 and linked in the closing maintainer comment (2017-03-09) by ~elopio; it mocks the architecture so tests pass on all arches.

Evaluated by: mr-cal-bot

No scores available.

Issue body

This is caused by this change, that didn't take into account that we run tests in all the architectures: https://github.com/snapcore/snapcraft/pull/1148/files ====================================================================== FAIL: test_build_verbose_with_kconfigfile (snapcraft.tests.plugins.test_kernel.KernelPluginTestCase) snapcraft.tests.plugins.test_kernel.KernelPluginTestCase.test_build_verbose_with_kconfigfile ---------------------------------------------------------------------- testtools.testresult.real._StringException: Empty attachments: pythonlogging:''-1 pythonlogging:'': {{{ Generating driver initrd for kernel release: 4.4.2 initrd mime_type: temporary-directory/squashfs-root/usr/lib/ubuntu-core-generic-initrd/initrd.img-core application/gzip }}} Traceback (most recent call last): File "/tmp/autopkgtest.hRA5Ne/build.yqr/snapcraft/snapcraft/tests/plugins/test_kernel.py", line 429, in test_build_verbose_with_kconfigfile plugin.installdir, 'lib', 'firmware'))]) File "/usr/lib/python3.5/unittest/mock.py", line 824, in assert_has_calls ) from cause AssertionError: Calls not found. Expected: [call(['make', '-j2', 'V=1', 'bzImage', 'modules']), call(['make', '-j2', 'V=1', 'CONFIG_PREFIX=/tmp/tmprjje0lnz/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmprjje0lnz/parts/test-part/install', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmprjje0lnz/parts/test-part/install/lib/firmware'])] Actual: [call(['make', '-j2', 'V=1', 'bzImage', 'modules', 'dtbs']), call(['make', '-j2', 'V=1', 'CONFIG_PREFIX=/tmp/tmprjje0lnz/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmprjje0lnz/parts/test-part/install', 'dtbs_install', 'INSTALL_DTBS_PATH=/tmp/tmprjje0lnz/parts/test-part/install/dtbs', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmprjje0lnz/parts/test-part/install/lib/firmware'])] ====================================================================== FAIL: test_build_with_defconfig_and_kconfigs (snapcraft.tests.plugins.test_kernel.KernelPluginTestCase) snapcraft.tests.plugins.test_kernel.KernelPluginTestCase.test_build_with_defconfig_and_kconfigs ---------------------------------------------------------------------- testtools.testresult.real._StringException: Empty attachments: pythonlogging:'' Traceback (most recent call last): File "/tmp/autopkgtest.hRA5Ne/build.yqr/snapcraft/snapcraft/tests/plugins/test_kernel.py", line 529, in test_build_with_defconfig_and_kconfigs plugin.installdir, 'lib', 'firmware'))]) File "/usr/lib/python3.5/unittest/mock.py", line 824, in assert_has_calls ) from cause AssertionError: Calls not found. Expected: [call(['make', '-j1', 'defconfig']), call(['make', '-j2', 'bzImage', 'modules']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmpn3rrxo27/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmpn3rrxo27/parts/test-part/install', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmpn3rrxo27/parts/test-part/install/lib/firmware'])] Actual: [call(['make', '-j1', 'defconfig']), call(['make', '-j2', 'bzImage', 'modules', 'dtbs']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmpn3rrxo27/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmpn3rrxo27/parts/test-part/install', 'dtbs_install', 'INSTALL_DTBS_PATH=/tmp/tmpn3rrxo27/parts/test-part/install/dtbs', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmpn3rrxo27/parts/test-part/install/lib/firmware'])] ====================================================================== FAIL: test_build_with_kconfigfile (snapcraft.tests.plugins.test_kernel.KernelPluginTestCase) snapcraft.tests.plugins.test_kernel.KernelPluginTestCase.test_build_with_kconfigfile ---------------------------------------------------------------------- testtools.testresult.real._StringException: Empty attachments: pythonlogging:'' Traceback (most recent call last): File "/tmp/autopkgtest.hRA5Ne/build.yqr/snapcraft/snapcraft/tests/plugins/test_kernel.py", line 373, in test_build_with_kconfigfile plugin.installdir, 'lib', 'firmware'))]) File "/usr/lib/python3.5/unittest/mock.py", line 824, in assert_has_calls ) from cause AssertionError: Calls not found. Expected: [call(['make', '-j2', 'bzImage', 'modules']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmp_jkrmyjn/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmp_jkrmyjn/parts/test-part/install', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmp_jkrmyjn/parts/test-part/install/lib/firmware'])] Actual: [call(['make', '-j2', 'bzImage', 'modules', 'dtbs']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmp_jkrmyjn/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmp_jkrmyjn/parts/test-part/install', 'dtbs_install', 'INSTALL_DTBS_PATH=/tmp/tmp_jkrmyjn/parts/test-part/install/dtbs', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmp_jkrmyjn/parts/test-part/install/lib/firmware'])] ====================================================================== FAIL: test_build_with_kconfigfile_and_firmware (snapcraft.tests.plugins.test_kernel.KernelPluginTestCase) snapcraft.tests.plugins.test_kernel.KernelPluginTestCase.test_build_with_kconfigfile_and_firmware ---------------------------------------------------------------------- testtools.testresult.real._StringException: Empty attachments: pythonlogging:'' Traceback (most recent call last): File "/tmp/autopkgtest.hRA5Ne/build.yqr/snapcraft/snapcraft/tests/plugins/test_kernel.py", line 745, in test_build_with_kconfigfile_and_firmware plugin.installdir, 'lib', 'firmware'))]) File "/usr/lib/python3.5/unittest/mock.py", line 824, in assert_has_calls ) from cause AssertionError: Calls not found. Expected: [call(['make', '-j2', 'bzImage', 'modules']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmpsx894c7e/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmpsx894c7e/parts/test-part/install', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmpsx894c7e/parts/test-part/install/lib/firmware'])] Actual: [call(['make', '-j2', 'bzImage', 'modules', 'dtbs']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmpsx894c7e/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmpsx894c7e/parts/test-part/install', 'dtbs_install', 'INSTALL_DTBS_PATH=/tmp/tmpsx894c7e/parts/test-part/install/dtbs', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmpsx894c7e/parts/test-part/install/lib/firmware'])] ====================================================================== FAIL: test_build_with_kconfigfile_and_kconfigs (snapcraft.tests.plugins.test_kernel.KernelPluginTestCase) snapcraft.tests.plugins.test_kernel.KernelPluginTestCase.test_build_with_kconfigfile_and_kconfigs ---------------------------------------------------------------------- testtools.testresult.real._StringException: Empty attachments: pythonlogging:'' Traceback (most recent call last): File "/tmp/autopkgtest.hRA5Ne/build.yqr/snapcraft/snapcraft/tests/plugins/test_kernel.py", line 471, in test_build_with_kconfigfile_and_kconfigs plugin.installdir, 'lib', 'firmware'))]) File "/usr/lib/python3.5/unittest/mock.py", line 824, in assert_has_calls ) from cause AssertionError: Calls not found. Expected: [call(['make', '-j2', 'bzImage', 'modules']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmpg1eqcunb/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmpg1eqcunb/parts/test-part/install', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmpg1eqcunb/parts/test-part/install/lib/firmware'])] Actual: [call(['make', '-j2', 'bzImage', 'modules', 'dtbs']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmpg1eqcunb/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmpg1eqcunb/parts/test-part/install', 'dtbs_install', 'INSTALL_DTBS_PATH=/tmp/tmpg1eqcunb/parts/test-part/install/dtbs', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmpg1eqcunb/parts/test-part/install/lib/firmware'])] ====================================================================== FAIL: test_build_with_kconfigfile_and_modules (snapcraft.tests.plugins.test_kernel.KernelPluginTestCase) snapcraft.tests.plugins.test_kernel.KernelPluginTestCase.test_build_with_kconfigfile_and_modules ---------------------------------------------------------------------- testtools.testresult.real._StringException: Empty attachments: pythonlogging:'' Traceback (most recent call last): File "/tmp/autopkgtest.hRA5Ne/build.yqr/snapcraft/snapcraft/tests/plugins/test_kernel.py", line 690, in test_build_with_kconfigfile_and_modules plugin.installdir, 'lib', 'firmware'))]) File "/usr/lib/python3.5/unittest/mock.py", line 824, in assert_has_calls ) from cause AssertionError: Calls not found. Expected: [call(['make', '-j2', 'bzImage', 'modules']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmpbsopnisr/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmpbsopnisr/parts/test-part/install', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmpbsopnisr/parts/test-part/install/lib/firmware'])] Actual: [call(['make', '-j2', 'bzImage', 'modules', 'dtbs']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmpbsopnisr/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmpbsopnisr/parts/test-part/install', 'dtbs_install', 'INSTALL_DTBS_PATH=/tmp/tmpbsopnisr/parts/test-part/install/dtbs', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmpbsopnisr/parts/test-part/install/lib/firmware'])] ====================================================================== FAIL: test_build_with_kconfigfile_and_no_firmware (snapcraft.tests.plugins.test_kernel.KernelPluginTestCase) snapcraft.tests.plugins.test_kernel.KernelPluginTestCase.test_build_with_kconfigfile_and_no_firmware ---------------------------------------------------------------------- testtools.testresult.real._StringException: Empty attachments: pythonlogging:'' Traceback (most recent call last): File "/tmp/autopkgtest.hRA5Ne/build.yqr/snapcraft/snapcraft/tests/plugins/test_kernel.py", line 783, in test_build_with_kconfigfile_and_no_firmware 'INSTALL_MOD_PATH={}'.format(plugin.installdir)]), File "/usr/lib/python3.5/unittest/mock.py", line 824, in assert_has_calls ) from cause AssertionError: Calls not found. Expected: [call(['make', '-j2', 'bzImage', 'modules']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmpvibvxboz/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmpvibvxboz/parts/test-part/install'])] Actual: [call(['make', '-j2', 'bzImage', 'modules', 'dtbs']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmpvibvxboz/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmpvibvxboz/parts/test-part/install', 'dtbs_install', 'INSTALL_DTBS_PATH=/tmp/tmpvibvxboz/parts/test-part/install/dtbs'])] ====================================================================== FAIL: test_build_with_two_defconfigs (snapcraft.tests.plugins.test_kernel.KernelPluginTestCase) snapcraft.tests.plugins.test_kernel.KernelPluginTestCase.test_build_with_two_defconfigs ---------------------------------------------------------------------- testtools.testresult.real._StringException: Empty attachments: pythonlogging:'' Traceback (most recent call last): File "/tmp/autopkgtest.hRA5Ne/build.yqr/snapcraft/snapcraft/tests/plugins/test_kernel.py", line 582, in test_build_with_two_defconfigs plugin.installdir, 'lib', 'firmware'))]) File "/usr/lib/python3.5/unittest/mock.py", line 824, in assert_has_calls ) from cause AssertionError: Calls not found. Expected: [call(['make', '-j1', 'defconfig', 'defconfig2']), call(['make', '-j2', 'bzImage', 'modules']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmp26y0z7hv/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmp26y0z7hv/parts/test-part/install', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmp26y0z7hv/parts/test-part/install/lib/firmware'])] Actual: [call(['make', '-j1', 'defconfig', 'defconfig2']), call(['make', '-j2', 'bzImage', 'modules', 'dtbs']), call(['make', '-j2', 'CONFIG_PREFIX=/tmp/tmp26y0z7hv/parts/test-part/install', 'modules_install', 'INSTALL_MOD_PATH=/tmp/tmp26y0z7hv/parts/test-part/install', 'dtbs_install', 'INSTALL_DTBS_PATH=/tmp/tmp26y0z7hv/parts/test-part/install/dtbs', 'firmware_install', 'INSTALL_FW_PATH=/tmp/tmp26y0z7hv/parts/test-part/install/lib/firmware'])]

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Kernel plugin unit tests failed on armhf/arm64 after snapcore/snapcraft#1148 added DTB build/install args only for ARM; fixed by snapcore/snapcraft#1178 (commit b2a31b957), which made the tests architecture-independent.
stealth/space-bunny-alpha — closed resolved ARM-specific DTB arguments broke kernel test expectations; merged PR snapcore/snapcraft#1178 (b2a31b957) made the tests architecture-independent.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #1178 (commit b2a31b957), which made the kernel plugin unit tests architecture-independent after ARM DTB support caused assertion mismatches.
qwen/qwen3.6-35b-a3b — — Fixed. Kernel unit tests on armhf and arm64 failed due to outdated mocks missing dtbs targets. Test assertions were updated to match the new kernel plugin commands from PR 1148, resolving the CI failures.
qwen/qwen3.6-35b-a3b — — Kernel unit tests failed on armhf/arm64 after PR #1148 added dtbs targets without updating mocks. The issue was closed after test expectations were updated to match the new dtbs and dtbs_install make calls.
qwen/qwen3.6-35b-a3b — — Closed and fixed. Unit test expectations were updated to include the new dtbs and dtbs_install arguments from PR #1148, resolving the armhf and arm64 failures.
qwen3.6-35b-a3b-mtp-q6 — — Closed and fixed. Test expectations were updated to match the new dtbs and dtbs_install targets added in PR #1148, resolving the armhf and arm64 build failures.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft#1178 (confidence 97%)

    Merged PR referenced in the closing comment; commit b2a31b957 makes kernel unit tests architecture independent.

  • Caused By: snapcraft#1148 (confidence 95%)

    Merged PR 24261779d added ARM/arm64-only dtbs/dtbs_install make args without updating the tests for other architectures.

  • Related To: snapcraft (launchpad)#1665656 (confidence 80%)

    Launchpad bug 1665656 is the original feature request implemented by #1148.

Related issues

Issue Project State Summary Similarity
#1650458 snaps tests fail in armhf snapcraft (launchpad) closed Armhf snap test builds were fixed by snapcore/snapcraft#990, merged as f467e55bc; installation testing remained deferred because runners used LXC.
77%
#1643029 unittests are not passing in armhf snapcraft (launchpad) closed Architecture-hardcoded unit tests (pluginhandler IsDirty and commands push) were made arch-agnostic by canonical/snapcraft#945, commit 073332b9b "tests: fix unittests for armhf", closing the armhf autopkgtest failures.
75%
#1665656 kernel plugin: install all dtbs snapcraft (launchpad) closed ARM/ARM64 DTB auto-build and installation was implemented by merged snapcraft#1148 in commit 24261779d.
73%
#1649899 integration tests fail in armhf snapcraft (launchpad) closed Armhf integration tests were fixed and re-enabled by merged PR snapcore/snapcraft#971 (commit a725e69da).
72%