]>
Commit | Line | Data |
---|---|---|
fe8ab488 A |
1 | #include "perf_index.h" |
2 | #include "fail.h" | |
3 | #include <stdio.h> | |
4 | #include <stdlib.h> | |
5 | ||
6 | DECL_SETUP { | |
0a7de745 | 7 | VERIFY(test_argc > 0, "missing argument"); |
fe8ab488 | 8 | |
0a7de745 | 9 | return PERFINDEX_SUCCESS; |
fe8ab488 A |
10 | } |
11 | ||
12 | DECL_TEST { | |
0a7de745 A |
13 | char* cmd; |
14 | int retval; | |
fe8ab488 | 15 | |
0a7de745 A |
16 | retval = asprintf(&cmd, "iperf -c \"%s\" -n %lld > /dev/null", test_argv[0], length); |
17 | VERIFY(retval > 0, "asprintf failed"); | |
fe8ab488 | 18 | |
0a7de745 A |
19 | retval = system(cmd); |
20 | VERIFY(retval == 0, "iperf command failed"); | |
fe8ab488 | 21 | |
0a7de745 | 22 | return PERFINDEX_SUCCESS; |
fe8ab488 | 23 | } |