+ok(run('amcheckdump', 'TESTCONF'),
+ "amcheckdump with a new config succeeds");
+like($Installcheck::Run::stdout, qr(could not find)i,
+ "..but finds no dumps.");
+
+Installcheck::Dumpcache::load("notimestamps");
+
+like(run_get('amcheckdump', 'TESTCONF'), qr(Validating),
+ "amcheckdump succeeds, claims to validate something (usetimestamps=no)");
+
+##
+# and check command-line handling
+
+like(run_get('amcheckdump', 'TESTCONF', '-oorg=installcheck'), qr(Validating),
+ "amcheckdump accepts '-o' options on the command line");
+
+##
+# Try with usetimestamps enabled
+
+Installcheck::Dumpcache::load("basic");
+
+like(run_get('amcheckdump', 'TESTCONF'), qr(Validating),
+ "amcheckdump succeeds, claims to validate something (usetimestamps=yes)");
+
+##
+# now try zeroing out the dumps
+
+my $vtape1 = Installcheck::Run::vtape_dir(1);
+opendir(my $vtape_dir, $vtape1) || die "can't opendir $vtape1: $!";
+my @dump1 = grep { /^0+1/ } readdir($vtape_dir);
+closedir $vtape_dir;
+
+for my $dumpfile (@dump1) {
+ open(my $dumpfh, "+<", "$vtape1/$dumpfile");
+ sysseek($dumpfh, 32768, 0); # jump past the header
+ syswrite($dumpfh, "\0" x 100); # and write some zeroes
+ close($dumpfh);
+}
+
+ok(!run('amcheckdump', 'TESTCONF'),
+ "amcheckdump detects a failure from a zeroed-out dumpfile");
+
+Installcheck::Run::cleanup();