]> arthur.barton.de Git - bup.git/commitdiff
Use $RANDOM seed for --sparse random tests
authorRob Browning <rlb@defaultvalue.org>
Sun, 24 Apr 2016 22:07:39 +0000 (17:07 -0500)
committerRob Browning <rlb@defaultvalue.org>
Mon, 25 Apr 2016 00:09:42 +0000 (19:09 -0500)
Since bup random defaults to a fixed random seed of 1, the restore
--sparse test for random data was actually testing the same data every
time.  Specify a $RANDOM --seed to fix that.

After this change, the affected test fails fairly often.

Thanks to Frank Gevaerts for help evaluating the fix.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
t/test-sparse-files.sh

index 82275ff8bc045f82e1f85b46f0f5b624740b2f59..8ff5ddeff303a729800eab4bc1860c5f3624ea37 100755 (executable)
@@ -120,7 +120,7 @@ else
     random_size=1M
 fi
 WVSTART "sparse file restore --sparse (random $random_size)"
-WVPASS bup random 1M > src/foo
+WVPASS bup random --seed "$RANDOM" 1M > src/foo
 WVPASS bup index src
 WVPASS bup save -n src src
 WVPASS rm -r restore