Commit Graph

943 Commits

Author SHA1 Message Date
Craig Tiller 05e6bf2e4a
[build] Add test/core/util, test/core/event_engine to auto build deps (#30364)
* [build] Add test/core/util, test/core/event_engine to auto build deps

* deal with suppressions

* fix suppressions

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* progress

* Automated change: Fix sanity tests

* fix

* fix

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-07-25 21:59:25 -07:00
AJ Heller 785d6b656a
Add logging for invalid client PayloadConfig in QPS test (#30261)
* Add invalid PayloadConfig logging to QPS test

* flip conditions
2022-07-19 12:18:02 -07:00
AJ Heller 18a8f6aad9
Refactor end2end tests to exercise each EventEngine (#29202)
* Refactor end2end tests to exercise each EventEngine

* fix incorrect bazel_only exclusions

* Automated change: Fix sanity tests

* microbenchmark fix

* sanitize, fix iOS flub

* Automated change: Fix sanity tests

* iOS fix

* reviewer feedback

* first pass at excluding EventEngine test expansion

Also caught a few cases where we should not test pollers, but should
test all engines. And two cases where we likely shouldn't be testing
either product.

* end2end fuzzers to be fuzzed differently via EventEngine.

* sanitize

* reviewer feedback

* remove misleading comment

* reviewer feedback: comments

* EE test_init needs to play with our build system

* fix golden file test runner

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2022-03-30 15:43:05 -07:00
Wanlin Du d2aafef157
Make scenario results to include start and end time for a test scenario. (#29207)
This commit update the scenario results to include the start_timestamp
and end_timestamp. These two fields are used in prometheus range queries
to indicate the period we are pulling data for.
2022-03-29 19:16:12 -07:00
Vignesh Babu f86723d9db
Revert "Update the scenario results to include start and end time for a test scenario. (#29034)" (#29122)
This reverts commit 84edc034aa.
2022-03-16 11:52:29 -07:00
Wanlin Du 84edc034aa
Update the scenario results to include start and end time for a test scenario. (#29034)
This commit add start and end timestamp to the existing scenario results.
2022-03-16 09:39:18 -07:00
AJ Heller 85189b24bb
Reintroduce: Avoid fully qualifying namespaces (and add check) (#28917)
Based on a handful of https://abseil.io/tips, it's generally advised to
only fully-qualify namespaces when in a `using` statement, or when it's
otherwise required for compilation. In all other cases, the general
recommendation is to not fully-qualify.

This change fixes most `grpc.*` namespace uses. There are potential
challenges in trying to make blanket changes to non-gRPC namespace uses,
such as `::testing`, since there is also a `grpc::testing` namespace.
2022-02-18 16:18:54 -08:00
AJ Heller e72a5fe5dd
Revert "Avoid fully qualifying namespaces (and add check) (#28901)" (#28916)
This reverts commit fc7314c701.
2022-02-17 17:56:19 -08:00
AJ Heller fc7314c701
Avoid fully qualifying namespaces (and add check) (#28901)
Based on a handful of https://abseil.io/tips, it's generally advised to
only fully-qualify namespaces when in a `using` statement, or when it's
otherwise required for compilation. In all other cases, the general
recommendation is to not fully-qualify.

This change fixes most `grpc.*` namespace uses. There are potential
challenges in trying to make blanket changes to non-gRPC namespace uses,
such as `::testing`, since there is also a `grpc::testing` namespace.
2022-02-17 16:23:25 -08:00
Wanlin Du dc9e898310
Allow --qps_server_target_override to replace the original server (#28686)
This commit makes sure that the client's server target is only
from the --qps_server_target_override, once the flag is in use.
Any prior server targets are cleared away.
2022-02-03 11:35:47 -06:00
Craig Tiller e29bdfe4e8
Add a test for includes without paths (#28532)
* Add a test for includes without paths

* fix path

* fix

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-01-12 07:00:02 -08:00
Richard Belleville 468768865b
Make Buildifier Sanity Test Strict (#27807)
* Fix all lint errors in repo.

* Use strict buildifier by default

* Whoops. That file does not exist

* Attempt fix to buildifier invocation

* Add missing copyright
2021-11-03 14:57:04 -07:00
Jan Tattermusch 6001bc636b
Stop running some more esoteric C++ benchmark scenarios continuously (#27872)
* stop running some more esoteric C++ benchamk scenarios continuously

* regenerate qps scenarios for bazel unit tests
2021-11-02 11:27:00 +01:00
Jan Tattermusch cf99a32109
set threads_per_cq=2 for C++ unconstrained scenarios for best throughput and lower variance (#27870) 2021-11-02 06:57:53 +01:00
Jan Tattermusch dfee4a946c
Speed up runs of tests under //test/cpp/qps (#27600)
* initial attempts to speedup qps tests

* make json_run_localhost finish without up to 5 sec lag

* cap number of client channels for qps tests

* regenerate bazel qps scenarios

* add a todo for driver.cc

* adjust max channel count for streaming_from_server

* regenerate scenarios
2021-10-20 09:20:54 +02:00
Jan Tattermusch aae25e2443
address review comments for #27622 (#27659) 2021-10-09 19:18:03 +02:00
Jan Tattermusch 6f2021c48f
Cleanup of bazel qps scenarios generator (#27622)
* cleanup of bazel qps scenarios generator

* regenerate bzl files

* add back outstanding_rpc_divisor

* regenerate

* fix check_qps_scenario_changes.py
2021-10-08 10:17:12 -07:00
Craig Tiller d1e01ac139
Add a test for a (now-illegal) build file construct (#27602)
* Add a test for a (now-illegal) build file construct

* add to test suite!

* fix

* fix

* fix syntax
2021-10-06 07:43:59 -07:00
Austin Schuh d30404868f
ARM and -Wextra fixups (#19141)
* Make generated code compile with -Wunused-parameters

-Wunused-parameters is turned on by -Werror -Wextra.  gRPC code
generation creates header files with unused parameters.  So let's modify
the generator to not generate code which will make -Wunused-parameters
unhappy.

* Fix unsigned vs signed comparisons and 32 bit string formats

Fix unsigned vs signed comparison warnings.

For 64 bit numbers printed in gRPC, the string formats assume that you
are running on a 64 bit machine.  Use inttypes.h to make it portable.
Also, use size_t format strings for the same reason.

* Fix unaligned memory access

cost_entry_ptr has no alignment guarentees that ubsan can find.  So it
fails the test with an alignment problem.  Use memcopy to read the data
from the pointer to fix this.

* Fix undefined behavior with memcpy and memcmp

Passing in a 0 length piece of data and a null pointer is undefined
behavior.  If the length is 0, don't pass it in.  This fixes ubsan
failures.

* Clang-format

* Automated change: Fix sanity tests
2021-09-27 04:54:05 -07:00
Craig Tiller ea389c00c2
Adjust include order per style guide (#27175)
Introduce clang-format configuration to sort includes closer to our rules.
2021-09-08 12:14:44 -07:00
Esun Kim 71a9410fc7
Another workaround to fix windows SymInitialize error (#27169) 2021-08-30 10:15:55 -07:00
AJ Heller 4ba3fa52b9
Clean up some instances of -Wunreachable-code-aggressive (#27054)
See https://github.com/grpc/grpc/pull/26951 for why this is not enforced
at the moment.
2021-08-18 11:43:46 -07:00
Alisha Nanda 0307759b9b
Fix OOM issues in qps tests (#26888) 2021-08-05 19:04:06 -07:00
Lidi Zheng 2231c2ba77
Introduce Python import sorting to our sanity test suite (#26768)
* Add isort_code.sh to sanity tests

* Run tools/distrib/isort_code.sh

* Fine tune the import order for relative imports

* Make pylint and project generation happy

* Fix a few corner cases

* Use --check instead of --diff

* The import order impacts test result somehow

* Make isort print diff and check output at the same time

* Let tools/run_tests/python_utils be firstparty library

* Run isort against latest HEAD
2021-07-26 12:31:21 -07:00
Vijay Pai 8aff94558c
De-experimentalize C++ callback API (#25728)
* De-experimentalize callback API

* Make FromServerContext based on ServerContextBase

* Fix lambda

* Fix headers

* De-experimentalize tests

* clang-format

* Fix consistency checks

* wip

* Fix const-ness of callback client read RPC requests

* Fix golden file

* Give full route_guide callback client example with Hold etc

* Complete example route-guide server

* De-experimentalize test services

* Omit unneeded using

* Remove some uses of non-experimental macro from test

* clang-format examples

* De-experimentalize async stub calls

* Remove experimental namespace use in qps, ubms

* De-experimentalize alarms, generic stubs, and context allocator

* De-experimentalize SetContextAllocator

* clang-format

* Fix conflicts

* Leave obsolete API in place until users can be migrated
2021-05-27 14:55:25 -07:00
Richard Belleville 05aa736840
Fix bazel copyright notices (#26353)
* Add copyright to Bazel files

* Add check for copyright in Bazel files

* Remove unintentional file
2021-05-25 12:15:30 -07:00
Esun Kim d30b04ed7b
Fix status error (#25731) 2021-03-17 18:00:44 +01:00
Esun Kim a41a206b8c
Fix readability-const-return-type,readability-delete-null-pointer,readability-simplify-boolean-expr (#25628) 2021-03-09 21:30:35 -08:00
Esun Kim 377fe6095a
Upgrade clang-tidy and clang-format to 11 (#25590)
* Upgrade clang-tidy and clang-format to 11
* Reformat code
* Fix abseil-string-find-str-contains
* Fix modernize-make-unique
2021-03-04 11:54:30 -08:00
Yash Tibrewal f4e55b85bc Replace disrespectful term 2021-02-08 15:29:53 -08:00
Esun Kim be761cd430 Fixed sign-compare warnings 2021-01-27 11:16:18 -08:00
Sergii Tkachenko 8db79e2e71 Python style: reformat code using updated yapf 0.30.0 2021-01-13 14:00:12 -05:00
Adam Cozzette 63ee5b62c2 Updated parse_json.cc to rely on config_protobuf.h for protobuf types
Google's internal version of the gRPC codebase uses a version of
protobuf with a different namespace and include paths. This commit makes
parse_json.cc rely on config_protobuf.h for protobuf types so that it
will work properly in that environment. I also replaced a call to
Status::error_code() with a call to Status::code() instead. This way the
code will work with absl::Status, which has a somewhat different API
compared to google::protobuf::util::Status.
2020-12-23 15:55:17 -08:00
AJ Heller 01378c742f Add TODO for the OOM fix that makes these tests flaky 2020-12-11 11:56:23 -08:00
AJ Heller 34ba812e20 Mark QPS Benchmark Tests as flaky 2020-12-11 11:52:48 -08:00
Esun Kim 53ab235fb8 Fix google-explicit-constructor 2020-12-03 15:03:39 -08:00
Esun Kim 2ff84ed8c2 C++ cast for void* 2020-11-30 17:29:15 -08:00
Esun Kim ac080fd17a Fix readability-inconsistent-declaration-parameter-name manually 2020-11-30 14:22:40 -08:00
Esun Kim 75e3e660fd Fix google-readability-todo 2020-11-25 10:09:42 -08:00
Mark D. Roth 27e1c1c56d clang-tidy: enable google-readability-braces-around-statements 2020-11-06 13:41:44 -08:00
capstan 131579d52d Roll forward of commit 7883b51: Use abseil's flags in tests.
This replaces gflags. Added TODOs where use of `absl::Duration` or `absl::FlagSaver` might be preferred in follow-up cleanup. Fixes #24493.

This reverts commit da66b7d14e.

NEW:
* Adds references to `absl/flags/declare.h`, new to LTS 2020923.2 imported in commit 5b43440.
* Works around MSVC 2017 compiler error with large help text on flags by reducing the help text.
2020-11-06 16:07:19 +01:00
Esun Kim ccdfcc2ee8 Add workaround for bazel 2020-11-05 11:50:45 -08:00
Jan Tattermusch a6b5e5c73a make qps_worker --server_port behavior consistent with java 2020-11-04 15:42:11 +01:00
Nathan Herring da66b7d14e
Revert "Abseil Flags" 2020-10-24 15:19:55 -07:00
capstan 7883b5133d Use abseil's flags in tests.
This replaces gflags. Added TODOs where use of `absl::Duration` or `absl::FlagSaver` might be preferred in follow-up cleanup. Fixes #24493.
2020-10-23 19:36:33 +02:00
Esun Kim e37dab3b7f
Merge pull request #24483 from veblush/tidy-readability-redundant-control-flow
[Clang-Tidy] Enable readability-redundant-control-flow
2020-10-21 12:00:13 -07:00
Esun Kim aae4f4cf18 Fix by misc-unused-using-decls 2020-10-19 18:12:11 -07:00
Esun Kim 9e8a13bb93 Fix by tidy-readability-redundant-control-flow 2020-10-19 17:03:35 -07:00
Esun Kim 84df61b31a
Merge pull request #24453 from veblush/tidy-modernize-make-unique
[Clang-Tidy] Enable modernize-make-unique
2020-10-16 16:35:08 -07:00
Esun Kim e7434d385e Fix by tidy-modernize-use-override 2020-10-16 14:01:06 -07:00