diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2016-10-09 09:17:20 +0100 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2016-10-09 09:17:38 +0100 |
commit | 9ceea7f92e6d38f80c7a01b7ee1168a3fcdd633a (patch) | |
tree | c31bd287c5206e25222afe8c478466a0cf310abf | |
parent | abcaa651ac3af9e57896e2751b164509246dc3fd (diff) |
Add ping test
Test that ping utility works
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rw-r--r-- | tests/ping.c | 12 |
3 files changed, 16 insertions, 0 deletions
@@ -22,4 +22,5 @@ ar-lib tests/libtest.a tests/delay tests/bandwidth +tests/ping .*.swp diff --git a/tests/Makefile.am b/tests/Makefile.am index 4e09dcf..c73f309 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -20,3 +20,6 @@ delay_SOURCES = delay.c TESTS += bandwidth bandwidth_SOURCES = bandwidth.c bandwidth_LDFLAGS = -pthread + +TESTS += ping +ping_SOURCES = ping.c diff --git a/tests/ping.c b/tests/ping.c new file mode 100644 index 0000000..95831fc --- /dev/null +++ b/tests/ping.c @@ -0,0 +1,12 @@ +/* check that ping is working */ +#include "common.h" + +int main(void) +{ + printf("Testing ping is working\n"); + + launch_latency("10 100M"); + assert(system("ping -c1 192.168.127.1") == 0); + kill_latency(); + return 0; +} |