Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/gen use "RZ()" instead of ATF_CHECK(), since ...
details: https://anonhg.NetBSD.org/src/rev/cd6b19a3de7c
branches: trunk
changeset: 757994:cd6b19a3de7c
user: christos <christos%NetBSD.org@localhost>
date: Mon Oct 11 15:48:57 2010 +0000
description:
use "RZ()" instead of ATF_CHECK(), since ATF_CHECK does not deal with errno.
This is repulsive, specially the part about hard-coding the h_macros.h file
in the c code.
diffstat:
tests/lib/libc/gen/t_glob_star.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 6d02b216e599 -r cd6b19a3de7c tests/lib/libc/gen/t_glob_star.c
--- a/tests/lib/libc/gen/t_glob_star.c Mon Oct 11 15:37:55 2010 +0000
+++ b/tests/lib/libc/gen/t_glob_star.c Mon Oct 11 15:48:57 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_glob_star.c,v 1.2 2010/10/11 15:16:01 christos Exp $ */
+/* $NetBSD: t_glob_star.c,v 1.3 2010/10/11 15:48:57 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_glob_star.c,v 1.2 2010/10/11 15:16:01 christos Exp $");
+__RCSID("$NetBSD: t_glob_star.c,v 1.3 2010/10/11 15:48:57 christos Exp $");
#include <atf-c.h>
@@ -46,6 +46,8 @@
#include <string.h>
#include <errno.h>
+#include "../../../h_macros.h"
+
#ifdef DEBUG
#define DPRINTF(a) printf a
@@ -178,7 +180,7 @@
gl.gl_stat = gl_stat;
gl.gl_lstat = gl_lstat;
- ATF_CHECK(glob(p, GLOB_ALTDIRFUNC | flags, NULL, &gl) == 0);
+ RZ(glob(p, GLOB_ALTDIRFUNC | flags, NULL, &gl));
for (i = 0; i < gl.gl_pathc; i++)
DPRINTF(("%s\n", gl.gl_pathv[i]));
Home |
Main Index |
Thread Index |
Old Index