Module Name: src
Committed By: christos
Date: Fri Feb 16 16:30:20 UTC 2018
Modified Files:
src/tests/net/net: t_tcp.c t_unix.c
Log Message:
explain what's going on before we fix it.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/net/net/t_tcp.c
cvs rdiff -u -r1.13 -r1.14 src/tests/net/net/t_unix.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/net/net/t_tcp.c
diff -u src/tests/net/net/t_tcp.c:1.7 src/tests/net/net/t_tcp.c:1.8
--- src/tests/net/net/t_tcp.c:1.7 Fri Feb 16 11:23:15 2018
+++ src/tests/net/net/t_tcp.c Fri Feb 16 11:30:20 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: t_tcp.c,v 1.7 2018/02/16 16:23:15 christos Exp $ */
+/* $NetBSD: t_tcp.c,v 1.8 2018/02/16 16:30:20 christos Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#ifdef __RCSID
-__RCSID("$Id: t_tcp.c,v 1.7 2018/02/16 16:23:15 christos Exp $");
+__RCSID("$Id: t_tcp.c,v 1.8 2018/02/16 16:30:20 christos Exp $");
#endif
/* Example code. Should block; does with accept not paccept. */
@@ -182,12 +182,13 @@ again:
FAIL("fnctl setfl");
#endif
+ /* This is supposed to only work on Unix sockets but returns garbage */
if (getpeereid(clnt, &euid, &egid) == -1)
FAIL("getpeereid(clnt)");
CHECK_EQUAL(euid, geteuid(), "client");
CHECK_EQUAL(egid, getegid(), "client");
- /* This is not symmetric? */
+ /* This is supposed to only work on Unix sockets but returns garbage */
if (getpeereid(srvr, &euid, &egid) == -1)
FAIL("getpeereid(srvr)");
CHECK_EQUAL(euid, geteuid(), "server");
Index: src/tests/net/net/t_unix.c
diff -u src/tests/net/net/t_unix.c:1.13 src/tests/net/net/t_unix.c:1.14
--- src/tests/net/net/t_unix.c:1.13 Fri Feb 16 11:23:15 2018
+++ src/tests/net/net/t_unix.c Fri Feb 16 11:30:20 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: t_unix.c,v 1.13 2018/02/16 16:23:15 christos Exp $ */
+/* $NetBSD: t_unix.c,v 1.14 2018/02/16 16:30:20 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifdef __RCSID
-__RCSID("$Id: t_unix.c,v 1.13 2018/02/16 16:23:15 christos Exp $");
+__RCSID("$Id: t_unix.c,v 1.14 2018/02/16 16:30:20 christos Exp $");
#else
#define getprogname() argv[0]
#endif
@@ -183,7 +183,7 @@ test(bool closeit, size_t len)
CHECK_EQUAL(egid, getegid(), "client");
#if 0
- /* This is not symmetric? */
+ /* This is not symmetric? It is supposed to work! */
if (getpeereid(srvr, &euid, &egid) == -1)
FAIL("getpeereid(srvr)");
CHECK_EQUAL(euid, geteuid(), "server");