54 Commits

Author SHA1 Message Date
Adam Heller
f5ffef4d6b [test] Add PostMortem dumps on CHECK failures in test builds (#39945)
See `grpc_check.h`. This code  redefines the abseil `CHECK*` macros using custom gRPC macros when building tests. In `bazel test ...` builds, on check failure, `PostMortemEmit()` will dump state to the log before crashing.

Caveat: to prevent circular dependencies, code that `postmortem` relies on cannot use the custom gRPC CHECK macros. This is not much code, ~50 source files. grep for the `absl/log:check` bazel dependency.

Closes #39945

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39945 from drfloob:grpc_check ca8e46718f2021e0df79aa67a3a0b0c751b3ce44
PiperOrigin-RevId: 807452496
2025-09-15 17:43:19 -07:00
Craig Tiller
dbb5164ac7 [clang-format] Remove custom clang-format rules for include ordering (#37820)
Closes #37820

PiperOrigin-RevId: 682352913
2024-10-04 09:44:20 -07:00
Mark D. Roth
f6c57b6384 [reorg] move a bunch of stuff to src/core/util (#36792)
The following files have been moved:
- src/core/lib/avl/*
- src/core/lib/backoff/*
- src/core/lib/debug/event_log*
- src/core/lib/iomgr/gethostname*
- src/core/lib/iomgr/grpc_if_nametoindex*
- src/core/lib/matchers/*
- src/core/lib/uri/* (renamed from uri_parser.* to uri.*)
- src/core/lib/gprpp/* (existing src/core/util/time.cc was renamed to gpr_time.cc to avoid conflict)

Closes #36792

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36792 from markdroth:reorg_util d4e8996f481c611ffbb06a8b04924ff81bc1bc2b
PiperOrigin-RevId: 676947640
2024-09-20 13:19:02 -07:00
Tanvi Jagtap
3c928436b4 [Gpr_To_Absl_Logging] Remove logging header from example and test/cpp folder (#37488)
[Gpr_To_Absl_Logging] Remove logging header from example and test/cpp folder

Closes #37488

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37488 from tanvi-jagtap:remove_header_examples 1423ee77fff3136f3157993c07a5288552768e0d
PiperOrigin-RevId: 663597077
2024-08-15 22:13:08 -07:00
Tanvi Jagtap
b0de95507c [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT (#36441)
[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT
Replacing GPR_ASSERT with absl CHECK

These changes have been made using string replacement and regex.

Will not be replacing all instances of CHECK with CHECK_EQ , CHECK_NE etc because there are too many callsites. Only ones which are doable using very simple regex with least chance of failure will be replaced.

Given that we have 5000+ instances of GPR_ASSERT to edit, Doing it manually is too much work for both the author and reviewer.

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #36441

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36441 from tanvi-jagtap:tjagtap_util_01 ca1029292553077d25559938604e1e08fc4bbe2b
PiperOrigin-RevId: 627961969
2024-04-24 22:46:32 -07:00
Craig Tiller
67f364e23e [cleanup] Eliminate usage of GRPC_ASSERT(false...); (#31757)
* crash function

* progress

* fix

* fix

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fixes

* Automated change: Fix sanity tests

* fix

* Automated change: Fix sanity tests

* fix

* fix

* use cpp attr

* Automated change: Fix sanity tests

* fix

* fix

* fix

* fix

* fix

* fix

* add exclusion

* fix

* typo

* fix

* fmt

* Update tcp_socket_utils.cc

* Automated change: Fix sanity tests

* fix

* revert php changes

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-01-11 08:50:32 -08:00
Yijie Ma
f99b8b5bc4 Convert c-style comments to C++-style comments (#31923)
* baseline

* fix clang-tidy

* manually revert these files

* manually fixup at eof

* revert 2 more files

* change check_deprecated_grpc++.py

* change end2end_defs.include template

* fix check_include_guards.py

* untrack tools/distrib/python/convert_cstyle_comments_to_cpp.py

not yet ready to be submitted

* fix

yapf check_include_guards.py
remove a space...

* fix version.cc.template

* fix version_info.h.template
2022-12-22 23:01:53 -08:00
Cheng-Yu Chung
5fe132a211 Revert "Revert "Remove include/grpc/impl/codegen/gpr_slice.h (#31774)" (#31805)" (#31806)
This reverts commit 39a4343044.

Fixing forward the original PR. The content should be the same as the original PR. The broken part is in the internal.
2022-12-07 00:43:18 +08:00
Cheng-Yu Chung
39a4343044 Revert "Remove include/grpc/impl/codegen/gpr_slice.h (#31774)" (#31805)
This reverts commit ac1dee8ac1.
2022-12-05 11:11:42 -08:00
Cheng-Yu Chung
ac1dee8ac1 Remove include/grpc/impl/codegen/gpr_slice.h (#31774) 2022-12-06 02:33:11 +08:00
Craig Tiller
1df153f46e Revert "Revert "Move metadata setting into HPackParser (#27545)" (#27686)" (#27688)
This reverts commit 0e6ced8800.
2021-10-13 08:44:57 -07:00
Craig Tiller
0e6ced8800 Revert "Move metadata setting into HPackParser (#27545)" (#27686)
This reverts commit f57a1f7d8c.
2021-10-12 08:37:00 -07:00
Craig Tiller
f57a1f7d8c Move metadata setting into HPackParser (#27545)
* forward work to get append, limit check into parser

* further cleanup

* Remove chttp2_incoming_metadata_buffer

* Automated change: Fix sanity tests

* test fixes

* fix cronet

* wip

* first pass mementofication of parsing - libgrpc compiles

* further progress

* fixes

* fixes

* fix leak

* Automated change: Fix sanity tests

* fix leak

* fixes

* x

* improve fuzzer

* init ordering fix

* Update hpack_parser_table.h

* Update hpack_parser.cc

* Update hpack_parser_test.cc

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* i mustache myself why

* fix use after free

* Automated change: Fix sanity tests

* fixes

* eliminate second pass metadata - this is an illegal frame and fails the new parser

* handle mementos with size > sizeof(intptr_t)

* fix

* add parsed metadata header, test

* Automated change: Fix sanity tests

* fix includes

* phase1

* phase2

* Update parsed_metadata.h

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-10-11 20:02:29 -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
2ff84ed8c2 C++ cast for void* 2020-11-30 17:29:15 -08:00
Alisha Nanda
91627677fd Added timeout flag to grpc cli. 2020-09-14 17:00:45 +00:00
Alisha Nanda
a3ef19c1f0 Revert "Add timeout flag to gRPC cli" 2020-09-09 18:32:27 -07:00
Alisha Nanda
94a72c151b Changed timeout to ns rather than us. 2020-09-03 16:50:42 +00:00
Alisha Nanda
4282e968c4 Re-add in all changes, fix check failures. 2020-09-03 04:01:22 +00:00
Alisha Nanda
a4eedc1510 Revert "Merge branch 'master' of https://github.com/ananda1066/grpc"
This reverts commit 35e0e96b09, reversing
changes made to b78bc85185.
2020-09-03 01:57:03 +00:00
Alisha Nanda
88d99b4603 Add timeout flag to gRPC cli
Signed-off-by: Alisha Nanda <alishananda@google.com>
2020-09-01 22:10:35 +00:00
Esun Kim
165ee5007a Replaced grpc::string with std::string 2020-06-29 17:56:36 -07:00
Esun Kim
b308241343 Fix clang-tidy issues 2020-03-03 12:27:41 -08:00
Noah Eisen
58e0cbf9fb Enable the performance-* clang-tidy checks 2018-06-14 14:58:09 -04:00
Vijay Pai
c90a85649b Change grpc++ references in names to grpcpp 2018-03-08 22:04:59 -08:00
Noah Eisen
be82e64b3d Autofix c casts to c++ casts 2018-02-09 09:16:55 -08:00
Vijay Pai
3b7ae55f77 More uses of 1-phase Call 2018-02-05 16:49:22 -08:00
Sree Kuchibhotla
54961bb9e1 Change the code to use MONOTONIC clocks when calling gpr_cv_wait (condition varialbes in linux support MONOTONIC clock type) 2017-12-04 12:50:27 -08:00
Vijay Pai
0f95fa4909 Add idiomatic C++ API for grpc::Slice construction that doesn't
require using grpc_slice
2017-07-18 11:07:43 -07:00
Jan Tattermusch
7897ae9308 auto-fix most of licenses 2017-06-08 11:22:41 +02:00
zhimingxie
60f35722de fix truncate bug in grpc_cli 2017-05-02 17:40:03 +08:00
yang-g
ded7f8250c Minor fixes 2017-02-01 10:49:51 -08:00
Yuchen Zeng
8d2d70ca99 Support bidirectional stream RPC
Add bidistream test

Add bad request tests

Replace deprecated DynamicMessageFactory constructor
2017-01-30 14:31:24 -08:00
Yuchen Zeng
d37f642f35 Support server streaming
Skip unparsable input

Add tests for uni-directional stream calls

Simplify client stream handling
2016-12-15 16:10:37 -08:00
Yuchen Zeng
f9329217b1 Support client streaming 2016-12-15 15:54:39 -08:00
Craig Tiller
28b72428a8 clang-format 2016-10-26 21:15:29 -07:00
Craig Tiller
b37d53ebc0 Bulk update #includes 2016-10-26 16:16:35 -07:00
Craig Tiller
d41a4a720f s/gpr_slice/grpc_slice, and move around tests, impls 2016-10-26 16:16:06 -07:00
yang-g
4335e11951 Prevent some compilers compaining unused return value 2016-08-30 10:09:08 -07:00
yang-g
df012d048a Add proto file support in grpc_cli 2016-05-18 16:15:15 -07:00
Craig Tiller
6169d5f7b0 Update copyrights 2016-03-31 07:46:18 -07:00
David Garcia Quintas
2425bbbc55 Further work. Compiles. WIP 2016-01-25 17:32:48 -08:00
David Garcia Quintas
2bf574f814 Added back trailing newlines 2016-01-14 15:55:03 -08:00
murgatroid99
ace28d3f98 Fix copyrights again 2016-01-14 10:12:10 -08:00
Sree Kuchibhotla
b0d0c8e8c2 FormatCode 2016-01-13 22:52:17 -08:00
Craig Tiller
7536af02cf Eliminate gpr_ int types - and insist on C99 variants instead 2015-12-22 13:49:30 -08:00
yang-g
e21908fcee impl 2015-08-25 13:47:51 -07:00
yang-g
9e2f90cd06 headers reorg 2015-08-21 15:35:03 -07:00
yang-g
8c2be9f228 Remove ChannelInterface and replace it with Channel 2015-08-19 16:28:09 -07:00
Craig Tiller
d6c98df792 clang-format all source 2015-08-18 09:33:44 -07:00