Open MPI logo

MTT Devel Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all MTT Users mailing list

From: Ethan Mallove (ethan.mallove_at_[hidden])
Date: 2006-11-03 13:52:23


The patch was for DoCommand.pm which wouldn't affect @foo@,
right? (Isn't @foo@ dealt with in Run.pm?) I would revise
the patch to only chop the trailing '"' only if there is a
leading '"'. So we only remove quotes that wrap the whole
command.

+++ lib/MTT/DoCommand.pm (working copy)
+ # Remove wrapping quotes, which
+ # protects against a common funclet syntax error
+ @$tokens[(@$tokens - 1)] =~ s/\"$//
+ if ((@$tokens[0] =~ s/^\"//) > 0);
+

+
+ # Remove wrapping quotes, which
+ # protects against a common funclet syntax error
+ $cmds =~ s/\"$//
+ if (($cmds =~ s/^\"//) > 0);
+

I fold after this :)

-Ethan

On Fri, Nov/03/2006 01:21:03PM, Jeff Squyres wrote:
> On Nov 3, 2006, at 12:08 PM, Ethan Mallove wrote:
>
> > Point taken about being literal. My thinking is that most
> > will be only guessing about the quoting mechanism of
> > funclets (as I was for a bit), and there would never be a
> > real case for sending '"cmd"' to exec().
>
> How about a doc fix then?
>
> I'm not so worried about a '"cmd"' to exec(), but more about other
> fields. Remember that shell commands are a very small portion of
> the fields used in MTT - there's others that are explicitly used as
> portions of commands. For example you could do something like this:
>
> shell_command = ./configure @foo@
> foo = "CFLAGS=-g -O"
>
> which then wouldn't work.
>
> --
> Jeff Squyres
> Server Virtualization Business Unit
> Cisco Systems
>
> _______________________________________________
> mtt-users mailing list
> mtt-users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/mtt-users