coordination #66400: [qe-core][epic][qem][systemd] test fails in 1_systemd
[qe-core][qem][systemd] qa_test_systemd fails in check-lvm2-lvmetad and check-named
The systemd testsuite (
qa_test_systemd) fails in
check-namedfor sle 15, sle 15sp1 and sle 15sp2. The service
named.servicedoes not exist in those products.
check-lvm2-lvmetadfor sle 15sp2. The service
lvm2-lvmetad.servicedoes not exist in this product.
The problem is a bit different than one might first think, because the default behavior of the testsuite should be to SKIP those missing service tests rather than fail.
But how do we know what the default behavior should be?
To answer this, let's check sle 12sp5:
In this product, the
named.service does not exist, similar to sle 15 and above. However the
check-named testcase is SKIPPED here.
/usr/share/qa/tools/test_systemd_run script (that runs the testsuite) in short runs
/usr/share/qa/qa_test_systemd/check-service.sh against all to-be-tested services as listed in
/usr/share/qa/qa_test_systemd/check-service.sh contains a function
function get_loaded() that gets the
Loaded: status of the service that is being tested. Later in the code, if this status is
"not-found", then the script exits with
exit 22. This results in the current service test being skipped.
So for 12sp5 if we would be testing a service called
get_loaded() would run
# systemctl status imaginary-service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
Loaded status (which is
"not-found"), it would skip the test for
However for sle 15 and above the output of systemctl has changed:
Here we get
systemctl status imaginary-service
Unit imaginary-service.service could not be found.
Which means that
get_loaded cannot grep the
Loaded status and exits with
exit 1, resulting in a failing testcase.
Given the above, there are two potential actions to address the aforementioned fails:
- The testsuite behavior should be fixed for the sle 15 products, namely how the
get_loadedfunction gets the loaded status.
- I also believe (but I am not sure if it is the correct route) that apart from the above change, the tests for the services that are no longer found (
check-named) should be removed from the
qa_systemd.tcfof the qa_test_systemd versions that correspond to those products