Date: Mon, 15 Aug 2016 19:05:41 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304175 - head/contrib/netbsd-tests/lib/libc/gen Message-ID: <201608151905.u7FJ5fch091782@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Mon Aug 15 19:05:41 2016 New Revision: 304175 URL: https://svnweb.freebsd.org/changeset/base/304175 Log: Disable tests for non-standard behaviour of dirname(3)/basename(3). The NetBSD ATF tests explicitly check that these functions do not modify their input. These tests are NetBSD-specific. They test for something that is not part of POSIX. PR: 211873 Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D7506 Modified: head/contrib/netbsd-tests/lib/libc/gen/t_basedirname.c Modified: head/contrib/netbsd-tests/lib/libc/gen/t_basedirname.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/gen/t_basedirname.c Mon Aug 15 18:55:33 2016 (r304174) +++ head/contrib/netbsd-tests/lib/libc/gen/t_basedirname.c Mon Aug 15 19:05:41 2016 (r304175) @@ -111,6 +111,7 @@ ATF_TC_BODY(basename_posix, tc) } else base = basename(NULL); +#ifdef __NetBSD__ /* * basename(3) is allowed to modify the input buffer. * However, that is considered hostile by some programs, @@ -127,6 +128,7 @@ ATF_TC_BODY(basename_posix, tc) test_basename_table[i].input); atf_tc_fail("Input buffer was modified."); } +#endif /* Make sure the result is correct. */ if (strcmp(test_basename_table[i].output, base) != 0) { @@ -162,6 +164,7 @@ ATF_TC_BODY(dirname_posix, tc) } else base = dirname(NULL); +#ifdef __NetBSD__ /* * dirname(3) is allowed to modify the input buffer. * However, that is considered hostile by some programs, @@ -178,6 +181,7 @@ ATF_TC_BODY(dirname_posix, tc) test_dirname_table[i].input); atf_tc_fail("Input buffer was modified."); } +#endif /* Make sure the result is correct. */ if (strcmp(test_dirname_table[i].output, base) != 0) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608151905.u7FJ5fch091782>