Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/ld Tweak.
details: https://anonhg.NetBSD.org/src/rev/672053f41652
branches: trunk
changeset: 803861:672053f41652
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Sat Nov 15 03:10:01 2014 +0000
description:
Tweak.
diffstat:
tests/usr.bin/ld/t_script.sh | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diffs (42 lines):
diff -r 895c090727ba -r 672053f41652 tests/usr.bin/ld/t_script.sh
--- a/tests/usr.bin/ld/t_script.sh Sat Nov 15 02:09:18 2014 +0000
+++ b/tests/usr.bin/ld/t_script.sh Sat Nov 15 03:10:01 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_script.sh,v 1.1 2014/11/14 09:03:39 uebayasi Exp $
+# $NetBSD: t_script.sh,v 1.2 2014/11/15 03:10:01 uebayasi Exp $
#
# Copyright (c) 2014 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -58,12 +58,9 @@
ld -r -T test.x -Map test.map -o test.ro test.o
extract_section_names test.ro >test.secs
extract_symbol_names test.ro >test.syms
- atf_check -s exit:1 -o ignore -e ignore \
- grep '\.data\.a$' test.secs
- atf_check -s exit:1 -o ignore -e ignore \
- grep '\.data\.b$' test.secs
- atf_check -s exit:0 -o ignore -e ignore \
- grep '\.data\.c$' test.secs
+ assert_nosec '\.data\.a'
+ assert_nosec '\.data\.b'
+ assert_sec '\.data\.c'
}
extract_section_names() {
@@ -76,6 +73,16 @@
sed -e 's/^.* //'
}
+assert_sec() {
+ atf_check -s exit:0 -o ignore -e ignore \
+ grep "^$1\$" test.secs
+}
+
+assert_nosec() {
+ atf_check -s exit:1 -o ignore -e ignore \
+ grep "^$1\$" test.secs
+}
+
atf_init_test_cases()
{
Home |
Main Index |
Thread Index |
Old Index