Skip to content
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

test-configs.yaml: Enable kselftest-rtc test plan on rk3399-gru-kevin #980

Merged
merged 1 commit into from
Jan 17, 2022

Conversation

nfraprado
Copy link
Contributor

The rk3399-gru-kevin device uses the rtc-cros-ec driver for RTC. This PR adds the kselftest-rtc test on kevin to exercise this driver. The config needed to enable the driver is already part of the arm64 defconfig.

LAVA run: https://lava.collabora.co.uk/scheduler/job/5409783

As can be seen from the LAVA output, the alarm_alm_set_minute test, which sets an alarm, is failing with timeout. From a first look it seems like a bug in the rtc-cros-ec driver.

rk3399-gru-kevin uses the rtc-cros-ec driver for RTC. Run kselftest-rtc
on this device to exercise its driver.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
@gctucker gctucker added this to In Progress in KernelCI project board via automation Jan 12, 2022
@gctucker gctucker requested a review from a team January 12, 2022 17:03
@gctucker
Copy link
Contributor

@nfraprado Could you please take a look at the sleep test results and compare? They use rtcwake.

@nfraprado
Copy link
Contributor Author

Since the whole rtc selftest was timing out, I increased its timeout setting to let all tests run, and with this I was able to see that even though the alarm_alm_set_minute test is failing with timeout, alarm_wkalm_set_minute is working fine. This means that the alarm functionality is working at least with the wkalm variant. So the failure on the alarm_alm_set_minute is most likely a driver bug, so shouldn't hold back this test from being added.

Lava log with increased timeout: https://lava.collabora.co.uk/scheduler/job/5415176

A patch has been sent upstream changing the timeout setting to allow all tests to run: https://lore.kernel.org/all/20220112165359.3206047-1-nfraprado@collabora.com/

@nfraprado
Copy link
Contributor Author

@gctucker sure, I'll do that next. I'll also double-check why this timeout increase is needed, since the response on the ML is that it shouldn't be.

@gctucker
Copy link
Contributor

OK thanks. It would be good to also have a GitHub issue in kernelci-project to track this on the kernel bugs board.

@nfraprado
Copy link
Contributor Author

Opened the kernel bug issue at kernelci/kernelci-project#86. I don't have permission to add it to the project/board though.

@nfraprado
Copy link
Contributor Author

Regarding the comparison between the sleep test and this test:

Both tests use the RTC, but their purpose is different. The sleep test uses RTC alarms and then suspends the device, so that the alarm will wake it up. It does this for different sleep levels. On the other hand, the rtc kselftest (added here) tries a few different functions of the RTC, including setting an alarm.

So what both have in common is working with RTC alarms through use of the RTC_WKALM_RD and RTC_WKALM_SET IOCTLs. Both of these IOCTLs seem to be working fine on this device and driver, since the alarm_wkalm_set_minute test passes (and at least some of the sleep test cases pass).

The failing test in the rtc kselftest, alarm_alm_set_minute, uses the RTC_ALM_SET IOCTL, which has slightly different semantics, and is not used by rtcwake in the sleep test.

@nfraprado
Copy link
Contributor Author

@gctucker I'd say this is ready to be tested on staging and get merged.

The failing test case, alarm_alm_set_minute, really looks like a bug in the rtc driver and is being tracked at kernelci/kernelci-project#86.

The fix for the selftest timeout bug has been sent upstream and accepted by the maintainer: https://lore.kernel.org/all/f286a86d-6371-d8bd-6ca9-5f622468d1a4@linuxfoundation.org/. When the fix reaches mainline it will allow the last test case, alarm_wkalm_set_minute, to run (and pass).

@gctucker gctucker merged commit cf2429b into kernelci:main Jan 17, 2022
KernelCI project board automation moved this from In Progress to Done Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants