summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libc/stdio/t_fmemopen.c
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2014-11-01 21:21:06 +0000
committerngie <ngie@FreeBSD.org>2014-11-01 21:21:06 +0000
commit4625d6d956d9dd8bbf4886a5292062445b821a75 (patch)
tree342798f0b512fd551a1971b28803ad9e5edd4989 /contrib/netbsd-tests/lib/libc/stdio/t_fmemopen.c
parent54a2fbab7f097d56e0d0d5835e1f4f1140b16d65 (diff)
downloadFreeBSD-src-4625d6d956d9dd8bbf4886a5292062445b821a75.zip
FreeBSD-src-4625d6d956d9dd8bbf4886a5292062445b821a75.tar.gz
Disable testcases 12 and 15-22 on FreeBSD
Submitted by: pho
Diffstat (limited to 'contrib/netbsd-tests/lib/libc/stdio/t_fmemopen.c')
-rw-r--r--contrib/netbsd-tests/lib/libc/stdio/t_fmemopen.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/contrib/netbsd-tests/lib/libc/stdio/t_fmemopen.c b/contrib/netbsd-tests/lib/libc/stdio/t_fmemopen.c
index 212c7c86..31b76d0 100644
--- a/contrib/netbsd-tests/lib/libc/stdio/t_fmemopen.c
+++ b/contrib/netbsd-tests/lib/libc/stdio/t_fmemopen.c
@@ -27,7 +27,7 @@
*
*/
-#if defined(__NetBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
#include <atf-c.h>
#else
#if defined(__linux__)
@@ -563,6 +563,7 @@ ATF_TC_BODY(test11, tc)
}
}
+#ifndef __FreeBSD__
ATF_TC(test12);
ATF_TC_HEAD(test12, tc)
{
@@ -620,6 +621,7 @@ ATF_TC_BODY(test12, tc)
}
}
}
+#endif
ATF_TC(test13);
ATF_TC_HEAD(test13, tc)
@@ -629,7 +631,9 @@ ATF_TC_HEAD(test13, tc)
ATF_TC_BODY(test13, tc)
{
struct testcase *t;
+#ifndef __FreeBSD__
off_t i;
+#endif
const char **p;
char buf[BUFSIZ];
FILE *fp;
@@ -659,7 +663,9 @@ ATF_TC_BODY(test13, tc)
/* negative + OOB */
ATF_CHECK(fseeko(fp, -1, SEEK_END) == -1);
ATF_CHECK(ftello(fp) == (off_t)0);
+#endif
+#ifndef __FreeBSD__
/* positive */
for (i = 1; i <= t->n; ++i) {
ATF_CHECK(fseeko(fp, i, SEEK_END) == 0);
@@ -711,11 +717,13 @@ ATF_TC_BODY(test14, tc)
ATF_CHECK(fseeko(fp, -(len + 1), SEEK_END) == -1);
ATF_CHECK(ftello(fp) == len);
+#ifndef __FreeBSD__
/* positive */
for (i = 1; i <= rest; ++i) {
ATF_CHECK(fseeko(fp, i, SEEK_END) == 0);
ATF_CHECK(ftello(fp) == len + i);
}
+#endif
/* negative */
for (i = 1; i < len; ++i) {
@@ -734,6 +742,8 @@ const char *mode_rw1[] = {
NULL
};
+#ifndef __FreeBSD__
+
/* test15 - 18:
* When a stream open for writing is flushed or closed, a null byte is written
* at the current position or at the end of the buffer, depending on the size
@@ -1135,6 +1145,7 @@ ATF_TC_BODY(test22, tc)
}
}
}
+#endif
ATF_TP_ADD_TCS(tp)
{
@@ -1150,9 +1161,12 @@ ATF_TP_ADD_TCS(tp)
ATF_TP_ADD_TC(tp, test09);
ATF_TP_ADD_TC(tp, test10);
ATF_TP_ADD_TC(tp, test11);
+#ifndef __FreeBSD__
ATF_TP_ADD_TC(tp, test12);
+#endif
ATF_TP_ADD_TC(tp, test13);
ATF_TP_ADD_TC(tp, test14);
+#ifndef __FreeBSD__
ATF_TP_ADD_TC(tp, test15);
ATF_TP_ADD_TC(tp, test16);
ATF_TP_ADD_TC(tp, test17);
@@ -1161,6 +1175,7 @@ ATF_TP_ADD_TCS(tp)
ATF_TP_ADD_TC(tp, test20);
ATF_TP_ADD_TC(tp, test21);
ATF_TP_ADD_TC(tp, test22);
+#endif
return atf_no_error();
}
OpenPOWER on IntegriCloud