public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug testsuite/29726] New: [gdb] FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=: action=delete: connection to GDBserver succeeded
Date: Thu, 27 Oct 2022 07:19:41 +0000	[thread overview]
Message-ID: <bug-29726-4717@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2022-10-27  7:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27  7:19 vries at gcc dot gnu.org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29726-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).