#120 skip systemd-userdbd test on RHEL-8
Merged 3 years ago by mmalik. Opened 3 years ago by mmalik.
tests/ mmalik/selinux set-userdbd-relevancy  into  master

@@ -1,2 +1,5 @@ 

  path: /selinux-policy/systemd-userdbd-and-similar

  tier: 2

+ relevancy:

+ - "distro <= rhel-8: False"

+ 

@@ -42,6 +42,13 @@ 

  DENIED_USERS=${DENIED_USERS:-""}

  

  rlJournalStart

+     # the systemd-userdbd service is not available on RHEL-8

+     if rlIsRHEL 8 ; then

+         rlLog "Not applicable to this OS version."

+         rlJournalEnd

+         exit 0

+     fi

+ 

      rlPhaseStartSetup

          rlRun "rlImport 'selinux-policy/common'"

          rlSESatisfyRequires

It makes no sense to run this TC on RHEL-8.x or lower RHELs, because
the systemd-userdbd service is not available there. As soon as the
service becomes available in these environments, the TC can be enabled.

I was asked by systemd QE to hurry up this change. Going to merge it today.

Are you sure that relevancy already works as expected?

It's common to use https://src.fedoraproject.org/tests/selinux/c/1bb26b402a83e43ec93637ebb69ddc7d53f9b6a2 in this repo as Fedora CI didn't support relevancy in fmf metadata.

Yeah, and unless this test is referenced via FMF downstream, it definitely won't work if you change it here. You'll need to modify the downstream wrapper to change RHEL relevancy.

EDIT: It has been pointed out to me that the test can be run also via STR (tests.yml), which does use FMF to filter the tests. Though I'm not sure if it supports relevancy already...

rebased onto 4ac00168c61b944eff4f0320f4a4c4d1e4085a04

3 years ago

rebased onto daf4df16e8571aae112f0d3078149095dc425c77

3 years ago

Fedora CI pending for 3 hours already. That's sad.

Well, tests are still running, see current artifacts I was able to gather from the tests in

https://pagure.io/fedora-ci/general/issue/158

These restorecond is creating quite some load on the machine btw:

 109819 root      20   0   18936   1596      0 R  48.0   0.1 103:30.55 restorecond                                                                                                                                 

That is why the tests seems to take so long

# tail -f /tmp/artifacts//selinux-policy-ping-and-similar-err.log


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   bz#1596065
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Deprecated, use selabel_lookup
Deprecated, use selabel_lookup
:: [ 12:41:58 ] :: [   PASS   ] :: Result of matchpathcon /usr/bin/ping should contain ping_exec_t (Assert: expected 0, got 0)
:: [ 12:42:03 ] :: [   INFO   ] :: rlSESearchRule: checking rule 'allow dhcpc_t ping_exec_t : file { map }'
^C
[root@ip-172-31-20-135 ~]# cat /tmp/artifacts//selinux-policy-ping-and-similar-err.log

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 12:40:48 ] :: [  BEGIN   ] :: Running 'rlImport 'selinux-policy/common''
:: [ 12:40:49 ] :: [   INFO   ] :: rlImport: Found 'selinux-policy/common', version '40' during upwards traversal
:: [ 12:40:50 ] :: [   INFO   ] :: rlImport: Will try to import selinux-policy/common from /var/str/selinux-policy/Library/common/lib.sh
:: [ 12:40:52 ] :: [   INFO   ] :: rlImport: Found 'distribution/epel', version '19' in BEAKERLIB_LIBRARY_PATH
:: [ 12:40:52 ] :: [   INFO   ] :: rlImport: Will try to import distribution/epel from /usr/share/beakerlib-libraries/distribution/Library/epel/lib.sh
:: [ 12:40:55 ] :: [   LOG    ] :: Determined distro is 'Fedora'
:: [ 12:41:01 ] :: [   PASS   ] :: Command 'rlImport 'selinux-policy/common'' (Expected 0, got 0)
./runtest.sh: line 44: rlSESatisfyRequires: command not found
:: [ 12:41:03 ] :: [   PASS   ] :: Checking for the presence of selinux-policy rpm 
:: [ 12:41:03 ] :: [   LOG    ] :: Package versions:
:: [ 12:41:04 ] :: [   LOG    ] ::   selinux-policy-3.14.7-5.fc34.noarch
:: [ 12:41:05 ] :: [   PASS   ] :: Checking for the presence of selinux-policy-targeted rpm 
:: [ 12:41:06 ] :: [   LOG    ] :: Package versions:
:: [ 12:41:07 ] :: [   LOG    ] ::   selinux-policy-targeted-3.14.7-5.fc34.noarch
:: [ 12:41:08 ] :: [   PASS   ] :: Checking for the presence of iputils rpm 
:: [ 12:41:09 ] :: [   LOG    ] :: Package versions:
:: [ 12:41:09 ] :: [   LOG    ] ::   iputils-20190515-8.fc33.x86_64
:: [ 12:41:10 ] :: [   INFO   ] :: using '/var/tmp/beakerlib-T2nhCMG/backup' as backup destination
:: [ 12:41:12 ] :: [  BEGIN   ] :: Running 'setenforce 1'
:: [ 12:41:12 ] :: [   PASS   ] :: Command 'setenforce 1' (Expected 0, got 0)
:: [ 12:41:13 ] :: [  BEGIN   ] :: Running 'id -Z'
:: [ 12:41:13 ] :: [   PASS   ] :: Command 'id -Z' (Expected 0, got 0)
:: [ 12:41:14 ] :: [  BEGIN   ] :: Running 'sestatus'
:: [ 12:41:14 ] :: [   PASS   ] :: Command 'sestatus' (Expected 0, got 0)
:: [ 12:41:15 ] :: [  BEGIN   ] :: Running 'semodule --list-modules=full | grep -i disabled'
:: [ 12:41:15 ] :: [   PASS   ] :: Command 'semodule --list-modules=full | grep -i disabled' (Expected 0,1, got 0)
:: [ 12:41:16 ] :: [   LOG    ] :: rlSESetTimestamp: Setting timestamp 'TIMESTAMP' [10/23/2020 12:41:16]
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 31s
::   Assertions: 8 good, 0 bad
::   RESULT: PASS (Setup)


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   bz#1596065
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Deprecated, use selabel_lookup
Deprecated, use selabel_lookup
:: [ 12:41:58 ] :: [   PASS   ] :: Result of matchpathcon /usr/bin/ping should contain ping_exec_t (Assert: expected 0, got 0)
:: [ 12:42:03 ] :: [   INFO   ] :: rlSESearchRule: checking rule 'allow dhcpc_t ping_exec_t : file { map }'

See for example the below test, is is super slow afaict ....

We applied a hot fix that should help a bit. Retesting soon.

I killed the previous job

I believe it works now, just seems the master branch of the fork needs to be updated

afaict this needs rebase and rerun

rebased onto 335244af4d8cbc95a70be1d91a8b47a99e2d9df4

3 years ago

The TC failed because BZ#1878094 is not fixed yet.

Everything else in the TC output looks good / expected. Going to merge this PR today.

rebased onto 06c47e6

3 years ago

Pull-Request has been merged by mmalik

3 years ago