[Skiboot] [PATCH] test/mambo: Skip restoring the old ulimit

Oliver O'Halloran oohall at gmail.com
Wed Nov 13 17:33:51 AEDT 2019


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 at gmail.com>
---
 test/hello_world/run_mambo_hello_world.sh    | 3 ---
 test/hello_world/run_mambo_p9_hello_world.sh | 3 ---
 test/run_mambo_boot_test.sh                  | 3 ---
 test/sreset_world/run_mambo_p9_sreset.sh     | 3 ---
 test/sreset_world/run_mambo_sreset.sh        | 3 ---
 5 files changed, 15 deletions(-)

diff --git a/test/hello_world/run_mambo_hello_world.sh b/test/hello_world/run_mambo_hello_world.sh
index 54d445b18943..d3dbf1f211a3 100755
--- a/test/hello_world/run_mambo_hello_world.sh
+++ b/test/hello_world/run_mambo_hello_world.sh
@@ -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
@@ -59,8 +58,6 @@ if [ $r != 0 ]; then
     exit $r
 fi
 
-ulimit -c $OLD_ULIMIT_C
-
 rm -f -- "$t"
 trap - EXIT
 exit 0;
diff --git a/test/hello_world/run_mambo_p9_hello_world.sh b/test/hello_world/run_mambo_p9_hello_world.sh
index 9560527a0c2a..75c5ee7bf2a1 100755
--- a/test/hello_world/run_mambo_p9_hello_world.sh
+++ b/test/hello_world/run_mambo_p9_hello_world.sh
@@ -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
@@ -58,8 +57,6 @@ if [ $r != 0 ]; then
     exit $r
 fi
 
-ulimit -c $OLD_ULIMIT_C
-
 rm -f -- "$t"
 trap - EXIT
 exit 0;
diff --git a/test/run_mambo_boot_test.sh b/test/run_mambo_boot_test.sh
index adff1804dddb..9899bde466e4 100755
--- a/test/run_mambo_boot_test.sh
+++ b/test/run_mambo_boot_test.sh
@@ -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
@@ -66,8 +65,6 @@ if [ $r != 0 ]; then
     exit $r
 fi
 
-ulimit -c $OLD_ULIMIT_C
-
 rm -f -- "$t"
 trap - EXIT
 exit 0
diff --git a/test/sreset_world/run_mambo_p9_sreset.sh b/test/sreset_world/run_mambo_p9_sreset.sh
index 926ce3e49d3e..bae72e793d0f 100755
--- a/test/sreset_world/run_mambo_p9_sreset.sh
+++ b/test/sreset_world/run_mambo_p9_sreset.sh
@@ -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
@@ -70,8 +69,6 @@ if [ $r != 0 ]; then
     exit $r
 fi
 
-ulimit -c $OLD_ULIMIT_C
-
 rm -f -- "$t"
 trap - EXIT
 exit 0;
diff --git a/test/sreset_world/run_mambo_sreset.sh b/test/sreset_world/run_mambo_sreset.sh
index 8fba5eb9ea0f..24a8a934a942 100755
--- a/test/sreset_world/run_mambo_sreset.sh
+++ b/test/sreset_world/run_mambo_sreset.sh
@@ -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
@@ -71,8 +70,6 @@ if [ $r != 0 ]; then
     exit $r
 fi
 
-ulimit -c $OLD_ULIMIT_C
-
 rm -f -- "$t"
 trap - EXIT
 exit 0;
-- 
2.21.0



More information about the Skiboot mailing list