Skip to content

Commit c55affc

Browse files
PLangowskiredzynix
authored andcommitted
README: Add information about rebooting DUT
Provide explanation on how to use the reboot_wrapper in tests Signed-off-by: Pawel Langowski <pawelx.langowski@intel.com>
1 parent 5e158c9 commit c55affc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,20 @@ not to make your system vulnerable.
148148
On systems using auditd, sof-test will also generate a huge amount of
149149
log. If you need to keep `audit`, check `man auditctl` to find how to
150150
filter out sudo noise.
151+
152+
## Rebooting DUT during tests
153+
154+
The SOF test automation framework supports rebooting the DUT during tests.
155+
In order to use it, the test developer needs to use the `reboot_wrapper`
156+
function from `case-lib/lib.sh`.
157+
158+
It is important to note that after the DUT is rebooted, the framework will run
159+
the test script again. This allows reboots to be carried out during test
160+
execution. To avoid infinite loops where the test keeps running and rebooting
161+
the platform, the developer needs to provide a way to detect that the reboot was
162+
performed and continue test execution from that point. This can be achieved by
163+
creating a persistent file before the reboot and reading it within the test
164+
script. This file can also contain context of the test, e.g. the number of
165+
reboots already performed (if the test requires several reboots). Since there
166+
can be many use cases of the reboot wrapper, no particular format of the file is
167+
enforced. It is up to the test developer to handle the reboots.

0 commit comments

Comments
 (0)