From: Heinrich Schuchardt Date: Wed, 11 Aug 2021 15:46:10 +0000 (+0200) Subject: tst_bitops: don't stop testing on low memory X-Git-Tag: v1.46.4~28 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=61d72a9a8263eec8cc34ffa7e19e93c205f77f00;p=tools%2Fe2fsprogs.git tst_bitops: don't stop testing on low memory Some build systems have 512 MiB memory or less, e.g. Ubiquity Edgeroute Lite which can be used to build for the mips and mips64 architectures. On these allocating 512 MIB will always fail. So if allocating 512 MiB fails treat this as expected behavior and return 0. This will allow testing to continue with the remaining tests. Signed-off-by: Heinrich Schuchardt Signed-off-by: Theodore Ts'o --- diff --git a/lib/ext2fs/tst_bitops.c b/lib/ext2fs/tst_bitops.c index 8262d3b..adef12d 100644 --- a/lib/ext2fs/tst_bitops.c +++ b/lib/ext2fs/tst_bitops.c @@ -104,7 +104,7 @@ int main(int argc, char **argv) bigarray = malloc(1 << 29); if (!bigarray) { fprintf(stderr, "Failed to allocate scratch memory!\n"); - exit(1); + exit(0); } bigarray[BIG_TEST_BIT >> 3] = 0;