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.129.124]) by sourceware.org (Postfix) with ESMTPS id 2FC923858D3C for ; Mon, 22 Apr 2024 16:04:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2FC923858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2FC923858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713801875; cv=none; b=o0cPeuZwQ7HN+Pk3B+dAnpcmJsrV5uXZp8g3SEyuH3CiLsQ2C0Fes88+ndWDPZDt+Kz3ZO/z6sd9erJxWvnmeTUBB4PZ4iJVT0Y9vNL9/7lh66ZqKV43zyo91PZNYwr2rYeRQykOiFoa4JmDXlWapjt/I33U7QbMuhKYI2w+XJs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713801875; c=relaxed/simple; bh=04JwslO36/Rkp9UIbuhWWU/Ik0QcrbYLugnjI1DrAcY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=IwfEX66yb34MiGGeERfX7hKL7I87fNb9BpgDstm2tqNn1FpVY0kz2lCkJbUL8Pv9vXGzPKmQUICcfTNyzabfl6/pckodoZoIGQL+yqCWP+pDvdtkbfPloWeEp7ASb3SIngejwHl0AOxuTubT7K3M48GGu/E4zCZgRVdN6YgIA5w= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713801864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RMOuwv1ur+xwxP2FdaY+zF1mZp+C4ryIgidwKruO8cg=; b=JQWILOkN8t91fixtciHAb2h5AhxFU2xsi46edl0GUp61gTezzm9Kl1emxYpqAic9Vy0lY4 CIZABlV2r4fmeqAehlLZVKtCab4YEPi2CcUyNcjHlG81x4S9ji5xDQUmye3BaOK4UapZlx Am8BPP3VPRoDHjASdW3vnbfp+3QwBjc= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-101-DLlDP0IZPbW8ESQ-CJAYvw-1; Mon, 22 Apr 2024 09:49:51 -0400 X-MC-Unique: DLlDP0IZPbW8ESQ-CJAYvw-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-41a1eb33994so4006935e9.1 for ; Mon, 22 Apr 2024 06:49:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713793790; x=1714398590; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RMOuwv1ur+xwxP2FdaY+zF1mZp+C4ryIgidwKruO8cg=; b=RSBz+bhYctsoVOrX0omkLJ0VOIGFdvytVtShWILRqwRE5Mljpf73q455qYDg1lFoY7 xK+D/Z3gcCYSfHqVTUIWbB3btiRFKjyuJyOxzljgRwztYs0BaWa3REbMbtV6ccWba9td Is+cbJ7dHcAIUrJr9nAqf9CwSCeUPaP01CrXKHwWbldWbr61plv90oO4bwG1wC1avLgp jSGm6EenVpiTdnqwuZP28QXOcQWtpm4ssOotyQauLjA6zUBfve2kZmtrHw66siqKJFdb iMUXIpVkOuRxLAPGn5ejLqoQJeQlecZ5eSo6vHY1wdJEetN6V9Ez++/LQHJO/S+edQRA viTQ== X-Forwarded-Encrypted: i=1; AJvYcCWf6znZVR9Tl26TfjjqdrN4ce6ATuazO9mLSsZ3nrR6DT6OUXXJ3ssK5B1CLwbMf5AKjq8xjiiZN2TGU4iYHqF5mS8E3k4OomRVTQ== X-Gm-Message-State: AOJu0YxL6ZXzlT1X/hQrNzmczCG1Qn2BJ9NrB5iH+wncJ/1aRK5JdVxU 5HQGHN2jH30uubZ36yTEkRv9NnAk3HIArTT5bo7m9sPzzJz67sDZ/q1Y75pz4N3oYOQLTdUl3L4 lrMbgJYCu7HmwPnMuf6nxBu+XM0BPy0qMWDZncB4dfCcczxC35fpMhRy3hVE= X-Received: by 2002:a05:600c:3d89:b0:41a:91bd:7722 with SMTP id bi9-20020a05600c3d8900b0041a91bd7722mr737639wmb.22.1713793789820; Mon, 22 Apr 2024 06:49:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYKj8yrgKpeuSHwDZDKPowNq1lhng8iR6Zi9+thCIFwII/59j9neHU8pL426UgpEcut/inIQ== X-Received: by 2002:a05:600c:3d89:b0:41a:91bd:7722 with SMTP id bi9-20020a05600c3d8900b0041a91bd7722mr737615wmb.22.1713793789219; Mon, 22 Apr 2024 06:49:49 -0700 (PDT) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id j10-20020a05600c190a00b00418a9961c47sm16771822wmq.47.2024.04.22.06.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 06:49:49 -0700 (PDT) From: Andrew Burgess To: Bernd Edlinger , "gdb-patches@sourceware.org" , Tom de Vries Subject: Re: [PATCH v2] Fix random dejagnu test abort with simulator target In-Reply-To: References: Date: Mon, 22 Apr 2024 14:49:48 +0100 Message-ID: <87zftlfqwz.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Bernd Edlinger writes: > This is probably a dejagnu issue with the gdb testsuite > when a simulator target is used. I observed random > testrun aborts with dejagnu 1.6.2-1 from ubuntu 20.04 > The problem starts when the test case gdb.base/sigwinch-notty.exp > tries to execute "sleep", although that is impossible with a > simulator. And for unknown reason the test case completes > (with errors) before the "after 1000" block is run. > > Then in a totally different test this happens with 50% likelihood: > > ERROR: (DejaGnu) proc "bgerror {can't read "gdb_pid": no such variable}" does not exist. > The error code is TCL LOOKUP COMMAND bgerror > The info on the error is: > invalid command name "bgerror" > while executing > "::tcl_unknown bgerror {can't read "gdb_pid": no such variable}" > ("uplevel" body line 1) > invoked from within > "uplevel 1 ::tcl_unknown $args" > > === gdb Summary === > > # of expected passes 30815 > # of unexpected failures 241 > # of expected failures 3 > # of known failures 23 > # of unresolved testcases 241 > # of untested testcases 96 > # of unsupported tests 532 > # of paths in test names 1 > > So the whole test run is aborted in the middle. > > This patch should fix the issue. > > Co-Authored-By: Tom de Vries > --- > gdb/testsuite/gdb.base/sigwinch-notty.exp | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > > v2: I took over Tom's suggestion 1:1, and gave it a few test runs with > no unexpected test aborts so far. > So this looks quite good to me, and has also a nice improvement of giving > an UNSUPPORTED message, with what exactly was the reason why the test > did not run. > > diff --git a/gdb/testsuite/gdb.base/sigwinch-notty.exp b/gdb/testsuite/gdb.base/sigwinch-notty.exp > index cef21c07c59..621231df6af 100644 > --- a/gdb/testsuite/gdb.base/sigwinch-notty.exp > +++ b/gdb/testsuite/gdb.base/sigwinch-notty.exp > @@ -19,11 +19,17 @@ > > require {!target_info exists gdb,nosignals} > > -# The testfile relies on "run" from the command line, so only works > -# with "target native". > -if { [target_info gdb_protocol] != "" } { > - return > -} > +# The test-case relies on "run" from the command line, so it only works > +# with "target native", so we need host == target. I'm currently reading and rereaching the V1 series to try and understand what's going on here, but I don't understand this comment. # The test-case relies on "run" from the command line, so it only works # with "target native", so we need host == target. Just doesn't make sense to me: 'target extended-remote' will also support the `run` command, as will 'target sim'. The conclusion might well be valid, but I think the logic used to justify it is incorrect. Can we rephrase this comment so it makes sense? Thanks, Andrew > +# > +# The test-case uses "exp_pid -i $gdb_spawn_id" which doesn't work with > +# remote host, so we need build == host. > +# > +# In other words, we need build == host == target. > +require {!is_remote host} {!is_remote target} > + > +# Check that we have "target native" as opposed to native-gdbserver etc. > +require {string equal [target_info gdb_protocol] ""} > > gdb_exit > > -- > 2.39.2