From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 7903F1F953 for ; Wed, 3 Nov 2021 05:10:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230059AbhKCFMr convert rfc822-to-8bit (ORCPT ); Wed, 3 Nov 2021 01:12:47 -0400 Received: from mail-ed1-f49.google.com ([209.85.208.49]:38464 "EHLO mail-ed1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbhKCFMo (ORCPT ); Wed, 3 Nov 2021 01:12:44 -0400 Received: by mail-ed1-f49.google.com with SMTP id r4so4964833edi.5 for ; Tue, 02 Nov 2021 22:10:08 -0700 (PDT) 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:content-transfer-encoding; bh=iiialm1dIQ/5UaPKYfDqo1EhZm+Xz8akF9sd7Bdn3Co=; b=EjgPFz4mR9GmcB2tDKlIbsRxM5gqIsI4LqkYGEn6fw62hcm1CVWDvf9Z5R4lKKyOXJ mqNKx9gMS6kMvnkqAN4YFImfulMb9WNmevKCkzpVMpIjGNj1o+eJTCw+2Yh8x3t0zD7d bIX30XBmPKRna3N58ue/uxMj8usfr4Xa1kmvq8Nyw7v0+hKXH+Leqkej4XiCzKKXf4Fk Ck0A/L97YmSOYkznMfqLnNWjSV2Xd7Bt//Z3rBDkNFZ+AKwmhP+by3xTqmYiBglONTGj e2aeHSV/w47ysWagS+yvNZSJOKkC2vn0cVlziBxjVGULMjezG2CyqjBqkkgXnrWxfmjX nOCA== X-Gm-Message-State: AOAM530cjUcI2BUUYVUBo3o4LqEB3b4qrk0NRuWzEevjm3DAEff/KxxZ cX7Cjt/0T5ag/pbgqLQ5HZJuB/D8EOm3TCpx6nOchXwa X-Google-Smtp-Source: ABdhPJyABySbetF/ONNoKAhk7swtOte4t3AF1pSNnwQL+BSDqPWh8kr0N1kpZ+7CqwVK22WpGZN1fsDlykDu+RYiJVs= X-Received: by 2002:a17:906:128d:: with SMTP id k13mr51613048ejb.517.1635916207726; Tue, 02 Nov 2021 22:10:07 -0700 (PDT) MIME-Version: 1.0 References: <211026.8635oo11jk.gmgdl@evledraar.gmail.com> In-Reply-To: From: Eric Sunshine Date: Wed, 3 Nov 2021 01:09:56 -0400 Message-ID: Subject: Re: [PATCH] maintenance tests: fix systemd v2.34.0-rc* test regression To: =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Cc: Git List , Junio C Hamano , =?UTF-8?B?TMOpbmHDr2MgSHVhcmQ=?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Tue, Nov 2, 2021 at 10:25 AM Ævar Arnfjörð Bjarmason wrote: > Fix tests added in b681b191f92 (maintenance: add support for systemd > timers on Linux, 2021-09-04) to run successfully no systems where s/no/on/ > systemd-analyze is installed, but on which there's a discrepancy > between a FILE argument of "/lib/systemd/system/basic.target" and > "systemd/user/git-maintenance@.service" succeeding. > > There was an attempt to work around previous breakage in these tests > in 670e5973992 (maintenance: fix test t7900-maintenance.sh, > 2021-09-27), as noted in my [1] that commit is wrong about its > assumption that we can use "/lib/systemd/system/basic.target" as a > canary.argument. > > To fix this let's adjust this test to test what it really should be > testing: If we've got systemd-analyze reporting anything useful, we > should use it to check the syntax of our just-generated > "systemd/user/git-maintenance@.service" file. > > Even on systems where this previously succeeded we weren't effectively > doing that, because "systemd-analyze" will pass various syntax errors > by and exit with a status code of 0, e.g. if the "[Unit]" section is > replaced with a nonsensical "[HlaghUnfUnf]" section. > > To do that ignore whatever exit code we get from "systemd-analyze > verify", and filter its stderr output to extract the sorts of lines it > emits no note syntax warnings and errors. We need to filter out s/no/on/ > "Failed to load", which would be emitted e.g. on the > gcc135.fsffrance.org test box[1]. > > We also need to pipe this output to FD's 5 & 6, to avoid mixing up the > trace output with our own output under "-x". > > 1. https://lore.kernel.org/git/211026.8635oo11jk.gmgdl@evledraar.gmail.com/ > > Signed-off-by: Ævar Arnfjörð Bjarmason