Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add a case for PR lib/41558. It is unclear whether this is a...
details: https://anonhg.NetBSD.org/src/rev/2307addf2df3
branches: trunk
changeset: 778168:2307addf2df3
user: jruoho <jruoho%NetBSD.org@localhost>
date: Sun Mar 18 08:52:07 2012 +0000
description:
Add a case for PR lib/41558. It is unclear whether this is a bug, but at
least it is documented now. Probably it would be better to follow Linux,
where the test case does not fail.
diffstat:
distrib/sets/lists/tests/mi | 4 +-
tests/lib/libc/gen/Makefile | 3 +-
tests/lib/libc/gen/t_fnmatch.c | 65 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 70 insertions(+), 2 deletions(-)
diffs (111 lines):
diff -r b64d6976a66f -r 2307addf2df3 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Sun Mar 18 08:13:57 2012 +0000
+++ b/distrib/sets/lists/tests/mi Sun Mar 18 08:52:07 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.446 2012/03/17 17:23:34 jruoho Exp $
+# $NetBSD: mi,v 1.447 2012/03/18 08:52:07 jruoho Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -379,6 +379,7 @@
./usr/libdata/debug/usr/tests/lib/libc/gen/t_cpuset.debug tests-lib-debug debug,atf
./usr/libdata/debug/usr/tests/lib/libc/gen/t_dir.debug tests-lib-debug debug,atf
./usr/libdata/debug/usr/tests/lib/libc/gen/t_fmtcheck.debug tests-lib-debug debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/gen/t_fnmatch.debug tests-lib-debug debug,atf
./usr/libdata/debug/usr/tests/lib/libc/gen/t_fpclassify.debug tests-lib-debug debug,atf
./usr/libdata/debug/usr/tests/lib/libc/gen/t_fpsetmask.debug tests-lib-debug debug,atf
./usr/libdata/debug/usr/tests/lib/libc/gen/t_fpsetround.debug tests-lib-debug debug,atf
@@ -2016,6 +2017,7 @@
./usr/tests/lib/libc/gen/t_cpuset tests-lib-tests atf
./usr/tests/lib/libc/gen/t_dir tests-lib-tests atf
./usr/tests/lib/libc/gen/t_fmtcheck tests-lib-tests atf
+./usr/tests/lib/libc/gen/t_fnmatch tests-lib-tests atf
./usr/tests/lib/libc/gen/t_fpclassify tests-lib-tests atf
./usr/tests/lib/libc/gen/t_fpsetmask tests-lib-tests atf
./usr/tests/lib/libc/gen/t_fpsetround tests-lib-tests atf
diff -r b64d6976a66f -r 2307addf2df3 tests/lib/libc/gen/Makefile
--- a/tests/lib/libc/gen/Makefile Sun Mar 18 08:13:57 2012 +0000
+++ b/tests/lib/libc/gen/Makefile Sun Mar 18 08:52:07 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2012/03/17 16:40:14 jruoho Exp $
+# $NetBSD: Makefile,v 1.36 2012/03/18 08:52:07 jruoho Exp $
.include <bsd.own.mk>
@@ -13,6 +13,7 @@
TESTS_C+= t_cpuset
TESTS_C+= t_dir
TESTS_C+= t_fmtcheck
+TESTS_C+= t_fnmatch
TESTS_C+= t_fpclassify
TESTS_C+= t_fpsetmask
TESTS_C+= t_fpsetround
diff -r b64d6976a66f -r 2307addf2df3 tests/lib/libc/gen/t_fnmatch.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/lib/libc/gen/t_fnmatch.c Sun Mar 18 08:52:07 2012 +0000
@@ -0,0 +1,65 @@
+/* $NetBSD: t_fnmatch.c,v 1.1 2012/03/18 08:52:07 jruoho Exp $ */
+
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jukka Ruohonen.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: t_fnmatch.c,v 1.1 2012/03/18 08:52:07 jruoho Exp $");
+
+#include <atf-c.h>
+#include <fnmatch.h>
+#include <stdio.h>
+
+/*
+ * TODO: Test basic functionality of fnmatch(3) too.
+ */
+
+ATF_TC(fnmatch_backslashes);
+ATF_TC_HEAD(fnmatch_backslashes, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "Test translation of '\\' with fnmatch(3) (PR lib/41558)");
+}
+
+ATF_TC_BODY(fnmatch_backslashes, tc)
+{
+ const int rv = fnmatch(/* pattern */ "\\", "\\", 0);
+
+ atf_tc_expect_fail("PR lib/41558");
+
+ if (rv != FNM_NOMATCH)
+ atf_tc_fail("fnmatch(3) did not translate '\\'");
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+
+ ATF_TP_ADD_TC(tp, fnmatch_backslashes);
+
+ return atf_no_error();
+}
Home |
Main Index |
Thread Index |
Old Index