diff mbox

generic/244: avoid creating too large random ID

Message ID 1459253839-17197-1-git-send-email-eguan@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eryu Guan March 29, 2016, 12:17 p.m. UTC
ppc64 hosts are generating too large random IDs like 725294314141253632,
which causes all sorts of errors in test.

Fix it by using format "-t uI" for 'int' size and it works fine on all
platforms.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---

TBH, I'm not quite clear why "-t uL" behaves differently on ppc64 (even ppc64le
works fine), and I didn't dig too deep into it. "-t uI" just works :)

 tests/generic/244 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/tests/generic/244 b/tests/generic/244
index eb5a5ab..0b50438 100755
--- a/tests/generic/244
+++ b/tests/generic/244
@@ -83,7 +83,7 @@  ITERATIONS=100
 
 # A few extra on the off chance we get dups
 for I in `seq 1 $(($ITERATIONS+10))`; do
-	ID=`od -N 4 -t uL -An /dev/urandom | tr -d " "`
+	ID=`od -N 4 -t uI -An /dev/urandom | tr -d " "`
 	echo $ID >> $tmp.1
 done