diff options
author | Eric Wong <e@80x24.org> | 2021-09-23 05:53:02 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-23 06:21:38 +0000 |
commit | 76f5361d8b8d2bea828ac66dc98a0de24b761b3d (patch) | |
tree | 3468cc5dd396b7f36bb5f2867082d60b133feeb9 /t | |
parent | db98dfa6869f813220759e42b6de035abe40b10c (diff) | |
download | public-inbox-76f5361d8b8d2bea828ac66dc98a0de24b761b3d.tar.gz |
"Correct" meaning the permissions match that of the parent xap15 or ei15 directory.
Diffstat (limited to 't')
-rw-r--r-- | t/extsearch.t | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/extsearch.t b/t/extsearch.t index 6c074022..ca586f61 100644 --- a/t/extsearch.t +++ b/t/extsearch.t @@ -423,6 +423,7 @@ 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"; @@ -445,11 +446,17 @@ SKIP: { ok($es->cleanup_shards, 'cleanup_shards noop'); is("$es->{xdb}", $xdb_str, '{xdb} unchanged'); + my @ei_dir = glob("$d/ei*/"); + chmod 0755, $ei_dir[0] or xbail "chmod: $!"; + my $mode = sprintf('%04o', 07777 & (stat($ei_dir[0]))[2]); + is($mode, '0755', 'mode set on ei*/ dir'); my $o = { 2 => \(my $err = '') }; ok(run_script([qw(-xcpdb -R4), $d]), 'xcpdb R4'); my @dirs = glob("$d/ei*/?"); for my $i (0..3) { is(grep(m!/ei[0-9]+/$i\z!, @dirs), 1, "shard [$i] created"); + my $m = sprintf('%04o', 07777 & (stat($dirs[$i]))[2]); + is($m, $mode, "shard [$i] mode"); } is($es->cleanup_shards, undef, 'cleanup_shards cleaned'); ok(!defined($es->{xdb}), 'old {xdb} gone'); |