Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/ssp Since atf_check doesn't deal with a pipel...
details: https://anonhg.NetBSD.org/src/rev/ab4dd5663f69
branches: trunk
changeset: 760106:ab4dd5663f69
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Mon Dec 27 05:27:34 2010 +0000
description:
Since atf_check doesn't deal with a pipeline, modify the tests to pipe
the output of the echo commands to atf_check itself. This fixes the
three new ssp failures.
Note that the raw, strcpy, vsprintf, and vsnprintf tests still fail, but
they failed in the old 'regress' style, too.
diffstat:
tests/lib/libc/ssp/t_ssp.sh | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diffs (61 lines):
diff -r fcc849a6b889 -r ab4dd5663f69 tests/lib/libc/ssp/t_ssp.sh
--- a/tests/lib/libc/ssp/t_ssp.sh Mon Dec 27 03:38:52 2010 +0000
+++ b/tests/lib/libc/ssp/t_ssp.sh Mon Dec 27 05:27:34 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_ssp.sh,v 1.1 2010/12/27 02:04:19 pgoyette Exp $
+# $NetBSD: t_ssp.sh,v 1.2 2010/12/27 05:27:34 pgoyette Exp $
#
# Copyright (c) 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -27,14 +27,14 @@
h_pass()
{
- echo "Executing command [ $1 ]"
- atf_check -s exit:0 -o ignore -e ignore $1
+ echo "Executing command [ $2$1 ]"
+ eval $2 atf_check -s exit:0 -o ignore -e ignore $1
}
h_fail()
{
- echo "Executing command [ $1 ]"
- atf_check -s signal:6 -o ignore -e ignore $1
+ echo "Executing command [ $2$1 ]"
+ eval $2 atf_check -s signal:6 -o ignore -e ignore $1
}
atf_test_case raw
@@ -111,8 +111,8 @@
{
prog="$(atf_get_srcdir)/h_gets"
- h_pass "echo ok | $prog"
- h_fail "echo 0123456789 | $prog"
+ h_pass "$prog" "echo ok |"
+ h_fail "$prog" "echo 0123456789 |"
}
atf_test_case fgets
@@ -124,8 +124,8 @@
{
prog="$(atf_get_srcdir)/h_fgets"
- h_pass "echo ok | $prog 10"
- h_fail "echo busted | $prog 11"
+ h_pass "$prog 10" "echo ok |"
+ h_fail "$prog 11" "echo busted |"
}
atf_test_case memcpy
@@ -228,8 +228,8 @@
{
prog="$(atf_get_srcdir)/h_read"
- h_pass "echo foo | $prog 1024"
- h_fail "echo bar | $prog 1025"
+ h_pass "$prog 1024" "echo foo |"
+ h_fail "$prog 1025" "echo bar |"
}
atf_test_case readlink
Home |
Main Index |
Thread Index |
Old Index