Module Name: src
Committed By: martin
Date: Thu May 18 10:29:47 UTC 2017
Modified Files:
src/tests/usr.bin/c++: t_hello.sh
src/tests/usr.bin/cc: t_hello.sh
Log Message:
Add (currently failing) test cases for profiled programs.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/c++/t_hello.sh
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/cc/t_hello.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/usr.bin/c++/t_hello.sh
diff -u src/tests/usr.bin/c++/t_hello.sh:1.1 src/tests/usr.bin/c++/t_hello.sh:1.2
--- src/tests/usr.bin/c++/t_hello.sh:1.1 Sun May 14 00:07:07 2017
+++ src/tests/usr.bin/c++/t_hello.sh Thu May 18 10:29:47 2017
@@ -1,4 +1,4 @@
-# $NetBSD: t_hello.sh,v 1.1 2017/05/14 00:07:07 kamil Exp $
+# $NetBSD: t_hello.sh,v 1.2 2017/05/18 10:29:47 martin Exp $
#
# Copyright (c) 2011 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -31,6 +31,12 @@ hello_head() {
atf_set "require.progs" "c++"
}
+atf_test_case hello_profile
+hello_head() {
+ atf_set "descr" "compile and run \"hello world\" with profiling option"
+ atf_set "require.progs" "c++"
+}
+
atf_test_case hello_pic
hello_pic_head() {
atf_set "descr" "compile and run PIC \"hello world\""
@@ -59,6 +65,16 @@ EOF
atf_check -s exit:0 -o inline:"hello world\n" ./hello
}
+hello_profile_body() {
+ cat > test.cpp << EOF
+#include <stdio.h>
+#include <stdlib.h>
+int main(void) {printf("hello world\n");exit(0);}
+EOF
+ atf_check -s exit:0 -o ignore -e ignore c++ -pg -o hello test.cpp
+ atf_check -s exit:0 -o inline:"hello world\n" ./hello
+}
+
hello_pic_body() {
cat > test.cpp << EOF
#include <stdlib.h>
@@ -139,6 +155,7 @@ atf_init_test_cases()
{
atf_add_test_case hello
+ atf_add_test_case hello_profile
atf_add_test_case hello_pic
atf_add_test_case hello_pie
atf_add_test_case hello32
Index: src/tests/usr.bin/cc/t_hello.sh
diff -u src/tests/usr.bin/cc/t_hello.sh:1.4 src/tests/usr.bin/cc/t_hello.sh:1.5
--- src/tests/usr.bin/cc/t_hello.sh:1.4 Sat May 13 23:51:39 2017
+++ src/tests/usr.bin/cc/t_hello.sh Thu May 18 10:29:47 2017
@@ -1,4 +1,4 @@
-# $NetBSD: t_hello.sh,v 1.4 2017/05/13 23:51:39 kamil Exp $
+# $NetBSD: t_hello.sh,v 1.5 2017/05/18 10:29:47 martin Exp $
#
# Copyright (c) 2011 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -31,6 +31,12 @@ hello_head() {
atf_set "require.progs" "cc"
}
+atf_test_case hello_profile
+hello_head() {
+ atf_set "descr" "compile and run \"hello world\" with profiling option"
+ atf_set "require.progs" "cc"
+}
+
atf_test_case hello_pic
hello_pic_head() {
atf_set "descr" "compile and run PIC \"hello world\""
@@ -59,6 +65,16 @@ EOF
atf_check -s exit:0 -o inline:"hello world\n" ./hello
}
+hello_profile_body() {
+ cat > test.c << EOF
+#include <stdio.h>
+#include <stdlib.h>
+int main(void) {printf("hello world\n");exit(0);}
+EOF
+ atf_check -s exit:0 -o ignore -e ignore cc -o hello -pg test.c
+ atf_check -s exit:0 -o inline:"hello world\n" ./hello
+}
+
hello_pic_body() {
cat > test.c << EOF
#include <stdlib.h>
@@ -139,6 +155,7 @@ atf_init_test_cases()
{
atf_add_test_case hello
+ atf_add_test_case hello_profile
atf_add_test_case hello_pic
atf_add_test_case hello_pie
atf_add_test_case hello32