25 Commits

Author SHA1 Message Date
Craig Tiller
339906443b [clang-format] Match include file ordering to internal clang-format (#40905)
gRPC is currently getting formatted with two different clang-format implementations, and due to some weirdness they have different include file orderings. This change introduces clang-format configuration to ensure that the two systems align - it's *highly* expected that this will need some maintenance going forward as the two systems evolve.

Closes #40905

PiperOrigin-RevId: 819606209
2025-10-15 00:24:11 -07:00
Craig Tiller
66a137f1d7 [sanity] Restore it (#38869)
Closes #38869

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38869 from ctiller:nubbins 972d734cdf45a4786de53c51b2ce8cf97a3d38ff
PiperOrigin-RevId: 731570368
2025-02-26 21:26:56 -08:00
Craig Tiller
07188632f4 Tiny formatting cleanups for portability
PiperOrigin-RevId: 731512282
2025-02-26 17:22:27 -08: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
0944410d6c [reorg] move test/core/util -> test/core/test_util (#36446)
Closes #36446

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36446 from markdroth:reorg_test 5dcc85e006581a8fc52a3a914baa5f33e4a21589
PiperOrigin-RevId: 629229220
2024-04-29 17:06:40 -07: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
1b05576aa3 [cleanups] Clean up GrpcLibraryInitializer (#31894)
* Clean up `GrpcLibraryInitializer`

* Update

* Automated change: Fix sanity tests
2022-12-17 01:08:35 +08:00
Cheng-Yu Chung
5498481265 Remove include/grpcpp/impl/codegen/proto_utils.h (#31532) 2022-11-29 21:33:55 +08:00
Esun Kim
0ba0c4bf74 Added googletest clang-tidy checks (#31610)
* Added google-googletest

* Autofix

* Fix test names

* Fix
2022-11-18 13:02:20 -08:00
Cheng-Yu Chung
3d68bb735a Remove include/grpc/impl/codegen/byte_buffer.h (#31674) 2022-11-17 15:50:03 -05:00
Cheng-Yu Chung
47b9a57de9 Remove g_glip and class GrpcLibraryInterface (#30414)
* Remove `g_glip` and `class GrpcLibraryInterface`

* Update

* Update

* Update

* Automated change: Fix sanity tests (#20)

* Update

* Update

* Update

* Test

* Fix

* Revert "Test"

This reverts commit 2f5c77e98d9601b84123377f3e3746be192c4cbf.

* More fix

* More fix

* More fix

* Minor fix

* Revert "Minor fix"

This reverts commit 1ee3ae4da1779fb8c2abc11dace06f09532b17d9.

* Revert "More fix"

This reverts commit 1fc234896b088ec51e02c1dde79cf70db1ef90ae.

* Revert "More fix"

This reverts commit 851393c0e6d668c9c36332b552eefc70be314a4c.

* Revert "More fix"

This reverts commit ed342a51d0dbd47eff20c7c2bbe10a523ea8ca92.

* Revert "Fix"

This reverts commit 286ad8e6394082243c8089c5f8ee904db5f49d7e.
2022-11-14 15:30:09 -05: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
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
3e7d5976b5 Add TestEnvironment to tests 2020-07-30 11:06:52 -07:00
Prashant Jaikumar
fbfb93c88f Fix C++ tests to run on iOS
- Define grpc_iomgr_run_in_background in iomgr_posix_cfstream.cc
- Use *_IF_SUPPORTED() for death tests
- Move global test init, teardown to SetUpTestCase, TearDownTestCase as GTMGoogleTestRun doesn't run main()
2019-06-20 18:16:20 -07:00
ncteisen
92c4e0fee0 Rename ProtoBuffer helpers 2018-04-12 17:19:54 -07:00
ncteisen
cf5b2666e1 Make GrpcProtoBufferReaderWriter public 2018-04-06 07:05:27 -07:00
Vijay Pai
c90a85649b Change grpc++ references in names to grpcpp 2018-03-08 22:04:59 -08:00
Noah Eisen
4d20a66685 Run clang fmt 2018-02-09 09:34:04 -08:00
Noah Eisen
be82e64b3d Autofix c casts to c++ casts 2018-02-09 09:16:55 -08:00
Craig Tiller
6def7103bf Merge github.com:grpc/grpc into lfe3 2017-11-10 15:43:47 -08:00
Craig Tiller
4ac2b8e585 Enable clang-tidy as a sanity check, fix up all known failures 2017-11-10 14:14:17 -08:00
yang-g
272eebbbcd Only allocate what we need in the last slice for proto serialization 2017-11-09 09:54:54 -08:00
Jan Tattermusch
7897ae9308 auto-fix most of licenses 2017-06-08 11:22:41 +02:00
Harvey Tuch
5f3cfe960f Fix read from uninitialized memory bug in GrpcBufferWriter.
This commit fixes an issue in which the following sequence of operations
leads to use of uninitialized memory:

1. Caller invokes GrpcBufferWriter::Next(), and then makes use of 8191
   bytes in the returned buffer (which is 8192 bytes in size).

2. Caller then returns the unused single byte via
   GrpcBufferWriter::BackUp(). This method invokes
   g_core_codegen_interface->grpc_slice_split_tail(), which causes
   backup_slice_ to be a grpc_slice with one byte.

3. At the next invocation of GrpcBufferWriter::Next(), a reference to
   the single byte grpc_slice is returned to the caller.

The problem here is that the returned reference is to the inlined buffer
in the grpc_slice, which is resident in slice_, not the location of the
buffer inside slice_buffer_ after
g_core_codegen_interface->grpc_slice_buffer_add() in
GrpcBufferWriter::Next(). As a result, any data the caller writes to the
returned void* data is lost.

The solution is to avoid inlined backup slices.
2017-02-07 15:45:44 -05:00