From 87390fd480f40358fa4b3755f64a1c82706836ca Mon Sep 17 00:00:00 2001 From: Sergey Kolosov Date: Fri, 13 Jan 2023 22:20:10 +0100 Subject: [PATCH] CI Tests: updates Regression/bz471298-pthread_cond to use actual beakerlib functions --- .../bz471298-pthread_cond/runtest.sh | 47 ++++++++++--------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/tests/Regression/bz471298-pthread_cond/runtest.sh b/tests/Regression/bz471298-pthread_cond/runtest.sh index a5cc1ce..a8a952f 100755 --- a/tests/Regression/bz471298-pthread_cond/runtest.sh +++ b/tests/Regression/bz471298-pthread_cond/runtest.sh @@ -1,3 +1,5 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k # runtest.sh - bz471298-pthread_cond - Bugzilla(s) 471298 # Author: Petr Muller # Location: /tools/glibc/Regression/bz471298-pthread_cond/runtest.sh @@ -18,29 +20,30 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -PACKAGE=glibc - -# Include rhts environment -rpm -Uvh http://nest.test.redhat.com/mnt/qa/scratch/pmuller/rhtslib/rhtslib.rpm +# Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -rlStartJournal -rlPhaseStartSetup Preparation - rlAssertRpm ${PACKAGE} - rlRun 'gcc -lpthread -lrt pthread_cond_test.c -o pthread_test' 0 "Comnpiling the testcase" -rlPhaseEnd +PACKAGE="glibc" +TESTPROG="pthread_cond_test" -###################### -# Begin Test-Case -###################### -rlPhaseStartTest Test - rlWatchdog './pthread_test' 10 - rlAssert0 "Checking if the command had to be killed (bug 471298)" $? -rlPhaseEnd +rlJournalStart + rlPhaseStartSetup + rlAssertRpm ${PACKAGE} + rlRun "TESTTMPDIR=$(mktemp -d)" + rlRun "cp ${TESTPROG}.c $TESTTMPDIR" + rlRun "pushd $TESTTMPDIR" + rlPhaseEnd -###################### -# Clean after the test -###################### -rlPhaseStartCleanup Clean-Up - rlRun "rm -f pthread_test" 0 "Cleaning up the executable" -rlPhaseEnd + rlPhaseStartTest Test + rlRun "gcc -lpthread -lrt ${TESTPROG}.c -o ${TESTPROG}" + rlAssertExists "${TESTPROG}" + rlWatchdog "./${TESTPROG}" 10 + rlAssert0 "Checking if the command had to be killed (bug 471298)" $? + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TESTTMPDIR" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd