Wow; I could have sworn that @foo@ was evaluated during
Values::EvaluateString.
In light of all that, I looked more closely at your patch. I had
assumed that you were modifying Values.pm and didn't even notice that
you were modifying DoCommand.pm (doh!). So in light of that, I have
no objections to the patch, but I still don't think it's necessary. :-)
On Nov 3, 2006, at 4:30 PM, Ethan Mallove wrote:
On Fri, Nov/03/2006 03:31:40PM, Jeff Squyres wrote:
No, @foo@ is evaluated when shell_command is evaluated.
There's this block in Test/Run.pm, but I don't see the analogous
block anywhere else (e.g., Build or Install).
{{{
while ($exec =~ m/@(.+?)@/) {
my $val = $ini->val($mpi_details_section, $1);
if (!$val) {
Warning("Used undefined key @$1@ in exec value;
skipping");
return;
}
$exec =~ s/@(.+?)@/$val/;
}
}}}
So it would have it's " chopped before it was folded into
shell_command, resulting in a the following:
./configure CFLAGS=-g -O
which would be wrong.
I admit to not having looked closely at your patch; would
it handle this scenario properly?
No, the always erroneous command-wrapping quotes get chopped
just before they're passed to exec() in DoCommand. It would
not chop the trailing quote, because there's no leading
quote.
-Ethan
On Nov 3, 2006, at 1:21 PM, 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-us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/mtt-users
--
Jeff Squyres
Server Virtualization Business Unit
Cisco Systems
_______________________________________________
mtt-users mailing list
mtt-us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/mtt-users
_______________________________________________
mtt-users mailing list
mtt-us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/mtt-users
--
Jeff Squyres
Server Virtualization Business Unit
Cisco Systems