1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. 4 * Copyright (c) 2023 SUSE LLC Ioannis Bonatakis <ybonatakis@suse.com> 5 */ 6 7/*\ 8 * [Description] 9 * 10 * Test is checking that gethostname() succeeds. 11 */ 12 13#include "tst_test.h" 14#include <stdlib.h> 15 16static void run(void) 17{ 18 char hname[100]; 19 20 TST_EXP_PASS(gethostname(hname, sizeof(hname))); 21} 22 23static struct tst_test test = { 24 .test_all = run 25}; 26