Merge #67 CI Tests: updates old test cases to use actual beakerlib functions
This commit is contained in:
commit
64c7d00676
@ -13,7 +13,7 @@ contact: Petr Muller <pmuller@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: shell
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- gcc
|
||||
|
@ -74,7 +74,7 @@ contact: Petr Muller <pmuller@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: shell
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
tag:
|
||||
|
@ -26,20 +26,22 @@
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# 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
|
||||
|
||||
PACKAGE="glibc"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup Setup
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlRun "gcc -O0 testcase.c -o tc0"
|
||||
rlRun "gcc -O2 testcase.c -o tc2"
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "cp testcase.c $TESTTMPDIR"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest Testing
|
||||
rlRun "gcc -O0 testcase.c -o tc0"
|
||||
rlRun "gcc -O2 testcase.c -o tc2"
|
||||
rlRun "./tc0"
|
||||
rlAssertNotEquals "Checking for the bug 455360 itself" $? 139
|
||||
rlAssertExists "abcd"
|
||||
@ -50,5 +52,8 @@ rlPhaseStartTest Testing
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup Cleanup
|
||||
rlRun "rm -f tc0 tc2 abcd"
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
@ -14,7 +14,7 @@ contact: Petr Muller <pmuller@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: shell
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- quota-devel
|
||||
|
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# runtest.sh - bz464146-sp-corruption - Bugzilla(s) 464146
|
||||
# Author: Petr Muller <pmuller@redhat.com>
|
||||
# Location: /tools/glibc/Regression/bz464146-sp-corruption/runtest.sh
|
||||
@ -18,17 +20,19 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
|
||||
PACKAGE=glibc
|
||||
|
||||
# Include rhts environment
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
rlStartJournal
|
||||
|
||||
######################
|
||||
# Prepare environment
|
||||
######################
|
||||
rlPhaseStartSetup Preparation
|
||||
PACKAGE="glibc"
|
||||
TESTPROG="testit"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm ${PACKAGE}
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "cp ${TESTPROG}.c $TESTTMPDIR"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
|
||||
ARCH=`uname -m`
|
||||
if [ "$ARCH" == "ia64" -o "$ARCH" == "aarch64" -o "$ARCH" == "ppc64le" ]
|
||||
then
|
||||
@ -36,32 +40,23 @@ rlPhaseStartSetup Preparation
|
||||
else
|
||||
FLAGS="-m64"
|
||||
fi
|
||||
rlRun "gcc $FLAGS testit.c -o testit -lpthread" 0 "Compiling the testcase"
|
||||
|
||||
rlPhaseEnd
|
||||
|
||||
######################
|
||||
# Begin Test-Case
|
||||
######################
|
||||
rlPhaseStartTest Test
|
||||
output=`mktemp`
|
||||
./testit > $output
|
||||
rlRun "gcc $FLAGS ${TESTPROG}.c -o ${TESTPROG} -lpthread"
|
||||
rlAssertExists "${TESTPROG}"
|
||||
./${TESTPROG} > log
|
||||
RC=$?
|
||||
|
||||
rlAssert0 "Testing for success of the testcases" $RC
|
||||
rlAssertNotEquals "Testing for segfault (bug 464146)" $RC 139
|
||||
rlAssertEquals "Testing for correct output - output should contain 1 line" `cat $output | wc -l` 1
|
||||
cat $output > /tmp/mineminemine
|
||||
rlAssertGrep "received \"Hello World\!\"" /tmp/mineminemine
|
||||
rlAssertEquals "Testing for correct output - output should contain 1 line" `cat log | wc -l` 1
|
||||
rlAssertGrep "received \"Hello World\!\"" log
|
||||
rlPhaseEnd
|
||||
|
||||
######################
|
||||
# Clean after the test
|
||||
######################
|
||||
rlPhaseStartCleanup Clean-Up
|
||||
rlRun "rm -f $output testit"
|
||||
rlCreateLogFromJournal > ${OUTPUTFILE}
|
||||
rlCompareJournalWithRCW
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
|
||||
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <netdb.h>
|
||||
#include <sys/mman.h>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
/*
|
||||
@ -26,7 +27,7 @@ int port;
|
||||
void *receiver(void *);
|
||||
void *sender(void *);
|
||||
|
||||
main(argc,argv)
|
||||
int main(argc,argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ contact: Petr Muller <pmuller@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: shell
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- gcc
|
||||
|
@ -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 <pmuller@redhat.com>
|
||||
# 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
|
||||
PACKAGE="glibc"
|
||||
TESTPROG="pthread_cond_test"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm ${PACKAGE}
|
||||
rlRun 'gcc -lpthread -lrt pthread_cond_test.c -o pthread_test' 0 "Comnpiling the testcase"
|
||||
rlRun "TESTTMPDIR=$(mktemp -d)"
|
||||
rlRun "cp ${TESTPROG}.c $TESTTMPDIR"
|
||||
rlRun "pushd $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
|
||||
######################
|
||||
# Begin Test-Case
|
||||
######################
|
||||
rlPhaseStartTest Test
|
||||
rlWatchdog './pthread_test' 10
|
||||
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
|
||||
|
||||
######################
|
||||
# Clean after the test
|
||||
######################
|
||||
rlPhaseStartCleanup Clean-Up
|
||||
rlRun "rm -f pthread_test" 0 "Cleaning up the executable"
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TESTTMPDIR"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
@ -47,7 +47,7 @@ contact: Petr Muller <pmuller@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: shell
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- strace
|
||||
|
@ -39,7 +39,7 @@ contact: Petr Muller <pmuller@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: shell
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- perl
|
||||
|
@ -4,7 +4,7 @@ contact: Petr Muller <pmuller@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: shell
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- gcc
|
||||
|
@ -5,7 +5,7 @@ contact: Petr Muller <pmuller@redhat.com>
|
||||
component:
|
||||
- glibc
|
||||
test: ./runtest.sh
|
||||
framework: shell
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- glibc
|
||||
- expect
|
||||
|
Loading…
Reference in New Issue
Block a user