summaryrefslogtreecommitdiffstats
path: root/kernel/standards
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2014-04-16 16:02:55 -0400
committerBill Peck <bpeck@redhat.com>2014-04-16 16:02:55 -0400
commit07407c626525788f1e9a012905b221319776dc16 (patch)
treea3a6b2e6220bd536d52df58f2e4b3f57d1d89ac2 /kernel/standards
parent7bbdfde567e9284f3bab30d2ce7f9fe316c6dff8 (diff)
downloadtests-07407c626525788f1e9a012905b221319776dc16.tar.gz
tests-07407c626525788f1e9a012905b221319776dc16.tar.xz
tests-07407c626525788f1e9a012905b221319776dc16.zip
version of usex to run in restraint
Diffstat (limited to 'kernel/standards')
-rw-r--r--kernel/standards/usex/metadata7
-rw-r--r--kernel/standards/usex/runtest.sh116
-rw-r--r--kernel/standards/usex/usex-1.9-34.tar.gzbin0 -> 163774 bytes
3 files changed, 123 insertions, 0 deletions
diff --git a/kernel/standards/usex/metadata b/kernel/standards/usex/metadata
new file mode 100644
index 0000000..1bcf98b
--- /dev/null
+++ b/kernel/standards/usex/metadata
@@ -0,0 +1,7 @@
+[General]
+name=/kernel/standards/usex
+
+[restraint]
+entry_point=./runtest.sh
+dependencies=xorg-x11-devel;glibc-kernheaders;ncurses-devel
+max_time=30m
diff --git a/kernel/standards/usex/runtest.sh b/kernel/standards/usex/runtest.sh
new file mode 100644
index 0000000..9b99d8d
--- /dev/null
+++ b/kernel/standards/usex/runtest.sh
@@ -0,0 +1,116 @@
+#!/bin/sh
+
+function SysStats()
+{
+ # Collect some stats prior to running the test
+ echo "***** System stats *****"
+ vmstat
+ echo "---"
+ free -m
+ echo "---"
+ cat /proc/meminfo
+ echo "---"
+ cat /proc/slabinfo
+ echo "***** System stats *****"
+}
+
+function VerboseCupsLog()
+{
+ # This funnction was added Nov 2010 in hopes of assisting in resoltion of bugzilla 452305
+ # See comment #31 https://bugzilla.redhat.com/show_bug.cgi?id=452305
+ # Provide more verbose debug logging in /var/log/cups/error_log
+ echo "-------------------------------------------------------------------------"
+ echo "Setting up verbose debug logging in /var/log/cups/error_log for BZ452305."
+ echo "-------------------------------------------------------------------------"
+ rstrnt-backup /etc/cups/cupsd.conf
+ sed -i -e 's,^LogLevel.*,LogLevel debug2,' /etc/cups/cupsd.conf
+ sed -i -e '/^MaxLogSize/d' /etc/cups/cupsd.conf
+ echo MaxLogSize 0 >> /etc/cups/cupsd.conf
+ sed -i -e '/^Browsing/d' /etc/cups/cupsd.conf
+ sed -i -e '/^DefaultShared/d' /etc/cups/cupsd.conf
+ echo "Browsing No" >> /etc/cups/cupsd.conf
+ echo "DefaultShared No" >> /etc/cups/cupsd.conf
+ # sed will create temporary file in /etc/cups and rename it to cupds.conf
+ # so file ends up with wrong label
+ restorecon /etc/cups/cupsd.conf
+ # start service before using cupsctl
+ /sbin/service cups restart
+ echo "cupsctl: "
+ cupsctl
+}
+
+# ---------- Build UseX -------------
+
+tar zxvf usex-1.9-34.tar.gz
+pushd usex-1.9-34 && make || exit 1
+
+# ---------- Start Test -------------
+RHELVER=""
+cat /etc/redhat-release | grep "^Fedora"
+if [ $? -ne 0 ]; then
+ RHELVER=$(cat /etc/redhat-release |sed 's/.*\(release [0-9]\).*/\1/')
+fi
+
+if [ -z "$RHELVER" ]; then
+ kernel_rhelver=$(uname -r | grep -o el[0-9])
+ echo "Taking release from kernel version: $kernel_rhelver"
+
+ if [ "$kernel_rhelver" == "el6" ]; then
+ RHELVER="release 6"
+ fi
+
+ if [ "$kernel_rhelver" == "el7" ]; then
+ RHELVER="release 7"
+ fi
+fi
+
+echo "RHELVER is $RHELVER"
+
+VerboseCupsLog
+
+INFILE=rhtsusex.tcf
+MYARCH=`uname -m`
+if [ "$MYARCH" = "x86_64" -o "$MYARCH" = "s390x" ]; then
+ ln -s /usr/lib64/libc.a /usr/lib/libc.a
+fi
+
+#if ppc64 has less than or equal to 1 GB of memory don't run the vm tests
+ONE_GB=1048576
+if [ "$MYARCH" = "ppc64" ]; then
+ mem=`cat /proc/meminfo |grep MemTotal|sed -e 's/[^0-9]*\([0-9]*\).*/\1/'`
+ test "$mem" -le "$ONE_GB" && INFILE=rhtsusex_lowmem.tcf
+ logger -s "Running the rhtsusex_lowmem.tcf file"
+fi
+
+SysStats | tee sys_stats.log
+logger -t USEXINFO -f sys_stats.log
+
+if [ "x$RHELVER" == "xrelease 6" ]; then
+ logger -s "Running $RHELVER configuration"
+ ./usex --rhts hang-trace --exclude=ar,strace,clear -i $INFILE -l usex.log --nodisplay -R report.out
+elif [ "x$RHELVER" == "xrelease 7" ]; then
+ logger -s "Running $RHELVER configuration"
+ ./usex --rhts hang-trace --exclude=ar,as,strace,clear -i $INFILE -l usex.log --nodisplay -R report.out
+else
+ logger -s "Running default configuration"
+ ./usex --rhts hang-trace --exclude=clear -i $INFILE -l usex.log --nodisplay -R report.out
+fi
+
+# Default result to FAIL
+export result="FAIL"
+
+# Then post-process the results to find the regressions
+export fail=`cat report.out | grep "USEX TEST RESULT: FAIL" | wc -l`
+
+if [ "$fail" -gt "0" ]; then
+ export result="FAIL"
+ rstrnt-report-log -l report.out
+ tar -czvf /tmp/cupslog.tar /var/log/cups
+ rstrnt-report-log -l /tmp/cupslog.tar
+ rstrnt-report-log -l /etc/cups/cupsd.conf
+else
+ export result="PASS"
+fi
+
+rstrnt-report-result $TEST $result $fail
+rstrnt-report-log -l usex.log
diff --git a/kernel/standards/usex/usex-1.9-34.tar.gz b/kernel/standards/usex/usex-1.9-34.tar.gz
new file mode 100644
index 0000000..a1fc167
--- /dev/null
+++ b/kernel/standards/usex/usex-1.9-34.tar.gz
Binary files differ