[Swift-commit] r7678 - in branches/release-0.94/tests/stress: . random_fail

yadunandb at ci.uchicago.edu yadunandb at ci.uchicago.edu
Mon Mar 10 13:17:20 CDT 2014


Author: yadunandb
Date: 2014-03-10 13:17:20 -0500 (Mon, 10 Mar 2014)
New Revision: 7678

Added:
   branches/release-0.94/tests/stress/random_fail/
   branches/release-0.94/tests/stress/random_fail/Bug_info
   branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.check.sh
   branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.setup.sh
   branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.swift
   branches/release-0.94/tests/stress/random_fail/run
   branches/release-0.94/tests/stress/random_fail/sites.template.xml
   branches/release-0.94/tests/stress/random_fail/swift.properties
   branches/release-0.94/tests/stress/random_fail/tc.template.data
   branches/release-0.94/tests/stress/random_fail/title.txt
Log:

Adding random_fail tests



Added: branches/release-0.94/tests/stress/random_fail/Bug_info
===================================================================
--- branches/release-0.94/tests/stress/random_fail/Bug_info	                        (rev 0)
+++ branches/release-0.94/tests/stress/random_fail/Bug_info	2014-03-10 18:17:20 UTC (rev 7678)
@@ -0,0 +1,22 @@
+Regression tests for Bug 1067
+| Link -> http://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=1067
+Swift 0.94 swift-r6888 cog-r3762
+
+Exception in sh:
+    Arguments: [randfail.sh, 50, 0]
+    Host: local
+    Directory: rand_fail_Bug1067-20130820-1749-6n7zbux4/jobs/6/sh-6abm13el
+    stderr.txt: Failing 11 < 50
+    stdout.txt: 
+Caused by: Application /bin/bash failed with an exit code of 255
+
+Exception in sh:
+    Arguments: [randfail.sh, 50, 0]
+    Host: local
+    Directory: rand_fail_Bug1067-20130820-1749-6n7zbux4/jobs/8/sh-8abm13el
+    stderr.txt: Failing 19 < 50
+    stdout.txt: 
+Caused by: Application /bin/bash failed with an exit code of 255
+
+Execution failed:
+    Got one name (derr) and 0 values: []
\ No newline at end of file

Added: branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.check.sh
===================================================================
--- branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.check.sh	                        (rev 0)
+++ branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.check.sh	2014-03-10 18:17:20 UTC (rev 7678)
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+if [ ! -f ${0%.check.sh}.stdout ]
+then
+    echo "${$0%.check.sh}.stdout missing"
+    exit -1
+fi
+
+grep "Got one name (derr)" ${0%.check.sh}.stdout
+if [ "$?" == 0 ]
+then
+    echo "EXIT : REGRESSION FOUND!" >&2
+    exit -1
+else
+    echo "Test passed"
+fi
+exit 0
\ No newline at end of file


Property changes on: branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.check.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.setup.sh
===================================================================
--- branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.setup.sh	                        (rev 0)
+++ branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.setup.sh	2014-03-10 18:17:20 UTC (rev 7678)
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Setup script will just output the following file
+
+cat<<'EOF' > randfail.sh
+#!/bin/bash
+
+FAIL_PROBABILITY=$1
+DELAY=$2
+
+ITEM=$(($RANDOM%100))
+sleep $2
+
+if (( "$ITEM" <= "$FAIL_PROBABILITY" ))
+then
+    echo "Failing $ITEM < $FAIL_PROBABILITY" >&2
+    exit -1
+fi
+echo "Not failing $ITEM > $FAIL_PROBABILITY"
+exit 0
+EOF
+


Property changes on: branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.setup.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.swift
===================================================================
--- branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.swift	                        (rev 0)
+++ branches/release-0.94/tests/stress/random_fail/rand_fail_Bug1067.swift	2014-03-10 18:17:20 UTC (rev 7678)
@@ -0,0 +1,34 @@
+type file;
+
+file script<"randfail.sh">;
+
+app (file ofile1, file ofile2) quicklyFailingApp(file script, int failchance,
+int delay)
+{
+  sh @script failchance delay stdout=@ofile1 stderr=@ofile2;
+}
+
+app (file ofile) someApp3(file ifile, file jfile, file kfile)
+{
+  sh "-c" @strcat("cat ", at filename(ifile)) stdout=@ofile;
+}
+
+app (file ofile) someApp(file ifile)
+{
+  sh "-c" @strcat("cat ", at filename(ifile)) stdout=@ofile;
+}
+
+app sleep (int sec)
+{
+  sh "-c" @strcat("sleep ",sec);
+}
+
+int sufficientlyLargeNumber = 100;
+
+file a[];
+foreach i in [0:sufficientlyLargeNumber] {
+  file f1<single_file_mapper; file=@strcat("failed1.",i,".out")>;
+  file f2<single_file_mapper; file=@strcat("failed2.",i,".out")>;
+  (f1,f2)  = quicklyFailingApp(script,50,0);
+  a[i] = someApp(f2);
+}

