1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (c) International Business Machines Corp., 2001 4 * Copyright (c) 2012 Cyril Hrubis <chrubis@suse.cz> 5 * Copyright (c) 2022 SUSE LLC Avinesh Kumar <avinesh.kumar@suse.com> 6 */ 7 8/*\ 9 * [Description] 10 * 11 * Verify that getsid(2) fails with ESRCH errno when there is no 12 * process found with process ID pid. 13 */ 14 15#include "tst_test.h" 16 17static void run(void) 18{ 19 pid_t unused_pid; 20 unused_pid = tst_get_unused_pid(); 21 22 TST_EXP_FAIL(getsid(unused_pid), ESRCH); 23} 24 25static struct tst_test test = { 26 .test_all = run 27}; 28