Module Name: src
Committed By: jruoho
Date: Fri Jul 3 04:25:28 UTC 2020
Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests
src/tests/usr.bin: Makefile
Added Files:
src/tests/usr.bin/locale: Makefile t_locale.sh
Log Message:
Add a check for PR bin/54692.
To generate a diff of this commit:
cvs rdiff -u -r1.871 -r1.872 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.172 -r1.173 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.32 -r1.33 src/tests/usr.bin/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/locale/Makefile \
src/tests/usr.bin/locale/t_locale.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.871 src/distrib/sets/lists/tests/mi:1.872
--- src/distrib/sets/lists/tests/mi:1.871 Fri Jul 3 03:59:18 2020
+++ src/distrib/sets/lists/tests/mi Fri Jul 3 04:25:28 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.871 2020/07/03 03:59:18 jruoho Exp $
+# $NetBSD: mi,v 1.872 2020/07/03 04:25:28 jruoho Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -4462,6 +4462,10 @@
./usr/tests/usr.bin/ld/t_orphan tests-obsolete obsolete,atf
./usr/tests/usr.bin/ld/t_script tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/ld/t_section tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/locale tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/locale/Atffile tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/locale/Kyuafile tests-usr.bin-tests compattestfile,atf,kyua
+./usr/tests/usr.bin/locale/t_locale tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/m4 tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/m4/Atffile tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/m4/Kyuafile tests-usr.bin-tests compattestfile,atf,kyua
Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.172 src/etc/mtree/NetBSD.dist.tests:1.173
--- src/etc/mtree/NetBSD.dist.tests:1.172 Fri Jul 3 03:59:18 2020
+++ src/etc/mtree/NetBSD.dist.tests Fri Jul 3 04:25:28 2020
@@ -1,4 +1,4 @@
-# $NetBSD: NetBSD.dist.tests,v 1.172 2020/07/03 03:59:18 jruoho Exp $
+# $NetBSD: NetBSD.dist.tests,v 1.173 2020/07/03 04:25:28 jruoho Exp $
./usr/libdata/debug/usr/tests
./usr/libdata/debug/usr/tests/atf
@@ -423,6 +423,7 @@
./usr/tests/usr.bin/infocmp
./usr/tests/usr.bin/jot
./usr/tests/usr.bin/ld
+./usr/tests/usr.bin/locale
./usr/tests/usr.bin/m4
./usr/tests/usr.bin/make
./usr/tests/usr.bin/make/unit-tests
Index: src/tests/usr.bin/Makefile
diff -u src/tests/usr.bin/Makefile:1.32 src/tests/usr.bin/Makefile:1.33
--- src/tests/usr.bin/Makefile:1.32 Sat Jun 27 05:20:34 2020
+++ src/tests/usr.bin/Makefile Fri Jul 3 04:25:28 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2020/06/27 05:20:34 jruoho Exp $
+# $NetBSD: Makefile,v 1.33 2020/07/03 04:25:28 jruoho Exp $
#
.include <bsd.own.mk>
@@ -7,9 +7,10 @@ TESTSDIR= ${TESTSBASE}/usr.bin
TESTS_SUBDIRS= awk basename bzip2 cc cmp config cpio cut \
diff dirname find fstat gdb grep gzip id indent \
- infocmp jot ld m4 make mixerctl mkdep nbperf netpgpverify \
- patch pkill pr printf pwhash rump_server shmif_dumpbus sdiff \
- sed sort tar tmux tr unifdef uniq vmstat xlint ztest
+ infocmp jot ld locale m4 make mixerctl mkdep nbperf \
+ netpgpverify patch pkill pr printf pwhash rump_server \
+ shmif_dumpbus sdiff sed sort tar tmux tr unifdef uniq \
+ vmstat xlint ztest
.if ${MKCXX} != "no"
TESTS_SUBDIRS+= c++
@@ -19,5 +20,4 @@ TESTS_SUBDIRS+= c++
TESTS_SUBDIRS+= argon2
.endif
-
.include <bsd.test.mk>
Added files:
Index: src/tests/usr.bin/locale/Makefile
diff -u /dev/null src/tests/usr.bin/locale/Makefile:1.1
--- /dev/null Fri Jul 3 04:25:29 2020
+++ src/tests/usr.bin/locale/Makefile Fri Jul 3 04:25:28 2020
@@ -0,0 +1,8 @@
+# $NetBSD: Makefile,v 1.1 2020/07/03 04:25:28 jruoho Exp $
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/usr.bin/locale
+TESTS_SH= t_locale
+
+.include <bsd.test.mk>
Index: src/tests/usr.bin/locale/t_locale.sh
diff -u /dev/null src/tests/usr.bin/locale/t_locale.sh:1.1
--- /dev/null Fri Jul 3 04:25:29 2020
+++ src/tests/usr.bin/locale/t_locale.sh Fri Jul 3 04:25:28 2020
@@ -0,0 +1,43 @@
+# $NetBSD: t_locale.sh,v 1.1 2020/07/03 04:25:28 jruoho Exp $
+#
+# Copyright (c) 2020 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.
+#
+atf_test_case nonexistent
+nonexistent_head() {
+ atf_set "descr" "Check that locale(1) does not report " \
+ "success for a nonexistent locale (PR lib/54692)"
+}
+
+nonexistent_body() {
+ atf_expect_fail "PR lib/54692"
+ atf_check -s exit:1 -e ignore -o empty -x "locale nonexistent"
+}
+
+atf_init_test_cases() {
+ atf_add_test_case nonexistent
+}