fwupd icon indicating copy to clipboard operation
fwupd copied to clipboard

1.8.1: test suite is failing

Open kloczek opened this issue 3 years ago • 9 comments

Meson status:

fwupd 1.8.1

  User defined options
    auto_features                 : enabled
    bindir                        : /usr/bin
    buildtype                     : plain
    datadir                       : /usr/share
    includedir                    : /usr/include
    infodir                       : /usr/share/info
    libdir                        : /usr/lib64
    libexecdir                    : /usr/libexec
    localedir                     : /usr/share/locale
    localstatedir                 : /var
    mandir                        : /usr/share/man
    prefix                        : /usr
    sbindir                       : /usr/sbin
    sharedstatedir                : /var/lib
    sysconfdir                    : /etc
    wrap_mode                     : nodownload
    bluez                         : enabled
    build                         : all
    consolekit                    : enabled
    curl                          : enabled
    docs                          : gtkdoc
    firmware-packager             : true
    gudev                         : enabled
    gusb                          : enabled
    introspection                 : enabled
    libarchive                    : enabled
    lvfs                          : true
    lzma                          : enabled
    man                           : true
    plugin_amt                    : enabled
    plugin_dell                   : enabled
    plugin_dummy                  : true
    plugin_emmc                   : enabled
    plugin_flashrom               : enabled
    plugin_gpio                   : enabled
    plugin_intel_spi              : true
    plugin_logitech_bulkcontroller: enabled
    plugin_modem_manager          : enabled
    plugin_msr                    : enabled
    plugin_nvme                   : enabled
    plugin_parade_lspcon          : enabled
    plugin_platform_integrity     : true
    plugin_powerd                 : enabled
    plugin_realtek_mst            : enabled
    plugin_redfish                : enabled
    plugin_synaptics_rmi          : enabled
    plugin_thunderbolt            : enabled
    plugin_tpm                    : enabled
    plugin_uefi_capsule           : enabled
    plugin_uefi_capsule_splash    : true
    plugin_uefi_pk                : enabled
    polkit                        : enabled
    soup_session_compat           : true
    supported_build               : enabled
    systemd                       : enabled
    tests                         : true

I'm running my builds inside LXC zones and I'm not sure is it the cause. Nevertheless test suite is failing