Added: branches/release-0.94/tests/stress/random_fail/run
===================================================================
--- branches/release-0.94/tests/stress/random_fail/run	                        (rev 0)
+++ branches/release-0.94/tests/stress/random_fail/run	2014-03-10 18:17:20 UTC (rev 7678)
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+PATH=/scratch/midway/yadunand/swift-0.94RC2/cog/modules/swift/dist/swift-svn/bin:$PATH
+
+
+echo "Swift location: "; which swift
+echo "Swift version : "; swift -version
+
+rm rand_fail_Bug1067.stdout
+cat title.txt
+
+./rand_fail_Bug1067.setup.sh
+
+for i in `seq 1 10`
+do
+swift -tc.file tc.template.data -config swift.properties -sites.file sites.template.xml rand_fail_Bug1067.swift  | tee -a rand_fail_Bug1067.stdout
+
+rm -rf *{swiftx,kml} rand_fail_Bug1067-* _concurrent* failed*
+done
+
+./rand_fail_Bug1067.check.sh
\ No newline at end of file


Property changes on: branches/release-0.94/tests/stress/random_fail/run
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/release-0.94/tests/stress/random_fail/sites.template.xml
===================================================================
--- branches/release-0.94/tests/stress/random_fail/sites.template.xml	                        (rev 0)
+++ branches/release-0.94/tests/stress/random_fail/sites.template.xml	2014-03-10 18:17:20 UTC (rev 7678)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<config xmlns="http://www.ci.uchicago.edu/swift/SwiftSites">
+
+  <pool handle="midway">
+    <execution provider="coaster" jobmanager="local:local"/>
+    <profile namespace="globus" key="queue">sandyb</profile>
+    <profile namespace="globus" key="jobsPerNode">16</profile>
+    <profile namespace="globus" key="maxtime">36000</profile>
+    <profile namespace="globus" key="maxWalltime">00:10:00</profile>
+    <profile namespace="globus" key="highOverAllocation">100</profile>
+    <profile namespace="globus" key="lowOverAllocation">100</profile>
+    <profile namespace="globus" key="slots">4</profile>
+    <profile namespace="globus" key="maxNodes">1</profile>
+    <profile namespace="globus" key="nodeGranularity">1</profile>
+    <profile namespace="karajan" key="jobThrottle">.64</profile>
+    <profile namespace="karajan" key="initialScore">10000</profile>
+    <workdirectory>/tmp/MIDWAY_USERNAME</workdirectory>
+  </pool>
+
+</config>

Added: branches/release-0.94/tests/stress/random_fail/swift.properties
===================================================================
--- branches/release-0.94/tests/stress/random_fail/swift.properties	                        (rev 0)
+++ branches/release-0.94/tests/stress/random_fail/swift.properties	2014-03-10 18:17:20 UTC (rev 7678)
@@ -0,0 +1,11 @@
+wrapperlog.always.transfer=true
+sitedir.keep=true
+file.gc.enabled=false
+status.mode=provider
+
+execution.retries=5
+lazy.errors=true
+
+use.wrapper.staging=false
+use.provider.staging=false
+provider.staging.pin.swiftfiles=falsewrapperlog.always.transfer=true

Added: branches/release-0.94/tests/stress/random_fail/tc.template.data
===================================================================
--- branches/release-0.94/tests/stress/random_fail/tc.template.data	                        (rev 0)
+++ branches/release-0.94/tests/stress/random_fail/tc.template.data	2014-03-10 18:17:20 UTC (rev 7678)
@@ -0,0 +1,2 @@
+local perl /usr/bin/perl null null null
+local sh   /bin/bash

Added: branches/release-0.94/tests/stress/random_fail/title.txt
===================================================================
--- branches/release-0.94/tests/stress/random_fail/title.txt	                        (rev 0)
+++ branches/release-0.94/tests/stress/random_fail/title.txt	2014-03-10 18:17:20 UTC (rev 7678)
@@ -0,0 +1,2 @@
+Regression tests for Bug 1067
+| Link -> http://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=1067




More information about the Swift-commit mailing list