Re: testsuite errors on Red Hat 8.0

David Carlton
2003-04-16T04:27:34Z

On Wed, 16 Apr 2003 00:11:46 -0400, Daniel Jacobowitz <drow@mvista.com> said:

>> and in gdb.threads/pthreads.exp, I get:
>>
>> FAIL: gdb.threads/pthreads.exp: check backtrace from main thread
>> FAIL: gdb.threads/pthreads.exp: apply backtrace command to all three threads

> These I'd definitely like to see the log for.

I'll put it after my signature.

David Carlton
carlton@math.stanford.edu

Test Run By carlton on Tue Apr 15 21:01:43 2003
Native configuration is i686-pc-linux-gnu

=== gdb tests ===

Schedule of variations:
unix

Running target unix
Using /usr/local/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/local/share/dejagnu/config/unix.exp as generic interface file for target.
Using ./config/unix.exp as tool-and-target-specific interface file.
Running ./gdb.threads/pthreads.exp ...
Executing on host: gcc ./gdb.threads/pthreads.c -I/gdb/mirror/src/gdb/testsuite -g -lpthreads -lm -o /gdb/mirror/src/gdb/testsuite/gdb.threads/pthreads (timeout = 300)
spawn gcc ./gdb.threads/pthreads.c -I/gdb/mirror/src/gdb/testsuite -g -lpthreads -lm -o /gdb/mirror/src/gdb/testsuite/gdb.threads/pthreads
/usr/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status
compiler exited with status 1
output is:
/usr/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status

Executing on host: gcc ./gdb.threads/pthreads.c -I/gdb/mirror/src/gdb/testsuite -g -lpthread -lm -o /gdb/mirror/src/gdb/testsuite/gdb.threads/pthreads (timeout = 300)
spawn gcc ./gdb.threads/pthreads.c -I/gdb/mirror/src/gdb/testsuite -g -lpthread
-lm -o /gdb/mirror/src/gdb/testsuite/gdb.threads/pthreads
PASS: gdb.threads/pthreads.exp: successfully compiled posix threads test case
spawn /gdb/mirror/src/gdb/testsuite/../../gdb/gdb -nw -nx
GNU gdb 2003-04-16-cvs
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
(gdb) set height 0
(gdb) set width 0
(gdb) dir
Reinitialize source path to empty? (y or n) y
Source directories searched: $cdir:$cwd
(gdb) dir ./gdb.threads
Source directories searched: /gdb/mirror/src/gdb/testsuite/./gdb.threads:$cdir:$cwd
(gdb) file /gdb/mirror/src/gdb/testsuite/gdb.threads/pthreads
Reading symbols from /gdb/mirror/src/gdb/testsuite/gdb.threads/pthreads...done.
(gdb) set print sevenbit-strings
(gdb) PASS: gdb.threads/pthreads.exp: set print sevenbit-strings
set width 0
(gdb) PASS: gdb.threads/pthreads.exp: set width 0
shell stty intr '^C'
(gdb) PASS: gdb.threads/pthreads.exp: shell stty intr '^C'
delete breakpoints
(gdb) info breakpoints
No breakpoints or watchpoints.
(gdb) break main
Breakpoint 1 at 0x8048776: file gdb.threads/pthreads.c, line 119.
(gdb) run
Starting program: /gdb/mirror/src/gdb/testsuite/gdb.threads/pthreads
[New Thread 16384 (LWP 14967)]
[Switching to Thread 16384 (LWP 14967)]

Breakpoint 1, main (argc=1, argv=0xbffff554) at gdb.threads/pthreads.c:119
119 int t = 0;
(gdb) info threads
* 1 Thread 16384 (LWP 14967) main (argc=1, argv=0xbffff554) at gdb.threads/pthreads.c:119
(gdb) PASS: gdb.threads/pthreads.exp: info threads
info threads
* 1 Thread 16384 (LWP 14967) main (argc=1, argv=0xbffff554) at gdb.threads/pthreads.c:119
(gdb) break thread1
Breakpoint 2 at 0x8048602: file gdb.threads/pthreads.c, line 73.
(gdb) PASS: gdb.threads/pthreads.exp: break thread1
continue
Continuing.
[New Thread 32769 (LWP 14968)]
[New Thread 16386 (LWP 14969)]
[Switching to Thread 16386 (LWP 14969)]

