Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

t/t0005-exec.t: Fix corner case in test for file not found #848

Merged
merged 1 commit into from Oct 13, 2016

Conversation

Projects
None yet
5 participants
@chu11
Copy link
Contributor

chu11 commented Oct 12, 2016

The fake file 'nosuchprocess' does not have a relative or absolute path specified. So the file will be searched for in all directories in the users PATH. If the user does not have access to one of the directories in their PATH, an EACCES error can occur instead of ENOENT, leading to a failed test. So put "./" in front of 'nosuchprocess' to ensure it is not searched for in PATH.

@garlick garlick added the review label Oct 12, 2016

@chu11

This comment has been minimized.

Copy link
Contributor Author

chu11 commented Oct 12, 2016

I should probably mention, of course one could just change my PATH that made me hit this issue. But in this particular case, the bad directory was part of the defaults on login, took me awhile to figure out the problem. So figured we could avoid the problem in the future.

@coveralls

This comment has been minimized.

Copy link

coveralls commented Oct 12, 2016

Coverage Status

Coverage decreased (-0.008%) to 75.135% when pulling 3bbdc96 on chu11:t0005-exec.t-corner-case into 286b6e7 on flux-framework:master.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Oct 12, 2016

Current coverage is 71.52% (diff: 100%)

Merging #848 into master will not change coverage

@@             master       #848   diff @@
==========================================
  Files           157        157          
  Lines         26683      26683          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          19085      19085          
  Misses         7598       7598          
  Partials          0          0          

Powered by Codecov. Last update fdea053...1d9d613

@grondo

grondo approved these changes Oct 13, 2016

Copy link
Contributor

grondo left a comment

This seems fine to me. Nice catch!

@chu11 chu11 force-pushed the chu11:t0005-exec.t-corner-case branch from 3bbdc96 to cf4b643 Oct 13, 2016

@chu11

This comment has been minimized.

Copy link
Contributor Author

chu11 commented Oct 13, 2016

fyi, rebased on current master and now running through travis

t/t0005-exec.t: Fix corner case in test for file not found
The fake file 'nosuchprocess' does not have a relative or absolute
path specified.  So the file will be searched for in all
directories in the user's PATH.  If the user does not have access
to one of the directories in their PATH, an EACCES error can occur
instead of ENOENT, leading to a failed test.  So put "./" in front
of 'nosuchprocess' to ensure it is not searched for in PATH.

@chu11 chu11 force-pushed the chu11:t0005-exec.t-corner-case branch from cf4b643 to 1d9d613 Oct 13, 2016

@coveralls

This comment has been minimized.

Copy link

coveralls commented Oct 13, 2016

Coverage Status

Changes Unknown when pulling 1d9d613 on chu11:t0005-exec.t-corner-case into * on flux-framework:master*.

@coveralls

This comment has been minimized.

Copy link

coveralls commented Oct 13, 2016

Coverage Status

Coverage remained the same at 75.147% when pulling 1d9d613 on chu11:t0005-exec.t-corner-case into fdea053 on flux-framework:master.

@garlick

This comment has been minimized.

Copy link
Member

garlick commented Oct 13, 2016

Thanks!

@garlick garlick merged commit 1d3081d into flux-framework:master Oct 13, 2016

4 checks passed

codecov/patch Coverage not affected when comparing fdea053...1d9d613
Details
codecov/project 71.52% (+0.00%) compared to fdea053
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 75.147%
Details

@garlick garlick removed the review label Oct 13, 2016

@garlick garlick referenced this pull request Oct 26, 2016

Closed

0.5.0 release notes #879

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.