-
Notifications
You must be signed in to change notification settings - Fork 30
SuspendResume validation test #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
smuppand
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test location & structure
Confirm expected placement under Runner/suites/Kernel/... and alignment with our standard YAML pattern.
If this is host-side, we likely shouldn’t place it under Runner suites at all.
Can you align it to our on-device testkit format if DUT-side is desired?
| WAIT_TIMEOUT=40 # seconds to wait for device to resume | ||
|
|
||
| # Check if adb is available | ||
| if ! command -v adb >/dev/null 2>&1; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our repo is executed on the DUT (inside LAVA) via Runner/.../run.sh.
Your test is host-driven (requires adb on host).
Do you intend this test to run on host or on DUT?
If host: where is it supposed to live (not inside Runner suites)? If DUT: can you provide an on-device version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can accomodate running the test script on host using adb but I think for clarity the path in the repository should be different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is host driven due to limitations of continuing shell with this particular test. Please suggest location where to host this folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is host driven due to limitations of continuing shell with this particular test. Please suggest location where to host this folder.
Suggested options:
Put it under a clearly host-only area, e.g.
-
host-tools/suspend-resume/ or tools/host/SuspendResume/
-
Alternatively, provide two variants:
- Runner/suites/.../SuspendResume/ → DUT-side RTC baseline only (no adb)
- tools/host/... → adb/host-driven extension (optional)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's possible to have the host based script. I tried this approach in the past and it didn't work. Suspend breaks the execution of the script and thus LAVA can't complete the test shell with suspend step. IMHO the only way of testing it in LAVA is to have a host based script (with adb connection). Feel free to experiment with host based scripts and demonstrate it's possible - I might be wrong here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to New path is: qcom-linux-testkit\host-tools\SuspendResume, adb driven test suite. Removed from Runner.
| log_info "Command: rtcwake -d /dev/rtc0 -m no -s $SUSPEND_DURATION && systemctl suspend" | ||
|
|
||
| # Execute suspend command (this will disconnect adb) | ||
| adb shell "rtcwake -d /dev/rtc0 -m no -s $SUSPEND_DURATION && systemctl suspend" & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Connectivity during suspend
ADB will drop during suspend for most devices.
Your script uses adb shell "rtcwake ... && systemctl suspend" then polls adb shell "echo test".
How do you guarantee adb comes back reliably on resume across boards?
Do you expect the DUT to re-enumerate USB consistently, or require adb reconnect, etc.?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. This will be tricky to guarantee.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the default expectation is that the USB interface re‑enumerates consistently. Do you suggest adding an explicit reconnect step before wait-for-device? (i.e., using adb reconnect usb).
Also, the current echo-based polling in the script was intentionally chosen to make the resume detection non‑blocking, unlike adb wait-for-device, which blocks. With this approach, I was able to run around 15 back‑to‑back iterations on one platform and the device reconnected correctly each time.
|
@nitinn22 Please check for the script permissions https://github.com/qualcomm-linux/qcom-linux-testkit/actions/runs/21714250579/job/62647616233?pr=278 |
|
Here is a job using this patch: https://lava-staging.infra.foundries.io/scheduler/job/217 |
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
mwasilew
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please test your changes before sending for review. I'll stop looking at any new changes without a link to a job you submitted to LAVA to prove that your changes work.
| run: | ||
| steps: | ||
| - REPO_PATH=$PWD | ||
| - cd Runner/suites/Kernel/Baseport/SuspendResume |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the paths in files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please share a test job that demonstrates it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Job link: https://lava.infra.foundries.io/scheduler/job/141569,
I am seeing error: I am using a target past job to retrigger this test, does the build support ADB? as i see below error from the test script?
[INFO] 1970-01-01 00:00:32 - -----------------------------------------------------------------------------------------
[INFO] 1970-01-01 00:00:32 - -------------------Starting SuspendResume Testcase (ADB-based)----------------------------
[INFO] 1970-01-01 00:00:32 - === Test Initialization ===
[INFO] 1970-01-01 00:00:32 - Checking for connected ADB devices...
[INFO] 1970-01-01 00:00:32 - Detected 0 device(s)
[FAIL] 1970-01-01 00:00:32 - No ADB devices connected - please connect a device
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you might not be aware, RB3g2 requires Renesas firmware to be included in the build for USB stack to work. meta-qcom builds don't include Renesas firmware due to licensing issues. This state is expected - no USB on RB3gen2.
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
…ng tests similar to runner if more tests are added in future and modified the readme file Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
…unner to run independently. Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
host-tools/utils/functestlib.sh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you duplicate the whole functestlib?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The duplication enables host-tools to be deployed independently from Runner, which is useful for CI/CD scenarios that only need host-side ADB tests. However, if you prefer to avoid duplication, I can create a symbolic link instead. I am not sure if it would work directly without changes or needs rework on scripts. What's your preference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you give a scenario when duplication is actually required? I can't think of any. I would prefer a symlink or just using the file directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the file directly the changes are done, https://lava.infra.foundries.io/scheduler/job/141848 unable to proceed due to resource not available.
… now made a symlink instead of full copy in the host-tools utils path Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
…s are failing instead pointing directly from init_env Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
(Kernel/Baseport): Add SuspendResume validation test suite
Add comprehensive ADB-based suspend/resume validation test for Qualcomm Linux devices. The test remotely triggers suspend via rtcwake, validates resume functionality, and collects detailed power management statistics.
Key Features:
Test Components:
Prerequisites: Single ADB device, root access, rtcwake support
Signed-off-by: Nitin Nakka nitinn@qti.qualcomm.com