Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests Use proper format strings.
details: https://anonhg.NetBSD.org/src/rev/96d2f8cb1a28
branches: trunk
changeset: 766132:96d2f8cb1a28
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Jun 16 15:33:24 2011 +0000
description:
Use proper format strings.
diffstat:
tests/fs/ffs/t_quota2_1.c | 8 +++-----
tests/fs/ffs/t_quota2_remount.c | 8 +++-----
tests/h_macros.h | 4 ++--
tests/lib/libc/gen/t_getcwd.c | 6 +++---
tests/syscall/t_mincore.c | 6 +++---
tests/syscall/t_mprotect.c | 6 +++---
tests/syscall/t_msync.c | 10 +++++-----
tests/syscall/t_umask.c | 6 +++---
8 files changed, 25 insertions(+), 29 deletions(-)
diffs (215 lines):
diff -r 773da61184cb -r 96d2f8cb1a28 tests/fs/ffs/t_quota2_1.c
--- a/tests/fs/ffs/t_quota2_1.c Thu Jun 16 14:57:22 2011 +0000
+++ b/tests/fs/ffs/t_quota2_1.c Thu Jun 16 15:33:24 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_quota2_1.c,v 1.2 2011/03/06 17:08:40 bouyer Exp $ */
+/* $NetBSD: t_quota2_1.c,v 1.3 2011/06/16 15:33:24 joerg Exp $ */
/*
* Basic tests for quota2
@@ -63,10 +63,8 @@
}
snprintf(buf, 1024, "fsck_ffs -fn -F %s", FSTEST_IMGNAME);
res = system(buf);
- if (res != 0) {
- snprintf(buf, sizeof(buf), "fsck returned %d", res);
- atf_tc_fail(buf);
- }
+ if (res != 0)
+ atf_tc_fail("fsck returned %d", res);
}
#define DECL_TEST(nent, newops, name, descr, log) \
diff -r 773da61184cb -r 96d2f8cb1a28 tests/fs/ffs/t_quota2_remount.c
--- a/tests/fs/ffs/t_quota2_remount.c Thu Jun 16 14:57:22 2011 +0000
+++ b/tests/fs/ffs/t_quota2_remount.c Thu Jun 16 15:33:24 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_quota2_remount.c,v 1.2 2011/03/06 17:08:40 bouyer Exp $ */
+/* $NetBSD: t_quota2_remount.c,v 1.3 2011/06/16 15:33:25 joerg Exp $ */
/*
* Basic tests for quota2
@@ -95,10 +95,8 @@
}
snprintf(buf, 1024, "fsck_ffs -fn -F %s", FSTEST_IMGNAME);
res = system(buf);
- if (res != 0) {
- snprintf(buf, sizeof(buf), "fsck returned %d", res);
- atf_tc_fail(buf);
- }
+ if (res != 0)
+ atf_tc_fail("fsck returned %d", res);
}
#define DECL_TEST(nent, newops, name, descr, log) \
diff -r 773da61184cb -r 96d2f8cb1a28 tests/h_macros.h
--- a/tests/h_macros.h Thu Jun 16 14:57:22 2011 +0000
+++ b/tests/h_macros.h Thu Jun 16 15:33:24 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: h_macros.h,v 1.6 2010/08/31 17:21:14 pooka Exp $ */
+/* $NetBSD: h_macros.h,v 1.7 2011/06/16 15:33:24 joerg Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
strlcat(buf, ": ", sizeof(buf));
strlcat(buf, strerror(sverrno), sizeof(buf));
- atf_tc_fail(buf);
+ atf_tc_fail("%s", buf);
}
static __inline void
diff -r 773da61184cb -r 96d2f8cb1a28 tests/lib/libc/gen/t_getcwd.c
--- a/tests/lib/libc/gen/t_getcwd.c Thu Jun 16 14:57:22 2011 +0000
+++ b/tests/lib/libc/gen/t_getcwd.c Thu Jun 16 15:33:24 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_getcwd.c,v 1.1 2011/04/10 06:27:21 jruoho Exp $ */
+/* $NetBSD: t_getcwd.c,v 1.2 2011/06/16 15:33:25 joerg Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_getcwd.c,v 1.1 2011/04/10 06:27:21 jruoho Exp $");
+__RCSID("$NetBSD: t_getcwd.c,v 1.2 2011/06/16 15:33:25 joerg Exp $");
#include <sys/param.h>
#include <sys/stat.h>
@@ -133,7 +133,7 @@
(void)fts_close(fts);
if (str != NULL)
- atf_tc_fail(str);
+ atf_tc_fail("%s", str);
}
ATF_TP_ADD_TCS(tp)
diff -r 773da61184cb -r 96d2f8cb1a28 tests/syscall/t_mincore.c
--- a/tests/syscall/t_mincore.c Thu Jun 16 14:57:22 2011 +0000
+++ b/tests/syscall/t_mincore.c Thu Jun 16 15:33:24 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mincore.c,v 1.1 2011/06/02 10:48:55 jruoho Exp $ */
+/* $NetBSD: t_mincore.c,v 1.2 2011/06/16 15:33:25 joerg Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_mincore.c,v 1.1 2011/06/02 10:48:55 jruoho Exp $");
+__RCSID("$NetBSD: t_mincore.c,v 1.2 2011/06/16 15:33:25 joerg Exp $");
#include <sys/mman.h>
@@ -168,7 +168,7 @@
}
if (str != NULL)
- atf_tc_fail(str);
+ atf_tc_fail("%s", str);
}
ATF_TC_CLEANUP(mincore_incore, tc)
diff -r 773da61184cb -r 96d2f8cb1a28 tests/syscall/t_mprotect.c
--- a/tests/syscall/t_mprotect.c Thu Jun 16 14:57:22 2011 +0000
+++ b/tests/syscall/t_mprotect.c Thu Jun 16 15:33:24 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mprotect.c,v 1.6 2011/05/06 22:24:41 njoly Exp $ */
+/* $NetBSD: t_mprotect.c,v 1.7 2011/06/16 15:33:25 joerg Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_mprotect.c,v 1.6 2011/05/06 22:24:41 njoly Exp $");
+__RCSID("$NetBSD: t_mprotect.c,v 1.7 2011/06/16 15:33:25 joerg Exp $");
#include <sys/param.h>
#include <sys/mman.h>
@@ -218,7 +218,7 @@
(void)paxset(pax_global, pax_enabled);
if (str != NULL)
- atf_tc_fail(str);
+ atf_tc_fail("%s", str);
}
ATF_TC(mprotect_write);
diff -r 773da61184cb -r 96d2f8cb1a28 tests/syscall/t_msync.c
--- a/tests/syscall/t_msync.c Thu Jun 16 14:57:22 2011 +0000
+++ b/tests/syscall/t_msync.c Thu Jun 16 15:33:24 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_msync.c,v 1.3 2011/04/25 22:29:35 njoly Exp $ */
+/* $NetBSD: t_msync.c,v 1.4 2011/06/16 15:33:25 joerg Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_msync.c,v 1.3 2011/04/25 22:29:35 njoly Exp $");
+__RCSID("$NetBSD: t_msync.c,v 1.4 2011/06/16 15:33:25 joerg Exp $");
#include <sys/mman.h>
@@ -153,7 +153,7 @@
str = msync_sync("garbage", MS_ASYNC);
if (str != NULL)
- atf_tc_fail(str);
+ atf_tc_fail("%s", str);
}
ATF_TC(msync_err);
@@ -190,7 +190,7 @@
str = msync_sync("garbage", MS_INVALIDATE);
if (str != NULL)
- atf_tc_fail(str);
+ atf_tc_fail("%s", str);
}
ATF_TC(msync_sync);
@@ -206,7 +206,7 @@
str = msync_sync("garbage", MS_SYNC);
if (str != NULL)
- atf_tc_fail(str);
+ atf_tc_fail("%s", str);
}
ATF_TP_ADD_TCS(tp)
diff -r 773da61184cb -r 96d2f8cb1a28 tests/syscall/t_umask.c
--- a/tests/syscall/t_umask.c Thu Jun 16 14:57:22 2011 +0000
+++ b/tests/syscall/t_umask.c Thu Jun 16 15:33:24 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_umask.c,v 1.2 2011/04/25 22:29:35 njoly Exp $ */
+/* $NetBSD: t_umask.c,v 1.3 2011/06/16 15:33:25 joerg Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_umask.c,v 1.2 2011/04/25 22:29:35 njoly Exp $");
+__RCSID("$NetBSD: t_umask.c,v 1.3 2011/06/16 15:33:25 joerg Exp $");
#include <sys/stat.h>
#include <sys/wait.h>
@@ -152,7 +152,7 @@
(void)umask(S_IWGRP | S_IWOTH);
if (str != NULL)
- atf_tc_fail(str);
+ atf_tc_fail("%s", str);
}
ATF_TC_CLEANUP(umask_open, tc)
Home |
Main Index |
Thread Index |
Old Index