testsuite-arrange-for-bad-volume-dump-to-be-in-useful-location-20020117
authorDerrick Brashear <shadow@dementia.org>
Thu, 17 Jan 2002 10:47:20 +0000 (10:47 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 17 Jan 2002 10:47:20 +0000 (10:47 +0000)
since we run the script not from the script dir we need to know where it lives, or do this.

src/tests/baduniq.pl [new file with mode: 0755]
src/tests/run-suite.pl

diff --git a/src/tests/baduniq.pl b/src/tests/baduniq.pl
new file mode 100755 (executable)
index 0000000..3477593
--- /dev/null
@@ -0,0 +1,25 @@
+#!/usr/bin/env perl
+use OpenAFS::CMU_copyright;
+use OpenAFS::util qw(:DEFAULT %AFS_Help);
+use OpenAFS::afsconf;
+use OpenAFS::fs;
+use OpenAFS::pts;
+use OpenAFS::vos;
+use OpenAFS::bos;
+
+my ($host, $ret);
+$host = `hostname`;
+&AFS_Init();
+
+&AFS_vos_restore("badvol","localhost","a","/usr/tmp/t.uniq-bad","100","full",);
+&AFS_bos_salvage("localhost","a","badvol",,,,,,);
+&AFS_fs_mkmount("badvol", "badvol",,,);
+if ( -f "badvol/test" ) {
+ &AFS_fs_rmmount("badvol");
+ exit(0);
+}
+&AFS_fs_rmmount("badvol");
+exit(1);
+
+
+
index 35b7619..d1559d6 100755 (executable)
@@ -219,6 +219,8 @@ unwind( "$openafsdirpath->{'afssrvsbindir'}/vos remove $server $part root.afs.re
 
 run("$openafsinitcmd->{'client-restart'}");
 
+`cp ./t.uniq-bad /usr/tmp`;
+
 system ("pagsh -c './test-front.sh $lcell'");
 
 @unwinds = ();