Actions
action #69133
closedos-autoinst self-tests fail to remove tempdir on test failure
Description
Observation¶
Running 99-full-stack.t when it fails I observe an error like the following:
# Failed test 'Result in testresults/result-reload_needles.json is ok'
# at 99-full-stack.t line 82.
# got: 'fail'
# expected: 'ok'
Bailout called. Further testing stopped: testresults/result-reload_needles.json failed
cannot remove path when cwd is /tmp/99-full-stack.t-KMSs/pool for /tmp/99-full-stack.t-KMSs: at /usr/lib/perl5/5.26.1/File/Temp.pm line 1616.
so the temporary directory can not be removed in this case
Acceptance criteria¶
- AC1: No error about failing to remove the temporary directory if the test fails
- AC2: No error about failing to remove the temporary directory if no tests fail
- AC3: The temporary directory is removed after the test exits regardless of the result (fail or pass)
Suggestions¶
- Reproduce the failure locally, e.g. with an artificial error within t/99-full-stack.t in os-autoinst
- Compare how we handle the temporary directory within other test modules within os-autoinst as well as openQA
- Apply a fix and where necessary enhance all other uses of the temp dir in both os-autoinst and openQA
Actions