[09/14] alpine: sigaltstack returns EINVAL if SS_ONSTACK is set

Submitted by Andrey Vagin on June 1, 2018, 9:02 p.m.

Details

Message ID 20180601210304.30164-10-avagin@virtuozzo.com
State Accepted
Series "More changes to be compatible with python 3"
Commit 8fc954ab63cb1b48b01020181800d14ea4fd4334
Headers show

Commit Message

Andrey Vagin June 1, 2018, 9:02 p.m.
Actually this flag is ignored by kernel.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
---
 test/zdtm/static/sigaltstack.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/test/zdtm/static/sigaltstack.c b/test/zdtm/static/sigaltstack.c
index 3ccd18277..d324b0d37 100644
--- a/test/zdtm/static/sigaltstack.c
+++ b/test/zdtm/static/sigaltstack.c
@@ -64,7 +64,7 @@  static void *thread_func(void *arg)
 	sas_state[SAS_THRD_OLD] = (stack_t) {
 		.ss_size	= sizeof(stack_thread) - 8,
 		.ss_sp		= stack_thread,
-		.ss_flags	= SS_ONSTACK,
+		.ss_flags	= 0,
 	};
 
 	struct sigaction sa = {
@@ -106,7 +106,7 @@  int main(int argc, char *argv[])
 	sas_state[SAS_MAIN_OLD] = (stack_t) {
 		.ss_size	= sizeof(stack_main) - 8,
 		.ss_sp		= stack_main,
-		.ss_flags	= SS_ONSTACK,
+		.ss_flags	= 0,
 	};
 
 	struct sigaction sa = {
@@ -151,6 +151,9 @@  int main(int argc, char *argv[])
 	}
 	task_waiter_fini(&t);
 
+	sas_state[SAS_THRD_OLD].ss_flags = SS_ONSTACK;
+	sas_state[SAS_MAIN_OLD].ss_flags = SS_ONSTACK;
+
 	show_ss("main old", &sas_state[SAS_MAIN_OLD]);
 	show_ss("main new", &sas_state[SAS_MAIN_NEW]);
 	show_ss("thrd old", &sas_state[SAS_THRD_OLD]);