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

yadunandb at ci.uchicago.edu yadunandb at ci.uchicago.edu
Tue Aug 20 12:55:59 CDT 2013


Author: yadunandb
Date: 2013-08-20 12:55:59 -0500 (Tue, 20 Aug 2013)
New Revision: 6898

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.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:

Committing initial test for Bug 1067.
* Bug reproduced on 0.94
* Pending tests with RC2



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	2013-08-20 17:55:59 UTC (rev 6898)
@@ -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.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	2013-08-20 17:55:59 UTC (rev 6898)
@@ -0,0 +1,23 @@
+#!/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	2013-08-20 17:55:59 UTC (rev 6898)
@@ -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	2013-08-20 17:55:59 UTC (rev 6898)
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+
+cat title.txt
+
+./rand_fail_Bug1067.setup.sh
+
+swift -tc.file tc.template.data -config swift.properties -sites.file sites.template.xml rand_fail_Bug1067.swift


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	2013-08-20 17:55:59 UTC (rev 6898)
@@ -0,0 +1,16 @@
+<config>
+  <pool handle="local">
+    <execution provider="coaster" jobmanager="local:local"/>
+    <profile namespace="globus" key="jobsPerNode">4</profile>
+    <profile namespace="globus" key="maxWalltime">00:05:00</profile>
+    <profile namespace="globus" key="highOverAllocation">100</profile>
+    <profile namespace="globus" key="lowOverAllocation">100</profile>
+    <profile namespace="globus" key="slots">1</profile>
+    <profile namespace="globus" key="maxNodes">1</profile>
+    <profile namespace="globus" key="nodeGranularity">1</profile>
+    <profile namespace="karajan" key="jobThrottle">0.03</profile>
+    <profile namespace="karajan" key="initialScore">10000</profile>
+    <filesystem provider="local"/>
+    <workdirectory>/scratch/midway/{env.USER}</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	2013-08-20 17:55:59 UTC (rev 6898)
@@ -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	2013-08-20 17:55:59 UTC (rev 6898)
@@ -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	2013-08-20 17:55:59 UTC (rev 6898)
@@ -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