Blame SOURCES/scrub-2.5.2-test-use-power-2-filesizes.patch

69c651
From 9f37f5d29f255285cbc7822788963681a8f659dd Mon Sep 17 00:00:00 2001
69c651
From: rpm-build <rpm-build>
69c651
Date: Tue, 26 Jan 2021 15:22:57 -0500
69c651
Subject: [PATCH] test: use a power of 2 for file sizes
69c651
69c651
Reduce the change of tests failing due to block size round-up.
69c651
Freebsd was failing that way.
69c651
69c651
Upstream: https://github.com/chaos/scrub/commit/5c66fc0537f4ecb21d4c3dcdd9020a02c8a2d819
69c651
---
69c651
 test/t02     |  2 +-
69c651
 test/t02.exp |  2 +-
69c651
 test/t03     |  2 +-
69c651
 test/t03.exp |  2 +-
69c651
 test/t04     |  2 +-
69c651
 test/t04.exp |  2 +-
69c651
 test/t05     |  2 +-
69c651
 test/t05.exp |  2 +-
69c651
 test/t06     |  2 +-
69c651
 test/t06.exp |  2 +-
69c651
 test/t07     |  2 +-
69c651
 test/t11     |  2 +-
69c651
 test/t11.exp |  2 +-
69c651
 test/t12     |  8 ++++----
69c651
 test/t12.exp | 12 ++++++------
69c651
 15 files changed, 23 insertions(+), 23 deletions(-)
69c651
69c651
diff --git a/test/t02 b/test/t02
69c651
index d09a517..14c5ca7 100755
69c651
--- a/test/t02
69c651
+++ b/test/t02
69c651
@@ -1,6 +1,6 @@
69c651
 #!/bin/sh
69c651
 TESTFILE=${TMPDIR:-/tmp}/scrub-testfile.$$
69c651
 rm -f $TESTFILE
69c651
-./pad 400k $TESTFILE || exit 1
69c651
+./pad 512k $TESTFILE || exit 1
69c651
 $PATH_SCRUB -r $TESTFILE 2>&1 | sed -e "s!${TESTFILE}!file!" >t02.out || exit 1
69c651
 diff t02.exp t02.out >t02.diff
69c651
diff --git a/test/t02.exp b/test/t02.exp
69c651
index 848c9b7..e026a17 100644
69c651
--- a/test/t02.exp
69c651
+++ b/test/t02.exp
69c651
@@ -1,5 +1,5 @@
69c651
 scrub: using NNSA NAP-14.1-C patterns
69c651
-scrub: scrubbing file 409600 bytes (~400KB)
69c651
+scrub: scrubbing file 524288 bytes (~512KB)
69c651
 scrub: random  |................................................|
69c651
 scrub: random  |................................................|
69c651
 scrub: 0x00    |................................................|
69c651
diff --git a/test/t03 b/test/t03
69c651
index db9ca61..917ec52 100755
69c651
--- a/test/t03
69c651
+++ b/test/t03
69c651
@@ -1,6 +1,6 @@
69c651
 #!/bin/sh
69c651
 TESTFILE=${TMPDIR:-/tmp}/scrub-testfile.$$
69c651
 rm -f $TESTFILE
69c651
-./pad 400k $TESTFILE || exit 1
69c651
+./pad 512k $TESTFILE || exit 1
69c651
 $PATH_SCRUB -r -p dod $TESTFILE 2>&1 | sed -e "s!$TESTFILE!file!" >t03.out || exit 1
69c651
 diff t03.exp t03.out >t03.diff
69c651
diff --git a/test/t03.exp b/test/t03.exp
69c651
index e7e8015..4456149 100644
69c651
--- a/test/t03.exp
69c651
+++ b/test/t03.exp
69c651
@@ -1,5 +1,5 @@
69c651
 scrub: using DoD 5220.22-M patterns
69c651
-scrub: scrubbing file 409600 bytes (~400KB)
69c651
+scrub: scrubbing file 524288 bytes (~512KB)
69c651
 scrub: random  |................................................|
69c651
 scrub: 0x00    |................................................|
69c651
 scrub: 0xff    |................................................|
69c651
diff --git a/test/t04 b/test/t04
69c651
index 3dd4165..a33e9cd 100755
69c651
--- a/test/t04
69c651
+++ b/test/t04
69c651
@@ -1,6 +1,6 @@
69c651
 #!/bin/sh
69c651
 TESTFILE=${TMPDIR:-/tmp}/scrub-testfile.$$
69c651
 rm -f $TESTFILE
