public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/29726] New: [gdb] FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=: action=delete: connection to GDBserver succeeded
@ 2022-10-27  7:19 vries at gcc dot gnu.org
  2022-10-27  7:21 ` [Bug testsuite/29726] " vries at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-27  7:19 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29726

            Bug ID: 29726
           Summary: [gdb] FAIL:
                    gdb.server/connect-with-no-symbol-file.exp: sysroot=:
                    action=delete: connection to GDBserver succeeded
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

I build gdb using -O2, and ran the testsuite using taskset -c 0, and ran into:
...
(gdb) PASS: gdb.server/connect-with-no-symbol-file.exp: sysroot=:
action=delete: setup: adjust sysroot
builtin_spawn
/home/vries/gdb_versions/devel/build/gdb/testsuite/../../gdb/../gdbserver/gdbserver
--once localhost:2385
/home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.server/connect-with-no-symbol-file/connect-with-no-symbol-file^M
/bin/bash:
/home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.server/connect-with-no-symbol-file/connect-with-no-symbol-file:
Permission denied^M
/bin/bash: line 0: exec:
/home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.server/connect-with-no-symbol-file/connect-with-no-symbol-file:
cannot execute: Permission denied^M
During startup program exited with code 126.^M
Exiting^M
target remote localhost:2385^M
`/home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.server/connect-with-no-symbol-file/connect-with-no-symbol-file'
has disappeared; keeping its symbols.^M
localhost:2385: Connection timed out.^M
(gdb) FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=:
action=delete: connection to GDBserver succeeded
...

AFAICT, the following is intended to happen:
- enter scenario "permission"
- cp $exec.bak $exec
- disconnect
- gdbserver start with $exec
- chmod 000 $exec
- connect to gdbserver
- detach
- enter scenario "delete"
- cp $exec.bak $exec
- disconnect
- gdbserver start with $exec
- delete $exec
- connect to gdbserver
- detach

So, it looks like the second "gdbserver start with $exec" fails because it has
no permission to execute $exec, which at first glance suggest that the chmod
000 $exec is still effective, despite the subsequent "cp $exec.bak $exec" which
should have restored the permissions.

FTR, the $exec.bak still has the correct permissions set:
...
$ ls -al
outputs/gdb.server/connect-with-no-symbol-file/connect-with-no-symbol-file.bak
-rwxr-xr-x 1 vries users 12104 Oct 26 18:00
outputs/gdb.server/connect-with-no-symbol-file/connect-with-no-symbol-file.bak
...

And due to the "delete $exec", we can't see the permissions of that one.

This doesn't look like a gdb bug, but I have no idea yet what it could be.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-10-27 14:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27  7:19 [Bug testsuite/29726] New: [gdb] FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=: action=delete: connection to GDBserver succeeded vries at gcc dot gnu.org
2022-10-27  7:21 ` [Bug testsuite/29726] " vries at gcc dot gnu.org
2022-10-27  7:45 ` vries at gcc dot gnu.org
2022-10-27  8:17 ` vries at gcc dot gnu.org
2022-10-27  8:33 ` vries at gcc dot gnu.org
2022-10-27  9:04 ` vries at gcc dot gnu.org
2022-10-27  9:26 ` luis.machado at arm dot com
2022-10-27 14:56 ` [Bug testsuite/29726] [gdb/testsuite] " vries at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).