New test, sanity selinux check
This commit is contained in:
parent
a3e66ecc54
commit
342537c95b
2 changed files with 46 additions and 0 deletions
26
tests/selinux-context/main.fmf
Normal file
26
tests/selinux-context/main.fmf
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
summary: Verify selinux context of binutils files
|
||||
|
||||
require+:
|
||||
- policycoreutils
|
||||
|
||||
link+:
|
||||
- verifies: https://issues.redhat.com/browse/RHELPLAN-166055
|
||||
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2232410
|
||||
- verifies: https://issues.redhat.com/browse/RHELPLAN-167156
|
||||
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2236729
|
||||
|
||||
adjust+:
|
||||
- when: collection is not defined
|
||||
enabled: false
|
||||
|
||||
- when: collection == gcc-toolset-11
|
||||
environment+:
|
||||
COLLECTION_ROOT: /opt/rh/gcc-toolset-11/root
|
||||
|
||||
- when: collection == gcc-toolset-12
|
||||
environment+:
|
||||
COLLECTION_ROOT: /opt/rh/gcc-toolset-12/root
|
||||
|
||||
- when: collection == gcc-toolset-13
|
||||
environment+:
|
||||
COLLECTION_ROOT: /opt/rh/gcc-toolset-13/root
|
||||
20
tests/selinux-context/test.sh
Executable file
20
tests/selinux-context/test.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
. "$TMT_TREE/tests/lib.sh" || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
buTestHeader
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun -s "restorecon -Rvn $COLLECTION_ROOT"
|
||||
rlRun "grep 'Would relabel' $rlRun_LOG" 1
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlPhaseEnd
|
||||
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue