Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/kernel Fix a mistake in a test for KERN_PROC_CWD
details: https://anonhg.NetBSD.org/src/rev/e05d46a46b0e
branches: trunk
changeset: 999442:e05d46a46b0e
user: kamil <kamil%NetBSD.org@localhost>
date: Sat Jun 01 22:18:23 2019 +0000
description:
Fix a mistake in a test for KERN_PROC_CWD
Emit properly ENOENT scenario in chroot. For some reason the final patch
did not hit the tree.
diffstat:
tests/kernel/t_proccwd.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 04913a0147a5 -r e05d46a46b0e tests/kernel/t_proccwd.c
--- a/tests/kernel/t_proccwd.c Sat Jun 01 21:42:02 2019 +0000
+++ b/tests/kernel/t_proccwd.c Sat Jun 01 22:18:23 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_proccwd.c,v 1.1 2019/06/01 19:49:02 kamil Exp $ */
+/* $NetBSD: t_proccwd.c,v 1.2 2019/06/01 22:18:23 kamil Exp $ */
/*-
* Copyright (c) 2019 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2019\
The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_proccwd.c,v 1.1 2019/06/01 19:49:02 kamil Exp $");
+__RCSID("$NetBSD: t_proccwd.c,v 1.2 2019/06/01 22:18:23 kamil Exp $");
#include <sys/types.h>
#include <sys/stat.h>
@@ -84,7 +84,7 @@
ATF_REQUIRE_EQ(strlen(buf) + 1, prompted_len);
ATF_REQUIRE(strlen(buf) > 0);
- if (t[i] == -1 || t[i] == getpid() || t[i] == getppid()) {
+ if (t[i] == -1 || t[i] == getpid()) {
getcwd(cwdbuf, MAXPATHLEN);
ATF_REQUIRE_EQ(strcmp(buf, cwdbuf), 0);
ATF_REQUIRE(strlen(buf) > strlen("/"));
@@ -133,7 +133,7 @@
ASSERT(chroot(buf) == 0);
errno = 0;
- rv = getproccwd(NULL, &len, pid_one);
+ rv = getproccwd(buf, &len, pid_one);
ASSERT(rv == -1);
ASSERT(errno == ENOENT);
Home |
Main Index |
Thread Index |
Old Index