summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-07-27 04:11:41 +0000
committerngie <ngie@FreeBSD.org>2015-07-27 04:11:41 +0000
commit2907322f74d8092336c9dbacea0260a231755fd3 (patch)
tree07f415d3cdc03a0dfadc7705705915ac3282dcdc /tests
parent1036fbb839071eac9806ebf49b655de276c4f23b (diff)
parenta1823ab55e152ac47502eec09cf01b23ef1e9bb3 (diff)
downloadFreeBSD-src-2907322f74d8092336c9dbacea0260a231755fd3.zip
FreeBSD-src-2907322f74d8092336c9dbacea0260a231755fd3.tar.gz
MFhead @ r285904
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/fifo/fifo_misc.c3
-rwxr-xr-xtests/sys/file/flock_test.sh5
-rwxr-xr-xtests/sys/netinet/fibs_test.sh19
3 files changed, 14 insertions, 13 deletions
diff --git a/tests/sys/fifo/fifo_misc.c b/tests/sys/fifo/fifo_misc.c
index 888547e..2c834b1 100644
--- a/tests/sys/fifo/fifo_misc.c
+++ b/tests/sys/fifo/fifo_misc.c
@@ -30,6 +30,7 @@
#include <sys/types.h>
#include <sys/event.h>
#include <sys/filio.h>
+#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/time.h>
@@ -149,7 +150,7 @@ test_truncate(void)
}
static int
-test_ioctl_setclearflag(int fd, int flag, const char *testname,
+test_ioctl_setclearflag(int fd, unsigned long flag, const char *testname,
const char *fdname, const char *flagname)
{
int i;
diff --git a/tests/sys/file/flock_test.sh b/tests/sys/file/flock_test.sh
index ac3e799..f963cde 100755
--- a/tests/sys/file/flock_test.sh
+++ b/tests/sys/file/flock_test.sh
@@ -32,7 +32,6 @@
# Testcase # 11 is racy; uses an undocumented kernel interface for testing
# locking
-# Testcase # 16 is racy/doesn't handle EINTR properly
last_testcase=16
echo "1..$last_testcase"
@@ -42,10 +41,6 @@ for n in `seq 1 $last_testcase`; do
if [ $n -eq 11 ]; then
todomsg=" # TODO: racy testcase"
- # Test 16 fails:
- # F_SETLKW on locked region by two threads: FAIL ((uintptr_t)res != 0)
- elif [ $n -eq 16 ]; then
- todomsg=" # TODO: racy testcase (doesn't handle EINTR properly)"
fi
$(dirname $0)/flock_helper . $n | grep -q SUCCEED
diff --git a/tests/sys/netinet/fibs_test.sh b/tests/sys/netinet/fibs_test.sh
index 2dc3169..70b53e8 100755
--- a/tests/sys/netinet/fibs_test.sh
+++ b/tests/sys/netinet/fibs_test.sh
@@ -98,9 +98,12 @@ arpresolve_checks_interface_fib_body()
}
arpresolve_checks_interface_fib_cleanup()
{
- for PID in `cat "processes_to_kill"`; do
- kill $PID
- done
+ if [ -f processes_to_kill ]; then
+ for pid in $(cat processes_to_kill); do
+ kill "${pid}"
+ done
+ rm -f processes_to_kill
+ fi
cleanup_tap
}
@@ -476,8 +479,10 @@ setup_tap()
cleanup_tap()
{
- for TAPD in `cat "tap_devices_to_cleanup"`; do
- ifconfig ${TAPD} destroy
- done
- rm "tap_devices_to_cleanup"
+ if [ -f tap_devices_to_cleanup ]; then
+ for tap_device in $(cat tap_devices_to_cleanup); do
+ ifconfig "${tap_device}" destroy
+ done
+ rm -f tap_devices_to_cleanup
+ fi
}
OpenPOWER on IntegriCloud