xref: /aosp_15_r20/external/ltp/testcases/kernel/syscalls/execlp/execlp01_child.c (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) 2018 Linux Test Project
4  * Copyright (C) 2015 Cyril Hrubis [email protected]
5  */
6 
7 #define TST_NO_DEFAULT_MAIN
8 #include "tst_test.h"
9 
main(int argc,char * argv[])10 int main(int argc, char *argv[])
11 {
12 	tst_reinit();
13 
14 	if (argc != 2)
15 		tst_brk(TFAIL, "argc is %d, expected 2", argc);
16 
17 	if (strcmp(argv[1], "canary"))
18 		tst_brk(TFAIL, "argv[1] is %s, expected 'canary'", argv[1]);
19 
20 	tst_res(TPASS, "%s executed", argv[0]);
21 
22 	return 0;
23 }
24