~ubuntu-branches/ubuntu/natty/ltrace/natty

« back to all changes in this revision

Viewing changes to testsuite/ltrace.torture/ia64-sigill.exp

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar, Colin Watson
  • Date: 2009-01-06 17:46:28 UTC
  • mfrom: (1.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090106174628-pt1541aq1ykev7m1
Tags: 0.5.1-2ubuntu1
[ Bhavani Shankar ]
* Merge from debian unstable, remaining changes: LP: #313530
  - Add lpia to architecture list.
  - Use libelf-dev instead of libelfg0-dev
  - Define _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE in debian/rules CFLAGS.
    The configure script has a bug where it can't properly cope with the need
    to define these before detecting the use of elfutils.

[ Colin Watson ]
* Remove stray dpatch build-dependency.
* Change libelfg0-dev to libelf-dev in debian/control.in as well as in
  debian/control.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This file was written by Yao Qi <qiyao@cn.ibm.com>.
 
2
 
 
3
set testfile "ia64-sigill"
 
4
set srcfile ${testfile}.s
 
5
set binfile ${testfile}
 
6
 
 
7
if { [istarget ia64-*] } then {
 
8
    verbose "compiling source file now....."
 
9
    # Build the shared libraries this test case needs.
 
10
    if  { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.s" "${srcdir}/${subdir}/${binfile}" executable {debug} ] != "" } {
 
11
         send_user "Testcase compile failed, so all tests in this file will automatically fail\n."
 
12
    }
 
13
 
 
14
    # Run PUT for ltarce.
 
15
    set exec_output [ltrace_runtest $srcdir/$subdir $srcdir/$subdir/$binfile]
 
16
 
 
17
    # Check the output of this program.
 
18
    verbose "ltrace runtest output: $exec_output\n"
 
19
    if [regexp {ELF from incompatible architecture} $exec_output] {
 
20
            fail "32-bit ltrace can not perform on 64-bit PUTs and rebuild ltrace in 64 bit mode!"
 
21
            return
 
22
    } elseif [ regexp {Couldn't get .hash data} $exec_output ] {
 
23
            fail "Couldn't get .hash data!"
 
24
            return
 
25
    }
 
26
 
 
27
    catch "exec sh -c {grep SIGILL ${srcdir}/${subdir}/${testfile}.ltrace | wc -l ;exit}" output
 
28
    if { $output == 0 } then {
 
29
        pass "ltrace did interpret SIGILL as breakpoint."
 
30
    } else {
 
31
        fail "ltrace failed to interpret SIGILL as breakpoint."
 
32
    }
 
33
}