Commit f643d1b6 authored by Bjorn Munch's avatar Bjorn Munch

Bug #56125 MTR2 start-and-exit removes server tmpdir, server becomes not operational

This happens when creating new tmpdir due to too long socket path
Don't delete it if --start-and-exit, but warn user to do it.
parent 80d666bc
......@@ -110,13 +110,25 @@ my $path_vardir_trace; # unix formatted opt_vardir for trace files
my $opt_tmpdir; # Path to use for tmp/ dir
my $opt_tmpdir_pid;
my $opt_start;
my $opt_start_dirty;
my $opt_start_exit;
my $start_only;
END {
if ( defined $opt_tmpdir_pid and $opt_tmpdir_pid == $$ )
{
if (!$opt_start_exit)
{
# Remove the tempdir this process has created
mtr_verbose("Removing tmpdir '$opt_tmpdir");
mtr_verbose("Removing tmpdir $opt_tmpdir");
rmtree($opt_tmpdir);
}
else
{
mtr_warning("tmpdir $opt_tmpdir should be removed after the server has finished");
}
}
}
sub env_or_val($$) { defined $ENV{$_[0]} ? $ENV{$_[0]} : $_[1] }
......@@ -215,10 +227,6 @@ my $opt_start_timeout = $ENV{MTR_START_TIMEOUT} || 180; # seconds
sub suite_timeout { return $opt_suite_timeout * 60; };
sub check_timeout { return $opt_testcase_timeout * 6; };
my $opt_start;
my $opt_start_dirty;
my $opt_start_exit;
my $start_only;
my $opt_wait_all;
my $opt_user_args;
my $opt_repeat= 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment