]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
t/extsearch: use autodie to detect chmod failures
authorEric Wong <e@80x24.org>
Sat, 10 Aug 2024 09:00:09 +0000 (09:00 +0000)
committerEric Wong <e@80x24.org>
Sat, 17 Aug 2024 17:36:18 +0000 (17:36 +0000)
We'll also drop a commented out call to chmod while we're at it.

t/extsearch.t

index 797aa8f54fd088fd6a9e2148970351ab469f2317..37e1f024e21ab3b11c3a55115f2ff99cdb8c638c 100644 (file)
@@ -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 = '') };