69c651
-./pad 400k $TESTFILE || exit 1
69c651
+./pad 512k $TESTFILE || exit 1
69c651
 $PATH_SCRUB -r -p bsi $TESTFILE 2>&1 | sed -e "s!$TESTFILE!file!" >t04.out || exit 1
69c651
 diff t04.exp t04.out >t04.diff
69c651
diff --git a/test/t04.exp b/test/t04.exp
69c651
index 2bb6822..ac98d54 100644
69c651
--- a/test/t04.exp
69c651
+++ b/test/t04.exp
69c651
@@ -1,5 +1,5 @@
69c651
 scrub: using BSI patterns
69c651
-scrub: scrubbing file 409600 bytes (~400KB)
69c651
+scrub: scrubbing file 524288 bytes (~512KB)
69c651
 scrub: 0xff    |................................................|
69c651
 scrub: 0xfe    |................................................|
69c651
 scrub: 0xfd    |................................................|
69c651
diff --git a/test/t05 b/test/t05
69c651
index 474fcd3..d9a6061 100755
69c651
--- a/test/t05
69c651
+++ b/test/t05
69c651
@@ -1,6 +1,6 @@
69c651
 #!/bin/sh
69c651
 TESTFILE=${TMPDIR:-/tmp}/scrub-testfile.$$
69c651
 rm -f $TESTFILE
69c651
-./pad 400k $TESTFILE || exit 1
69c651
+./pad 512k $TESTFILE || exit 1
69c651
 $PATH_SCRUB -r -p fastold $TESTFILE 2>&1 | sed -e "s!$TESTFILE!file!" >t05.out || exit 1
69c651
 diff t05.exp t05.out >t05.diff
69c651
diff --git a/test/t05.exp b/test/t05.exp
69c651
index 48ba9b7..118d7e4 100644
69c651
--- a/test/t05.exp
69c651
+++ b/test/t05.exp
69c651
@@ -1,5 +1,5 @@
69c651
 scrub: using pre v1.7 scrub (skip random) patterns
69c651
-scrub: scrubbing file 409600 bytes (~400KB)
69c651
+scrub: scrubbing file 524288 bytes (~512KB)
69c651
 scrub: 0x00    |................................................|
69c651
 scrub: 0xff    |................................................|
69c651
 scrub: 0xaa    |................................................|
69c651
diff --git a/test/t06 b/test/t06
69c651
index 28eb856..48bde5a 100755
69c651
--- a/test/t06
69c651
+++ b/test/t06
69c651
@@ -1,7 +1,7 @@
69c651
 #!/bin/sh
69c651
 TESTFILE=${TMPDIR:-/tmp}/scrub-testfile.$$
69c651
 rm -f $TESTFILE
69c651
-./pad 400k $TESTFILE || exit 1
69c651
+./pad 512k $TESTFILE || exit 1
69c651
 $PATH_SCRUB -r -p old $TESTFILE 2>&1 | sed -e "s!$TESTFILE!file!" >t06.out || exit 1
69c651
 diff t06.exp t06.out >t06.diff
69c651
 rc=$?
69c651
diff --git a/test/t06.exp b/test/t06.exp
69c651
index 49967ec..e84360a 100644
69c651
--- a/test/t06.exp
69c651
+++ b/test/t06.exp
69c651
@@ -1,5 +1,5 @@
69c651
 scrub: using pre v1.7 scrub patterns
69c651
-scrub: scrubbing file 409600 bytes (~400KB)
69c651
+scrub: scrubbing file 524288 bytes (~512KB)
69c651
 scrub: 0x00    |................................................|
69c651
 scrub: 0xff    |................................................|
69c651
 scrub: 0xaa    |................................................|
69c651
diff --git a/test/t07 b/test/t07
69c651
index cb935bf..69eab76 100755
69c651
--- a/test/t07
69c651
+++ b/test/t07
69c651
@@ -1,7 +1,7 @@
69c651
 #!/bin/sh
69c651
 TESTFILE=${TMPDIR:-/tmp}/scrub-testfile.$$
69c651
 rm -f $TESTFILE
69c651
-./pad 400k $TESTFILE
69c651
+./pad 512k $TESTFILE
69c651
 (./tsig $TESTFILE && ./tsig $TESTFILE) >t07.out 2>&1
69c651
 diff t07.exp t07.out >t07.diff 
69c651
 rc=$?
69c651
diff --git a/test/t11 b/test/t11
69c651
index 5a17b46..dd5444f 100755
69c651
--- a/test/t11
69c651
+++ b/test/t11
69c651
@@ -1,7 +1,7 @@
69c651
 #!/bin/sh
