-
Notifications
You must be signed in to change notification settings - Fork 50
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
Conversation
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. |
Current coverage is 71.52% (diff: 100%)@@ 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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine to me. Nice catch!
3bbdc96
to
cf4b643
Compare
fyi, rebased on current master and now running through travis |
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.
cf4b643
to
1d9d613
Compare
Changes Unknown when pulling 1d9d613 on chu11:t0005-exec.t-corner-case into * on flux-framework:master*. |
Thanks! |
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.