Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/net/in_cksum Invoke the helper program from the test i...
details: https://anonhg.NetBSD.org/src/rev/d08a24a2f97b
branches: trunk
changeset: 805568:d08a24a2f97b
user: martin <martin%NetBSD.org@localhost>
date: Tue Jan 06 15:13:16 2015 +0000
description:
Invoke the helper program from the test installation directory (instead
of the current/temporary).
Properly register failure.
diffstat:
tests/net/in_cksum/t_in_cksum.sh | 38 ++++++++++++++++++++++++--------------
1 files changed, 24 insertions(+), 14 deletions(-)
diffs (56 lines):
diff -r cea2f263cbdf -r d08a24a2f97b tests/net/in_cksum/t_in_cksum.sh
--- a/tests/net/in_cksum/t_in_cksum.sh Tue Jan 06 13:54:18 2015 +0000
+++ b/tests/net/in_cksum/t_in_cksum.sh Tue Jan 06 15:13:16 2015 +0000
@@ -1,28 +1,38 @@
#! /usr/bin/atf-sh
-# $NetBSD: t_in_cksum.sh,v 1.1 2015/01/05 22:38:36 christos Exp $
+# $NetBSD: t_in_cksum.sh,v 1.2 2015/01/06 15:13:16 martin Exp $
#
TIMING_LOOPS=10000
+incksum="$(atf_get_srcdir)/in_cksum"
+
+fail() {
+ atf_fail "see output for details"
+}
mbufs() {
- ./in_cksum -l 16 -u $0 -i ${TIMING_LOOPS} \
- 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
- ./in_cksum -l 16 -u $0 -i ${TIMING_LOOPS} \
+ ${incksum} -l 16 -u $0 -i ${TIMING_LOOPS} \
+ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 \
+ || fail
+ ${incksum} -l 16 -u $0 -i ${TIMING_LOOPS} \
+ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- ./in_cksum -l 64 -u $0 -i ${TIMING_LOOPS} \
+ || fail
+ ${incksum} -l 64 -u $0 -i ${TIMING_LOOPS} \
+ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- ./in_cksum -l 16 -u $0 -i ${TIMING_LOOPS} \
- 1 3 1 3 1 3 1
+ || fail
+ ${incksum} -l 16 -u $0 -i ${TIMING_LOOPS} \
+ 1 3 1 3 1 3 1 \
+ || fail
}
sizes() {
- ./in_cksum -l 16 -u $1 -i ${TIMING_LOOPS} 2048
- ./in_cksum -l 16 -u $1 -i ${TIMING_LOOPS} 40
- ./in_cksum -l 16 -u $1 -i ${TIMING_LOOPS} 1536
- ./in_cksum -l 16 -u $1 -i ${TIMING_LOOPS} 576
- ./in_cksum -l 16 -u $1 -i ${TIMING_LOOPS} 1536 1536 1536 1536 1536 640
+ ${incksum} -l 16 -u $1 -i ${TIMING_LOOPS} 2048 || fail
+ ${incksum} -l 16 -u $1 -i ${TIMING_LOOPS} 40 || fail
+ ${incksum} -l 16 -u $1 -i ${TIMING_LOOPS} 1536 || fail
+ ${incksum} -l 16 -u $1 -i ${TIMING_LOOPS} 576 || fail
+ ${incksum} -l 16 -u $1 -i ${TIMING_LOOPS} 1536 1536 1536 1536 1536 640 \
+ || fail
}
atf_test_case mbufs_aligned
Home |
Main Index |
Thread Index |
Old Index