Diff reduce with upstream by taking diff hunks that were contributed back
This commit is contained in:
parent
9f30f6b7c3
commit
2a1440c618
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312149
@ -37,10 +37,6 @@
|
||||
|
||||
#include <atf-c.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
ATF_TC(connect_low_port);
|
||||
ATF_TC_HEAD(connect_low_port, tc)
|
||||
{
|
||||
|
@ -46,10 +46,6 @@ __RCSID("$NetBSD: t_dup.c,v 1.9 2017/01/13 20:31:53 christos Exp $");
|
||||
#include <unistd.h>
|
||||
#include <sysexits.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
static char path[] = "dup";
|
||||
#ifdef __NetBSD__
|
||||
static void check_mode(bool, bool, bool);
|
||||
|
@ -42,10 +42,6 @@ __RCSID("$NetBSD: t_link.c,v 1.3 2017/01/13 20:42:36 christos Exp $");
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
static const char *getpath(void);
|
||||
static char path[] = "link";
|
||||
static const char *pathl;
|
||||
|
@ -37,10 +37,6 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
static const char *path = "listen";
|
||||
|
||||
ATF_TC_WITH_CLEANUP(listen_err);
|
||||
|
@ -47,10 +47,6 @@ __RCSID("$NetBSD: t_msgctl.c,v 1.5 2017/01/13 20:44:45 christos Exp $");
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#define MSG_KEY 12345689
|
||||
#define MSG_MTYPE_1 0x41
|
||||
|
||||
|
@ -48,10 +48,6 @@ __RCSID("$NetBSD: t_msgrcv.c,v 1.4 2017/01/13 20:44:45 christos Exp $");
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#define MSG_KEY 1234
|
||||
#define MSG_MTYPE_1 0x41
|
||||
#define MSG_MTYPE_2 0x42
|
||||
|
@ -48,10 +48,6 @@ __RCSID("$NetBSD: t_msgsnd.c,v 1.3 2017/01/13 20:44:45 christos Exp $");
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#define MSG_KEY 1234
|
||||
#define MSG_MTYPE_1 0x41
|
||||
#define MSG_MTYPE_2 0x42
|
||||
|
@ -65,22 +65,33 @@ msync_sync(const char *garbage, int flags)
|
||||
if (buf == NULL)
|
||||
return NULL;
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
memset(buf, 'x', page);
|
||||
#else
|
||||
for (i = 0; i < (size_t)page; i++)
|
||||
buf[i] = 'x';
|
||||
#endif
|
||||
|
||||
fd = open(path, O_RDWR | O_CREAT, 0700);
|
||||
|
||||
if (fd < 0) {
|
||||
#ifdef __FreeBSD__
|
||||
free(buf);
|
||||
return "failed to open";
|
||||
#else
|
||||
str = "failed to open";
|
||||
goto out;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if __FreeBSD__
|
||||
(void)write(fd, buf, page);
|
||||
#else
|
||||
tot = 0;
|
||||
|
||||
while (tot < page) {
|
||||
|
||||
rv = write(fd, buf, sizeof(buf));
|
||||
|
||||
if (rv < 0) {
|
||||
str = "failed to write";
|
||||
goto out;
|
||||
@ -88,6 +99,7 @@ msync_sync(const char *garbage, int flags)
|
||||
|
||||
tot += rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
map = mmap(NULL, page, PROT_READ | PROT_WRITE, MAP_FILE|MAP_PRIVATE,
|
||||
fd, 0);
|
||||
|
@ -41,11 +41,6 @@ __RCSID("$NetBSD: t_sigqueue.c,v 1.7 2017/01/13 20:44:10 christos Exp $");
|
||||
#include <sched.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <err.h>
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
static void handler(int, siginfo_t *, void *);
|
||||
|
||||
#define VALUE (int)0xc001dad1
|
||||
@ -212,7 +207,6 @@ ATF_TC_BODY(sigqueue_rt, tc)
|
||||
if (sigaddset(&mask, signals[i]) == -1)
|
||||
warn("sigaddset");
|
||||
|
||||
|
||||
ATF_REQUIRE(sigprocmask(SIG_BLOCK, &mask, &orig) != -1);
|
||||
|
||||
for (size_t i = 0; i < CNT; i++)
|
||||
@ -222,7 +216,6 @@ ATF_TC_BODY(sigqueue_rt, tc)
|
||||
sleep(1);
|
||||
ATF_CHECK_MSG((size_t)count == ndelivered,
|
||||
"count %zu != ndelivered %zu", (size_t)count, ndelivered);
|
||||
|
||||
for (size_t i = 0; i < ndelivered; i++)
|
||||
ATF_REQUIRE_MSG(ordered[i] == delivered[i],
|
||||
"%zu: ordered %d != delivered %d",
|
||||
|
@ -48,10 +48,6 @@ __RCSID("$NetBSD: t_stat.c,v 1.5 2017/01/13 20:06:50 christos Exp $");
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
static const char *path = "stat";
|
||||
|
||||
ATF_TC_WITH_CLEANUP(stat_chflags);
|
||||
@ -400,9 +396,6 @@ ATF_TC_BODY(stat_symlink, tc)
|
||||
(void)close(fd);
|
||||
ATF_REQUIRE(unlink(path) == 0);
|
||||
ATF_REQUIRE(unlink(pathlink) == 0);
|
||||
#ifdef __FreeBSD__
|
||||
(void)close(fd);
|
||||
#endif
|
||||
}
|
||||
|
||||
ATF_TC_CLEANUP(stat_symlink, tc)
|
||||
|
@ -41,10 +41,6 @@ __RCSID("$NetBSD: t_truncate.c,v 1.3 2017/01/13 20:03:51 christos Exp $");
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
static const char path[] = "truncate";
|
||||
static const size_t sizes[] = { 8, 16, 512, 1024, 2048, 4094, 3000, 30 };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user