Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)

- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
This commit is contained in:
2013-12-06 12:04:52 +01:00
parent ff10274392
commit 84d9c625bf
4655 changed files with 379317 additions and 151059 deletions

View File

@@ -74,6 +74,10 @@ PROGS+= t10a t11a t11b t40a t40b t40c t40d t40e t40f t40g t60a t60b \
SCRIPTS+= run testinterp.sh testsh1.sh testsh2.sh testmfs.sh testisofs.sh testvnd.sh
# test57loop.S is not linked into the .bcl file.
# This way, we can link it in when linking the final binary
LDADD.test57+= ${${USE_BITCODE:Uno} != "no":? test57loop.o -Wl,-allow-multiple-definition:}
.if ${MKPIC} == "yes"
# Build them as dynamic executables by default if shared libraries
# are available; so that the building and executing of dynamic
@@ -94,10 +98,6 @@ mod.o: mod.c
common.o: common.c
${COMPILE.c} -fPIC ${.IMPSRC}
# test57loop.S is not linked into the .bcl file.
# This way, we can link it in when linking the final binary
LDADD.test57+= ${${USE_BITCODE:Uno} != "no":? test57loop.o -Wl,-allow-multiple-definition:}
# Add test that must be linked dynamically, and its dynamically loaded
# module
PROGS+= test63 mod

View File

@@ -1,4 +1,4 @@
# Copied from drivers/Makefile.inc, and slightly edited.
LDADD+= -lminlib -lcompat_minix -lc
DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX}
DPADD+= ${LIBMINLIB} ${LIBCOMPAT_MINIX} ${LIBC}
BINDIR?=/usr/sbin

View File

@@ -335,8 +335,8 @@ static struct
{ "32768", 32768, 1, 0, 0 },
{ "65535", 65535, 1, 0, 0 },
{ "echo", 7, 0, 0, 0 },
{ "ftp", 21, 0, SOCK_STREAM, 0 },
{ "tftp", 69, 0, SOCK_DGRAM , 0 },
{ "ftp", 21, 0, 0, 0 },
{ "tftp", 69, 0, 0, 0 },
{ "-1", 0, 1, 0, (1<<EAI_NONAME) | (1<<EAI_SERVICE) },
{ "", 0, 1, 0, (1<<EAI_NONAME) | (1<<EAI_SERVICE) },
{ "65537", 0, 1, 0, (1 << EAI_SERVICE) },
@@ -473,6 +473,8 @@ static struct
const char *servnum;
unsigned short port;
int socktype;
struct servent *se_tcp; /* getservbyport() s_name on this port with "tcp" */
struct servent *se_udp; /* getservbyport() s_name on this port with "udp" */
} ports[] = {
{ "0", "0", 0, 0 },
{ "tcpmux", "1", 1, SOCK_STREAM },
@@ -491,6 +493,33 @@ static void test_getnameinfo_all(void)
int exp_results, flags, i, j, k, l, socktypemismatch;
const char *nodename, *servname;
/* set ports servent structs */
for (j = 0; j < LENGTH(ports); j++) {
struct servent *se_tcp, *se_udp;
se_tcp = getservbyport(htons(ports[j].port), "tcp");
ports[j].se_tcp = se_tcp;
if(ports[j].se_tcp) {
ports[j].se_tcp = malloc(sizeof(struct servent));
memcpy(ports[j].se_tcp, se_tcp, sizeof(*se_tcp));
assert(ports[j].se_tcp->s_name);
ports[j].se_tcp->s_name = strdup(ports[j].se_tcp->s_name);
assert(ports[j].se_tcp->s_name);
}
se_udp = getservbyport(htons(ports[j].port), "udp");
ports[j].se_udp = se_udp;
if(ports[j].se_udp) {
ports[j].se_udp = malloc(sizeof(struct servent));
memcpy(ports[j].se_udp, se_udp, sizeof(*se_udp));
assert(ports[j].se_udp->s_name);
ports[j].se_udp->s_name = strdup(ports[j].se_udp->s_name);
assert(ports[j].se_udp->s_name);
}
}
/* loop through various parameter values */
for (i = 0; i < LENGTH(ipaddrs); i++)
for (j = 0; j < LENGTH(ports); j++)
@@ -517,8 +546,12 @@ static void test_getnameinfo_all(void)
socktypemismatch =
(flag_DGRAM && ports[j].socktype == SOCK_STREAM) ||
(!flag_DGRAM && ports[j].socktype == SOCK_DGRAM);
servname = (flag_NUMERICSERV || socktypemismatch) ?
ports[j].servnum : ports[j].servname;
struct servent *se = flag_DGRAM ? ports[j].se_udp : ports[j].se_tcp;
servname = (flag_NUMERICSERV) ?
ports[j].servnum : (se ? se->s_name : ports[j].servname);
if (buflens[l] > 0 && buflens[l] <= strlen(servname))
exp_results |= (1 << EAI_OVERFLOW) | (1 << EAI_MEMORY);

View File

@@ -4,6 +4,7 @@
*/
#include <sys/types.h>
#include <machine/param.h>
#include <machine/vmparam.h>
#define MAXBLOCKS 1500000

View File

@@ -28,7 +28,7 @@ else echo "Can't find a compiler, skipping test"
exit 0
fi
ARCH=`arch`
ARCH=`uname -p`
echo -n "Shell test 2 "
rm -rf $TESTDIR