]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: ignore the "freezing" & "thawing" intermediate states
authorFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 22 Jun 2021 10:12:34 +0000 (12:12 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 22 Jun 2021 10:12:34 +0000 (12:12 +0200)
commit907300c3c3db0940964dd511f9744529226a69a2
treee8c855a470d1bf900cd433af3ab7fc38ba833338
parentb5ce2feebc8bcc02e03661de9d49b3ea0cd064a4
test: ignore the "freezing" & "thawing" intermediate states

When checking the unit state after `systemctl freeze|thaw` we can be
"too fast" and get the intermediate state (freezing/thawing) which we're
not interested in. Let's wait a bit and try to get the state again in
such cases to avoid unnecessary flakiness.

```
[   29.390203] testsuite-38.sh[218]: + state=thawing
[   29.390203] testsuite-38.sh[218]: + '[' thawing = running ']'
[   29.390203] testsuite-38.sh[218]: + echo 'error: unexpected freezer state, expected: running, actual: thawing'
[   29.390203] testsuite-38.sh[218]: error: unexpected freezer state, expected: running, actual: thawing
[   29.390203] testsuite-38.sh[218]: + exit 1
```
test/units/testsuite-38.sh