summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libc
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2014-11-03 21:21:08 +0000
committerngie <ngie@FreeBSD.org>2014-11-03 21:21:08 +0000
commitd1031afa9a48dbe4073049e6cbe91936a2204ba0 (patch)
tree09accb4bc64b3c729bad85f944406e324f066d7e /contrib/netbsd-tests/lib/libc
parent0f07da924ef52c311e695b2dcd2b82fdbd330bb3 (diff)
downloadFreeBSD-src-d1031afa9a48dbe4073049e6cbe91936a2204ba0.zip
FreeBSD-src-d1031afa9a48dbe4073049e6cbe91936a2204ba0.tar.gz
Port t_db.sh to FreeBSD
- The blocksize on FreeBSD is 32kB, not 64kB - Add some detection for MK_DICT == no; /nonexistent is echoed along with atf_skip to ensure that the test will fail if dict(..) is called in the non-final stage of the pipeline Submitted by: pho
Diffstat (limited to 'contrib/netbsd-tests/lib/libc')
-rwxr-xr-xcontrib/netbsd-tests/lib/libc/db/t_db.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libc/db/t_db.sh b/contrib/netbsd-tests/lib/libc/db/t_db.sh
index 52244e3..d256508 100755
--- a/contrib/netbsd-tests/lib/libc/db/t_db.sh
+++ b/contrib/netbsd-tests/lib/libc/db/t_db.sh
@@ -41,6 +41,18 @@ dict()
fi
}
+# Begin FreeBSD
+dict()
+{
+ if [ -f /usr/share/dict/words ]; then
+ echo /usr/share/dict/words
+ else
+ echo /nonexistent
+ atf_skip "Test requires dict/words"
+ fi
+}
+# End FreeBSD
+
SEVEN_SEVEN="abcdefg|abcdefg|abcdefg|abcdefg|abcdefg|abcdefg|abcdefg"
atf_test_case small_btree
@@ -887,7 +899,15 @@ r
k1234
EOF
+ # Begin FreeBSD
+ if true; then
+ atf_check "$(prog)" -i bsize=32768 hash in
+ else
+ # End FreeBSD
atf_check "$(prog)" -i bsize=65536 hash in
+ # Begin FreeBSD
+ fi
+ # End FreeBSD
}
atf_init_test_cases()
OpenPOWER on IntegriCloud