svn commit: r273942 - head/contrib/netbsd-tests/lib/libc/gen

Garrett Cooper ngie at FreeBSD.org
Sat Nov 1 20:33:43 UTC 2014


Author: ngie
Date: Sat Nov  1 20:33:42 2014
New Revision: 273942
URL: https://svnweb.freebsd.org/changeset/base/273942

Log:
  Skip :sethostname_basic because it messes up the test host's hostname
  
  Convert code from #if defined(__FreeBSD__) to #ifdef __FreeBSD__

Modified:
  head/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c	Sat Nov  1 20:07:32 2014	(r273941)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c	Sat Nov  1 20:33:42 2014	(r273942)
@@ -59,11 +59,13 @@ ATF_TC_BODY(sethostname_basic, tc)
 	char name[MAXHOSTNAMELEN];
 	size_t i;
 
+	atf_tc_skip("screws up the test host's hostname on FreeBSD");
+
 	for (i = 0; i < __arraycount(hosts); i++) {
 
 		(void)memset(name, 0, sizeof(name));
 
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 		/* 
 		 * Sanity checks to ensure that the wrong invariant isn't being
 		 * tested for per PR # 181127
@@ -106,7 +108,7 @@ ATF_TC_BODY(sethostname_limit, tc)
 
 ATF_TC_CLEANUP(sethostname_limit, tc)
 {
-#if defined(__FreeBSD__)
+#ifdef __FreeBSD__
 	ATF_REQUIRE(sethostname(host, MAXHOSTNAMELEN - 1 ) == 0);
 	ATF_REQUIRE(sethostname(host, MAXHOSTNAMELEN) == -1);
 #endif


More information about the svn-src-all mailing list