PAPI 7.1.0.0
Loading...
Searching...
No Matches
exec2.c File Reference
Include dependency graph for exec2.c:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 22 of file exec2.c.

23{
24 int retval;
25
26 tests_quiet( argc, argv ); /* Set TESTS_QUIET variable */
27
28 if ( ( argc > 1 ) && ( strcmp( argv[1], "xxx" ) == 0 ) ) {
30 if ( retval != PAPI_VER_CURRENT )
31 test_fail( __FILE__, __LINE__, "execed PAPI_library_init", retval );
32 } else {
34 if ( retval != PAPI_VER_CURRENT )
35 test_fail( __FILE__, __LINE__, "main PAPI_library_init", retval );
36
37 if ( execlp( argv[0], argv[0], "xxx", NULL ) == -1 )
38 test_fail( __FILE__, __LINE__, "execlp", PAPI_ESYS );
39 }
40
41 test_pass( __FILE__ );
42
43 return 0;
44
45}
initialize the PAPI library.
#define PAPI_VER_CURRENT
Definition: f90papi.h:54
#define PAPI_ESYS
Definition: f90papi.h:136
int tests_quiet(int argc, char **argv)
Definition: test_utils.c:376
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
Definition: test_utils.c:491
void PAPI_NORETURN test_pass(const char *filename)
Definition: test_utils.c:432
int retval
Definition: zero_fork.c:53
Here is the call graph for this function: