mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 06:50:12 +00:00
tests: Use real tempfile in pt_util-t
Use a real call to File::Temp::tempfile to generate our temporary filename, instead of creating a somewhat predictable filename based on our pid. Change-Id: Icb585c04e088b1fa37dffb6d92fc41cdb14874c7 Reviewed-on: https://gerrit.openafs.org/14799 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
1bf2281ecf
commit
d8040104f7
@ -4,6 +4,7 @@ use strict;
|
||||
use warnings;
|
||||
|
||||
use File::Basename;
|
||||
use File::Temp qw(tempfile);
|
||||
use Test::More tests=>2;
|
||||
|
||||
my $builddir = $ENV{C_TAP_BUILD};
|
||||
@ -13,7 +14,7 @@ if (!$builddir) {
|
||||
|
||||
$builddir.="/..";
|
||||
|
||||
my $prdbfile = "/tmp/prdbtest.$$";
|
||||
(undef, my $prdbfile) = tempfile("prdbtest.XXXXXX", TMPDIR => 1, UNLINK => 1);
|
||||
|
||||
my $instructions = <<EOF;
|
||||
admin 128/20 1 -204 -204
|
||||
@ -49,5 +50,3 @@ close($fh)
|
||||
or die "pt_util failed while reading from DB\n";
|
||||
is($output, $expected, "pt_util produced expected output");
|
||||
ok(1, "Completed sucessfully");
|
||||
|
||||
unlink($prdbfile);
|
||||
|
Loading…
Reference in New Issue
Block a user