69c651
 TESTFILE=${TMPDIR:-/tmp}/scrub-testfile.$$
69c651
 rm -f $TESTFILE
69c651
-./pad 400k $TESTFILE || exit 1
69c651
+./pad 512k $TESTFILE || exit 1
69c651
 $PATH_SCRUB -r -p gutmann $TESTFILE 2>&1 | sed -e "s!$TESTFILE!file!" >t11.out || exit 1
69c651
 diff t11.exp t11.out >t11.diff
69c651
 rc=$?
69c651
diff --git a/test/t11.exp b/test/t11.exp
69c651
index abd2abf..895d903 100644
69c651
--- a/test/t11.exp
69c651
+++ b/test/t11.exp
69c651
@@ -1,5 +1,5 @@
69c651
 scrub: using Gutmann patterns
69c651
-scrub: scrubbing file 409600 bytes (~400KB)
69c651
+scrub: scrubbing file 524288 bytes (~512KB)
69c651
 scrub: random  |................................................|
69c651
 scrub: random  |................................................|
69c651
 scrub: random  |................................................|
69c651
diff --git a/test/t12 b/test/t12
69c651
index c312220..260198f 100755
69c651
--- a/test/t12
69c651
+++ b/test/t12
69c651
@@ -1,14 +1,14 @@
69c651
 #!/bin/sh
69c651
 TESTFILE=${TMPDIR:-/tmp}/scrub-testfile.$$
69c651
 rm -f $TESTFILE
69c651
-./pad 400k $TESTFILE || exit 1
69c651
-$PATH_SCRUB -s 400k $TESTFILE 2>&1 | sed -e "s!$TESTFILE!file!" >t12.out
69c651
+./pad 512k $TESTFILE || exit 1
69c651
+$PATH_SCRUB -s 512k $TESTFILE 2>&1 | sed -e "s!$TESTFILE!file!" >t12.out
69c651
 test $? = 0 || exit 1
69c651
 ./tsize $TESTFILE >>t12.out 2>&1
69c651
-$PATH_SCRUB -f -s 300k $TESTFILE 2>&1 | sed -e "s!$TESTFILE!file!" >>t12.out
69c651
+$PATH_SCRUB -f -s 256k $TESTFILE 2>&1 | sed -e "s!$TESTFILE!file!" >>t12.out
69c651
 test $? = 0 || exit 1
69c651
 ./tsize $TESTFILE >>t12.out 2>&1
69c651
-$PATH_SCRUB -f -s 500k $TESTFILE 2>&1 | sed -e "s!$TESTFILE!file!" >>t12.out
69c651
+$PATH_SCRUB -f -s 1024k $TESTFILE 2>&1 | sed -e "s!$TESTFILE!file!" >>t12.out
69c651
 test $? = 0 || exit 1
69c651
 ./tsize $TESTFILE >>t12.out 2>&1
69c651
 diff t12.exp t12.out >t12.diff
69c651
diff --git a/test/t12.exp b/test/t12.exp
69c651
index 33f2c97..4c5d987 100644
69c651
--- a/test/t12.exp
69c651
+++ b/test/t12.exp
69c651
@@ -1,22 +1,22 @@
69c651
 scrub: using NNSA NAP-14.1-C patterns
69c651
-scrub: scrubbing file 409600 bytes (~400KB)
69c651
+scrub: scrubbing file 524288 bytes (~512KB)
69c651
 scrub: random  |................................................|
69c651
 scrub: random  |................................................|
69c651
 scrub: 0x00    |................................................|
69c651
 scrub: verify  |................................................|
69c651
-409600
69c651
+524288
69c651
 scrub: warning: -s size < file size
69c651
 scrub: using NNSA NAP-14.1-C patterns
69c651
-scrub: scrubbing file 307200 bytes (~300KB)
69c651
+scrub: scrubbing file 262144 bytes (~256KB)
69c651
 scrub: random  |................................................|
69c651
 scrub: random  |................................................|
69c651
 scrub: 0x00    |................................................|
69c651
 scrub: verify  |................................................|
69c651
-409600
69c651
+524288
69c651
 scrub: using NNSA NAP-14.1-C patterns
69c651
-scrub: scrubbing file 512000 bytes (~500KB)
69c651
+scrub: scrubbing file 1048576 bytes (~1024KB)
69c651
 scrub: random  |................................................|
69c651
 scrub: random  |................................................|
69c651
 scrub: 0x00    |................................................|
69c651
 scrub: verify  |................................................|
69c651
-512000
69c651
+1048576
69c651
-- 
69c651
2.27.0
69c651