[PATCH] tests: check gcc

2019-05-21 Thread mingli.yu
From: Mingli Yu 

Both run-disasm-x86-64.sh and run-disasm-x86.sh
need gcc, so check gcc before run the test.

Signed-off-by: Mingli Yu 
---
 tests/run-disasm-x86-64.sh | 2 ++
 tests/run-disasm-x86.sh| 2 ++
 2 files changed, 4 insertions(+)

diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh
index a6be62b..c3ef238 100755
--- a/tests/run-disasm-x86-64.sh
+++ b/tests/run-disasm-x86-64.sh
@@ -22,6 +22,8 @@ case "`uname -m`" in
   x86_64)
 tempfiles testfile45.o
 testfiles testfile45.S testfile45.expect
+# skip the case if no gcc deployed
+which gcc || exit 77
 gcc -m64 -c -o testfile45.o testfile45.S
 testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < 
testfile45.expect
 ;;
diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh
index 28a3df7..544fc28 100755
--- a/tests/run-disasm-x86.sh
+++ b/tests/run-disasm-x86.sh
@@ -22,6 +22,8 @@ case "`uname -m`" in
   x86_64 | i?86 )
 tempfiles testfile44.o
 testfiles testfile44.S testfile44.expect
+# skip the case if no gcc deployed
+which gcc || exit 77
 gcc -m32 -c -o testfile44.o testfile44.S
 testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < 
testfile44.expect
 ;;
-- 
2.7.4



Re: [PATCH] tests: check gcc

2019-05-21 Thread Dmitry V. Levin
On Tue, May 21, 2019 at 03:00:31PM +0800, mingli...@windriver.com wrote:
> From: Mingli Yu 
> 
> Both run-disasm-x86-64.sh and run-disasm-x86.sh
> need gcc, so check gcc before run the test.

There are several dozens more tests that invoke gcc,
why these two need a check?


-- 
ldv


[PATCH v2] skip the test when gcc not deployed

2019-05-21 Thread mingli.yu
From: Mingli Yu 

Skip the tests which depend on gcc when
gcc not deployed.

Signed-off-by: Mingli Yu 
---
 tests/run-disasm-x86-64.sh | 2 ++
 tests/run-disasm-x86.sh| 2 ++
 tests/run-strip-g.sh   | 2 ++
 tests/run-strip-nothing.sh | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh
index a6be62b..c3ef238 100755
--- a/tests/run-disasm-x86-64.sh
+++ b/tests/run-disasm-x86-64.sh
@@ -22,6 +22,8 @@ case "`uname -m`" in
   x86_64)
 tempfiles testfile45.o
 testfiles testfile45.S testfile45.expect
+# skip the case if no gcc deployed
+which gcc || exit 77
 gcc -m64 -c -o testfile45.o testfile45.S
 testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < 
testfile45.expect
 ;;
diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh
index 28a3df7..544fc28 100755
--- a/tests/run-disasm-x86.sh
+++ b/tests/run-disasm-x86.sh
@@ -22,6 +22,8 @@ case "`uname -m`" in
   x86_64 | i?86 )
 tempfiles testfile44.o
 testfiles testfile44.S testfile44.expect
+# skip the case if no gcc deployed
+which gcc || exit 77
 gcc -m32 -c -o testfile44.o testfile44.S
 testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < 
testfile44.expect
 ;;
diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh
index 1303819..a943dec 100755
--- a/tests/run-strip-g.sh
+++ b/tests/run-strip-g.sh
@@ -24,6 +24,8 @@
 
 tempfiles a.out strip.out debug.out readelf.out
 
+# skip the test if gcc deployed
+which gcc || exit 77
 echo Create debug a.out.
 echo "int main() { return 1; }" | gcc -g -xc -
 
diff --git a/tests/run-strip-nothing.sh b/tests/run-strip-nothing.sh
index 914fdfb..d03f734 100755
--- a/tests/run-strip-nothing.sh
+++ b/tests/run-strip-nothing.sh
@@ -22,6 +22,8 @@
 
 tempfiles a.out strip.out debug.out
 
+# skip the case if no gcc deployed
+which gcc || exit 77
 # Create no-debug a.out.
 echo "int main() { return 1; }" | gcc -s -xc -
 
-- 
2.7.4



[Bug general/24589] New: run-backtrace-native.sh failed

2019-05-21 Thread mingli.yu at windriver dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24589

Bug ID: 24589
   Summary: run-backtrace-native.sh failed
   Product: elfutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: general
  Assignee: unassigned at sourceware dot org
  Reporter: mingli.yu at windriver dot com
CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

backtrace: ../../elfutils-0.176/tests/backtrace.c:114: callback_verify:
Assertion `symname != NULL && strcmp (symname, "sigusr2") == 0' failed.
/usr/lib64/elfutils/ptest/tests/test-subr.sh: line 90:  4466 Aborted   
 $VALGRIND_CMD $program ${1+"$@"}
backtrace-child: no main 
FAIL: run-backtrace-native.sh

-- 
You are receiving this mail because:
You are on the CC list for the bug.