Skip to content

Commit b54566d

Browse files
grooverdanelenst
authored andcommitted
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: Daniel 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.
1 parent e5b877c commit b54566d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mysql-test/mysql-test-run.pl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ sub command_line_setup {
11941194
# Directories
11951195
'tmpdir=s' => \$opt_tmpdir,
11961196
'vardir=s' => \$opt_vardir,
1197-
'mem:s' => \$opt_mem,
1197+
'mem' => \$opt_mem,
11981198
'clean-vardir' => \$opt_clean_vardir,
11991199
'client-bindir=s' => \$path_client_bindir,
12001200
'client-libdir=s' => \$path_client_libdir,
@@ -1457,9 +1457,6 @@ sub command_line_setup {
14571457
# Use $ENV{'MTR_MEM'} as first location to look (if defined)
14581458
unshift(@tmpfs_locations, $ENV{'MTR_MEM'}) if defined $ENV{'MTR_MEM'};
14591459

1460-
# however if the opt_mem was given a value, use this first
1461-
unshift(@tmpfs_locations, $opt_mem) if $opt_mem ne '';
1462-
14631460
foreach my $fs (@tmpfs_locations)
14641461
{
14651462
if ( -d $fs && ! -l $fs )

0 commit comments

Comments
 (0)