From 61d72a9a8263eec8cc34ffa7e19e93c205f77f00 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 11 Aug 2021 17:46:10 +0200 Subject: 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 --- lib/ext2fs/tst_bitops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ext2fs/tst_bitops.c') diff --git a/lib/ext2fs/tst_bitops.c b/lib/ext2fs/tst_bitops.c index 8262d3b7..adef12da 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; -- cgit v1.2.3