Uh oh!
There was an error while loading. Please reload this page.
verify-sof-firmware-load: fix test to actually check the FW is loaded - #855
verify-sof-firmware-load: fix test to actually check the FW is loaded#855marc-hb wants to merge 2 commits into
Conversation
Maybe setting up a checkpoint here was useful in the past? Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Searching the logs for the firmware version was stupid because old logs were enough to make the test pass! Check whether /sys/kernel/debug/sof/fw_version exists instead. This also makes the test pass with IPC4 and fixesthesofproject#842 and thesofproject#845 Signed-off-by: Marc Herbert <marc.herbert@intel.com>
plbossart
commented
Feb 10, 2022
doesn't sound very good to me, what does this test in practice? an empty firmware version is a success? |
The test is named "verify-sof-firmware-load" so yes that looks like a success to me, why not? Certainly more appropriate than passing based on old and irrelevant logs... Any better alternative to suggest? |
plbossart
commented
Feb 10, 2022
if you want to check that the firmware booted, then we should look for specific strings that tell us just that. Or indirectly find a valid version number. An empty version number if not a good sign. This is what you want to check for: |
marc-hb
commented
Feb 10, 2022
Checking the logs does not really work because it involves time. This test currently passes after unloading the drivers, this is ridiculous. Is there really nothing equivalent in |
marc-hb
commented
Feb 10, 2022
This may mean that the firmware is not a good state (which will be detected by further tests) but can this ever be a sign that the firmware is not loaded? I've been using an sof-logger patch (thesofproject/sof/pull/5027) for a few months locally. This patch makes the sof-logger wait for |
How about |
libinyang
commented
Feb 10, 2022
|
libinyang
commented
Feb 10, 2022
If we want to check the fw_version, it will meet the same issue as aplay. If driver loads unsuccessfully in the main thread, the fw_version entry will be removed. In this situation, you can't tell FW is loaded successfully or not. You can find "firmware boot complete" is showed in |
plbossart
commented
Feb 10, 2022
@marc-hb not able to understand why a log isn't good. that's what we use to report errors, don't we? if you want to double check that a driver is bound, you can add an additional check. I think it's feasible with sysfs or lspci, but that's different to checking if the firmware booted. |
marc-hb
commented
Feb 10, 2022
Because the test to check whether the firmware is loaded passes after unloading the firmware. Especially ridiculous in the unload-reload test!!
Yes but only thanks an elaborate timestamp scheme (a.k.a. "kernel checkpoint") that could be used in the load-unload test but can simply not be used in any "spot check" like this one. So how about this: because nothing in |
marc-hb
commented
Feb 10, 2022
Actually: first B and then A. Obviously. |
plbossart
commented
Feb 10, 2022
Why can't we also do this on the initial test? It's useful to check if the firmware booted correctly the FIRST time. doing it only when cycling load/unload is weird. Put differently, the 'load' sequence is exactly the same for the first boot, or after doing the remove. I don't see why we should special-case stress tests. |
marc-hb
commented
Feb 10, 2022
We can but it's a different test. So, new proposal:
|
plbossart
commented
Feb 10, 2022
sounds good to me @marc-hb. I am not sure if 'at least once' is the right name, you can't load the same firmware twice but that's fine. Maybe 'first boot' or something. |
marc-hb
commented
Feb 16, 2022
Submitted in #860 which superseded this. I'm keeping this open for now as reminder because there may still be some stuff to salvage from this PR.
I haven't included any rename in #860 so it can be reviewed and merged faster. Will do later. |
marc-hb
commented
Feb 16, 2022
I just noticed by chance that even when running Should not be a problem. |
marc-hb
commented
Mar 1, 2022
The rest (and a bit more) submitted in |
Searching the logs for the firmware version was stupid because old logs
were enough to make the test pass!
Check whether
/sys/kernel/debug/sof/fw_versionexists instead.This also makes the test pass with IPC4 and fixes#842 and #845
Signed-off-by: Marc Herbert marc.herbert@intel.com