[PATCH] generic/244: avoid creating too large random ID

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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@xxxxxxxxxx>
---

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 --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
 
-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux