[Piglit] [PATCH 4/5] Run random UBO tests forever looking for failures
Ian Romanick
idr at freedesktop.org
Wed Sep 24 09:47:41 PDT 2014
From: Ian Romanick <ian.d.romanick at intel.com>
Doesn't actually run forever. Passing tests are put in a directory
called "pass", and failing tests are put in a directory called "fail".
The test will terminate when 1,000 failing tests are generated.
This is an example of how random_ubo.py can be used. This is how I
found SIX bugs in Mesa's UBO code. I don't think we want this in
piglit, but it should live somewhere.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
random_runs.sh | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 random_runs.sh
diff --git a/random_runs.sh b/random_runs.sh
new file mode 100644
index 0000000..2d3af90
--- /dev/null
+++ b/random_runs.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+typeset -i i
+typeset -i f
+
+i=1
+f=0
+
+if [ -d pass ]; then
+ rm -f pass/*.shader_test
+else
+ mkdir pass
+fi
+
+if [ -d fail ]; then
+ rm -f fail/*.shader_test
+else
+ mkdir fail
+fi
+
+while true; do
+ t=$(printf "0x%08x.shader_test" $i)
+
+ python2 generated_tests/random_ubo.py 330 > $t
+
+ if mesa installed bin/shader_runner ./$t -auto -fbo | grep -q pass; then
+ mv $t pass/
+ else
+ mv $t fail/
+ echo $t
+ f=$((f + 1))
+ fi
+
+ if [ $f -ge 1000 ]; then
+ echo $i total tests
+ exit 0
+ fi
+
+ i=$((i + 1))
+done
--
1.8.1.4
More information about the Piglit
mailing list