Breakpoint 2, thread1 (arg=0xfeedface) at gdb.threads/pthreads.c:73
73 int z = 0;
(gdb) PASS: gdb.threads/pthreads.exp: Continue to creation of first thread
disable
(gdb) PASS: gdb.threads/pthreads.exp: disable
info threads
* 3 Thread 16386 (LWP 14969) thread1 (arg=0xfeedface) at gdb.threads/pthreads.c:73
2 Thread 32769 (LWP 14968) 0x40163b11 in poll () from /lib/libc.so.6
1 Thread 16384 (LWP 14967) 0x4013a816 in nanosleep () from /lib/libc.so.6
(gdb) break thread2
Breakpoint 3 at 0x804869e: file gdb.threads/pthreads.c, line 90.
(gdb) PASS: gdb.threads/pthreads.exp: break thread2
continue
Continuing.
[New Thread 32771 (LWP 14970)]
[Switching to Thread 32771 (LWP 14970)]

Breakpoint 3, thread2 (arg=0xdeadbeef) at gdb.threads/pthreads.c:90
90 int k = 0;
(gdb) PASS: gdb.threads/pthreads.exp: Continue to creation of second thread
info threads
* 4 Thread 32771 (LWP 14970) thread2 (arg=0xdeadbeef) at gdb.threads/pthreads.c:90
3 Thread 16386 (LWP 14969) 0x4013a816 in nanosleep () from /lib/libc.so.6
2 Thread 32769 (LWP 14968) 0x40163b11 in poll () from /lib/libc.so.6
1 Thread 16384 (LWP 14967) 0x4013a816 in nanosleep () from /lib/libc.so.6
(gdb) set var common_routine::hits=0
(gdb) PASS: gdb.threads/pthreads.exp: set var common_routine::hits=0
set var common_routine::from_thread1=0
(gdb) PASS: gdb.threads/pthreads.exp: set var common_routine::from_thread1=0
set var common_routine::from_thread2=0
(gdb) PASS: gdb.threads/pthreads.exp: set var common_routine::from_thread2=0
set var common_routine::from_main=0
(gdb) PASS: gdb.threads/pthreads.exp: set var common_routine::from_main=0
set var common_routine::full_coverage=0
(gdb) PASS: gdb.threads/pthreads.exp: set var common_routine::full_coverage=0
disable
(gdb) PASS: gdb.threads/pthreads.exp: disable
tbreak common_routine if hits >= 15
Breakpoint 4 at 0x804857a: file gdb.threads/pthreads.c, line 51.
(gdb) PASS: gdb.threads/pthreads.exp: tbreak common_routine if hits >= 15
continue
Continuing.
[Switching to Thread 16384 (LWP 14967)]
common_routine (arg=0) at gdb.threads/pthreads.c:51
51 if (verbose) printf("common_routine (%d)\n", arg);
(gdb) p common_routine::hits
$1 = 15
(gdb) PASS: gdb.threads/pthreads.exp: stopped before calling common_routine 15 times
p common_routine::full_coverage
$2 = 1
(gdb) PASS: gdb.threads/pthreads.exp: All threads running after startup
continue
Continuing.
PASS: gdb.threads/pthreads.exp: Continue with all threads running

Program received signal SIGINT, Interrupt.
[Switching to Thread 32771 (LWP 14970)]
0x4013a816 in nanosleep () from /lib/libc.so.6
(gdb) PASS: gdb.threads/pthreads.exp: Stopped with a ^C
bt
#0 0x4013a816 in nanosleep () from /lib/libc.so.6
#1 0x00000000 in ?? ()
(gdb) PASS: gdb.threads/pthreads.exp: bt
set var common_routine::hits=0
(gdb) PASS: gdb.threads/pthreads.exp: set var common_routine::hits=0
set var common_routine::from_thread1=0
(gdb) PASS: gdb.threads/pthreads.exp: set var common_routine::from_thread1=0
set var common_routine::from_thread2=0
(gdb) PASS: gdb.threads/pthreads.exp: set var common_routine::from_thread2=0
set var common_routine::from_main=0
(gdb) PASS: gdb.threads/pthreads.exp: set var common_routine::from_main=0
set var common_routine::full_coverage=0
(gdb) PASS: gdb.threads/pthreads.exp: set var common_routine::full_coverage=0
disable
(gdb) PASS: gdb.threads/pthreads.exp: disable
tbreak common_routine if hits >= 15
Breakpoint 5 at 0x804857a: file gdb.threads/pthreads.c, line 51.
(gdb) PASS: gdb.threads/pthreads.exp: tbreak common_routine if hits >= 15
continue
Continuing.
[Switching to Thread 16386 (LWP 14969)]
common_routine (arg=1) at gdb.threads/pthreads.c:51
51 if (verbose) printf("common_routine (%d)\n", arg);
(gdb) p common_routine::hits
$3 = 15
(gdb) PASS: gdb.threads/pthreads.exp: stopped before calling common_routine 15 times
p common_routine::full_coverage
$4 = 1
(gdb) PASS: gdb.threads/pthreads.exp: All threads running after continuing from
^C stop
thread apply 1 backtrace

