[PATCH] tests: make ipcs limit calculations work when numbers are large

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

 



Test suite  failed when I ran it with kernel 3.16.  Error is the
following.

tests/ts/ipcs/limits2: line 31: [: 18446744073692774399: integer expression expected

Reference: http://lkml.iu.edu/hypermail/linux/kernel/1406.0/01869.html
Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 tests/ts/ipcs/limits2 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/ts/ipcs/limits2 b/tests/ts/ipcs/limits2
index 2333198..1a49c46 100755
--- a/tests/ts/ipcs/limits2
+++ b/tests/ts/ipcs/limits2
@@ -28,7 +28,8 @@ ts_check_prog "bc"
 . $TS_SELF/functions.sh
 
 # TODO https://github.com/karelzak/util-linux/issues/51
-if [ $(</proc/sys/kernel/shmall) -ge $(bc <<<"2^64 / $PAGE_SIZE") ]; then
+SHMALL=$(</proc/sys/kernel/shmall)
+if [ $(bc <<<"2^64 / $PAGE_SIZE < $SHMALL") -ne 1 ]; then
 	TS_KNOWN_FAIL="yes"
 fi
 
-- 
2.0.4

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




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux