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

IOError: [Errno 9] Bad file descriptor when running shcov on Mac OSX #8

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. echo -e '#!/bin/bash\necho "Some test message"\n' > test.sh
2. chmod +x test.sh
3. ./shcov test.sh

What is the expected output? What do you see instead?
I expected to get 'Some test message'. What I got was that and a traceback.

What version of the product are you using? On what operating system?
commit 3c3e16a0b49eb4b695107f842b5d7b387b70e5ab
Mac OSX 10.6.8
Python 2.7.6

Please provide any additional information below.

The error doesn't seem to be file related, because if I give it a non-existent 
file is throws the same traceback. This works on a RHEL6 system I have 
elsewhere.

$ cat test.sh
#!/bin/bash
echo "Some test message"

$ ./shcov test.sh
Traceback (most recent call last):
  File "./shcov", line 176, in <module>
    out = sc.parse_output()
  File "./shcov", line 109, in parse_output
    self.process.stderr.flush()
IOError: [Errno 9] Bad file descriptor
Some test message

$ ./shcov jfdkls
Traceback (most recent call last):
  File "./shcov", line 176, in <module>
    out = sc.parse_output()
  File "./shcov", line 109, in parse_output
    self.process.stderr.flush()
IOError: [Errno 9] Bad file descriptor

$ ./shcov --help;
Usage: shcov [-h] [--output=where] [--shell=what] script...

Produce coverage data for 'script'. Options are

  --output=where  write data to 'where' instead of /tmp/shcov
  --shell=what    ues 'what' (including arguments) as shell instead of 'bash -x'


Original issue reported on code.google.com by [email protected] on 14 Feb 2014 at 5:28

@GoogleCodeExporter
Copy link
Author

I believe that particular error has been fixed by Nils in this fork:

  https://github.com/pyssling/shcov

I've pushed the commit to the main repo.


I don't have Mac OS (I have a mac, but run Fedora on it), so perhaps you could 
test the change?

Original comment by [email protected] on 14 Feb 2014 at 6:05

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

I would be happy to, but this is my first foray into GitHub and I can't 
figure out how get it. I've used git for a few years at work, but the 
GitHub model is different than what we use. I created a fork with the 
web interface, and cloned (and pushed to) that fork from my machine.

$ git remote -v
origin    https://github.com/Mark-E-Hamilton/shcov.git (fetch)
origin    https://github.com/Mark-E-Hamilton/shcov.git (push)

I don't know what to do next, however, and doing a pull doesn't get 
anything new, so it's clearly not in my fork. Do I need to add a remote 
for the pyssling repository, or for some other repository?

Mark E. Hamilton

Original comment by [email protected] on 14 Feb 2014 at 6:08

@GoogleCodeExporter
Copy link
Author

I've pushed it to my repo, so you should be able to bring in that, basically

  git remote add upstream https://github[...]/SimonKagstrom/shcov.git
  git fetch upstream
  git merge upstream

Original comment by [email protected] on 14 Feb 2014 at 6:19

@GoogleCodeExporter
Copy link
Author

I figured it out, with the help of this page. Google is your friend!

https://help.github.com/articles/syncing-a-fork

However, it still fails with the same 'Bad file descriptor' error. Sorry.

Mark.

Original comment by [email protected] on 14 Feb 2014 at 6:22

@GoogleCodeExporter
Copy link
Author

OK, then it's some other issue. Thanks for testing!

Original comment by [email protected] on 14 Feb 2014 at 6:31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant