Commit b54566d7 authored by Daniel Black's avatar Daniel Black Committed by elenst

MDEV-11619: mtr --mem {no argument of a directory} (#320)

This removes functionality of where ./mtr --mem /tmp/dir could be a directory.

Now MTR_MEM=/tmp/dir ./mtr is needed.

The case where MTR_MEM=/tmp/dir ./mtr --mem has the equivalent effect.
Signed-off-by: default avatarDaniel Black <daniel.black@au.ibm.com>

--mem works better as a pure flag, because it can be followed by command-line arguments (test names). If the option is allowed to have a value, the test name which directly follows it will be treated as the option value instead. It is possible to implement workarounds to avoid this, but they would not be completely reliable, and there is no practical purpose of such extension of functionality to justify them.
parent e5b877ce
......@@ -1194,7 +1194,7 @@ sub command_line_setup {
# Directories
'tmpdir=s' => \$opt_tmpdir,
'vardir=s' => \$opt_vardir,
'mem:s' => \$opt_mem,
'mem' => \$opt_mem,
'clean-vardir' => \$opt_clean_vardir,
'client-bindir=s' => \$path_client_bindir,
'client-libdir=s' => \$path_client_libdir,
......@@ -1457,9 +1457,6 @@ sub command_line_setup {
# Use $ENV{'MTR_MEM'} as first location to look (if defined)
unshift(@tmpfs_locations, $ENV{'MTR_MEM'}) if defined $ENV{'MTR_MEM'};
# however if the opt_mem was given a value, use this first
unshift(@tmpfs_locations, $opt_mem) if $opt_mem ne '';
foreach my $fs (@tmpfs_locations)
{
if ( -d $fs && ! -l $fs )
......
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