Unable to rerun ubuntu_lttng_smoke_test / ubuntu_sysdig_smoke_test on the same system due to module removed

Bug #1931338 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Po-Hsu Lin

Bug Description

In these two tests, the DKMS module will be unloaded and package will be removed with cleanup() in the end of the test.

This is for our manually provisioned system (bug 1798295), and it's also a good practice to keep the system clean after the test.

However, as we only run setup() once if the test version is not bumped, when you try to restart these tests on the same system without removing autotest/client/tmp/<test suite> directory, they will fail due to the lack of corresponding modules.

Solution for this is to move code in setup() into initialize(), which is guaranteed to be executed on every run.

This is the workflow for a test:
1. initialize()
2. setup()
3. run_once()
4. cleanup()

With a second run immediately after the first one:
5. initialize()
6. run_once()
7. cleanup()

Po-Hsu Lin (cypressyew)
tags: added: ubuntu-lttng-smoke-test ubuntu-sysdig-smoke-test
Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
Po-Hsu Lin (cypressyew)
description: updated
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.