From 72af3e3f4345f5d0471d45233eaa6dde540dcc42 Mon Sep 17 00:00:00 2001 From: Karel Srot Date: Fri, 19 May 2023 11:27:53 +0200 Subject: [PATCH] Update for opencryptoki-3.21 --- Sanity/PID-file-location/main.fmf | 4 +++- Sanity/PID-file-location/runtest.sh | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) 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