Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/sys When the t_mmap:mmap_err test fails due t...



details:   https://anonhg.NetBSD.org/src/rev/a27794eebbae
branches:  trunk
changeset: 364670:a27794eebbae
user:      gson <gson%NetBSD.org@localhost>
date:      Tue Apr 05 13:09:54 2022 +0000

description:
When the t_mmap:mmap_err test fails due to errno not having the expected
value of EINVAL, print the actual value.

diffstat:

 tests/lib/libc/sys/t_mmap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 95d9fba42e15 -r a27794eebbae tests/lib/libc/sys/t_mmap.c
--- a/tests/lib/libc/sys/t_mmap.c       Tue Apr 05 06:43:54 2022 +0000
+++ b/tests/lib/libc/sys/t_mmap.c       Tue Apr 05 13:09:54 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mmap.c,v 1.14 2020/06/26 07:50:11 jruoho Exp $ */
+/* $NetBSD: t_mmap.c,v 1.15 2022/04/05 13:09:54 gson Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_mmap.c,v 1.14 2020/06/26 07:50:11 jruoho Exp $");
+__RCSID("$NetBSD: t_mmap.c,v 1.15 2022/04/05 13:09:54 gson Exp $");
 
 #include <sys/param.h>
 #include <sys/disklabel.h>
@@ -228,7 +228,7 @@
        map = mmap(&addr, page, PROT_READ, MAP_FIXED|MAP_PRIVATE, -1, 0);
 
        ATF_REQUIRE(map == MAP_FAILED);
-       ATF_REQUIRE(errno == EINVAL);
+       ATF_REQUIRE_MSG(errno == EINVAL, "errno %d != EINVAL", errno);
 
        errno = 0;
        map = mmap(NULL, page, PROT_READ, MAP_ANON|MAP_PRIVATE, INT_MAX, 0);



Home | Main Index | Thread Index | Old Index