diff options
author | bluhm <> | 2020-11-09 23:18:51 +0000 |
---|---|---|
committer | bluhm <> | 2020-11-09 23:18:51 +0000 |
commit | c369d42df84f5bdabcac9041e6c5680a0cbfeaf9 (patch) | |
tree | 2233f16128b2705882f46a8369c9f9f47f40af5c /src/regress/lib/libc/sys/t_fsync.c | |
parent | 999ec352efbeb24cccd1d584b91a659b15764151 (diff) | |
download | openbsd-c369d42df84f5bdabcac9041e6c5680a0cbfeaf9.tar.gz openbsd-c369d42df84f5bdabcac9041e6c5680a0cbfeaf9.tar.bz2 openbsd-c369d42df84f5bdabcac9041e6c5680a0cbfeaf9.zip |
Sync libc syscall tests with changes in upstream NetBSD. Use #ifdef
to document differences to NetBSD behaviour, this helps to track
upstream. Mark currently failing test as expected failures. So
test programs get compiled and executed, but it shows that further
investigation is necceassry.
Diffstat (limited to 'src/regress/lib/libc/sys/t_fsync.c')
-rw-r--r-- | src/regress/lib/libc/sys/t_fsync.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/regress/lib/libc/sys/t_fsync.c b/src/regress/lib/libc/sys/t_fsync.c index c6f24c0e85..bc3cd7939b 100644 --- a/src/regress/lib/libc/sys/t_fsync.c +++ b/src/regress/lib/libc/sys/t_fsync.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: t_fsync.c,v 1.1.1.1 2019/11/19 19:57:03 bluhm Exp $ */ | 1 | /* $OpenBSD: t_fsync.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */ |
2 | /* $NetBSD: t_fsync.c,v 1.2 2012/03/18 07:00:52 jruoho Exp $ */ | 2 | /* $NetBSD: t_fsync.c,v 1.2 2012/03/18 07:00:52 jruoho Exp $ */ |
3 | 3 | ||
4 | /*- | 4 | /*- |
@@ -103,8 +103,11 @@ ATF_TC_BODY(fsync_sync, tc) | |||
103 | 103 | ||
104 | (void)snprintf(buf, sizeof(buf), "t_fsync-%d", i); | 104 | (void)snprintf(buf, sizeof(buf), "t_fsync-%d", i); |
105 | 105 | ||
106 | /* Adjusted for OpenBSD, initially mkstemp(buf) */ | 106 | #ifdef __OpenBSD__ |
107 | fd = open(buf, O_CREAT|O_EXCL|O_RDWR, 0600); | 107 | fd = open(buf, O_CREAT|O_EXCL|O_RDWR, 0600); |
108 | #else | ||
109 | fd = mkstemp(buf); | ||
110 | #endif | ||
108 | 111 | ||
109 | ATF_REQUIRE(fd != -1); | 112 | ATF_REQUIRE(fd != -1); |
110 | ATF_REQUIRE(write(fd, "0", 1) == 1); | 113 | ATF_REQUIRE(write(fd, "0", 1) == 1); |