+ok(run('amcheckdump', 'TESTCONF'),
+ "amcheckdump with a new config succeeds");
+like($Installcheck::Run::stdout, qr(could not find)i,
+ "..but finds no dumps.");
+
+BAIL_OUT("amdump failed")
+ unless run('amdump', 'TESTCONF');
+
+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");
+
+##
+# And a config with usetimestamps enabled
+
+$testconf = Installcheck::Run::setup();
+$testconf->add_param('label_new_tapes', '"TESTCONF%%"');
+$testconf->add_param('usetimestamps', 'yes');
+$testconf->add_dle("localhost $diskname installcheck-test");
+$testconf->write();
+
+BAIL_OUT("amdump failed")
+ unless run('amdump', 'TESTCONF');
+
+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: $!";
+@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();