]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: make ipcs limit calculations work when numbers are large
authorSami Kerola <kerolasa@iki.fi>
Wed, 6 Aug 2014 22:04:31 +0000 (23:04 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 11 Aug 2014 12:52:01 +0000 (14:52 +0200)
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@iki.fi>
tests/ts/ipcs/limits2

index 23331985e64f182412d9de3f9e70fb8c0e446d81..1a49c46245999ec4b154cebfd7c9266419c6d3b8 100755 (executable)
@@ -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