view release on metacpan or search on metacpan
#
# $Id: CONFIG,v 7.1 2004/01/13 19:01:10 wpm Exp $
#
# (c) 2003-2004 Morgan Stanley and Co.
# See ..../src/LICENSE for terms of distribution.
#
#
# The name of the AFS cell in which the tests will be performed.
#
AFS_COMMAND_CELLNAME = your.cell.name
#
# This prefix will be used to create and remove a few volumes during
# the tests. Anything left over after the tests complete can be
# removed. Note that a successful test run should remove them, but a
# failed test run can leave them behind.
#
AFS_COMMAND_VOLNAME_PREFIX = afscmd.
#
# Two fileserver:/partition names in which to create volumes. These
# must be in the same AFS cell as specified at the top of this file.
#
AFS_COMMAND_PARTITION_LIST = server1:/vicepa server2:/vicepb
#
# The bos tests need the name of a database server to work with.
#
AFS_COMMAND_DBSERVER = dbserver1
#
# We need a valid pathname (directory) in AFS that we can abuse (that
# is, we will be hacking the ACL on this directory, and a few other
# intrusive things, to test the FS API). This directory must be in a
# RW volume, and system:administratoirs must have write access to it.
#
AFS_COMMAND_PATHNAME_AFS = /afs/your.cell.name/home/you/hackmebaby
#
# We will need to create a pts group and user, and if these names are
# already taken, then change these lines. The code will *remove* them
# when its done.
#
AFS_COMMAND_PTS_GROUP = afscmdgroup
AFS_COMMAND_PTS_USER = afscmduser
#
# If the AFS client on which the tests run does NOT match that
# specified above, then the pts group/user we create will NOT be
# visible to the fs setacl command. Therefore, we need the name of an
# existing pts user or group to use for that test.
#
# Yes, I promise the tests will NOT remove this one, 'cause I did
# all the tests using my own ID. ;-)
#
AFS_COMMAND_PTS_EXISTING = wpm
#
# If you don't have either gzip/gunzip, of bzip2/bunzip2, then comment
# the appropriate line to disable the tests using these compression
# utilities. Then, go download the source and compile them, because
# you shouldn't be without something so basic.
#
AFS_COMMAND_GZIP_ENABLED = 1
AFS_COMMAND_BZIP2_ENABLED = 1
#
# Change this, if you want to scribble temporary files elsewhere. You
# probably don't...
#
AFS_COMMAND_TMP_ROOT = /var/tmp
#
# This parameter is used to test the output filter mechanism for vos
# dump and restore. Obviously, 'cat' is very boring, but we just need
# something in the pipeline that reads from stdin and writes to
# stdout, and it can't break the volume dump format that passes
# through it.
#
# Tweak this at your own peril.
#
AFS_COMMAND_DUMP_FILTER = cat
AFS_COMMAND_RESTORE_FILTER = cat
#
# By default, we'll get the AFS commands from your PATH, but you can
# test with explicit versions by specifying these variables.
#
#AFS_COMMAND_BINARY_VOS = /some/path/to/vos
#AFS_COMMAND_BINARY_BOS = /some/path/to/bos
#AFS_COMMAND_BINARY_PTS = /some/path/to/pts
#AFS_COMMAND_BINARY_FS = /some/path/to/fs
The code to parse the VLDB header was missing the LOCKED flag, if it
was present, so this attribute was not being set properly. It is now.
=head2 pts membership error checking was bogus
Well, it still is bogus, actually, since the code has to deal with the
fact that pts has never produced meaningful return codes, so a failed
pts membership command can still exit 0, and we have to figure out if
it failed by other means. This is done by looking for the known error
messages that pts prints out, which is a good example of why parsing
the ASCII test output of commands like this is a weak architecture.
=head1 Changes in 1.7
=head1 Enhancements
=head2 Boolean flags can be turned off, as well as on
If an argument to a method (and its corresponding command line
argument) doesn't take a value, it is treated like a Boolean flag.
However, the code used to assume that the existence of a Boolean key
in the argument list implied the Boolean argument was always true.
Now, the truth of the arguments I<value> is tested to determine if the
flag should be set on or off. This makes it easy to have subroutines
that just blindly pass certain arguments along, without haing to test
them, and allows for much cleaner code.
For example:
my $result = $vos->release
(
name => $name,
force => $force,
);
The actual attribute on the objects was named "access". Oops. The
attribute was changed to "accesses" to match the documentation, and
the string that is parsed in vos output.
=head1 Changes in 1.4
=head1 Enhancements
=head2 Test suite is disabled by default.
There is a well intentioned effort to automatically test all new
submissions to CPAN (see http://testers.cpan.org). Unfortunately, the
AFS-Command package can't be tested automatically, since it requires a
fair amount of configuration. You have to specify a cell name, some
fileserver names and partitions, etc.
By default, the tests will all be skipped if the configured cell name
in the CONFIG file has not been modified, thus allowing the automated
CPAN testing to continue, automatically, without the author getting a
bunch of bogus emails.
=head1 Bugs
=head2 Volume status value inconsistency
!!!!!!!! WARNING !!!!!!!!
This change is NOT backwards compatible with previous releases, so
verify that your code handles the new, consistent values correctly.
Changes.html view on Meta::CPAN
<P>
<HR>
<H2><A NAME="pts_membership_error_checking_wa">pts membership error checking was bogus
</A></H2>
Well, it still is bogus, actually, since the code has to deal with the fact
that pts has never produced meaningful return codes, so a failed pts
membership command can still exit 0, and we have to figure out if it failed
by other means. This is done by looking for the known error messages that
pts prints out, which is a good example of why parsing the ASCII test
output of commands like this is a weak architecture.
<P>
<P>
<HR>
<H1><A NAME="Changes_in_1_7">Changes in 1.7
</A></H1>
Changes.html view on Meta::CPAN
</A></H2>
If an argument to a method (and its corresponding command line argument)
doesn't take a value, it is treated like a Boolean flag. However, the code
used to assume that the existence of a Boolean key in the argument list
implied the Boolean argument was always true.
<P>
Now, the truth of the arguments <EM>value</EM> is tested to determine if the flag should be set on or off. This makes it
easy to have subroutines that just blindly pass certain arguments along,
without haing to test them, and allows for much cleaner code.
<P>
For example:
<P>
<PRE> my $result = $vos->release
Changes.html view on Meta::CPAN
<P>
<HR>
<H1><A NAME="Enhancements">Enhancements
</A></H1>
<P>
<HR>
<H2><A NAME="Test_suite_is_disabled_by_defaul">Test suite is disabled by default.
</A></H2>
There is a well intentioned effort to automatically test all new
submissions to CPAN (see <A
HREF="http://testers.cpan.org).">http://testers.cpan.org).</A>
Unfortunately, the AFS-Command package can't be tested automatically, since
it requires a fair amount of configuration. You have to specify a cell
name, some fileserver names and partitions, etc.
<P>
By default, the tests will all be skipped if the configured cell name in
the CONFIG file has not been modified, thus allowing the automated CPAN
testing to continue, automatically, without the author getting a bunch of
bogus emails.
<P>
<P>
<HR>
<H1><A NAME="Bugs">Bugs
</A></H1>
nor shall it fall under the restrictions of Paragraphs 3 and 4,
provided that you do not represent such an executable image as a
Standard Version of this Package.
7. C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order to
emulate subroutines and variables of the language defined by this
Package shall not be considered part of this Package, but are the
equivalent of input as in Paragraph 6, provided these subroutines
donot change the language in any way that would cause it to fail
the regression tests for the language.
8. Aggregation of this Package with a commercial distribution is
always permitted provided that the use of this Package is embedded;
that is, when no overt attempt is made to make this Package's
interfaces visible to the end user of the commercial distribution.
Such use shall not be construed as a distribution of this Package.
9. The name of the Copyright Holder may not be used to endorse or
promote products derived from this software without specific prior
written permission.
code makes aggressive use of pipe() and fork(), so porting it to
Windows is gonna be painful... but then, why anyone would want to
manage their AFS infrastructure from Windows escapes me).
=head1 INSTALLATION
This module builds like almost everything else on CPAN:
perl Makefile.PL
make
make test
make install
Before running 'make test', edit the CONFIG file and follow the
instructions in the comments. Minimally, you have to specify a couple
of AFS file servers and one AFS database server against which to run
the tests, as well as a pathname in AFS where we can create mount
points.
The test suite will require AFS super-user privileges, so you must
either be a member of the system:administrators protection group, or a
member of the super users list on the servers. If you don't know what
that means, you shouldn't be testing this module, so consult your AFS
administrators.
See the CONFIG file for more details. Its pretty verbosely
documented.
Any failure in the test suite is a cause for concern. For more
verbose output, run:
make test TEST_VERBOSE=1
If you can't determine the source of the problem(s), send the verbose
test output, along with the output from "perl -V", as well as the
versions of AFS in use at your site, to the author, and I'll do my
best to figure out why things are breaking, and if you're lucky,
actually fix it.
=head1 RELEASE NOTES
In addition to the README file (which in case you hadn't noticed,
you're reading right now), the history of changes is maintained in
Changes.html.
README.html view on Meta::CPAN
<H1><A NAME="INSTALLATION">INSTALLATION
</A></H1>
This module builds like almost everything else on CPAN:
<P>
<PRE> perl Makefile.PL
make
make test
make install
</PRE>
<P>
Before running 'make test', edit the CONFIG file and follow the
instructions in the comments. Minimally, you have to specify a couple of
AFS file servers and one AFS database server against which to run the
tests, as well as a pathname in AFS where we can create mount points.
<P>
The test suite will require AFS super-user privileges, so you must either
be a member of the system:administrators protection group, or a member of
the super users list on the servers. If you don't know what that means, you
shouldn't be testing this module, so consult your AFS administrators.
<P>
See the CONFIG file for more details. Its pretty verbosely documented.
<P>
Any failure in the test suite is a cause for concern. For more verbose
output, run:
<P>
<PRE> make test TEST_VERBOSE=1
</PRE>
<P>
If you can't determine the source of the <CODE>problem(s),</CODE> send the
verbose test output, along with the output from ``perl -V'', as well as the
versions of AFS in use at your site, to the author, and I'll do my best to
figure out why things are breaking, and if you're lucky, actually fix it.
<P>
<P>
<HR>
<H1><A NAME="RELEASE_NOTES">RELEASE NOTES
lib/AFS/Command/BOS.pod view on Meta::CPAN
[-tmpdir <directory to place tmp files>]
[-orphans <ignore | remove | attach>] [-debug] [-nowrite]
[-force] [-oktozap] [-rootfiles] [-salvagedirs] [-blockreads]
[-ListResidencies] [-SalvageRemote] [-SalvageArchival]
[-IgnoreCheck] [-ForceOnLine] [-UseRootDirACL]
[-TraceBadLinkCounts] [-DontAskFS] [-LogLevel <(MR-AFS) log level>]
[-rxdebug] [-cell <cell name>] [-noauth] [-localauth]
Where: -all salvage whole server
-showlog display salvage log
-debug (MR-AFS) Run in Debugging mode
-nowrite (MR-AFS) Run readonly/test mode
-force (MR-AFS) Force full salvaging
-oktozap (MR-AFS) Give permission to destroy bogus file residencies/volumes - debugging flag
-rootfiles (MR-AFS) Show files owned by root - debugging flag
-salvagedirs (MR-AFS) Force rebuild/salvage of all directories
-blockreads (MR-AFS) Read smaller blocks to handle IO/bad blocks
-ListResidencies (MR-AFS) Just list affected file residencies - debugging flag
-SalvageRemote (MR-AFS) Salvage storage systems that are not directly attached
-SalvageArchival (MR-AFS) Salvage HSM storage systems
-IgnoreCheck (MR-AFS) Don't perform VLDB safety check when deleting unreferenced files.
Only a good idea in single server cell.
lib/AFS/Command/Base.pod view on Meta::CPAN
id => $volname,
cell => $cell,
);
unless ( $result ) {
die "Unable to examine volname '$volname' in cell '$cell':" .
$vos->errors();
}
=head2 supportsOperation
This class method allows the developer to test whether or not any
given operation is supported by the underlying command line utility.
For example, the "vos changeloc" operation is not supported in older
release of vos.
unless ( $vos->supportsOperation('changeloc') {
die "Unable to continue -- 'vos changeloc' is unsupported.\n";
}
The return value is simply true or false.
=head2 supportsArgument
Similar to supportsOperation, supportsArgument will test whether or
not a given argument is a support command line argument for the
specified operation. For example, the -encrypt argument is only
supported in more recent versions of vos, so that support can be
tested for easily.
unless ( $vos->supportsArgument('listvldb','encrypt') ) {
warn "Encryption is not support by your version of vos.\n";
}
The return value is simply true or false.
=head1 SEE ALSO
AFS::Command::VOS(1), AFS::Command::BOS(1), AFS::Command::PTS(1),
lib/AFS/Command/VOS.pm view on Meta::CPAN
#
# These two lines are part of the verbose output
#
next if /Fetching VLDB entry/;
next if /Getting volume listing/;
#
# This code parses the volume header information. If we match
# this line, then we go after the information we expect to be
# right after it. We also test for this first, because we
# might very well have several of these chunks of data for RO
# volumes.
#
if ( /^\*{4}/ ) {
my $header = AFS::Object::VolumeHeader->new();
if ( /Volume (\d+) is busy/ ) {
$header->_setAttribute
(
lib/AFS/Command/VOS.pm view on Meta::CPAN
next;
} # if ( /^\s+RWrite:....
#
# Next we are looking for the number of sites, and then we'll
# suck that data in as well.
#
# NOTE: Because there is more interesting data after the
# locations, we fall through to the next test once we are done
# parsing them.
#
if ( /^\s+number of sites ->\s+(\d+)/ ) {
while ( defined($_ = $self->{handle}->getline()) ) {
chomp;
last unless m:^\s+server\s+(\S+)\s+partition\s+(/vicep\w+)\s+([A-Z]{2})\s+Site\s*(--\s+)?(.*)?:;
t/00vos_basic.t view on Meta::CPAN
};
my $binary = $AFS::Command::Tests::Config{AFS_COMMAND_BINARY_VOS} || 'vos';
my @servers = ();
my @partitions = ();
my $server_primary = "";
my $partition_primary = "";
#
# In order to have a predictable number of tests, we only use the
# first 2 server:/vicep* you specify.
#
foreach my $serverpart ( (split(/\s+/,$partition_list))[0..1] ) {
my ($server,$partition) = split(/:/,$serverpart);
unless ( $server && $partition ) {
print "not ok $TestCounter..$TestTotal\n";
die "Invalid server:/partition specification: '$serverpart'\n";
}
t/00vos_basic.t view on Meta::CPAN
} else {
warn("Volume header 'size' is '" .
$header->size() . "', should be 2\n");
print "not ok $TestCounter\n";
$errors++;
}
$TestCounter++;
#
# Both the update and creation times should be ctime values.
# NOTE: This test may very well break if LANG is set, and
# affects vos output syntax. Note that in that case, we'll
# need code in VOS.pm to deal with more generic time strings.
#
foreach my $method ( qw( update creation ) ) {
if ( $header->$method() =~ /^\S+\s+\S+\s+\d+\s+\d{2}:\d{2}:\d{2}\s+\d{4}$/ ) {
print "ok $TestCounter\n";
} else {
warn("Volume header '$method' is '" .
$header->$method() . "', should be a ctime date value\n");
print "not ok $TestCounter\n";
t/00vos_basic.t view on Meta::CPAN
print "not ok $TestCounter..$TestTotal\n";
die("Unexpected result from vos examine:\n" . $vos->errors());
}
$TestCounter++;
exit 0;
END {
#$TestCounter--;
#warn "Total number of tests == $TestCounter\n";
if ( %Volnames ) {
warn("The following temporary volumes were created, and may be left over:\n\t" .
join("\n\t",sort keys %Volnames) . "\n");
}
}
t/01vos_dumprestore.t view on Meta::CPAN
}
} else {
print "ok $TestCounter # skip Compression support disabled\n";
}
$TestCounter++;
} else {
for ( my $count = 0 ; $count < 2 ; $count++ ) {
print "ok $TestCounter # skip Dump filter tests disabled\n";
$TestCounter++;
}
}
#
# Finally, let's remove that volume, so we can reuse the name for the
# restore tests.
#
$result = $vos->remove
(
server => $server_primary,
partition => $partition_primary,
id => $volname,
cell => $cell,
);
if ( $result ) {
print "ok $TestCounter\n";
t/01vos_dumprestore.t view on Meta::CPAN
} else {
print "not ok $TestCounter..$TestTotal\n";
die("Unable to remove volume '$volname' from server '$server_primary', " .
"partition '$partition_primary', in cell '$cell':\n" .
$vos->errors());
}
#
# If we made it this far, dump works fine. Now let's test restore...
#
$result = $vos->restore
(
server => $server_primary,
partition => $partition_primary,
name => $volname,
file => $files{raw},
overwrite => 'full',
cell => $cell,
);
t/01vos_dumprestore.t view on Meta::CPAN
}
} else {
print "ok $TestCounter # skip Compression support disabled\n";
}
$TestCounter++;
} else {
for ( my $count = 0 ; $count < 2 ; $count++ ) {
print "ok $TestCounter # skip Restoreg filter tests disabled\n";
$TestCounter++;
}
}
$result = $vos->remove
(
server => $server_primary,
partition => $partition_primary,
id => $volname,
t/01vos_dumprestore.t view on Meta::CPAN
die("Unable to remove volume '$volname' from server '$server_primary', " .
"partition '$partition_primary', in cell '$cell':\n" .
$vos->errors());
}
exit 0;
END {
#$TestCounter--;
#warn "Total number of tests == $TestCounter\n";
if ( %Volnames ) {
warn("The following temporary volumes were created, and may be left over:\n\t" .
join("\n\t",sort keys %Volnames) . "\n");
}
}
t/02vos_volserver.t view on Meta::CPAN
if ( ref $vos && $vos->isa("AFS::Command::VOS") ) {
print "# AFS::Command::VOS->new()\n";
print "ok $TestCounter\n";
$TestCounter++;
} else {
print "not ok $TestCounter..$TestTotal\n";
die "Unable to instantiate AFS::Command::VOS object\n";
}
#
# Thi test is kinda boring... Just verifying that partinfo and
# listpart are consistent.
#
my $listpart = $vos->listpart
(
server => $server_primary,
cell => $cell,
);
if ( ref $listpart && $listpart->isa("AFS::Object::FileServer") ) {
print "# AFS::Command::VOS->listpart()\n";
print "ok $TestCounter\n";
t/02vos_volserver.t view on Meta::CPAN
my @partitions = $src->getPartitionNames();
if ( @partitions ) {
print "# AFS::Command::VOS->getPartitionNames()\n";
print "ok $TestCounter\n";
$TestCounter++;
} else {
print "not ok $TestCounter..$TestTotal\n";
die("Unable to get list of partition names for server '$server_primary', in cell '$cell':\n");
}
my $attribute_test = 1;
foreach my $partname ( @partitions ) {
my $partition = $dst->getPartition($partname);
unless ( ref $partition && $partition->isa("AFS::Object::Partition") ) {
print "not ok $TestCounter..$TestTotal\n";
die("Inconsistent data in listpart and partinfo output\n" .
"Found partname '$partname' in one, but not the other");
}
if ( $partition->hasAttribute('available') ) {
my $available = $partition->available();
my $total = $partition->total();
unless ( $available =~ /^\d+$/ && $total =~ /^\d+$/ && $available < $total ) {
$attribute_test = 0;
warn("Invalid attributes for partition '$partname'\n" .
"Available is '$available', total is '$total'\n" .
"both must be numeric, and available less than total\n");
}
}
}
print "# AFS::Command::VOS->hasAttribute()\n";
print "not " unless $attribute_test;
print "ok $TestCounter\n";
$TestCounter++;
}
#
# Now that we can trust listpart and partinfo, let's see if we can
# trust listvol.
#
t/02vos_volserver.t view on Meta::CPAN
print "# AFS::Command::VOS->getVolumeHeaders header check\n";
print "ok $TestCounter\n";
$TestCounter++;
exit 0;
END {
# $TestCounter--;
# warn "Total number of tests == $TestCounter\n";
if ( %Volnames ) {
warn("The following temporary volumes were created, and may be left over:\n\t" .
join("\n\t",sort keys %Volnames) . "\n");
}
}
t/10bos_basic.t view on Meta::CPAN
my $dbserver = $AFS::Command::Tests::Config{AFS_COMMAND_DBSERVER} || do {
print "not ok $TestCounter..$TestTotal\n";
die "Missing configuration variable AFS_COMMAND_PARTITION_LIST\n";
};
my $binary = $AFS::Command::Tests::Config{AFS_COMMAND_BINARY_BOS} || 'bos';
exit 0 unless $TestTotal;
#
# First, test the constructor
#
my $bos = AFS::Command::BOS->new
(
command => $binary,
);
if ( ref $bos && $bos->isa("AFS::Command::BOS") ) {
print "ok $TestCounter\n";
$TestCounter++;
} else {
print "not ok $TestCounter..$TestTotal\n";
t/10bos_basic.t view on Meta::CPAN
$TestCounter += 7;
warn("Unable to get instance '$name' from getInstance()\n");
}
}
exit 0;
END {
#$TestCounter--;
#warn "Total number of tests == $TestCounter\n";
}
t/20fs_basic.t view on Meta::CPAN
print "not ok $TestCounter\n";
$TestCounter++;
}
}
}
}
#
# fs exportafs -- this one is hard to really test, since we can't
# verify all the parsing unless it is actually supported and enabled,
# so fake it.
#
$result = $fs->exportafs
(
type => 'nfs',
);
if ( ref $result && $result->isa("AFS::Object::CacheManager") ) {
print "ok $TestCounter\n";
$TestCounter++;
t/20fs_basic.t view on Meta::CPAN
} else {
warn("Unable to get server object from fs->getserverprefs result\n");
for ( my $count = 1 ; $count <= 3 ; $count++ ) {
print "not ok $TestCounter\n";
$TestCounter++;
}
}
#
# fs listacl -- tested in 40fs_complex.t
#
#
# fs listaliases -- not tested, but I supposed we could define an
# alias, and then remove it. Might be kinda intrusive, though.
#
#
# fs listcells
#
$result = $fs->listcells();
if ( ref $result && $result->isa("AFS::Object::CacheManager") ) {
print "ok $TestCounter\n";
$TestCounter++;
t/20fs_basic.t view on Meta::CPAN
} else {
warn("Unable to get cell objects for cell '$cell' from fs->listcells()\n");
for ( my $count = 1 ; $count <= 3 ; $count++ ) {
print "not ok $TestCounter\n";
$TestCounter++;
}
}
#
# fs lsmount -- tested in 40fs_complex.t
#
#
# fs sysname
#
$result = $fs->sysname();
if ( ref $result && $result->isa("AFS::Object::CacheManager") ) {
print "ok $TestCounter\n";
$TestCounter++;
} else {
t/20fs_basic.t view on Meta::CPAN
if ( defined($result->sysname()) ) {
print "ok $TestCounter\n";
} else {
print "not ok $TestCounter\n";
warn("Result object for fs->sysname() has no attr 'sysname'\n");
}
$TestCounter++;
END {
#$TestCounter--;
#warn "Total number of tests == $TestCounter\n";
}
t/30pts_basic.t view on Meta::CPAN
}
$TestCounter++;
}
#
# pts creategroup, createuser, examine
#
foreach my $name ( $ptsgroup, $ptsuser ) {
#
# First, let's make sure our test IDs aren't defined, so we can
# redefine them.
#
my $result = $pts->delete
(
nameorid => $name,
cell => $cell,
);
if ( $result ) {
print "ok $TestCounter\n";
} elsif ( defined($pts->errors()) && $pts->errors() =~ /unable to find entry/ ) {
print "ok $TestCounter\n";
} else {
print "not ok $TestCounter..$TestTotal\n";
die("Unable to delete the test pts id ($name), or verify it doesn't exist\n" .
Data::Dumper->Dump([$pts],['pts']));
}
$TestCounter++;
my $method = $name eq $ptsgroup ? 'creategroup' : 'createuser';
my $type = $name eq $ptsgroup ? 'Group' : 'User';
my $class = 'AFS::Object::' . ( $name eq $ptsgroup ? 'Group' : 'User' );
$result = $pts->$method
(
t/30pts_basic.t view on Meta::CPAN
warn("membership should have failed, not succeeded for 'ThisSurelyDoesNotExist'");
} else {
print "ok $TestCounter\n";
}
$TestCounter++;
exit 0;
# END {
# $TestCounter--;
# warn "Total number of tests == $TestCounter\n";
# }
t/40fs_complex.t view on Meta::CPAN
}
#
# This is the one mtpt we know will work. The AFS pasth you gave me
# might NOT be in the same cell you specified, so using the
# cell-specific mount is necessary.
#
my $mtpath = $mtpath{cell};
#
# Set and test the ACL (several different ways)
#
my $paths = [ $mtpath, $pathnotafs, $pathbogus ];
$result = $fs->listacl
(
path => $paths,
);
if ( ref $result && $result->isa("AFS::Object::CacheManager") ) {
print "ok $TestCounter\n";
$TestCounter++;
t/40fs_complex.t view on Meta::CPAN
print "$ok $TestCounter\n";
$TestCounter++;
}
}
}
#
# Sadly, if the localhost is not in the same AFS cell as that being
# tested, the setacl command is guaranteed to fail, because the test
# pts entries will not be defined.
#
# Thus, we use a different, existing pts entry for these tests, and
# not the ones we created above.
#
my %entries =
(
$ptsexisting => 'rlidwk',
);
foreach my $type ( qw(normal negative) ) {
$result = $fs->setacl
t/40fs_complex.t view on Meta::CPAN
} else {
print "not ok $TestCounter..$TestTotal\n";
die("Unable to remove volume '$volname' from server '$server:$partition'" .
"in cell '$cell'\n" . "Errors from vos command:\n" . $vos->errors());
}
delete $Volnames{$volname};
END {
#$TestCounter--;
#warn "Total number of tests == $TestCounter\n";
if ( %Volnames ) {
warn("The following temporary volumes were created, and may be left over:\n\t" .
join("\n\t",sort keys %Volnames) . "\n");
}
}
t/99pts_cleanup.t view on Meta::CPAN
print "not ok $TestCounter..$TestTotal\n";
die("Unable to delete pts entries:\n" .
$pts->errors() .
Data::Dumper->Dump([$pts],['pts']));
}
exit 0;
# END {
# $TestCounter--;
# warn "Total number of tests == $TestCounter\n";
# }
util/bin/check_version view on Meta::CPAN
warn "Everythings OK.... don't panic.\n";
exit 0;
}
if ( @missing ) {
warn("The following modules have no \$VERSION:\n\t" .
join("\n\t",@missing) . "\n");
}
if ( ! $args{update} && @old ) {
warn("The following modules or test suites have an old \$VERSION:\n\t" .
join("\n\t",@old) . "\n");
}
exit 0 unless $args{update};
#
# Update the $VERSION if asked to.
#
foreach my $old ( @old) {
util/bin/check_version view on Meta::CPAN
#
# Fix the module version
#
if ( /\$VERSION\s+=\s+\'([\d\.]+)\'/ ) {
print NEW "our \$VERSION = '$newversion';\n";
} else {
print NEW;
}
} else {
#
# Fix the use statements for tests
#
if ( /use\s+\S+\s+([\d\.]+)/ ) {
$oldversion = $1;
s/$oldversion/$newversion/;
}
print NEW;
}
}
util/lib/parse_config view on Meta::CPAN
#-*-perl-*-
#
# $Id: parse_config,v 7.1 2004/01/13 19:01:45 wpm Exp $
#
# (c) 2003-2004 Morgan Stanley and Co.
# See ..../src/LICENSE for terms of distribution.
#
# Parse our config file to get the parameters we need for the tests
#
# NOTE: this is used ONLY for the installation procedures, and not in
# the production code itself.
package AFS::Command::Tests;
use vars qw(%Config);
my $config = "/no/such/path";