From 0ee48eebb24c38bdad193fa9945a3b26d4a89dc6 Mon Sep 17 00:00:00 2001 From: Dmitrii Kuvaiskii Date: Thu, 14 Mar 2024 08:21:42 -0700 Subject: [PATCH] [LibOS] test/regression: reenable `sigaltstack` test There was a small bug in the test itself, which is fixed (sigaltstack size must be sufficiently large to hold the Gramine-generated frame). Signed-off-by: Dmitrii Kuvaiskii --- libos/test/regression/sigaltstack.c | 6 ++++-- libos/test/regression/test_libos.py | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libos/test/regression/sigaltstack.c b/libos/test/regression/sigaltstack.c index 7d4638fc90..8d864dc4d3 100644 --- a/libos/test/regression/sigaltstack.c +++ b/libos/test/regression/sigaltstack.c @@ -7,9 +7,11 @@ #include #include +/* default SIGSTKSZ is 8KB which is too small to hold e.g. XSAVE area (always stored by Gramine) */ +size_t sig_stack_size = 64 * 1024; uint8_t* sig_stack; -size_t sig_stack_size = SIGSTKSZ; -_Atomic int count = 0; + +_Atomic int count = 0; static void handler(int signal, siginfo_t* info, void* ucontext) { int ret; diff --git a/libos/test/regression/test_libos.py b/libos/test/regression/test_libos.py index fb19c238ff..14b750940c 100644 --- a/libos/test/regression/test_libos.py +++ b/libos/test/regression/test_libos.py @@ -869,7 +869,6 @@ def test_05A_munmap(self): stdout, _ = self.run_binary(['munmap']) self.assertIn('TEST OK', stdout) - @unittest.skip('sigaltstack isn\'t correctly implemented') def test_060_sigaltstack(self): stdout, _ = self.run_binary(['sigaltstack'])