Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Feb 2017 02:41:33 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r313510 - stable/10/contrib/netbsd-tests/lib/libc/db
Message-ID:  <201702100241.v1A2fXpJ004456@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Fri Feb 10 02:41:33 2017
New Revision: 313510
URL: https://svnweb.freebsd.org/changeset/base/313510

Log:
  MFC r301753:
  
  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.

Modified:
  stable/10/contrib/netbsd-tests/lib/libc/db/t_db.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/netbsd-tests/lib/libc/db/t_db.sh
==============================================================================
--- stable/10/contrib/netbsd-tests/lib/libc/db/t_db.sh	Fri Feb 10 02:37:42 2017	(r313509)
+++ stable/10/contrib/netbsd-tests/lib/libc/db/t_db.sh	Fri Feb 10 02:41:33 2017	(r313510)
@@ -42,6 +42,7 @@ dict()
 	elif [ -f /usr/dict/words ]; then
 		echo /usr/dict/words
 	else
+		echo ""
 		atf_fail "no dictionary found"
 	fi
 }
@@ -49,12 +50,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
 
@@ -67,6 +63,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()
 {
@@ -93,6 +92,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()
 {
@@ -119,6 +121,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()
 {
@@ -143,6 +148,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()
 {
@@ -171,6 +179,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()
 {
@@ -736,6 +747,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()
 {
@@ -789,6 +803,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()
 {
@@ -821,6 +838,9 @@ bsize_ffactor_head()
 	atf_set "timeout" "1800"
 	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()
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702100241.v1A2fXpJ004456>