From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 12BEE1FC5E for ; Sat, 10 Aug 2024 09:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1723280415; bh=ldYik/1SIbgO2fSmj5z2H5KCMy1KjjDeAKSYWHM5X9I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rSxWooi5dHe6JXO0DJBT/7KymenzNPLMjujgermq31y7mdMQkZyQcSB8W/XF5SOs+ HbxPwlIm5U56j2+gGgWnVsalnHkfCsYW93e8MgwfYMnDLYARHePJgbMqqnCHu2cGQ+ +8jsdrIHbB0+/zoOpXZbJ9Psv0skCab2ioFAKCQI= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 08/11] t/extsearch: use autodie to detect chmod failures Date: Sat, 10 Aug 2024 09:00:09 +0000 Message-ID: <20240810090012.23269-9-e@80x24.org> In-Reply-To: <20240810090012.23269-1-e@80x24.org> References: <20240810090012.23269-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We'll also drop a commented out call to chmod while we're at it. --- t/extsearch.t | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/t/extsearch.t b/t/extsearch.t index 797aa8f5..37e1f024 100644 --- a/t/extsearch.t +++ b/t/extsearch.t @@ -7,7 +7,7 @@ use PublicInbox::Config; use PublicInbox::InboxWritable; require_git(2.6); require_mods(qw(json DBD::SQLite Xapian)); -use autodie qw(open rename truncate unlink); +use autodie qw(chmod open rename truncate unlink); require PublicInbox::Search; use_ok 'PublicInbox::ExtSearch'; use_ok 'PublicInbox::ExtSearchIdx'; @@ -416,7 +416,6 @@ if ('dedupe + dry-run') { '--dry-run alone fails'); } -# chmod 0755, $home or xbail "chmod: $!"; for my $j (1, 3, 6) { my $o = { 2 => \(my $err = '') }; my $d = "$home/extindex-j$j"; @@ -437,7 +436,7 @@ SKIP: { is($nshards1, 1, 'correct shard count'); my @ei_dir = glob("$d/ei*/"); - chmod 0755, $ei_dir[0] or xbail "chmod: $!"; + chmod 0755, $ei_dir[0]; my $mode = sprintf('%04o', 07777 & (stat($ei_dir[0]))[2]); is($mode, '0755', 'mode set on ei*/ dir'); my $o = { 2 => \(my $err = '') };