* [PATCH] Really release IPC resources in info-os.exp
@ 2012-10-23 3:25 Yao Qi
2012-10-23 14:14 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2012-10-23 3:25 UTC (permalink / raw)
To: gdb-patches
Hi,
I find test case gdb.base/info-os.exp fails on our testing servers,
because of error "No space left on device". After I remove these
IPC resources manually, fails disappear.
On my build server, after each execution of info-os.exp, the number
of IPC resources increases by 3,
$ make check RUNTESTFLAGS='--target_board=unix info-os.exp'
$ ipcs | grep yqi | wc -l
15
$ make check RUNTESTFLAGS='--target_board=unix info-os.exp'
$ ipcs | grep yqi | wc -l
18
The end of info-os.exp and info-os.c takes care of releasing them,
but it is still not enough.
In current info-os.exp, dejagnu sends gdb "continue" and tears down
gdb process. It is possible that gdb and inferior is terminated
before the end of info-os.c (releasing IPC resources) is executed.
This patch force GDB to wait until inferior is exited to make sure
IPC resources is really released. With this patch applied, after
each execution of info-os.exp, the number of IPC resources is not
changed.
Is it OK?
gdb/testsuite:
2012-10-23 Yao Qi <yao@codesourcery.com>
* gdb.base/info-os.exp: Resume the inferior until it exits.
---
gdb/testsuite/gdb.base/info-os.exp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp
index 541f03b..4200067 100644
--- a/gdb/testsuite/gdb.base/info-os.exp
+++ b/gdb/testsuite/gdb.base/info-os.exp
@@ -176,4 +176,4 @@ expect_multiline "info os msg" "$msgkey +$msqid +666 .*" "get message queues"
# The SysV IPC primitives linger on after the creating process is killed
# unless they are destroyed explicitly, so allow the test program to tidy
# up after itself.
-send_gdb "continue\n"
+gdb_test "continue" ".*exited.*"
--
1.7.7.6
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Really release IPC resources in info-os.exp
2012-10-23 3:25 [PATCH] Really release IPC resources in info-os.exp Yao Qi
@ 2012-10-23 14:14 ` Joel Brobecker
2012-10-23 15:47 ` Yao Qi
0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2012-10-23 14:14 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
> 2012-10-23 Yao Qi <yao@codesourcery.com>
>
> * gdb.base/info-os.exp: Resume the inferior until it exits.
Regardless of your problem, any change that removes a call to send_gdb
and uses gdb_test instead is a good change in my books. So OK to commit.
IIRC, you don't need the leading ".*", which is implicit, but it might
be clearer the way you have it.
Thanks,
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Really release IPC resources in info-os.exp
2012-10-23 14:14 ` Joel Brobecker
@ 2012-10-23 15:47 ` Yao Qi
0 siblings, 0 replies; 3+ messages in thread
From: Yao Qi @ 2012-10-23 15:47 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On 10/23/2012 10:13 PM, Joel Brobecker wrote:
>> 2012-10-23 Yao Qi <yao@codesourcery.com>
>>
>> * gdb.base/info-os.exp: Resume the inferior until it exits.
>
> Regardless of your problem, any change that removes a call to send_gdb
> and uses gdb_test instead is a good change in my books. So OK to commit.
>
> IIRC, you don't need the leading ".*", which is implicit, but it might
> be clearer the way you have it.
>
This is what I committed, with leading ".*" removed.
--
Yao
gdb/testsuite:
2012-10-23 Yao Qi <yao@codesourcery.com>
* gdb.base/info-os.exp: Resume the inferior until it exits.
---
gdb/testsuite/gdb.base/info-os.exp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp
index 541f03b..45f3103 100644
--- a/gdb/testsuite/gdb.base/info-os.exp
+++ b/gdb/testsuite/gdb.base/info-os.exp
@@ -176,4 +176,4 @@ expect_multiline "info os msg" "$msgkey +$msqid +666 .*" "get message queues"
# The SysV IPC primitives linger on after the creating process is killed
# unless they are destroyed explicitly, so allow the test program to tidy
# up after itself.
-send_gdb "continue\n"
+gdb_test "continue" "exited.*"
--
1.7.7.6
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-23 15:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-23 3:25 [PATCH] Really release IPC resources in info-os.exp Yao Qi
2012-10-23 14:14 ` Joel Brobecker
2012-10-23 15:47 ` Yao Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox