/dev/fd/63: line 1668: "[: 0+1: integer expression expected" && "curl: (3) <url> malformed"


I have codecov integrated with Travis. The package takes inspiration from https://github.com/mikeferguson/code_coverage

The gcov is run by using the cmake extension from https://github.com/mikeferguson/code_coverage.

However, I am not able to upload the gcov out file in codecov (that I guess they are correctly generated, since I can see them in a folder when I launch everything locally, and a index.html file is also created).

Two errors are generated in sequence:

  • “curl: (3) malformed”
    –> I do not understand this error, that is, where am I wrong in configuring codecov?

  • “/dev/fd/63: line 1668: [: 0+1: integer expression expected”
    –> looking at the bash script, it is a simple syntax issue. Maybe none enter in this section since the curl error is not so common.
    and finally, it does not upload anything to codecov.io

Any suggestion?



Travis with GitHub


bash <(curl -s https://codecov.io/bash) -t “$CODECOV_TOKEN” -s “$1/build/$PROJECT_NAME/” -X gcov -X coveragepy

Commit SHAs

==> Uploading reports

2409 url: https://codecov.io/gh/CNR-STIIMA-IRAS

2410 query: branch=master&commit=c102f812b20f8dc1b72b079bf66ddd01c4bd3c86&build=85.1&build_url=&name=&tag=&slug=CNR-STIIMA-IRAS%2Fcnr_logger&service=travis&flags=&pr=false&job=705394971

2411-> Pinging Codecov


Codecov YAML


Codecov Output

@nicolapedrocchi, thanks for this! We will be deploying some changes to the uploader which should fix this issue. I’ll reply back to this thread when it’s been fixed.

@nicolapedrocchi, we deployed a new version of the bash uploader, would you be able to try it out and see if you get the same issues?

the syntax error has been solved, thanks!

Now the script tries 4 times before to fail, but I guess that I am wrong in using Travis & ros in generating the report files.

This is the output generated in Travis:

curl: (3) malformed
2175 X> Failed to upload
2176 -> Sleeping for 30s and trying again…
2177-> Pinging Codecov
2179-> Uploading to
2181curl: (3) malformed
2182 X> Failed to upload
2183 -> Sleeping for 30s and trying again…
2184-> Pinging Codecov
2186-> Uploading to
2188curl: (3) malformed
2189 X> Failed to upload
2190 -> Sleeping for 30s and trying again…
2191-> Pinging Codecov
2193-> Uploading to
2195curl: (3) malformed
2196 X> Failed to upload
2197 -> Sleeping for 30s and trying again…
2198==> Uploading to Codecov
2199 % Total % Received % Xferd Average Speed Time Time Time Current
2200 Dload Upload Total Spent Left Speed
2201100 34156 0 0 100 34156 0 108k --:–:-- --:–:-- --:–:-- 108k
2202 View reports at

I guess the error is in how I generate the report. Despite the script claims:

2532=> Searching for coverage reports in:
2533 + .
2534 -> Found 1 reports

I’ll dive in the configuration, and I’ll try to figure out what I am missing…


@nicolapedrocchi, are you able to reproduce this, and would you be able to shoot a link to that build?

@tom Hi Tom, honestly I am a newbie with codecov and the code coverage … likely it is a stupid error in my configuration.

Basically, if I launch the script locally (or remotely with Travis) I get this error message, that is


curl: (3) Host name ‘’ contains bad letter

I guess the error is from the tool I am using to generate the coverage report.
I followed the approach as in https://github.com/mikeferguson/code_coverage

This package generates:

  • a file *.info,
  • a directory, with the index.html, and many files (I can browse them properly)

Then, I call the command

bash <(curl -s https://codecov.io/bash) -t “$CODECOV_TOKEN” -X gcov -X coveragepy

I disable coveragepy, otherwise it stuck, since it is not able to find any report.

With coveragepy disabled, the bash script finds the *.info files, but then the “curl (3) malformed” error is caught.

Any help will be much appreciated!

Ops, the error is:

<! DOCTYPE html>
curl: (3) Host name ‘<! DOCTYPE html >’ contains bad letter

I did not realize that the string “<! DOCTYPE html>” was filtered in the quotation of the error (I added a space to avoid this issue between “<!” and “DOCTYPE” )


@nicolapedrocchi do you have a Travis build URL I can take a look at? I’d like to be able to dig into this a little more.

Yep, thanks!


Hi @nicolapedrocchi, I made some changes here, do you mind trying?