Thread 1 (Thread 16384 (LWP 14967)):
#0 0x4013a816 in nanosleep () from /lib/libc.so.6
#1 0x00000000 in ?? ()
51 if (verbose) printf("common_routine (%d)\n", arg);
(gdb) FAIL: gdb.threads/pthreads.exp: check backtrace from main thread
thread apply 3 backtrace

Thread 3 (Thread 16386 (LWP 14969)):
#0 common_routine (arg=1) at gdb.threads/pthreads.c:51
#1 0x0804867a in thread1 (arg=0xfeedface) at gdb.threads/pthreads.c:80
#2 0x40028c0e in pthread_start_thread_event () from /lib/libpthread.so.0
(gdb) PASS: gdb.threads/pthreads.exp: check backtrace from thread 1
thread apply 4 backtrace

Thread 4 (Thread 32771 (LWP 14970)):
#0 common_routine (arg=2) at gdb.threads/pthreads.c:51
#1 0x08048716 in thread2 (arg=0xdeadbeef) at gdb.threads/pthreads.c:97
#2 0x40028c0e in pthread_start_thread_event () from /lib/libpthread.so.0
51 if (verbose) printf("common_routine (%d)\n", arg);
(gdb) PASS: gdb.threads/pthreads.exp: check backtrace from thread 2
thread apply 1 3 4 bt

Thread 1 (Thread 16384 (LWP 14967)):
#0 0x4013a816 in nanosleep () from /lib/libc.so.6
#1 0x00000000 in ?? ()

Thread 3 (Thread 16386 (LWP 14969)):
#0 common_routine (arg=1) at gdb.threads/pthreads.c:51
#1 0x0804867a in thread1 (arg=0xfeedface) at gdb.threads/pthreads.c:80
#2 0x40028c0e in pthread_start_thread_event () from /lib/libpthread.so.0

Thread 4 (Thread 32771 (LWP 14970)):
#0 common_routine (arg=2) at gdb.threads/pthreads.c:51
#1 0x08048716 in thread2 (arg=0xdeadbeef) at gdb.threads/pthreads.c:97
#2 0x40028c0e in pthread_start_thread_event () from /lib/libpthread.so.0
51 if (verbose) printf("common_routine (%d)\n", arg);
(gdb) FAIL: gdb.threads/pthreads.exp: apply backtrace command to all three threads
break common_routine thread 4
Breakpoint 6 at 0x804857a: file gdb.threads/pthreads.c, line 51.
(gdb) PASS: gdb.threads/pthreads.exp: set break at common_routine in thread 2
continue
Continuing.
[Switching to Thread 32771 (LWP 14970)]

Breakpoint 6, common_routine (arg=2) at gdb.threads/pthreads.c:51
51 if (verbose) printf("common_routine (%d)\n", arg);
PASS: gdb.threads/pthreads.exp: continue to bkpt at common_routine in thread 2
backtrace
(gdb) backtrace
#0 common_routine (arg=2) at gdb.threads/pthreads.c:51
#1 0x08048716 in thread2 (arg=0xdeadbeef) at gdb.threads/pthreads.c:97
#2 0x40028c0e in pthread_start_thread_event () from /lib/libpthread.so.0
PASS: gdb.threads/pthreads.exp: backtrace from thread 2 bkpt in common_routine
testcase ./gdb.threads/pthreads.exp completed in 3 seconds

=== gdb Summary ===

# of expected passes 36
# of unexpected failures 2
Executing on host: /gdb/mirror/src/gdb/testsuite/../../gdb/gdb -nw --command gdb_cmd (timeout = 300)
spawn /gdb/mirror/src/gdb/testsuite/../../gdb/gdb -nw --command gdb_cmd
GNU gdb 2003-04-16-cvs
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
/gdb/mirror/src/gdb/testsuite/../../gdb/gdb version 2003-04-16-cvs -nx

runtest completed at Tue Apr 15 21:01:46 2003