Skip to content

check-suspend-resume.sh should verify, that SOF is running #305

Closed

Description

@lyakh

During a daily test one of kernel module loading and unloading scripts left SOF unloaded. After that check-suspend-resume.sh ran and reported success, because the system was able to suspend and resume with no errors, even though SOF wasn't even present. The script should check that SOF is active before beginning the process.

Activity

  1. added
    P1Blocker bugs or important features
    on Jul 31, 2020
  2. marc-hb commented on Jul 31, 2020

    @marc-hb
    Contributor

    P1 because any "green failure" (false negative without the double negation) should be P1

  3. plbossart commented on Jul 31, 2020

    @plbossart
    Member

    There is a dmesg trace 'probe complete' that can be used.

    dev_dbg(dev, "Completing SOF PCI probe");
    

    I just added the same for ACPI, that should help detect that the driver loaded ok. thesofproject/linux#2338
    In addition the script can check for the presence of a card, there can be cases where SOF probes but the card is not registered, and the error is squelched by the driver core.

  4. lyakh commented on Aug 3, 2020

    @lyakh
    ContributorAuthor

    @plbossart I think there's a problem with that too. I've seen at least one test in CI where the test sequence was started when the system has already been running for some time, so, the kernel message buffer has already discarded SOF probing messages. You can see such cases when some of the first few tests fail. Can we not use some /proc or /sys or /dev or aplay -l test instead?

  5. marc-hb commented on Aug 3, 2020

    @marc-hb
    Contributor

    We're working on replacing dmesg with journalctl [ --boot ] [ --dmesg ] [ etc.]

  6. plbossart commented on Aug 3, 2020

    @plbossart
    Member

    @plbossart I think there's a problem with that too. I've seen at least one test in CI where the test sequence was started when the system has already been running for some time, so, the kernel message buffer has already discarded SOF probing messages. You can see such cases when some of the first few tests fail. Can we not use some /proc or /sys or /dev or aplay -l test instead?

    Goodness. I hope the test devices reboot and only do a modprobe snd-soc-pci when the tests are actually enabled? In other words we don't want to probe the drivers at boot, otherwise yes the logs might have been erased for an odd reason.

  7. marc-hb commented on Apr 14, 2021

    @marc-hb
    Contributor

    In other words we don't want to probe the drivers at boot, otherwise yes the logs might have been erased for an odd reason.

    I'm not a fan of loading the drivers at boot either (I've been told it's closer to the "real-world") but journalctl typically keeps hundreds of megabytes of logs over many days and can be extended if needed so that should not be a problem anymore once the transition is finished.

  8. marc-hb commented on Apr 14, 2021

    @marc-hb
    Contributor

    After that check-suspend-resume.sh ran and reported success, because the system was able to suspend and resume with no errors, even though SOF wasn't even present. The script should check that SOF is active before beginning the process.

    We have a check-suspend-resume-with-playback, @lyakh is that enough?

  9. mengdonglin commented on Apr 21, 2021

    @mengdonglin
    Contributor

    Close this issue, because

    • Test case check-suspend-resume-with-playback checks SOF presence after system resumes.
    • CI is switch to use journalctl, so the early log will be kept in disc storage and will not be lost.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions