+ # ensure prefixed mount full clones work:
+ $td = start_script([@$cmd, $psgi], $env, { 3 => $sock });
+ my $opt = { 2 => \(my $clone_err = '') };
+ ok(run_script(['-clone', "http://$host:$port/pfx", "$tmpdir/pfx" ],
+ undef, $opt), 'pfx clone w/pfx') or diag "clone_err=$clone_err";
+ undef $td;
+
+ $td = start_script($cmd, $env, { 3 => $sock });
+
+ # default publicinboxGrokManifest match=domain default
+ tiny_test($json, $host, $port);
+
+ # normal full clone on /
+ $clone_err = '';
+ ok(run_script(['-clone', "http://$host:$port/", "$tmpdir/full" ],
+ undef, $opt), 'full clone') or diag "clone_err=$clone_err";
+
+ undef $td;
+
+ print $fh <<"" or xbail "print $!";
+[publicinbox]
+ wwwlisting = all
+
+ close $fh or xbail "close $!";
+ $td = start_script($cmd, $env, { 3 => $sock });
+ undef $sock;
+ tiny_test($json, $host, $port, 1);
+
+ # grok-pull sleeps a long while some places:
+ # https://lore.kernel.org/tools/20211013110344.GA10632@dcvr/
+ skip 'TEST_GROK unset', 12 unless $ENV{TEST_GROK};
+ my $grok_pull = require_cmd('grok-pull', 1) or
+ skip('grok-pull not available', 12);
+ my ($grok_version) = (xqx([$grok_pull, "--version"])
+ =~ /(\d+)\.(?:\d+)(?:\.(\d+))?/);
+ $grok_version >= 2 or
+ skip('grok-pull v2 or later not available', 12);
+ my $grok_loglevel = $ENV{TEST_GROK_LOGLEVEL} // 'info';