Closed alalazo closed 2 years ago
Hmm.. I don't see that issue here (on OSX though):
Simons-iMac:kcov ska$ kcov --bash-dont-parse-binary-dir /tmp/kcov /tmp/a.sh
Hello
Is this with the latest from git?
Is this with the latest from git?
No, it's with kcov v38 packaged in the Ubuntu repository
I tried re-builing on v38 and it works for me there as well. Not sure if it can affect it, but my bash version is
GNU bash, version 5.1.4(1)-release (x86_64-apple-darwin17.7.0)
Ok, I have a different bash version:
$ bash --version
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
I think you can probably reproduce starting from a vanilla ubuntu:20.04
docker image.
It should be reproducible if you run in this image:
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update && apt-get -y upgrade && \
apt-get install -y coreutils curl patchelf kcov emacs
RUN useradd -m bob
USER bob
WORKDIR /home/bob
I tried your docker image now, and I can reproduce it there. It seems to be caused by the xtrace FD support. A workaround is to use --debug-force-bash-stderr
, which disables it altogether. Then I see the stdout output when using kcov as well.
Actually, this is only a problem with v38 (and presumably earlier). I've tested the latest git HEAD on ubuntu 20.04, and that works while v38 fails, so closing.
This is similar to #61. Given this simple script:
I see the following:
i.e. nothing gets printed to stdout when running under kcov. Using one of the workaround suggested in #61 changes the behavior:
It's possibly done on purpose, but the
--debug-force-bash-stderr
is not shown fromkcov
help message. If it matters I am working on: