Skip to content

Commit

Permalink
test/mambo: Skip restoring the old ulimit
Browse files Browse the repository at this point in the history
Reducing the core size limit is always permitted, but increasing it may
not. To work around problems with some versions of mambo segfaulting we
set the ulimit to zero when running the tests and try to restore the old
ulimit afterwards.

On systems where this isn't permitted (fedora?) this results in a pile
of of spurious errors from ulimit while running "make check. e.g.

   ulimit: core file size: cannot modify limit: Operation not permitted

The ulimit reduction only applies to the currently running shell (i.e
the one running the script) which is probably not going to crash outside
of mambo. Remove the ulimit restoration to squash the errors so the
output of make check is cleaner.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
  • Loading branch information
oohal committed Nov 14, 2019
1 parent 7fddf42 commit 46fac46
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 15 deletions.
3 changes: 0 additions & 3 deletions test/hello_world/run_mambo_hello_world.sh
Expand Up @@ -31,7 +31,6 @@ else
fi

# Currently getting some core dumps from mambo, so disable them!
OLD_ULIMIT_C=$(ulimit -c)
ulimit -c 0

t=$(mktemp) || exit 1
Expand Down Expand Up @@ -59,8 +58,6 @@ if [ $r != 0 ]; then
exit $r
fi

ulimit -c $OLD_ULIMIT_C

rm -f -- "$t"
trap - EXIT
exit 0;
3 changes: 0 additions & 3 deletions test/hello_world/run_mambo_p9_hello_world.sh
Expand Up @@ -30,7 +30,6 @@ else
fi

# Currently getting some core dumps from mambo, so disable them!
OLD_ULIMIT_C=$(ulimit -c)
ulimit -c 0

t=$(mktemp) || exit 1
Expand Down Expand Up @@ -58,8 +57,6 @@ if [ $r != 0 ]; then
exit $r
fi

ulimit -c $OLD_ULIMIT_C

rm -f -- "$t"
trap - EXIT
exit 0;
3 changes: 0 additions & 3 deletions test/run_mambo_boot_test.sh
Expand Up @@ -38,7 +38,6 @@ if [ -z "$SKIBOOT_MEM_DUMP" ]; then
fi

# Currently getting some core dumps from mambo, so disable them!
OLD_ULIMIT_C=$(ulimit -c)
ulimit -c 0

t=$(mktemp) || exit 1
Expand Down Expand Up @@ -66,8 +65,6 @@ if [ $r != 0 ]; then
exit $r
fi

ulimit -c $OLD_ULIMIT_C

rm -f -- "$t"
trap - EXIT
exit 0
3 changes: 0 additions & 3 deletions test/sreset_world/run_mambo_p9_sreset.sh
Expand Up @@ -30,7 +30,6 @@ else
fi

# Currently getting some core dumps from mambo, so disable them!
OLD_ULIMIT_C=$(ulimit -c)
ulimit -c 0

t=$(mktemp) || exit 1
Expand Down Expand Up @@ -70,8 +69,6 @@ if [ $r != 0 ]; then
exit $r
fi

ulimit -c $OLD_ULIMIT_C

rm -f -- "$t"
trap - EXIT
exit 0;
3 changes: 0 additions & 3 deletions test/sreset_world/run_mambo_sreset.sh
Expand Up @@ -31,7 +31,6 @@ else
fi

# Currently getting some core dumps from mambo, so disable them!
OLD_ULIMIT_C=$(ulimit -c)
ulimit -c 0

t=$(mktemp) || exit 1
Expand Down Expand Up @@ -71,8 +70,6 @@ if [ $r != 0 ]; then
exit $r
fi

ulimit -c $OLD_ULIMIT_C

rm -f -- "$t"
trap - EXIT
exit 0;

0 comments on commit 46fac46

Please sign in to comment.