From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-il1-x12d.google.com with SMTP id g9so1947493ila.8 for ; Fri, 03 Mar 2023 08:41:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1677861689; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=hL9j6TUDFeKhtmPVEmUoO+zjdUs85kWePFizNsvD+xo=; b=loKzkauAL8rDVSkeAuQP6F99ijQgmjGJ5HAyiU9xXJteLS+VoAa5Ebm8n1nzmrQzEy w4MrapdJD1ogRcEco9QIM5VAAjIUmiJetjBehax5QDc3qPBeOhVSXa2Ft6PUjaqYpe4u uPPHtHXxWxO65oGwlr1WyHgSjWml4mSpAbCbRhRYFQVoNDBbKzZ/bcAoPwWHHGJ6Fs5s Cw44+TRKIhT4ykSQippzQ72HA6Gc9mbqFDFtHE3R45KTrtsHD8mqLpmx9BuSfIVLG1rU xo7uWM58opx0ha5JUCFmjNqLetrXWSInuN5MlIaMaPg6ZYNfv39Dnb/ylZD9RFr9aQ3g Mfcg== 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) From: Tom Tromey 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-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: 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