Remove building with NOCRYPTO option
[minix.git] / tests / net / in_cksum / t_in_cksum.sh
bloba3424037669252683755f9055827da3c07c0b971
1 #! /usr/bin/atf-sh
2 # $NetBSD: t_in_cksum.sh,v 1.2 2015/01/06 15:13:16 martin Exp $
5 TIMING_LOOPS=10000
6 incksum="$(atf_get_srcdir)/in_cksum"
8 fail() {
9 atf_fail "see output for details"
12 mbufs() {
13 ${incksum} -l 16 -u $0 -i ${TIMING_LOOPS} \
14 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 \
15 || fail
16 ${incksum} -l 16 -u $0 -i ${TIMING_LOOPS} \
17 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \
18 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \
19 || fail
20 ${incksum} -l 64 -u $0 -i ${TIMING_LOOPS} \
21 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \
22 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \
23 || fail
24 ${incksum} -l 16 -u $0 -i ${TIMING_LOOPS} \
25 1 3 1 3 1 3 1 \
26 || fail
29 sizes() {
30 ${incksum} -l 16 -u $1 -i ${TIMING_LOOPS} 2048 || fail
31 ${incksum} -l 16 -u $1 -i ${TIMING_LOOPS} 40 || fail
32 ${incksum} -l 16 -u $1 -i ${TIMING_LOOPS} 1536 || fail
33 ${incksum} -l 16 -u $1 -i ${TIMING_LOOPS} 576 || fail
34 ${incksum} -l 16 -u $1 -i ${TIMING_LOOPS} 1536 1536 1536 1536 1536 640 \
35 || fail
38 atf_test_case mbufs_aligned
40 mbufs_aligned_head() {
41 atf_set "descr" "Test in_cksum mbuf chains aligned"
44 mbufs_aligned_body() {
45 mbufs 0
48 mbufs_unaligned_head() {
49 atf_set "descr" "Test in_cksum mbuf chains unaligned"
52 mbufs_unaligned_body() {
53 mbufs 1
56 sizes_aligned_head() {
57 atf_set "descr" "Test in_cksum sizes aligned"
60 sizes_aligned_body() {
61 sizes 0
64 sizes_unaligned_head() {
65 atf_set "descr" "Test in_cksum sizes unaligned"
68 sizes_unaligned_body() {
69 sizes 1
72 atf_init_test_cases()
74 atf_add_test_case mbufs_aligned
75 atf_add_test_case mbufs_unaligned
76 atf_add_test_case sizes_aligned
77 atf_add_test_case sizes_unaligned