-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packetblaster: Added simple selftest.sh
This is a really simple test case that runs packetblaster on $INTEL_TEST_INTEL10G_PCIDEVA (if defined) and just makes sure that it runs for at least 5 seconds i.e. doesn't die on startup.
- Loading branch information
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
echo "selftest: packetblaster" | ||
if [ -z "${SNABB_TEST_INTEL10G_PCIDEVA}" ]; then | ||
echo "selftest: skipping test - SNABB_TEST_INTEL10G_PCIDEVA undefined" | ||
exit 43 | ||
fi | ||
|
||
# Simple test: Just make sure packetblaster runs for a period of time | ||
# (doesn't crash on startup). | ||
timeout 5 ./snabb packetblaster replay program/packetblaster/selftest.pcap \ | ||
${SNABB_TEST_INTEL10G_PCIDEVA} | ||
status=$? | ||
if [ $status != 124 ]; then | ||
echo "Error: expected timeout (124) but got ${status}" | ||
exit 1 | ||
fi | ||
|
||
echo "selftest: ok" |