From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SGErHE8jAmTqbQMAWB0awg (envelope-from ) for ; Fri, 03 Mar 2023 11:41:51 -0500 Received: by simark.ca (Postfix, from userid 112) id 70B1C1E223; Fri, 3 Mar 2023 11:41:51 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=yPx5zeyc; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 32C021E0D3 for ; Fri, 3 Mar 2023 11:41:51 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 50AEF3858436 for ; Fri, 3 Mar 2023 16:41:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 50AEF3858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677861710; bh=hL9j6TUDFeKhtmPVEmUoO+zjdUs85kWePFizNsvD+xo=; h=To:Cc:Subject:References:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=yPx5zeycYCHaEwNnik4DCciKS7AZE05fLpJIhM5GrzvN7pgGJQcHyL39oeUkOcmHo 8RUn9vw1GjyjsYRokJwyGYjSGpivPYCfyXWW5ungYtKKFovZxSl5C8dCoPL3A4szgB lSTWlvIgDBYpJaViM9JTY6KHZv9Vd+8+vR7lRu7g= Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by sourceware.org (Postfix) with ESMTPS id 4BF663858D37 for ; Fri, 3 Mar 2023 16:41:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4BF663858D37 Received: by mail-il1-x12d.google.com with SMTP id g9so1947493ila.8 for ; Fri, 03 Mar 2023 08:41:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677861689; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hL9j6TUDFeKhtmPVEmUoO+zjdUs85kWePFizNsvD+xo=; b=KGYcXyBXCjNea3EwDTTdyXf+ithqLlb/H7eLJb0iY4YGpxELu38s/8HjOuhRvn6gem r8C+NrSHket6e558avbCO4jgKxWvA9nIGlzpH0K/iUp80TB2nFEm3Q1TGQ3q0JBOZ0yv EbnhJOSIxqpZEA4S1C0+T8cb3wq2Obk1T2Q+4tNMhOX6FbCXwTLEFqvZfWyNQnOQVrbv upyD5bI74u85RNgjyDSMeSaVSYyPYLjBO5k9p9vdYxx1doouhDmlmJY5+g7tJP1eY00X mE/pkJPWZ1GVFNPRZdNAJ+51PKQFiCQ6RO/BE1PTw+Laob8wtVStXQA+dyS/U7lSkAGJ /Wfg== X-Gm-Message-State: AO0yUKWkVlB3pdzX1cHUJpQ9xoS366teqNdpM8xIQXdp9JEYc2tn8Fy4 cYGFIHfho7HBY6HWa/wNBIXF9Q== X-Google-Smtp-Source: AK7set8/Smafqk0x0ASMs63aM7ytLeDVjVkF7JUDibyCDIZjboJllbngXbuU5JVWl7eb7fpgiSO0Nw== X-Received: by 2002:a92:cda2:0:b0:315:9a7e:fb07 with SMTP id g2-20020a92cda2000000b003159a7efb07mr1714587ild.20.1677861689493; Fri, 03 Mar 2023 08:41:29 -0800 (PST) Received: from murgatroyd (75-166-130-93.hlrn.qwest.net. [75.166.130.93]) by smtp.gmail.com with ESMTPSA id j4-20020a92c204000000b00304ad1e7d21sm729525ilo.28.2023.03.03.08.41.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Mar 2023 08:41:29 -0800 (PST) To: Simon Marchi Cc: Tom Tromey , Tom Tromey via Gdb-patches Subject: Re: [PATCH v3 0/2] Write DWARF index cache files in background References: <20221219164558.378363-1-tromey@adacore.com> <87k006j3zz.fsf@tromey.com> <1154aa3c-4ef9-80ef-c551-35a9ce8bf294@simark.ca> X-Attribution: Tom Date: Fri, 03 Mar 2023 09:41:28 -0700 In-Reply-To: <1154aa3c-4ef9-80ef-c551-35a9ce8bf294@simark.ca> (Simon Marchi's message of "Fri, 24 Feb 2023 16:44:34 -0500") Message-ID: <87o7p9aitj.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: , From: Tom Tromey via Gdb-patches Reply-To: Tom Tromey Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Simon> FAIL: gdb.base/index-cache.exp: test_cache_enabled_miss: at least one file was created Simon> FAIL: gdb.base/index-cache.exp: test_cache_enabled_miss: expected file is there I can't reliably reproduce this. However, I believe the problem is that because the cache file is written in the background, the test is racy. I think the appended should fix it. This just mirrors something done in test_cache_enabled_hit, and the idea is that waiting for gdb to exit ensures that the cache file will have been written. Tom diff --git a/gdb/testsuite/gdb.base/index-cache.exp b/gdb/testsuite/gdb.base/index-cache.exp index 0614d4ee2db..d9a6145b5df 100644 --- a/gdb/testsuite/gdb.base/index-cache.exp +++ b/gdb/testsuite/gdb.base/index-cache.exp @@ -157,6 +157,9 @@ proc_with_prefix test_cache_enabled_miss { cache_dir } { lassign [ls_host $cache_dir] ret files_before + # Just to populate the cache. + run_test_with_flags $cache_dir on {} + run_test_with_flags $cache_dir on { lassign [ls_host $cache_dir] ret files_after