[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
This bug was fixed in the package fwupd - 1.7.7-1ubuntu2 --- fwupd (1.7.7-1ubuntu2) kinetic; urgency=medium * d/t/ci: don't stderr-fail the autopkgtest on modprobe error + it's optional as tests can be skipped, if mtdram module isn't there -- Lukas Märdian Wed, 18 May 2022 09:34:56 +0200 ** Changed in: fwupd (Ubuntu) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
Ugh! Indeed, fixed. https://github.com/fwupd/fwupd/pull/4645 https://launchpad.net/ubuntu/+source/fwupd/1.7.7-1ubuntu2 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
> ci FAIL stderr: modprobe: FATAL: Module mtdram not found in directory /lib/modules/5.4.0-109-generic No good deed goes unpunished. I think you'll want to redirect the stderr output from modprobe to stdout to make autopkgtest happy. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
Thanks Lukas! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
** Changed in: fwupd (Ubuntu) Status: New => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
Sounds like a plan! Done. Thanks for all of your feedback! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
> Ah! Sure, no problem. I wasn't aware of this. Here you go: https://github.com/fwupd/fwupd/pull/4641 Thanks! > I only included the "modprobe" change in this PR, as IMO it does not really make sense to ship the distro patch in this upstream "contrib/debian" directory, as the upstream repo already contains that fix in the git history. That matches what I thought made sense too. > So we can either wait for the new version to be shipped, or upload an intermediate fix/package to Ubuntu or Debian, which contains the "0002-trivial-skip-mtd-tests-if-not-working-off-mtdram-tes.patch" distro patch (that would need to be dropped again, once it's upgraded to the new version, containing it natively). For now to get Ubuntu to migrate (the only place this is failing) I'd say upload to kinetic directly. Debian will take 1.8.1 next which will take this patch and depending on where the cycle ends up in kinetic will sync at that time if so. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
Ah! Sure, no problem. I wasn't aware of this. Here you go: https://github.com/fwupd/fwupd/pull/4641 I only included the "modprobe" change in this PR, as IMO it does not really make sense to ship the distro patch in this upstream "contrib/debian" directory, as the upstream repo already contains that fix in the git history. So we can either wait for the new version to be shipped, or upload an intermediate fix/package to Ubuntu or Debian, which contains the "0002-trivial-skip-mtd-tests-if-not-working-off-mtdram-tes.patch" distro patch (that would need to be dropped again, once it's upgraded to the new version, containing it natively). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
We keep the packaging at https://github.com/fwupd/fwupd/tree/main/contrib/debian/tests. If you can bring the review there, that is ideal as this is the root of what goes into Debian and Ubuntu. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
I'm not sure what you mean by "contrib/debian"? The patch should apply cleanly to the upstream Debian package, too. (Well, one might want to change the version number.) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
** Patch added: "3-fix-mtd-tests.debdiff" https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+attachment/5590395/+files/3-fix-mtd-tests.debdiff -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
Can you bring it to upstream packaging in contrib/debian? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
Yes, I like this approach much better. LGTM! I'd also suggest to call "modprobe mtdram" prior to running the tests, so that the new mtd test are actually executed. See attached debdiff. This way it works for arm64 (skipping the test due to mtd0 not being provided by mtdram) and works for non-arm64 (using modprobe, as suggested above) https://autopkgtest.ubuntu.com/results/autopkgtest-kinetic-slyon- testing/kinetic/arm64/f/fwupd/20220517_123619_edd79@/log.gz https://autopkgtest.ubuntu.com/results/autopkgtest-kinetic-slyon- testing/kinetic/amd64/f/fwupd/20220517_122000_38022@/log.gz WDYT? Can we upload it this way? ... Actually, we might want to do "modprobe mtdram || true" as this is basically optional. ** Patch added: "2-fix-mtd-tests.debdiff" https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+attachment/5590388/+files/2-fix-mtd-tests.debdiff -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
Here's the cleaner solution: https://github.com/fwupd/fwupd/commit/eca29c11faa5b1258be8fa253beeebe753bad4fa -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
It's running in KVM. (armhf is the exception, running inside LXD container) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
Is autopkgtest running on "real" hardware? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
I think the question we'd need to ask first is: Why is there a /dev/mtd0 inside Ubuntu's arm64 autopkgtest VM? At no point during the tests do we modprobe the "mtdram" driver. So it is expected that /dev/mtd0 is not there and this test is skipped (as is the case for Debian and Ubuntu != arm64). Also, when I launch a Ubuntu Karmic VM in OpenStack, it does not have /dev/mtd0, only after "modprobe mtdram" can I query it: $ cat /sys/devices/virtual/mtd/mtd0/size 4194304 $ cat /sys/devices/virtual/mtd/mtd0/name mtdram test device The test is supposed to run against "mtdram", and 0x40=4194304 is the default size of that module, so that constant value is actually correct IMO, but the tests should be loading that module prior to executing the test. And it's strange that Ubuntu/arm64 would have a different mtd0 device.. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
I suspect the self tests need to check the name is "mtdram test device" before running. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
While we have the luxury of time with kinetic, I'd rather we figure out why the test fails rather than just skipping it. If the test is failing, the plugin may fail too! It seems that this code should be reading the "size" attribute from sysfs and comparing it (here https://github.com/fwupd/fwupd/blob/main/plugins/mtd/fu-mtd-device.c#L161) to a static value (here https://github.com/fwupd/fwupd/blob/main/plugins/mtd/fu-self-test.c#L53). That seems like a coding error to me. Maybe you can take a PR upstream to adjust it? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
** Patch added: "1-disable-mtd-self-test.debdiff" https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+attachment/5590042/+files/1-disable-mtd-self-test.debdiff -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1973598] Re: mtd-self-test failure on arm64 (mtdram module)
** Description changed: version 1.7.7-1 of fwupd introduced a new "mtd-self-test" which fails - the autopkgtest on ubuntu/kinetic/arm64. + the autopkgtest on ubuntu/kinetic/arm64. (https://salsa.debian.org/efi- + team/fwupd/-/commit/4d65d2014945e2e4f55a3192bf0f50beb68b1e3b) The "mtd" test is skipped on almost all other setups (e.g. all of Debian CI and all Ubuntu architectures, but arm64), due to missing the /devices/virtual/mtd/mtd0 device, supposed to be provided by the "mtdram" kernel module. On arm64 a "mtd0" device exists and makes the "mtd" tests fail. We could skip the "mtd-self-test", as they've never been run before (thus not a regression), or find some way to properly run the MTD tests. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1973598 Title: mtd-self-test failure on arm64 (mtdram module) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1973598/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs