diff --git a/Sanity/PID-file-location/main.fmf b/Sanity/PID-file-location/main.fmf index 0f13c86..3036ec6 100644 --- a/Sanity/PID-file-location/main.fmf +++ b/Sanity/PID-file-location/main.fmf @@ -7,6 +7,8 @@ component: - opencryptoki test: ./runtest.sh framework: beakerlib +require: + - library(nvr/nvr) recommend: - opencryptoki - opencryptoki-swtok @@ -21,7 +23,7 @@ tag: - CI-Tier-1 adjust: - enabled: false - when: distro == rhel-7, rhel-8 + when: "distro == rhel-7 or distro < rhel-8.9" continue: false link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1974693 diff --git a/Sanity/PID-file-location/runtest.sh b/Sanity/PID-file-location/runtest.sh index 50a8a63..42b5d16 100755 --- a/Sanity/PID-file-location/runtest.sh +++ b/Sanity/PID-file-location/runtest.sh @@ -33,6 +33,7 @@ UNITFILE="/usr/lib/systemd/system/pkcsslotd.service" rlJournalStart rlPhaseStartSetup + rlRun "rlImport nvr/nvr" || rlDie "cannot import nvr library" rlAssertRpm $PACKAGE rlAssertExists $UNITFILE rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" @@ -41,13 +42,16 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest - rlAssertGrep "PIDFile=/run/pkcsslotd.pid" $UNITFILE + PIDFILE=/run/opencryptoki/pkcsslotd.pid + nvrTestPackage opencryptoki '<' 3.21.0 && PIDFILE=/run/pkcsslotd.pid + + rlAssertGrep "PIDFile=$PIDFILE" $UNITFILE rlServiceStart pkcsslotd rlRun -s "journalctl -u pkcsslotd -S '-10s'" #rlAssertGrep "PID File created" $rlRun_LOG rlAssertGrep "Started Daemon" $rlRun_LOG rlAssertNotGrep "PIDFile= references a path below legacy directory" $rlRun_LOG - rlAssertExists /run/pkcsslotd.pid + rlAssertExists $PIDFILE rlPhaseEnd rlPhaseStartCleanup