Project

General

Profile

Actions

action #88648

closed

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

Added by geor over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
2021-02-16
Due date:
% Done:

100%

Estimated time:
Difficulty:

Description

The systemd testsuite (qa_test_systemd) fails in

  • check-named for sle 15, sle 15sp1 and sle 15sp2. The service named.service does not exist in those products.
  • check-lvm2-lvmetad for sle 15sp2. The service lvm2-lvmetad.service does 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.
The /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/tcf/qa_systemd.tcf.
/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 imaginary-service, get_loaded() would run

 # systemctl status imaginary-service
 imaginary-service.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

So after grepping the Loaded status (which is "not-found"), it would skip the test for imaginary-service.service

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_loaded function 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-lvm2-lvmetad and check-named) should be removed from the qa_systemd.tcf of the qa_test_systemd versions that correspond to those products
Actions #1

Updated by szarate over 3 years ago

  • Precedes action #62471: [qe-core][qem] systemd test fails in test_09_issue_2691 added
Actions #2

Updated by geor over 3 years ago

  • Precedes deleted (action #62471: [qe-core][qem] systemd test fails in test_09_issue_2691)
Actions #3

Updated by geor over 3 years ago

I unlinked this poo from #62471 because it concerns qa_test_systemd whereas #62471 concerns systemd-qa-testsuite.
So both tickets can be worked independently from one another.

Actions #4

Updated by geor over 3 years ago

  • % Done changed from 10 to 40
Actions #5

Updated by geor over 3 years ago

I created a bug for the testsuite's behavior: https://bugzilla.suse.com/show_bug.cgi?id=1182692

Actions #6

Updated by geor over 3 years ago

Actions #7

Updated by geor over 3 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 40 to 100
Actions #8

Updated by geor over 3 years ago

PR was merged

Actions

Also available in: Atom PDF