xref: /aosp_15_r20/external/ltp/testcases/kernel/syscalls/getdomainname/getdomainname01.c (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) Wipro Technologies Ltd, 2002.  All Rights Reserved.
4  *   AUTHOR: Saji Kumar.V.R <[email protected]>
5  */
6 
7 /*\
8  * [Description]
9  *
10  * Basic test for getdomainname(2)
11  *
12  * This is a Phase I test for the getdomainname(2) system call.
13  * It is intended to provide a limited exposure of the system call.
14  */
15 
16 #include <linux/utsname.h>
17 #include "tst_test.h"
18 
19 #define MAX_NAME_LEN __NEW_UTS_LEN
20 
verify_getdomainname(void)21 static void verify_getdomainname(void)
22 {
23 	char domain_name[MAX_NAME_LEN];
24 
25 	TST_EXP_PASS(getdomainname(domain_name, sizeof(domain_name)));
26 }
27 
28 static struct tst_test test = {
29         .test_all = verify_getdomainname,
30 };
31