1f08c3bdfSopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 2f08c3bdfSopenharmony_ci/* 3f08c3bdfSopenharmony_ci * Copyright (c) International Business Machines Corp., 2001 4f08c3bdfSopenharmony_ci */ 5f08c3bdfSopenharmony_ci 6f08c3bdfSopenharmony_ci/*\ 7f08c3bdfSopenharmony_ci * [Description] 8f08c3bdfSopenharmony_ci * 9f08c3bdfSopenharmony_ci * Test that we get an error using illegal signals. 10f08c3bdfSopenharmony_ci */ 11f08c3bdfSopenharmony_ci 12f08c3bdfSopenharmony_ci#include "tst_test.h" 13f08c3bdfSopenharmony_ci 14f08c3bdfSopenharmony_cistatic int sigs[] = { _NSIG + 1, SIGKILL, SIGSTOP }; 15f08c3bdfSopenharmony_ci 16f08c3bdfSopenharmony_cistatic void do_test(unsigned int n) 17f08c3bdfSopenharmony_ci{ 18f08c3bdfSopenharmony_ci TST_EXP_FAIL2((long)signal(sigs[n], SIG_IGN), EINVAL); 19f08c3bdfSopenharmony_ci} 20f08c3bdfSopenharmony_ci 21f08c3bdfSopenharmony_cistatic struct tst_test test = { 22f08c3bdfSopenharmony_ci .tcnt = ARRAY_SIZE(sigs), 23f08c3bdfSopenharmony_ci .test = do_test, 24f08c3bdfSopenharmony_ci}; 25