]>
Commit | Line | Data |
---|---|---|
39236c6e A |
1 | #include <fcntl.h> |
2 | #include "perf_index.h" | |
3 | #include <errno.h> | |
4 | ||
5 | const stress_test_t iperf_test = {"iperf", &stress_general_init, &iperf, &stress_general_cleanup, &validate_iperf}; | |
6 | ||
7 | DECL_VALIDATE(validate_iperf) { | |
8 | return (test_argc >= 1); | |
9 | } | |
10 | ||
11 | DECL_TEST(iperf) { | |
12 | char *cmd; | |
13 | assert(asprintf(&cmd, "iperf -c \"%s\" -n %lld > /dev/null", test_argv[0], length) >= 0); | |
14 | assert(system(cmd) == 0); | |
15 | free(cmd); | |
16 | } |