diff options
author | Tom de Vries <tdevries@suse.de> | 2023-09-26 16:28:48 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-09-26 16:28:48 +0200 |
commit | 940bb336cbce23f1780c449a7c72ca41e8d91fa5 (patch) | |
tree | 3147cb08f58261cb832a6051baf365665df1b481 /gdb/testsuite | |
parent | d86dbbea8a81ab499cbf6969cee54a051817e025 (diff) | |
download | gdb-940bb336cbce23f1780c449a7c72ca41e8d91fa5.zip gdb-940bb336cbce23f1780c449a7c72ca41e8d91fa5.tar.gz gdb-940bb336cbce23f1780c449a7c72ca41e8d91fa5.tar.bz2 |
[gdb/testsuite] Fix gdb.server/ext-run.exp in container
When running the gdb testsuite inside a container, I run into:
...
(gdb) gdb_expect_list pattern: /1 +root +[/a-z]*(init|systemd)/
FAIL: gdb.server/ext-run.exp: get process list (pattern 2)
...
because there's no process with pid 1 and cmd init or systemd.
In the host system (where the test passes), I have:
...
$ ps -f 1
UID PID PPID C STIME TTY STAT TIME CMD
root 1 0 0 Sep25 ? Ss 0:03 /usr/lib/systemd/systemd ...
...
but in the container instead:
...
UID PID PPID C STIME TTY STAT TIME CMD
root 1 0 0 11:45 pts/0 Ss 0:00 /bin/bash
...
Fix this by also accepting bash as a valid cmd.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.server/ext-run.exp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp index 59ead66..269158c 100644 --- a/gdb/testsuite/gdb.server/ext-run.exp +++ b/gdb/testsuite/gdb.server/ext-run.exp @@ -59,7 +59,7 @@ if { [istarget *-*-linux*] } { # This is done in a way to avoid the timeout that can occur from # applying .* regexp to large output. gdb_test_sequence "info os processes" "get process list" \ - { "pid +user +command" "1 +root +\[/a-z\]*(init|systemd)" } + { "pid +user +command" "1 +root +\[/a-z\]*(init|systemd|bash)" } } } |