Commit Graph

926 Commits

Author SHA1 Message Date
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
Esun Kim 6ae8463500 Fix by modernize-make-unique 2020-10-16 13:30:56 -07:00
Esun Kim f3cedfd357
Merge pull request #24437 from veblush/clang-tidy-abseil
[Clang-Tidy] Enable abseil-*
2020-10-16 12:21:51 -07:00
Esun Kim ece76ee1e8 Fix code by readability-container-size-empty 2020-10-16 09:48:20 -07:00
Esun Kim a51fe3e675 Fix abseil-* clang-tidy errors 2020-10-16 09:39:41 -07:00
Esun Kim c08f33c437 Fix clang-tidy errors 2020-10-15 16:07:25 -07:00
Esun Kim 6d6648c7e1 Fix clang-tidy errors 2020-10-13 09:51:31 -07:00
Alexander Polcyn eed39b385a Allow --qps_server_target_override to configure clients even if the driver isn't configuring any servers 2020-10-08 15:53:31 -07:00
Esun Kim 5112d75a46 Add TestEnvironment to tests 2020-07-30 23:43:02 -07:00
Esun Kim 3e7d5976b5 Add TestEnvironment to tests 2020-07-30 11:06:52 -07:00
Esun Kim f2374fb591 Add TestEnvironment to tests 2020-07-29 19:29:55 -07:00
Esun Kim 165ee5007a Replaced grpc::string with std::string 2020-06-29 17:56:36 -07:00
Esun Kim 2a3b1f0eb7 Revert log changes 2020-06-22 09:25:59 -07:00
Esun Kim b3469c723e Pre-assigned the server port and added more logs 2020-06-19 13:49:16 -07:00
Esun Kim ed2037d343 Update by review 2020-06-12 16:32:02 -07:00
Esun Kim 0eefd8b209 Finish client first completely for client-lead tests 2020-06-12 14:22:34 -07:00
Esun Kim d45f877dfb Add more logs and asswert to qps_worker 2020-05-19 11:37:26 -07:00
Mark D. Roth c769951764 Remove deprecated variant of JoinHostPort(). 2020-05-08 09:13:26 -07:00