Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Issue 11260048: Look up executable on PATH when given environment variables. (Closed)

Created:
8 years, 1 month ago by Bob Nystrom
Modified:
8 years, 1 month ago
Reviewers:
ahe, Mads Ager (google)
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Look up executable on PATH when given environment variables. Fixes http://code.google.com/p/dart/issues/detail?id=4402 Committed: https://code.google.com/p/dart/source/detail?r=14300

Patch Set 1 #

Total comments: 5

Patch Set 2 : Remove dead code and add tests. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -16 lines) Patch
M runtime/bin/process_linux.cc View 1 2 chunks +7 lines, -8 lines 0 comments Download
M runtime/bin/process_macos.cc View 1 2 chunks +7 lines, -8 lines 0 comments Download
A tests/standalone/io/process_path_environment_test.dart View 1 1 chunk +22 lines, -0 lines 4 comments Download
A tests/standalone/io/process_path_test.dart View 1 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Bob Nystrom
This bug is blocking me getting the Linux pub buildbot working, so I went ahead ...
8 years, 1 month ago (2012-10-25 23:58:02 UTC) #1
ahe
I don't see a test of this. I think the description is imprecise: this is ...
8 years, 1 month ago (2012-10-26 03:39:09 UTC) #2
Mads Ager (google)
LGTM https://codereview.chromium.org/11260048/diff/1/runtime/bin/process_linux.cc File runtime/bin/process_linux.cc (right): https://codereview.chromium.org/11260048/diff/1/runtime/bin/process_linux.cc#newcode465 runtime/bin/process_linux.cc:465: char **orig_environ = environ; char** orig_environ However, I ...
8 years, 1 month ago (2012-10-26 08:43:44 UTC) #3
Mads Ager (google)
I was a bit fast, please add a test and then it will look good. ...
8 years, 1 month ago (2012-10-26 08:44:49 UTC) #4
Bob Nystrom
On 2012/10/26 03:39:09, ahe wrote: > I don't see a test of this. I think ...
8 years, 1 month ago (2012-10-30 18:15:59 UTC) #5
Bob Nystrom
https://codereview.chromium.org/11260048/diff/1/runtime/bin/process_linux.cc File runtime/bin/process_linux.cc (right): https://codereview.chromium.org/11260048/diff/1/runtime/bin/process_linux.cc#newcode465 runtime/bin/process_linux.cc:465: char **orig_environ = environ; On 2012/10/26 08:43:44, Mads Ager ...
8 years, 1 month ago (2012-10-30 18:16:59 UTC) #6
Bob Nystrom
On 2012/10/26 08:44:49, Mads Ager wrote: > I was a bit fast, please add a ...
8 years, 1 month ago (2012-10-30 18:17:32 UTC) #7
ahe
https://codereview.chromium.org/11260048/diff/7001/tests/standalone/io/process_path_environment_test.dart File tests/standalone/io/process_path_environment_test.dart (right): https://codereview.chromium.org/11260048/diff/7001/tests/standalone/io/process_path_environment_test.dart#newcode5 tests/standalone/io/process_path_environment_test.dart:5: // Test that the executable is looked up on ...
8 years, 1 month ago (2012-10-31 06:46:46 UTC) #8
ahe
https://codereview.chromium.org/11260048/diff/1/runtime/bin/process_linux.cc File runtime/bin/process_linux.cc (right): https://codereview.chromium.org/11260048/diff/1/runtime/bin/process_linux.cc#newcode465 runtime/bin/process_linux.cc:465: char **orig_environ = environ; On 2012/10/26 08:43:44, Mads Ager ...
8 years, 1 month ago (2012-10-31 06:59:17 UTC) #9
ahe
On 2012/10/30 18:15:59, Bob Nystrom wrote: > On 2012/10/26 03:39:09, ahe wrote: > > I ...
8 years, 1 month ago (2012-10-31 07:00:34 UTC) #10
Bob Nystrom
https://codereview.chromium.org/11260048/diff/7001/tests/standalone/io/process_path_environment_test.dart File tests/standalone/io/process_path_environment_test.dart (right): https://codereview.chromium.org/11260048/diff/7001/tests/standalone/io/process_path_environment_test.dart#newcode5 tests/standalone/io/process_path_environment_test.dart:5: // Test that the executable is looked up on ...
8 years, 1 month ago (2012-11-01 20:53:03 UTC) #11
Bob Nystrom
On 2012/10/31 07:00:34, ahe wrote: > On 2012/10/30 18:15:59, Bob Nystrom wrote: > > On ...
8 years, 1 month ago (2012-11-01 20:57:19 UTC) #12
ahe
8 years, 1 month ago (2012-11-01 21:16:46 UTC) #13
Hi Bob,

I think I confused myself about this. You're right: the change is about using a
different version of exec that searches in PATH, and instead pass the
environment through the global variable "environment". I now see that you're
testing it well, and what I was thinking about would be a poor test. Sorry for
the noise.

Cheers,
Peter

On 2012/11/01 20:57:19, Bob Nystrom wrote:
> On 2012/10/31 07:00:34, ahe wrote:
> > On 2012/10/30 18:15:59, Bob Nystrom wrote:
> > > On 2012/10/26 03:39:09, ahe wrote:
> > > > I don't see a test of this. I think the description is imprecise: this
is
> > not
> > > > about searching in PATH, but passing the new environment on.
> > > 
> > > It's about both. Before this patch, if you pass in an environment, then
this
> > > implicitly disables looking up the executable on the PATH. (It may be that
> in
> > > the old code you also didn't get the passed in environment either, but
> that's
> > > irrelevant in my case. If it can't find the executable to spawn at all,
the
> > > environment variables are the least of my concerns!)
> > 
> > I understand what this change does, and I do not think the description
matches
> > the changes you made.
> 
> I'm not sure what would be a better description.
> 
> The bug was that if you passed any environment variables, dart:io would fail
to
> look up the executable on the PATH. This patch fixes that. I think the
> description is clear?
> 
> > I do not think the tests are testing the changes you have made,
> 
> If you take out the change, then process_path_environment_test will fail. The
> other test I added doesn't but that's because that test is essentially a
bonus.
> dart:io *was* looking up executables on PATH if you didn't provide environment
> variables, but there were no tests at all to validate that, so I added one.
> 
> > and we are likely to see regressions.
> 
> Regressions of what?

Powered by Google App Engine
This is Rietveld 408576698