Author: ngie Date: Thu Jun 9 19:12:51 2016 New Revision: 301753 URL: https://svnweb.freebsd.org/changeset/base/301753
Log: Fix up r274061 Detect /usr/share/dict/words the "right way" by using require.files instead of the hacked up attempt in the dict(..) function, which didn't work properly on systems where MK_DICT == no. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/db/t_db.sh Modified: head/contrib/netbsd-tests/lib/libc/db/t_db.sh ============================================================================== --- head/contrib/netbsd-tests/lib/libc/db/t_db.sh Thu Jun 9 18:35:37 2016 (r301752) +++ head/contrib/netbsd-tests/lib/libc/db/t_db.sh Thu Jun 9 19:12:51 2016 (r301753) @@ -37,6 +37,7 @@ dict() elif [ -f /usr/dict/words ]; then echo /usr/dict/words else + echo "" atf_fail "no dictionary found" fi } @@ -44,12 +45,7 @@ dict() # 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 + echo /usr/share/dict/words } # End FreeBSD @@ -62,6 +58,9 @@ small_btree_head() "Checks btree database using small keys and small data" \ "pairs: takes the first hundred entries in the dictionary," \ "and makes them be key/data pairs." + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } small_btree_body() { @@ -88,6 +87,9 @@ small_hash_head() "Checks hash database using small keys and small data" \ "pairs: takes the first hundred entries in the dictionary," \ "and makes them be key/data pairs." + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } small_hash_body() { @@ -114,6 +116,9 @@ small_recno_head() "Checks recno database using small keys and small data" \ "pairs: takes the first hundred entries in the dictionary," \ "and makes them be key/data pairs." + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } small_recno_body() { @@ -138,6 +143,9 @@ medium_btree_head() "Checks btree database using small keys and medium" \ "data pairs: takes the first 200 entries in the" \ "dictionary, and gives them each a medium size data entry." + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } medium_btree_body() { @@ -166,6 +174,9 @@ medium_hash_head() "Checks hash database using small keys and medium" \ "data pairs: takes the first 200 entries in the" \ "dictionary, and gives them each a medium size data entry." + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } medium_hash_body() { @@ -731,6 +742,9 @@ small_page_btree_head() "reverses them, and gives them each a small size data" \ "entry. Uses a small page size to make sure the btree" \ "split code gets hammered." + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } small_page_btree_body() { @@ -784,6 +798,9 @@ atf_test_case byte_orders_btree byte_orders_btree_head() { atf_set "descr" "Checks btree database using differing byte orders" + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } byte_orders_btree_body() { @@ -816,6 +833,9 @@ bsize_ffactor_head() atf_set "timeout" "480" atf_set "descr" "Checks hash database with various" \ "bucketsizes and fill factors" + # Begin FreeBSD + atf_set "require.files" /usr/share/dict/words + # End FreeBSD } bsize_ffactor_body() { _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"