xref: /aosp_15_r20/external/ltp/testcases/kernel/syscalls/getpgrp/getpgrp01.c (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
4  * AUTHOR: William Roske, CO-PILOT: Dave Fenner
5  * Copyright (c) 2023 SUSE LLC Avinesh Kumar <[email protected]>
6  */
7 
8 /*\
9  * [Description]
10  *
11  * Verify that getpgrp(2) syscall executes successfully.
12  */
13 
14 #include "tst_test.h"
15 
run(void)16 static void run(void)
17 {
18 	TST_EXP_PID(getpgrp());
19 	TST_EXP_EQ_LI(TST_RET, SAFE_GETPGID(0));
20 }
21 
22 static struct tst_test test = {
23 	.test_all = run
24 };
25