+ cd fwupd-1.8.1
+ /usr/bin/meson test -C x86_64-redhat-linux-gnu --num-processes 48 --print-errorlogs
ninja: Entering directory `/home/tkloczko/rpmbuild/BUILD/fwupd-1.8.1/x86_64-redhat-linux-gnu'
ninja: no work to do.
 1/35 fwupd-exported-api                     OK               0.04s
 2/35 fwupd-self-test                        OK               0.04s
 3/35 fwupdplugin-exported-api               OK               0.02s
 4/35 fwupd-thread-test                      OK               0.04s
 5/35 fwupd-context-test                     OK               0.04s
 6/35 fwupdplugin-self-test                  OK               4.37s
 7/35 fu-self-test                           OK               1.89s
 8/35 acpi-dmar-self-test                    OK               0.29s
 9/35 acpi-facp-self-test                    OK               0.28s
10/35 acpi-ivrs-self-test                    OK               0.27s
11/35 acpi-phat-self-test                    OK               0.27s
12/35 ata-self-test                          OK               0.26s
13/35 bcm57xx-self-test                      OK               0.25s
14/35 ccgx-self-test                         OK               0.24s
15/35 dell-self-test                         OK               0.24s
16/35 fu-dfu-self-test                       OK               0.23s
17/35 elantp-self-test                       OK               0.22s
18/35 lenovo-thinklmi-self-test              OK               0.21s
19/35 logitech-hidpp-self-test               OK               0.19s
20/35 mtd-self-test                          OK               0.19s
21/35 nitrokey-self-test                     OK               0.18s
22/35 nvme-self-test                         OK               0.17s
23/35 pxi-self-test                          OK               0.16s
24/35 synaptics-mst-self-test                OK               0.14s
25/35 synaptics-prometheus-self-test         OK               0.13s
26/35 synaptics-rmi-self-test                OK               0.12s
27/35 uefi-dbx-self-test                     OK               0.09s
28/35 uf2-self-test                          OK               0.08s
29/35 vli-self-test                          OK               0.07s
30/35 wacom-usb-self-test                    OK               0.06s
31/35 uefi-self-test                         OK               0.12s
32/35 linux-swap-self-test                   FAIL             0.23s   killed by signal 6 SIGABRT
>>> MALLOC_PERTURB_=198 /home/tkloczko/rpmbuild/BUILD/fwupd-1.8.1/x86_64-redhat-linux-gnu/plugins/linux-swap/linux-swap-self-test
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stdout:
# random seed: R02S994937edae07d39049331ee042556f84
1..3
# Start of linux-swap tests
ok 1 /linux-swap/none
Bail out! ERROR:../plugins/linux-swap/fu-self-test.c:46:fu_linux_swap_plain_func: assertion failed (error == NULL): failed to get system bus: Could not connect: Connection refused (g-io-error-quark, 39)
stderr:
**
ERROR:../plugins/linux-swap/fu-self-test.c:46:fu_linux_swap_plain_func: assertion failed (error == NULL): failed to get system bus: Could not connect: Connection refused (g-io-error-quark, 39)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

33/35 tpm-self-test                          OK               0.13s
34/35 redfish-self-test                      FAIL             0.33s   killed by signal 6 SIGABRT
>>> FWUPD_LOCALSTATEDIR=/tmp/fwupd-self-test/var G_TEST_BUILDDIR=/home/tkloczko/rpmbuild/BUILD/fwupd-1.8.1/x86_64-redhat-linux-gnu/plugins/redfish MALLOC_PERTURB_=56 G_TEST_SRCDIR=/home/tkloczko/rpmbuild/BUILD/fwupd-1.8.1/plugins/redfish /home/tkloczko/rpmbuild/BUILD/fwupd-1.8.1/x86_64-redhat-linux-gnu/plugins/redfish/redfish-self-test
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stdout:
# random seed: R02Sf5f7800e18fa2fe082d4a7498b25d95b
# GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ?gio-vfs?
# XbSilo-DEBUG: attempting to load /tmp/.8L4AN1
# XbSilo-DEBUG: failed to load silo: blob too small
# FuPlugin-DEBUG: load(/home/tkloczko/rpmbuild/BUILD/fwupd-1.8.1/x86_64-redhat-linux-gnu/plugins/redfish/libfu_plugin_redfish.so)
# FuPlugin-DEBUG: init(redfish)
# FuPlugin-DEBUG: startup(redfish)
# FuCommon-DEBUG: reading /home/tkloczko/rpmbuild/BUILD/fwupd-1.8.1/plugins/redfish/tests/redfish-smbios.bin with 118 bytes
# FuPluginRedfish-DEBUG: protocol_rcds: 1
# FuPluginRedfish-DEBUG: failed to get device: missing 0x9876:0x5678: failed to construct proxy for org.freedesktop.NetworkManager: Could not connect: Connection refused
# FuPluginRedfish-DEBUG: http://localhost:4661/redfish/v1/: (null) [0]
1..8
# Start of redfish tests
ok 1 /redfish/ipmi # SKIP no IPMI hardware
ok 2 /redfish/common
# FuPluginRedfish-DEBUG: using 1.2.3 for P50 v1.2.3 PROD
# FuPluginRedfish-DEBUG: using 1.2.3 for P50 1.2.3 DEV
ok 3 /redfish/common{version}
ok 4 /redfish/common{lenovo}
Bail out! FuPluginRedfish:ERROR:../plugins/redfish/fu-self-test.c:220:fu_test_redfish_network_mac_addr_func: assertion failed (error == NULL): missing 00:13:F7:29:C2:D8: failed to construct proxy for org.freedesktop.NetworkManager: Could not connect: Connection refused (g-io-error-quark, 39)
stderr:
**
FuPluginRedfish:ERROR:../plugins/redfish/fu-self-test.c:220:fu_test_redfish_network_mac_addr_func: assertion failed (error == NULL): missing 00:13:F7:29:C2:D8: failed to construct proxy for org.freedesktop.NetworkManager: Could not connect: Connection refused (g-io-error-quark, 39)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

35/35 thunderbolt-self-test                  OK               3.40s

Summary of Failures:

32/35 linux-swap-self-test           FAIL             0.23s   killed by signal 6 SIGABRT
34/35 redfish-self-test              FAIL             0.33s   killed by signal 6 SIGABRT


Ok:                 33
Expected Fail:      0
Fail:               2
Unexpected Pass:    0
Skipped:            0
Timeout:            0

kloczek avatar May 27 '22 14:05 kloczek

@superm1 -- opinion please -- do you think the self tests should work without a working DBus daemon?

hughsie avatar May 27 '22 14:05 hughsie

If dbus session would be requires I can run test suite over dbus-session command ..

kloczek avatar May 27 '22 17:05 kloczek

Tested with dbus-session and result is exactly the same.

kloczek avatar May 27 '22 17:05 kloczek

So is it because we can't talk to NetworkManager and D-Bus? Is there any way I can replicate this environment locally? F36 if that helps.

hughsie avatar May 27 '22 18:05 hughsie

I'm using my own distribution and I have no ability to replicate that on Fedora. What I've tested was in my normal devel LXC zone where I have dbus and NM. Final build will be stripped those bits because NM and dbus are not on list of BuildRequires and are not part of the base system used to assembly per package build env.

kloczek avatar May 27 '22 19:05 kloczek

@superm1 -- opinion please -- do you think the self tests should work without a working DBus daemon?

I think anything dependent on it should be skipped if the dependency is missing. We do this for plenty of tests already where things like a TSS emulator isn't there for example.

Maybe look for the particular error type and waive the failure as a skip?

superm1 avatar Jun 01 '22 16:06 superm1

@kloczek if you can add the g_error_matches() with the right values, we can g_test_skip() the right ones. Could you do a PR for that perhaps?

hughsie avatar Jun 01 '22 17:06 hughsie

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please note: We are just a few people who contribute to a shared project, and it's impossible for us to fix every bug with such limited resources. If you want to investigate and try to help solve this yourself, we will review all pull requests from new contributors. If this is issue is important to you for your business please talk with your technical account manager about arranging resources to solve this issue. You might even consider hiring someone to write the code if you're unable to do so yourself, e.g. see: https://fwupd.org/lvfs/docs/consulting

stale[bot] avatar Jul 31 '22 08:07 stale[bot]

@kloczek if you can add the g_error_matches() with the right values, we can g_test_skip() the right ones. Could you do a PR for that perhaps?

Sorry I'm not so familiar with fwupd code to be able prepare PR for that. Please let me know if it is anything else which I can try to diagnose that issue.

kloczek avatar Jul 31 '22 09:07 kloczek