Skip to content

test: modify some macros to reduce number of uncovered lines reported#8725

Merged
htuch merged 1 commit intoenvoyproxy:masterfrom
zuercher:zuercher_coverage_hacks
Oct 23, 2019
Merged

test: modify some macros to reduce number of uncovered lines reported#8725
htuch merged 1 commit intoenvoyproxy:masterfrom
zuercher:zuercher_coverage_hacks

Conversation

@zuercher
Copy link
Copy Markdown
Member

@zuercher zuercher commented Oct 22, 2019

Compiler macros that define statements with semicolons, when followed
by an additional semicolon, have the side-effect of producing a line of
code considered unreachable by llvm-cov. This change modifies the
macros to avoid this, which makes code coverage numbers slightly more
accurate.

Risk Level: low
Testing: n/a
Doc Changes: n/a
Release Notes: n/a

Signed-off-by: Stephan Zuercher zuercher@gmail.com

Compiler macros that define statements with semicolons, when followed
by an additional semicolon, have the side-effect of producing a line of
code considered unreachable by llvm-cov. This change modifies the
macros to avoid this, which makes code coverage numbers slightly more
accurate.

Risk Level: low
Testing: n/a
Doc Changes: n/a
Release Notes: n/a

Signed-off-by: Stephan Zuercher <zuercher@gmail.com>
@zuercher zuercher marked this pull request as ready for review October 22, 2019 20:29
@zuercher zuercher requested review from htuch and lizan as code owners October 22, 2019 20:29
@zuercher
Copy link
Copy Markdown
Member Author

/azp help

@azure-pipelines

This comment has been minimized.

@zuercher
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@zuercher
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@zuercher
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@mattklein123
Copy link
Copy Markdown
Member

/azp run

@mattklein123 mattklein123 self-assigned this Oct 23, 2019
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how this helps, but SGTM. :)

Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ta

@htuch htuch merged commit 50ba736 into envoyproxy:master Oct 23, 2019
spenceral added a commit to spenceral/envoy that referenced this pull request Oct 23, 2019
* master: (54 commits)
  Update dependencies - Go, Bazel toos, xxHash, nanopb, rules_go, curl, protobuf, Jinja, yaml-cpp, re2 (envoyproxy#8728)
  test: increase coverage of listener_manager_impl.cc (envoyproxy#8737)
  test: modify some macros to reduce number of uncovered lines reported (envoyproxy#8725)
  build: add a script to setup clang (envoyproxy#8682)
  http: fix ssl_redirect on external (envoyproxy#8664)
  docs: update fedora build requirements (envoyproxy#8641)
  fix draining listener removal logs (envoyproxy#8733)
  dubbo: fix router doc (envoyproxy#8734)
  server: provide server health status when stats disabled (envoyproxy#8482)
  router: adding a knob to configure a cap on buffering for shadowing/retries (envoyproxy#8574)
  tcp proxy: add default 1 hour idle timeout (envoyproxy#8705)
  thrift: fix filter names in docs (envoyproxy#8726)
  Quiche changes to avoid gcc flags on Windows (envoyproxy#8514)
  test: increase test coverage in Router::HeaderParser (envoyproxy#8721)
  admin: add drain listeners endpoint  (envoyproxy#8415)
  buffer filter: add content-length when ending stream with trailers (envoyproxy#8609)
  clarify draining option docs (envoyproxy#8712)
  build: ignore go-control-plane mirror git commit error code (envoyproxy#8703)
  api: remove API type database from checked in artifacts. (envoyproxy#8716)
  admin: correct help strings (envoyproxy#8710)
  ...

Signed-off-by: Spencer Lewis <slewis@squareup.com>
derekargueta pushed a commit to derekargueta/envoy that referenced this pull request Oct 24, 2019
…envoyproxy#8725)

Compiler macros that define statements with semicolons, when followed
by an additional semicolon, have the side-effect of producing a line of
code considered unreachable by llvm-cov. This change modifies the
macros to avoid this, which makes code coverage numbers slightly more
accurate.

Risk Level: low
Testing: n/a
Doc Changes: n/a
Release Notes: n/a

Signed-off-by: Stephan Zuercher <zuercher@gmail.com>
@zuercher zuercher deleted the zuercher_coverage_hacks branch November 7, 2019 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants