diff options
author | ngie <ngie@FreeBSD.org> | 2014-11-01 20:33:42 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2014-11-01 20:33:42 +0000 |
commit | 872d5cc719423a7fa0ede6e52339a7d0f5544d44 (patch) | |
tree | 85e788eea4eae75178da4228a19d0e265969743c /contrib/netbsd-tests/lib/libc | |
parent | 2c6c4f12006690dc9de073adba5ae6c7e961bfdb (diff) | |
download | FreeBSD-src-872d5cc719423a7fa0ede6e52339a7d0f5544d44.zip FreeBSD-src-872d5cc719423a7fa0ede6e52339a7d0f5544d44.tar.gz |
Skip :sethostname_basic because it messes up the test host's hostname
Convert code from #if defined(__FreeBSD__) to #ifdef __FreeBSD__
Diffstat (limited to 'contrib/netbsd-tests/lib/libc')
-rw-r--r-- | contrib/netbsd-tests/lib/libc/gen/t_sethostname.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c b/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c index 9c5abac..1972f7d 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c @@ -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 |