• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) 2018 Linux Test Project
4  * Copyright (c) International Business Machines Corp., 2001
5  */
6 
7 /*
8  * test3.c
9  *	dummy program which is used by execve02/4/5.c testcase
10  */
11 
12 #define TST_NO_DEFAULT_MAIN
13 #include <stdlib.h>
14 #include "tst_test.h"
15 
main(int argc,char * argv[])16 int main(int argc, char *argv[])
17 {
18 	tst_reinit();
19 
20 	/* For execve05 test, it should be returned here */
21 	if (argc > 1 && !strcmp(argv[1], "canary")) {
22 		tst_res(TPASS, "argv[1] is %s, expected 'canary'", argv[1]);
23 		return 0;
24 	}
25 
26 	/* For execve02/4 test, it shouldn't be executed */
27 	tst_res(TFAIL, "%s shouldn't be executed", argv[0]);
28 	return 0;
29 }
30