Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src New testcase to check limits flags for ulimit builtin.
details: https://anonhg.NetBSD.org/src/rev/0ffbce44abed
branches: trunk
changeset: 779695:0ffbce44abed
user: njoly <njoly%NetBSD.org@localhost>
date: Mon Jun 11 18:32:59 2012 +0000
description:
New testcase to check limits flags for ulimit builtin.
diffstat:
distrib/sets/lists/tests/mi | 3 +-
tests/bin/sh/Makefile | 3 +-
tests/bin/sh/t_ulimit.sh | 46 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+), 2 deletions(-)
diffs (84 lines):
diff -r f0c5fdca3950 -r 0ffbce44abed distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Mon Jun 11 18:28:10 2012 +0000
+++ b/distrib/sets/lists/tests/mi Mon Jun 11 18:32:59 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.473 2012/06/06 21:23:10 martin Exp $
+# $NetBSD: mi,v 1.474 2012/06/11 18:32:59 njoly Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -1395,6 +1395,7 @@
./usr/tests/bin/sh/t_fsplit tests-bin-tests atf
./usr/tests/bin/sh/t_here tests-bin-tests atf
./usr/tests/bin/sh/t_set_e tests-bin-tests atf
+./usr/tests/bin/sh/t_ulimit tests-bin-tests atf
./usr/tests/bin/sh/t_varquote tests-bin-tests atf
./usr/tests/bin/sh/t_wait tests-bin-tests atf
./usr/tests/bin/tar tests-bin-tests
diff -r f0c5fdca3950 -r 0ffbce44abed tests/bin/sh/Makefile
--- a/tests/bin/sh/Makefile Mon Jun 11 18:28:10 2012 +0000
+++ b/tests/bin/sh/Makefile Mon Jun 11 18:32:59 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2012/03/17 16:33:11 jruoho Exp $
+# $NetBSD: Makefile,v 1.2 2012/06/11 18:32:59 njoly Exp $
.include <bsd.own.mk>
@@ -11,6 +11,7 @@
TESTS_SH+= t_fsplit
TESTS_SH+= t_here
TESTS_SH+= t_set_e
+TESTS_SH+= t_ulimit
TESTS_SH+= t_varquote
TESTS_SH+= t_wait
diff -r f0c5fdca3950 -r 0ffbce44abed tests/bin/sh/t_ulimit.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/bin/sh/t_ulimit.sh Mon Jun 11 18:32:59 2012 +0000
@@ -0,0 +1,46 @@
+# $NetBSD: t_ulimit.sh,v 1.1 2012/06/11 18:32:59 njoly Exp $
+#
+# Copyright (c) 2012 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# 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.
+#
+
+# ulimit builtin test.
+
+atf_test_case limits
+limits_head() {
+ atf_set "descr" "Checks for limits flags"
+}
+limits_body() {
+ atf_check -s eq:0 -o ignore -e empty \
+ /bin/sh -c "ulimit -a"
+ for l in $(ulimit -a | sed 's,^.*(,,;s, .*$,,');
+ do
+ atf_check -s eq:0 -o ignore -e empty \
+ /bin/sh -c "ulimit $l"
+ done
+}
+
+atf_init_test_cases() {
+ atf_add_test_case limits
+}
Home |
Main Index |
Thread Index |
Old Index