mirror of
https://github.com/MariaDB/server.git
synced 2026-05-05 14:45:31 +02:00
Merge
This commit is contained in:
commit
8a73a4beca
8 changed files with 212 additions and 105 deletions
|
|
@ -59,6 +59,43 @@ sub rmtree {
|
|||
};
|
||||
|
||||
|
||||
use File::Basename;
|
||||
sub _mkpath_debug {
|
||||
my ($message, $path, $dir, $err)= @_;
|
||||
|
||||
print "=" x 40, "\n";
|
||||
print $message, "\n";
|
||||
print "err: '$err'\n";
|
||||
print "path: '$path'\n";
|
||||
print "dir: '$dir'\n";
|
||||
|
||||
print "-" x 40, "\n";
|
||||
my $dirname= dirname($path);
|
||||
print "ls -l $dirname\n";
|
||||
print `ls -l $dirname`, "\n";
|
||||
print "-" x 40, "\n";
|
||||
print "dir $dirname\n";
|
||||
print `dir $dirname`, "\n";
|
||||
print "-" x 40, "\n";
|
||||
my $dirname2= dirname($dirname);
|
||||
print "ls -l $dirname2\n";
|
||||
print `ls -l $dirname2`, "\n";
|
||||
print "-" x 40, "\n";
|
||||
print "dir $dirname2\n";
|
||||
print `dir $dirname2`, "\n";
|
||||
print "-" x 40, "\n";
|
||||
print "file exists\n" if (-e $path);
|
||||
print "file is a plain file\n" if (-f $path);
|
||||
print "file is a directory\n" if (-d $path);
|
||||
print "-" x 40, "\n";
|
||||
print "showing handles for $path\n";
|
||||
My::Handles::show_handles($path);
|
||||
|
||||
print "=" x 40, "\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub mkpath {
|
||||
my $path;
|
||||
|
||||
|
|
@ -78,15 +115,20 @@ sub mkpath {
|
|||
next if -d $path; # Path already exists and is a directory
|
||||
croak("File already exists but is not a directory: '$path'") if -e $path;
|
||||
next if mkdir($path);
|
||||
_mkpath_debug("mkdir failed", $path, $dir, $!);
|
||||
|
||||
# mkdir failed, try one more time
|
||||
next if mkdir($path);
|
||||
_mkpath_debug("mkdir failed, second time", $path, $dir, $!);
|
||||
|
||||
# mkdir failed again, try two more time after sleep(s)
|
||||
sleep(1);
|
||||
next if mkdir($path);
|
||||
_mkpath_debug("mkdir failed, third time", $path, $dir, $!);
|
||||
|
||||
sleep(1);
|
||||
next if mkdir($path);
|
||||
_mkpath_debug("mkdir failed, fourth time", $path, $dir, $!);
|
||||
|
||||
# Report failure and die
|
||||
croak("Couldn't create directory '$path' ",
|
||||
|
|
|
|||
|
|
@ -91,11 +91,14 @@ sub mtr_report_test_passed ($) {
|
|||
$tinfo->{timer}= $timer_str;
|
||||
}
|
||||
|
||||
# Set as passed unless already set
|
||||
if ( not defined $tinfo->{'result'} ){
|
||||
$tinfo->{'result'}= 'MTR_RES_PASSED';
|
||||
# Big warning if status already set
|
||||
if ( $tinfo->{'result'} ){
|
||||
mtr_warning("mtr_report_test_passed: Test result",
|
||||
"already set to '", $tinfo->{'result'}, ",");
|
||||
}
|
||||
|
||||
$tinfo->{'result'}= 'MTR_RES_PASSED';
|
||||
|
||||
mtr_report_test($tinfo);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue