aboutsummaryrefslogtreecommitdiff
path: root/testcases/kernel/syscalls/gethostname/gethostname01.c
blob: f2276a38c6c09e373e3b837019893c69e4c76c79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
 * Copyright (c) 2023 SUSE LLC Ioannis Bonatakis <ybonatakis@suse.com>
 */

/*\
 * [Description]
 *
 * Test is checking that gethostname() succeeds.
 */

#include "tst_test.h"
#include <stdlib.h>

static void run(void)
{
	char hname[100];

	TST_EXP_PASS(gethostname(hname, sizeof(hname)));
}

static struct tst_test test = {
	.test_all = run
};