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=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,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 4898B1F934 for ; Mon, 27 Sep 2021 21:32:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237264AbhI0VeP (ORCPT ); Mon, 27 Sep 2021 17:34:15 -0400 Received: from 82-64-198-250.subs.proxad.net ([82.64.198.250]:47118 "EHLO mail.lhuard.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237028AbhI0VeL (ORCPT ); Mon, 27 Sep 2021 17:34:11 -0400 Received: from coruscant.lhuard.fr (unknown [IPv6:2a01:e0a:465:5440:2b6b:76fe:e08a:5eba]) (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 mail.lhuard.fr (Postfix) with ESMTPSA id 2CDFD511687; Mon, 27 Sep 2021 23:32:00 +0200 (CEST) Authentication-Results: mail.lhuard.fr; dmarc=fail (p=quarantine dis=none) header.from=lhuard.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lhuard.fr; s=rpi3; t=1632778320; bh=gG64CtGjVLvwwjP6jqZpQ9AmoO0fdMxZBgt1GMpQcUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=y8FnL+KEwJZa7kx9mifcb01mFHe1CSBVphEa+CnyJs8ygj5lFNMmhfuGTbEzJ/SZI 1tLOZCarJXffnZ3AvnHGiNM6UE/wuqQebw7JQeZEzOTqc2YqG7421nQqFouU/I+i3Y K/bOgpF6FhmglImhBLblwgmvOlg07+mDCzsUT4nU= From: =?UTF-8?q?L=C3=A9na=C3=AFc=20Huard?= To: git@vger.kernel.org Cc: Junio C Hamano , Derrick Stolee , Derrick Stolee , Eric Sunshine , =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= , =?UTF-8?q?L=C3=A9na=C3=AFc=20Huard?= Subject: [PATCH 1/1] maintenance: fix test t7900-maintenance.sh Date: Mon, 27 Sep 2021 23:30:16 +0200 Message-Id: <20210927213016.21714-2-lenaic@lhuard.fr> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927213016.21714-1-lenaic@lhuard.fr> References: <20210927213016.21714-1-lenaic@lhuard.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Commit b681b191 introduced the support of systemd timers for git maintenance. A test is leveraging the `systemd-analyze verify` utility to verify the correctness of the systemd unit files generated by git. But on some systems, although the `systemd-analyze` tool is installed and supports the `verify` subcommand, it fails with some permission errors. So, instead of only checking if the `verify` subcommand exists, a more reliable way of detecting whether `systemd-analyze verify` can be used is to try to use it. The SYSTEMD_ANALYZE prerequisite is now trying to run `systemd-analyze verify` on a systemd unit file which is shipped by systemd itself. We can reasonably think that, on systemd hosts, this file is present and valid. Signed-off-by: Lénaïc Huard --- t/t7900-maintenance.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh index 36a4218745..6b4941980c 100755 --- a/t/t7900-maintenance.sh +++ b/t/t7900-maintenance.sh @@ -21,8 +21,7 @@ test_xmllint () { } test_lazy_prereq SYSTEMD_ANALYZE ' - systemd-analyze --help >out && - grep verify out + systemd-analyze verify /lib/systemd/system/basic.target ' test_systemd_analyze_verify () { -- 2.33.0