# "go test -coverprofile" report "unknown command"

**URL:** <https://forum.golangbridge.org/t/go-test-coverprofile-report-unknown-command/4509>\
**Category:** Getting Help\
**Created:** [February 6, 2017, 2:57am UTC](https://forum.golangbridge.org/t/go-test-coverprofile-report-unknown-command/4509 "2017-02-06T02:57:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![YuleiXiao](https://forum.golangbridge.org/letter_avatar_proxy/v4/letter/y/58956e/32.png) [@YuleiXiao](https://forum.golangbridge.org/u/YuleiXiao)\
**Post date:** [February 6, 2017, 2:57am UTC](https://forum.golangbridge.org/t/go-test-coverprofile-report-unknown-command/4509/1 "2017-02-06T02:57:37Z")

</div>

I execute `go test -coverprofile` for my code, but it always report `Error: unknown command "/usr1/code/src/github.com/squirreldb/clm" for "clm"`. Is there someone know the reason?

```auto
go version
go version go1.7 linux/amd64

```

```auto
go test -coverprofile /tmp/test0.cov -coverpkg=github.com/clm/agent,github.com/clm/cfg,github.com/clm/cli,github.com/clm/cm,github.com/clm/cm/common,github.com/clm/cm/monitor,github.com/clm/conftool,github.com/clm/etcd_manager,github.com/clm/keys,github.com/clm,github.com/clm/service,github.com/clm/topo,github.com/clm/util/log,github.com/clm/util github.com/clm

Error: unknown command "/usr1/code/src/github.com/clm" for "clm"

```

---

<div class="post-metadata">

**Author:** ![radovskyb](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/radovskyb/32/2423_2.png) [@radovskyb](https://forum.golangbridge.org/u/radovskyb)\
**Post date:** [February 6, 2017, 3:09am UTC](https://forum.golangbridge.org/t/go-test-coverprofile-report-unknown-command/4509/2 "2017-02-06T03:09:50Z")

</div>

Hey @YuleiXiao,

The last part of your `go test` args is this:

`github.com/clm/util github.com/clm`

Did you mean to write this:

`github.com/clm/util,github.com/clm`

with the comma and not a space?

P.S. I have no idea if that would cause the issue, but just noticed all of the other things are comma separated so just a suggestion.

---

<div class="post-metadata">

**Author:** ![YuleiXiao](https://forum.golangbridge.org/letter_avatar_proxy/v4/letter/y/58956e/32.png) [@YuleiXiao](https://forum.golangbridge.org/u/YuleiXiao)\
**Post date:** [February 6, 2017, 3:47am UTC](https://forum.golangbridge.org/t/go-test-coverprofile-report-unknown-command/4509/3 "2017-02-06T03:47:00Z")

</div>

Thanks reply @radovskyb . But it looks like not the problem. I had try, but still happen.

---

<div class="post-metadata">

**Author:** ![system](https://forum.golangbridge.org/uploads/default/original/2X/5/5ad234f7c3dbc68b6cc72d338ce4f2973d9fd81c.png) [@system](https://forum.golangbridge.org/u/system)\
**Post date:** [May 7, 2017, 3:47am UTC](https://forum.golangbridge.org/t/go-test-coverprofile-report-unknown-command/4509/4 "2017-05-07T03:47:09Z")

</div>

Closed on May 7, 2017, 3:47am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
