This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Really release IPC resources in info-os.exp


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]