1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (c) 2018 Linux Test Project 4 * Copyright (C) 2015 Cyril Hrubis <chrubis@suse.cz> 5 * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. 6 * AUTHOR : William Roske 7 * CO-PILOT : Dave Fenner 8 */ 9 10#include <errno.h> 11#include <string.h> 12#include <signal.h> 13#include <stdlib.h> 14 15#include <sys/types.h> 16#include <sys/wait.h> 17 18#include "tst_test.h" 19 20static void verify_execlp(void) 21{ 22 pid_t pid; 23 24 pid = SAFE_FORK(); 25 if (pid == 0) { 26 TEST(execlp("execlp01_child", "execlp01_child", "canary", NULL)); 27 tst_brk(TFAIL | TTERRNO, 28 "Failed to execute execlp01_child"); 29 } 30} 31 32static struct tst_test test = { 33 .forks_child = 1, 34 .child_needs_reinit = 1, 35 .test_all = verify_execlp, 36}; 37