]> git.saurik.com Git - apple/xnu.git/blame - tools/tests/perf_index/iperf.c
xnu-2422.1.72.tar.gz
[apple/xnu.git] / tools / tests / perf_index / iperf.c
CommitLineData
39236c6e
A
1#include <fcntl.h>
2#include "perf_index.h"
3#include <errno.h>
4
5const stress_test_t iperf_test = {"iperf", &stress_general_init, &iperf, &stress_general_cleanup, &validate_iperf};
6
7DECL_VALIDATE(validate_iperf) {
8 return (test_argc >= 1);
9}
10
11DECL_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}