From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id C64FD3858C83 for ; Mon, 28 Feb 2022 14:31:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C64FD3858C83 Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-490-QkNFn8oqNSeBPN-FvH66ow-1; Mon, 28 Feb 2022 09:31:35 -0500 X-MC-Unique: QkNFn8oqNSeBPN-FvH66ow-1 Received: by mail-oo1-f71.google.com with SMTP id c3-20020a4a8f83000000b0031cb521ef64so8692767ooj.8 for ; Mon, 28 Feb 2022 06:31:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bi4m/PUAPyueE8XrwC1+jendeA3Asd+B9bZVtYcetUE=; b=4QljzSw+0deb3wKP6xs+WYekKwOwf/Umek0OtFYMj/1eVoMnKBbQO3y/z6P4dGRaUo 86Qj8WAbnjkhLqjCIlfdVAHbj7trxJkGb04MOEKH9ffpoeIGLUfnR1qDQovp8/wSvEtM KkE5w9LlTs2tzTcTu242DRbDPBXrjKyV2UDZkhPzu9woVg18sszA2I8iLtu2uMg4kKxp Jt0fByNO43CHUqUs9Jp95LP0/ZIrpPWX/GRo7ftwi+3PxMjU46/Cjui+eGXLrhh1LMQa 6Qtq9N/RI8IGqF7JIyvUHIlOBVNh6dFEKKArP0iGUUHuKo0EE02lJBAuiE767fBl4OAs lU6A== X-Gm-Message-State: AOAM530HcKTci0NGTOQ6HJKpjxoQNUaqzzqZbly9JX4w3kIya73CYD+T Olyg2v0fk032j8a3U6KUGT2Ah09gTwQEllbNWmeUERJyMtzJUeerjKGP34eQWNjkt8FbhiUV9sm poomg+lfpy7ejJSqR0uPA76Libphvyy3zE4gN9A== X-Received: by 2002:a05:6870:494d:b0:d7:71a:6283 with SMTP id fl13-20020a056870494d00b000d7071a6283mr695564oab.5.1646058695041; Mon, 28 Feb 2022 06:31:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzlGbPMnYG3vM6kyE8L6Qi5UqdCNIdP0GD4YXVlljY7/1XerBj24h5c3X2r6wRD/AWik7/p4RcKRhntubbofA0= X-Received: by 2002:a05:6870:494d:b0:d7:71a:6283 with SMTP id fl13-20020a056870494d00b000d7071a6283mr695547oab.5.1646058694792; Mon, 28 Feb 2022 06:31:34 -0800 (PST) MIME-Version: 1.0 References: <20220224174113.1620498-1-keiths@redhat.com> In-Reply-To: <20220224174113.1620498-1-keiths@redhat.com> From: Alexandra Petlanova Hajkova Date: Mon, 28 Feb 2022 15:31:23 +0100 Message-ID: Subject: Re: [PATCH] Fix "spawn id XYZ not open" errors in gdb.mi/mi-exec-run.exp To: Keith Seitz Cc: gdb-patches@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2022 14:31:41 -0000 On Thu, Feb 24, 2022 at 6:42 PM Keith Seitz via Gdb-patches < gdb-patches@sourceware.org> wrote: > Running mi-exec-run.exp on native-extended-gdbserver/-m{32,64} > causes several Tcl errors to appear. For example, > > (gdb) > ERROR: : spawn id exp20 not open > while executing > "expect { > -i exp11 -timeout 10 > -i "$inferior_spawn_id" > -re ".*Cannot exec.*Permission denied" { > set saw_perm_error 1 > verbose -log "saw..." > ("uplevel" body line 1) > invoked from within > "uplevel $body" NONE : spawn id exp20 not open > UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: > force-fail=1: run failure detected (eof) > > This is happening because of the way this test is implemented: > > while {1} { > gdb_expect { > -i "$inferior_spawn_id" > -re ".*Cannot exec.*Permission denied" { > set saw_perm_error 1 > verbose -log "saw mi error" > } > -i "$gdb_spawn_id" > -re "\\^error,msg=\"During startup program exited with > code 127" { > set saw_mi_error 1 > verbose -log "saw mi error" > } > # and so on > } > } > I can see this ERROR on Fedora Rawhide when running: > make check RUNTESTFLAGS="--target_board native-extended-gdbserver" TESTS=gdb.mi/mi-exec-run.exp I'm using glibc-2.35.9000-6.fc37.x86_64 and gcc-12.0.1-0.9.fc37.x86_64. After applying this patch the TCL errors are gone and I can see one FAIL: Running /root/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.mi/mi-exec-run.exp ... FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=0: breakpoint hit reported on console (timeout) === gdb Summary === # of expected passes 13 # of unexpected failures 1