Skip to content

run-aa-test: Avoid reading previous tests log

To read the log for the currently running test only, the current date and time is used with the --since argument of journalctl.

Sometimes, tests can run too fast one after the other and the last log entries of the previous test is at the same timestamp as the one running.

That makes the current test parse log entries from the previous test, which is unexpected, and the test fails.

Unfortunately, the --since argument of journalctl doesn't allow for more precision than the second.

To fix that, use the current journal cursor instead of time. With this approach, no entries from the previous test is read by the current test

This is the same patch as in ofono!16 (merged)

Needs backport to v2022

https://phabricator.apertis.org/T8841

Edited by Detlev Casanova

Merge request reports

Loading