* [patch] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4
@ 2012-08-07 6:43 Jan Kratochvil
2012-08-07 11:39 ` [patchv2] " Jan Kratochvil
2012-08-21 18:20 ` [patch] " Pedro Alves
0 siblings, 2 replies; 11+ messages in thread
From: Jan Kratochvil @ 2012-08-07 6:43 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
Hi Doug,
according to freenode #gdb
(2012-08-07 00:02:56 GMT)
xdje: jankratochvil: I'm seeing valgrind-infcall.exp failing. While the docs
for gdb_test_multiple claim the action is performed in the caller's context,
that doesn't appear to be the case ...
(2012-08-07 00:03:29 GMT)
xdje: ... and the "break" for finding "Invalid free" is a nop, and we take the
"Remote connection closed" exit.
It works on Fedora systems and also on Ubuntu 12.04.
On reported Ubuntu 10.04.4 the testcase quits early as UNSUPPORTED because
valgrind is too old there.
So I do not see how to test it, except for building custom valgrind there.
Does it work for you this way?
Thanks,
Jan
gdb/testsuite/
2012-08-07 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/valgrind-infcall.exp (continue #$continue_count): Use
global variable loop, not a 'break'.
diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gdb.base/valgrind-infcall.exp
index 3224e9c..526d82a 100644
--- a/gdb/testsuite/gdb.base/valgrind-infcall.exp
+++ b/gdb/testsuite/gdb.base/valgrind-infcall.exp
@@ -90,12 +90,14 @@ gdb_test "$vgdbcmd" " in \\.?_start .*" "target remote for vgdb"
gdb_test "monitor v.set gdb_output" "valgrind output will go to gdb.*"
set continue_count 1
-while 1 {
+set loop 1
+while {$loop} {
set test "continue #$continue_count"
gdb_test_multiple "continue" "" {
-re "Invalid free\\(\\).*: main .*\r\n$gdb_prompt $" {
pass $test
- break
+ # In Ubuntu 10.04.4 environments 'break' does not work here.
+ set loop 0
}
-re "Remote connection closed.*\r\n$gdb_prompt $" {
fail "$test (remote connection closed)"
^ permalink raw reply [flat|nested] 11+ messages in thread* [patchv2] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4
2012-08-07 6:43 [patch] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4 Jan Kratochvil
@ 2012-08-07 11:39 ` Jan Kratochvil
2012-08-07 18:00 ` dje
2012-08-21 18:20 ` [patch] " Pedro Alves
1 sibling, 1 reply; 11+ messages in thread
From: Jan Kratochvil @ 2012-08-07 11:39 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
Hi Doug,
added there also some unrealted new protection against infinite loop which I
got in today's nightly run, to make it a single commit to the same code.
BTW I do not see how it could happen (it is not reproducible for me):
(gdb) target remote | /usr/lib/valgrind/../../bin/vgdb --pid=20165
Remote debugging using | /usr/lib/valgrind/../../bin/vgdb --pid=20165
relaying data between gdb and process 20165
Unknown remote qXfer reply: PacketSize=3fff;QStartNoAckMode+;QPassSignals+;qXfer:auxv:read+;qXfer:features:read+
(gdb) FAIL: gdb.base/valgrind-infcall.exp: target remote for vgdb
Jan
On Tue, 07 Aug 2012 08:43:03 +0200, Jan Kratochvil wrote:
Hi Doug,
according to freenode #gdb
(2012-08-07 00:02:56 GMT)
xdje: jankratochvil: I'm seeing valgrind-infcall.exp failing. While the docs
for gdb_test_multiple claim the action is performed in the caller's context,
that doesn't appear to be the case ...
(2012-08-07 00:03:29 GMT)
xdje: ... and the "break" for finding "Invalid free" is a nop, and we take the
"Remote connection closed" exit.
It works on Fedora systems and also on Ubuntu 12.04.
On reported Ubuntu 10.04.4 the testcase quits early as UNSUPPORTED because
valgrind is too old there.
So I do not see how to test it, except for building custom valgrind there.
Does it work for you this way?
Thanks,
Jan
gdb/testsuite/
2012-08-07 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/valgrind-infcall.exp (continue #$continue_count): Use
global variable loop, not a 'break'. Add loop count limit to 100.
Add new fail case for terminated vgdb.
diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gdb.base/valgrind-infcall.exp
index 3224e9c..84d6819 100644
--- a/gdb/testsuite/gdb.base/valgrind-infcall.exp
+++ b/gdb/testsuite/gdb.base/valgrind-infcall.exp
@@ -90,17 +90,23 @@ gdb_test "$vgdbcmd" " in \\.?_start .*" "target remote for vgdb"
gdb_test "monitor v.set gdb_output" "valgrind output will go to gdb.*"
set continue_count 1
-while 1 {
+set loop 1
+while {$loop && $continue_count < 100} {
set test "continue #$continue_count"
gdb_test_multiple "continue" "" {
-re "Invalid free\\(\\).*: main .*\r\n$gdb_prompt $" {
pass $test
- break
+ # In Ubuntu 10.04.4 environments 'break' does not work here.
+ set loop 0
}
-re "Remote connection closed.*\r\n$gdb_prompt $" {
fail "$test (remote connection closed)"
return -1
}
+ -re "The program is not being run\\.\r\n$gdb_prompt $" {
+ fail "$test (valgrind vgdb has terminated)"
+ return -1
+ }
-re "\r\n$gdb_prompt $" {
pass "$test (false warning)"
}
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [patchv2] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4
2012-08-07 11:39 ` [patchv2] " Jan Kratochvil
@ 2012-08-07 18:00 ` dje
2012-08-07 18:06 ` [commit+7.5] " Jan Kratochvil
0 siblings, 1 reply; 11+ messages in thread
From: dje @ 2012-08-07 18:00 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
Jan Kratochvil writes:
> Does it work for you this way?
>
>
> Thanks,
> Jan
>
>
> gdb/testsuite/
> 2012-08-07 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * gdb.base/valgrind-infcall.exp (continue #$continue_count): Use
> global variable loop, not a 'break'. Add loop count limit to 100.
> Add new fail case for terminated vgdb.
Yes, thanks!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4
2012-08-07 6:43 [patch] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4 Jan Kratochvil
2012-08-07 11:39 ` [patchv2] " Jan Kratochvil
@ 2012-08-21 18:20 ` Pedro Alves
2012-08-21 18:27 ` Jan Kratochvil
1 sibling, 1 reply; 11+ messages in thread
From: Pedro Alves @ 2012-08-21 18:20 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: Doug Evans, gdb-patches
On 08/07/2012 07:43 AM, Jan Kratochvil wrote:
> set continue_count 1
> -while 1 {
> +set loop 1
> +while {$loop} {
> set test "continue #$continue_count"
> gdb_test_multiple "continue" "" {
> -re "Invalid free\\(\\).*: main .*\r\n$gdb_prompt $" {
> pass $test
> - break
> + # In Ubuntu 10.04.4 environments 'break' does not work here.
> + set loop 0
> }
For archaeology, and for knowing when can we stop caring for this issue,
it would be nice(r) IMO to know the tcl/expect version that triggered this issue.
--
Pedro Alves
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [patch] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4
2012-08-21 18:20 ` [patch] " Pedro Alves
@ 2012-08-21 18:27 ` Jan Kratochvil
2012-08-21 18:41 ` Pedro Alves
0 siblings, 1 reply; 11+ messages in thread
From: Jan Kratochvil @ 2012-08-21 18:27 UTC (permalink / raw)
To: Pedro Alves; +Cc: Doug Evans, gdb-patches
On Tue, 21 Aug 2012 20:19:55 +0200, Pedro Alves wrote:
> On 08/07/2012 07:43 AM, Jan Kratochvil wrote:
> > set continue_count 1
> > -while 1 {
> > +set loop 1
> > +while {$loop} {
> > set test "continue #$continue_count"
> > gdb_test_multiple "continue" "" {
> > -re "Invalid free\\(\\).*: main .*\r\n$gdb_prompt $" {
> > pass $test
> > - break
> > + # In Ubuntu 10.04.4 environments 'break' does not work here.
> > + set loop 0
> > }
>
> For archaeology, and for knowing when can we stop caring for this issue,
> it would be nice(r) IMO to know the tcl/expect version that triggered this issue.
This was "v1" patch, there is also "patchv2".
"patchv2" fixes also the case of "The program is not being run". I believe
the Doug's problem was due to it and not due to the "break" statement. But
I failed to reproduce the Doug's problem so I left it as is.
The comment just states the bugreport, nothing more.
Thanks,
Jan
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [patch] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4
2012-08-21 18:27 ` Jan Kratochvil
@ 2012-08-21 18:41 ` Pedro Alves
2012-08-21 19:04 ` Jan Kratochvil
0 siblings, 1 reply; 11+ messages in thread
From: Pedro Alves @ 2012-08-21 18:41 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: Doug Evans, gdb-patches
On 08/21/2012 07:27 PM, Jan Kratochvil wrote:
> On Tue, 21 Aug 2012 20:19:55 +0200, Pedro Alves wrote:
>> On 08/07/2012 07:43 AM, Jan Kratochvil wrote:
>>> set continue_count 1
>>> -while 1 {
>>> +set loop 1
>>> +while {$loop} {
>>> set test "continue #$continue_count"
>>> gdb_test_multiple "continue" "" {
>>> -re "Invalid free\\(\\).*: main .*\r\n$gdb_prompt $" {
>>> pass $test
>>> - break
>>> + # In Ubuntu 10.04.4 environments 'break' does not work here.
>>> + set loop 0
>>> }
>>
>> For archaeology, and for knowing when can we stop caring for this issue,
>> it would be nice(r) IMO to know the tcl/expect version that triggered this issue.
>
> This was "v1" patch, there is also "patchv2".
>
> "patchv2" fixes also the case of "The program is not being run". I believe
> the Doug's problem was due to it and not due to the "break" statement. But
> I failed to reproduce the Doug's problem so I left it as is.
>
> The comment just states the bugreport, nothing more.
Understood. The comment is still there on v2, so the point still stands
though.
--
Pedro Alves
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [patch] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4
2012-08-21 18:41 ` Pedro Alves
@ 2012-08-21 19:04 ` Jan Kratochvil
2012-08-21 20:01 ` Doug Evans
0 siblings, 1 reply; 11+ messages in thread
From: Jan Kratochvil @ 2012-08-21 19:04 UTC (permalink / raw)
To: Pedro Alves; +Cc: Doug Evans, gdb-patches
On Tue, 21 Aug 2012 20:41:18 +0200, Pedro Alves wrote:
> On 08/21/2012 07:27 PM, Jan Kratochvil wrote:
> > "patchv2" fixes also the case of "The program is not being run". I believe
> > the Doug's problem was due to it and not due to the "break" statement. But
> > I failed to reproduce the Doug's problem so I left it as is.
> >
> > The comment just states the bugreport, nothing more.
>
> Understood. The comment is still there on v2, so the point still stands
> though.
Unless Doug speaks up with a verification I will just remove the comment.
Thanks,
Jan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4
2012-08-21 19:04 ` Jan Kratochvil
@ 2012-08-21 20:01 ` Doug Evans
2012-08-24 14:28 ` Jan Kratochvil
2012-09-13 5:36 ` [commit+7.5] " Jan Kratochvil
0 siblings, 2 replies; 11+ messages in thread
From: Doug Evans @ 2012-08-21 20:01 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: Pedro Alves, gdb-patches
On Tue, Aug 21, 2012 at 12:04 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Tue, 21 Aug 2012 20:41:18 +0200, Pedro Alves wrote:
>> On 08/21/2012 07:27 PM, Jan Kratochvil wrote:
>> > "patchv2" fixes also the case of "The program is not being run". I believe
>> > the Doug's problem was due to it and not due to the "break" statement. But
>> > I failed to reproduce the Doug's problem so I left it as is.
>> >
>> > The comment just states the bugreport, nothing more.
>>
>> Understood. The comment is still there on v2, so the point still stands
>> though.
>
> Unless Doug speaks up with a verification I will just remove the comment.
I'd say keep the comment in some form.
The tcl/expect I've been using is
$ expect -v
expect version 5.44.1.14
$ ldd /usr/bin/expect | grep tcl
libtcl8.5.so.0 => /usr/lib/libtcl8.5.so.0 (0x00007ff9bac15000)
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [patch] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4
2012-08-21 20:01 ` Doug Evans
@ 2012-08-24 14:28 ` Jan Kratochvil
2012-09-13 5:36 ` [commit+7.5] " Jan Kratochvil
1 sibling, 0 replies; 11+ messages in thread
From: Jan Kratochvil @ 2012-08-24 14:28 UTC (permalink / raw)
To: Doug Evans; +Cc: Pedro Alves, gdb-patches
[-- Attachment #1: Type: text/plain, Size: 835 bytes --]
On Tue, 21 Aug 2012 22:00:44 +0200, Doug Evans wrote:
> I'd say keep the comment in some form.
>
> The tcl/expect I've been using is
> $ expect -v
> expect version 5.44.1.14
> $ ldd /usr/bin/expect | grep tcl
> libtcl8.5.so.0 => /usr/lib/libtcl8.5.so.0 (0x00007ff9bac15000)
After reverting 61ab2e32245eadc40c36c5d7d4c4962962df59bd on FSF GDB HEAD it
still works for me.
expect-5.44.1.14-0google.fc18.x86_64
tcl-8.5.12-1.fc18.x86_64
Built from Fedora 18 expect repository
http://pkgs.fedoraproject.org/cgit/expect.git/tree/?h=f18&id=751b103fb1c95b705fd8a2eb9cf5c682f0aef373
by attached .spec patch with:
https://launchpad.net/ubuntu/+archive/primary/+files/expect_5.44.1.14.orig.tar.gz
Do you run some replaced valgrind on updated Ubuntu 10.04.4? Stock Ubuntu
valgrind is too old for this testcase to run.
Regards,
Jan
[-- Attachment #2: expect.spec-google.patch --]
[-- Type: text/plain, Size: 2663 bytes --]
diff --git a/expect.spec b/expect.spec
index 60dcb5c..1ff01e4 100644
--- a/expect.spec
+++ b/expect.spec
@@ -1,16 +1,17 @@
+%global _unpackaged_files_terminate_build 0
%{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)}
%{!?tcl_sitearch: %define tcl_sitearch %{_libdir}/tcl%{tcl_version}}
-%global majorver 5.45
+%global majorver 5.44.1.14
Summary: A program-script interaction and testing utility
Name: expect
Version: %{majorver}
-Release: 7%{?dist}
+Release: 0google%{?dist}
License: Public Domain
Group: Development/Languages
# URL: probably more useful is http://sourceforge.net/projects/expect/
URL: http://expect.nist.gov/
-Source: http://downloads.sourceforge.net/%{name}/%{name}%{version}.tar.gz
+Source: expect_5.44.1.14.orig.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Buildrequires: tcl-devel tk-devel autoconf automake libXft-devel chrpath
# Patch0: fixes change log file permissions
@@ -71,24 +72,25 @@ Please use tclsh with package require Tk and Expect instead
of expectk.
%prep
-%setup -q -n expect%{version}
-%patch0 -p1 -b .log_file
-%patch1 -p1 -b .pkgpath
-%patch2 -p1 -b .man-page
-%patch3 -p1 -b .match-gt-numchars-segfault
+%setup -q
+#-n expect%{version}
+#patch0 -p1 -b .log_file
+#patch1 -p1 -b .pkgpath
+#patch2 -p1 -b .man-page
+#patch3 -p1 -b .match-gt-numchars-segfault
# examples fixes
-%patch100 -p1 -b .random
-%patch101 -p1 -b .mkpasswd-dash
-%patch102 -p1 -b .check-telnet
-%patch103 -p1 -b .passmass-su-full-path
+#patch100 -p1 -b .random
+#patch101 -p1 -b .mkpasswd-dash
+#patch102 -p1 -b .check-telnet
+#patch103 -p1 -b .passmass-su-full-path
# -pkgpath.patch touch configure.in
-aclocal
-autoconf
-( cd testsuite
- autoconf -I.. )
+#aclocal
+#autoconf
+#( cd testsuite
+# autoconf -I.. )
%build
-%configure --with-tcl=%{_libdir} --with-tk=%{_libdir} --enable-shared \
+%configure --with-tcl=%{tcl_sitearch} --with-tk=%{_libdir} --enable-shared \
--with-tclinclude=%{_includedir}/tcl-private/generic
make %{?_smp_mflags}
@@ -100,7 +102,10 @@ rm -rf "$RPM_BUILD_ROOT"
make install DESTDIR="$RPM_BUILD_ROOT"
# move
-mv "$RPM_BUILD_ROOT"%{tcl_sitearch}/expect%{version}/libexpect%{version}.so "$RPM_BUILD_ROOT"%{_libdir}
+mv "$RPM_BUILD_ROOT"%{_libdir}/expect%{version}/libexpect%{version}.so "$RPM_BUILD_ROOT"%{_libdir}
+mkdir "$RPM_BUILD_ROOT"%{tcl_sitearch}
+mkdir "$RPM_BUILD_ROOT"%{tcl_sitearch}/expect%{version}
+mv "$RPM_BUILD_ROOT"%{_libdir}/expect%{version}/pkgIndex.tcl "$RPM_BUILD_ROOT"%{tcl_sitearch}/expect%{version}/
# for linking with -lexpect
ln -s libexpect%{majorver}.so "$RPM_BUILD_ROOT"%{_libdir}/libexpect.so
^ permalink raw reply [flat|nested] 11+ messages in thread* [commit+7.5] [patch] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4
2012-08-21 20:01 ` Doug Evans
2012-08-24 14:28 ` Jan Kratochvil
@ 2012-09-13 5:36 ` Jan Kratochvil
1 sibling, 0 replies; 11+ messages in thread
From: Jan Kratochvil @ 2012-09-13 5:36 UTC (permalink / raw)
To: Doug Evans; +Cc: Pedro Alves, gdb-patches
On Tue, 21 Aug 2012 22:00:44 +0200, Doug Evans wrote:
> On Tue, Aug 21, 2012 at 12:04 PM, Jan Kratochvil <jan.kratochvil@redhat.com> wrote:
> > Unless Doug speaks up with a verification I will just remove the comment.
>
> I'd say keep the comment in some form.
>
> The tcl/expect I've been using is
> $ expect -v
> expect version 5.44.1.14
> $ ldd /usr/bin/expect | grep tcl
> libtcl8.5.so.0 => /usr/lib/libtcl8.5.so.0 (0x00007ff9bac15000)
On Fri, 24 Aug 2012 16:27:33 +0200, Jan Kratochvil wrote:
> After reverting 61ab2e32245eadc40c36c5d7d4c4962962df59bd on FSF GDB HEAD it
> still works for me.
[...]
> Do you run some replaced valgrind on updated Ubuntu 10.04.4? Stock Ubuntu
> valgrind is too old for this testcase to run.
Therefore removed the comment:
http://sourceware.org/ml/gdb-cvs/2012-09/msg00056.html
For 7.5:
http://sourceware.org/ml/gdb-cvs/2012-09/msg00057.html
Regads,
Jan
http://sourceware.org/ml/gdb-cvs/2012-09/msg00056.html
--- src/gdb/testsuite/ChangeLog 2012/09/12 23:29:04 1.3370
+++ src/gdb/testsuite/ChangeLog 2012/09/13 05:32:08 1.3371
@@ -1,3 +1,7 @@
+2012-09-13 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.base/valgrind-infcall.exp: Remove comment about Ubuntu.
+
2012-09-12 Keith Seitz <keiths@redhat.com>
* gdb.cp/converts.cc (main): Comment out the pointer to boolean
--- src/gdb/testsuite/gdb.base/valgrind-infcall.exp 2012/08/07 18:04:12 1.4
+++ src/gdb/testsuite/gdb.base/valgrind-infcall.exp 2012/09/13 05:32:09 1.5
@@ -96,7 +96,6 @@
gdb_test_multiple "continue" "" {
-re "Invalid free\\(\\).*: main .*\r\n$gdb_prompt $" {
pass $test
- # In Ubuntu 10.04.4 environments 'break' does not work here.
set loop 0
}
-re "Remote connection closed.*\r\n$gdb_prompt $" {
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-09-13 5:36 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-07 6:43 [patch] gdb.base/valgrind-infcall.exp compat. with Ubuntu 10.04.4 Jan Kratochvil
2012-08-07 11:39 ` [patchv2] " Jan Kratochvil
2012-08-07 18:00 ` dje
2012-08-07 18:06 ` [commit+7.5] " Jan Kratochvil
2012-08-21 18:20 ` [patch] " Pedro Alves
2012-08-21 18:27 ` Jan Kratochvil
2012-08-21 18:41 ` Pedro Alves
2012-08-21 19:04 ` Jan Kratochvil
2012-08-21 20:01 ` Doug Evans
2012-08-24 14:28 ` Jan Kratochvil
2012-09-13 5:36 ` [commit+7.5] " Jan Kratochvil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox