svn commit: r318211 - head/contrib/netbsd-tests/lib/libc/ssp

Ngie Cooper ngie at FreeBSD.org
Fri May 12 05:17:51 UTC 2017


Author: ngie
Date: Fri May 12 05:17:49 2017
New Revision: 318211
URL: https://svnweb.freebsd.org/changeset/base/318211

Log:
  Fix up previous commit
  
  - Apply the logic to the FreeBSD block
  - Fix a typo with the getconf(1) call that I would have caught, were
    it not for the fact that I got the blocks wrong.
  - Consolidate the hardcoded buffer sizes to the NetBSD block.
  
  This would have been discovered had I run the test on a system where
  PATH_MAX != 1024 (I don't have that at my disposal right at this moment).
  
  MFC after:	3 weeks
  MFC with:	r318210
  Sponsored by:	Dell EMC Isilon

Modified:
  head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh

Modified: head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh	Fri May 12 05:06:48 2017	(r318210)
+++ head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh	Fri May 12 05:17:49 2017	(r318211)
@@ -386,14 +386,15 @@ read_body()
 {
 	prog="$(atf_get_srcdir)/h_read"
 
-	h_pass "$prog 1024" "echo foo |"
 	# Begin FreeBSD
 	if true; then
-		h_fail "$prog 1027" "echo bar |"
+	MAX_PATH=$(getconf _XOPEN_PATH_MAX) || atf_fail "getconf failed"
+	h_pass "$prog $MAX_PATH" "echo foo |"
+	h_fail "$prog $(( $MAX_PATH + 3 ))" "echo bar |"
 	else
 	# End FreeBSD
-	MAX_PATH=$(getconf _XOPEN_MAX_PATH) || atf_fail "getconf failed"
-	h_fail "$prog $(( $MAX_PATH + 1))" "echo bar |"
+	h_pass "$prog 1024" "echo foo |"
+	h_fail "$prog 1025" "echo bar |"
 	# Begin FreeBSD
 	fi
 	# End FreeBSD


More information about the svn-src-head mailing list