[CI] Upgraded clang to 18 in sanity tests (#37593)

Closes #37593

PiperOrigin-RevId: 668971470
pull/37603/head
Esun Kim 3 months ago committed by Copybara-Service
parent a374ef377d
commit be26969058
  1. 9
      .clang-tidy
  2. 6
      include/grpc/support/sync_generic.h
  3. 6
      src/core/lib/promise/interceptor_list.h
  4. 3
      src/core/util/spinlock.h
  5. 3
      src/objective-c/manual_tests/GrpcIosTestUITests/GrpcIosTestUITests.m
  6. 2
      templates/tools/dockerfile/grpc_clang_format/Dockerfile.template
  7. 2
      templates/tools/dockerfile/grpc_clang_tidy/Dockerfile.template
  8. 10
      templates/tools/dockerfile/test/sanity/Dockerfile.template
  9. 66
      test/core/end2end/end2end_test_suites.cc
  10. 6
      test/core/end2end/h2_ssl_cert_test.cc
  11. 3
      test/core/gprpp/match_test.cc
  12. 6
      test/core/iomgr/pollset_windows_starvation_test.cc
  13. 3
      test/core/promise/bm_party.cc
  14. 8
      test/core/promise/if_test.cc
  15. 44
      test/core/transport/chttp2/ping_callbacks_test.cc
  16. 6
      test/cpp/cocoapods/generic/generic.mm
  17. 2
      tools/bazelify_tests/dockerimage_current_versions.bzl
  18. 2
      tools/dockerfile/grpc_clang_format/Dockerfile
  19. 2
      tools/dockerfile/grpc_clang_tidy/Dockerfile
  20. 2
      tools/dockerfile/test/sanity.current_version
  21. 10
      tools/dockerfile/test/sanity/Dockerfile

@ -69,31 +69,37 @@ Checks: '-*,
bugprone-*,
-bugprone-assignment-in-if-condition,
-bugprone-branch-clone,
-bugprone-casting-through-void,
-bugprone-easily-swappable-parameters,
-bugprone-empty-catch,
-bugprone-exception-escape,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-inc-dec-in-conditions,
-bugprone-infinite-loop,
-bugprone-multi-level-implicit-pointer-conversion,
-bugprone-narrowing-conversions,
-bugprone-not-null-terminated-result,
-bugprone-optional-value-conversion,
-bugprone-reserved-identifier,
-bugprone-signed-char-misuse,
-bugprone-sizeof-expression,
-bugprone-switch-missing-default-case,
-bugprone-too-small-loop-variable,
-bugprone-unchecked-optional-access,
-bugprone-unused-local-non-trivial-variable,
-bugprone-unused-return-value,
google-*,
-google-readability-casting,
-google-runtime-int,
-google-runtime-references,
performance-*,
-performance-avoid-endl,
-performance-enum-size,
-performance-no-automatic-move,
-performance-no-int-to-ptr,
-performance-noexcept-swap,
-performance-unnecessary-copy-initialization,
-performance-unnecessary-value-param,
clang-diagnostic-deprecated-declarations,
clang-diagnostic-deprecated-register,
clang-diagnostic-expansion-to-defined,
clang-diagnostic-ignored-attributes,
@ -102,6 +108,7 @@ Checks: '-*,
clang-diagnostic-shift-sign-overflow,
clang-diagnostic-tautological-undefined-compare,
clang-diagnostic-thread-safety*,
-clang-diagnostic-thread-safety-reference-return,
clang-diagnostic-undefined-bool-conversion,
clang-diagnostic-unreachable-code,
clang-diagnostic-unreachable-code-loop-increment,

@ -29,8 +29,7 @@ typedef struct {
gpr_atm state;
} gpr_event;
#define GPR_EVENT_INIT \
{ 0 }
#define GPR_EVENT_INIT {0}
/* gpr_refcount */
typedef struct {
@ -42,7 +41,6 @@ typedef struct {
gpr_atm value;
} gpr_stats_counter;
#define GPR_STATS_INIT \
{ 0 }
#define GPR_STATS_INIT {0}
#endif /* GRPC_SUPPORT_SYNC_GENERIC_H */

@ -217,15 +217,13 @@ class InterceptorList {
// Append a new map to the end of the chain.
template <typename Fn>
void AppendMap(Fn fn, DebugLocation from) {
Append(MakeMapToAdd(
std::move(fn), [] {}, from));
Append(MakeMapToAdd(std::move(fn), [] {}, from));
}
// Prepend a new map to the beginning of the chain.
template <typename Fn>
void PrependMap(Fn fn, DebugLocation from) {
Prepend(MakeMapToAdd(
std::move(fn), [] {}, from));
Prepend(MakeMapToAdd(std::move(fn), [] {}, from));
}
// Append a new map to the end of the chain, with a cleanup function to be

@ -34,8 +34,7 @@ struct gpr_spinlock {
#else
#define GPR_SPINLOCK_INITIALIZER ((gpr_spinlock){0})
#endif
#define GPR_SPINLOCK_STATIC_INITIALIZER \
{ 0 }
#define GPR_SPINLOCK_STATIC_INITIALIZER {0}
#define gpr_spinlock_trylock(lock) (gpr_atm_acq_cas(&(lock)->atm, 0, 1))
#define gpr_spinlock_unlock(lock) (gpr_atm_rel_store(&(lock)->atm, 0))

@ -75,8 +75,7 @@ int const kNumIterations = 1;
[NSThread sleepForTimeInterval:1];
}
// Wait until all events in run loop have been processed
while (CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.1, true) == kCFRunLoopRunHandledSource)
;
while (CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.1, true) == kCFRunLoopRunHandledSource);
NSLog(@"Pressing button: %@", name);
[testApp.buttons[name] tap];

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM silkeh/clang:17-bookworm
FROM silkeh/clang:18-bookworm
ADD clang_format_all_the_things.sh /

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM silkeh/clang:17-bookworm
FROM silkeh/clang:18-bookworm
# Install prerequisites for the clang-tidy script
RUN apt-get update && apt-get install -y python3 jq git && apt-get clean

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM silkeh/clang:17-bookworm
FROM silkeh/clang:18-bookworm
<%include file="../../apt_get_basic.include"/>
@ -22,13 +22,13 @@
# (Bullseye comes with Python 3.9 which isn't supported by pytype yet)
RUN apt update && apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev ${'\\'}
libnss3-dev libssl-dev libreadline-dev libffi-dev libbz2-dev
RUN curl -O https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tar.xz && ${'\\'}
tar -xf Python-3.7.9.tar.xz && ${'\\'}
cd Python-3.7.9 && ${'\\'}
RUN curl -O https://www.python.org/ftp/python/3.7.17/Python-3.7.17.tar.xz && ${'\\'}
tar -xf Python-3.7.17.tar.xz && ${'\\'}
cd Python-3.7.17 && ${'\\'}
./configure && ${'\\'}
make -j 4 && ${'\\'}
make install
RUN curl https://bootstrap.pypa.io/get-pip.py | python3
RUN curl https://bootstrap.pypa.io/pip/3.7/get-pip.py | python3
<%include file="../../gcp_api_libraries.include"/>
<%include file="../../run_tests_addons.include"/>

@ -606,16 +606,14 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
}},
CoreTestConfiguration{
"Chttp2Fullstack",
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_IS_HTTP2,
nullptr,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_IS_HTTP2, nullptr,
[](const ChannelArgs& /*client_args*/,
const ChannelArgs& /*server_args*/) {
return std::make_unique<InsecureFixture>();
}},
CoreTestConfiguration{
"Chttp2FullstackCompression",
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_IS_HTTP2,
nullptr,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_IS_HTTP2, nullptr,
[](const ChannelArgs&, const ChannelArgs&) {
return std::make_unique<CompressionFixture>();
}},
@ -677,12 +675,12 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
const ChannelArgs& /*server_args*/) {
gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
return std::make_unique<LocalTestFixture>(
absl::StrFormat(
"unix:%s"
"grpc_fullstack_test.%%25.%d.%" PRId64 ".%" PRId32
".%" PRId64 ".%" PRId64,
absl::StrFormat("unix:%s"
"grpc_fullstack_test.%%25.%d.%" PRId64
".%" PRId32 ".%" PRId64 ".%" PRId64,
temp_dir, getpid(), now.tv_sec, now.tv_nsec,
unique.fetch_add(1, std::memory_order_relaxed), Rand()),
unique.fetch_add(1, std::memory_order_relaxed),
Rand()),
UDS);
}},
CoreTestConfiguration{
@ -696,12 +694,12 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
const ChannelArgs& /*server_args*/) {
gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
return std::make_unique<LocalTestFixture>(
absl::StrFormat(
"unix:%s"
"grpc_fullstack_test.%d.%" PRId64 ".%" PRId32 ".%" PRId64
".%" PRId64,
absl::StrFormat("unix:%s"
"grpc_fullstack_test.%d.%" PRId64 ".%" PRId32
".%" PRId64 ".%" PRId64,
temp_dir, getpid(), now.tv_sec, now.tv_nsec,
unique.fetch_add(1, std::memory_order_relaxed), Rand()),
unique.fetch_add(1, std::memory_order_relaxed),
Rand()),
UDS);
}},
#endif
@ -716,8 +714,7 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
}},
CoreTestConfiguration{
"Chttp2FullstackWithCensus",
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_IS_HTTP2,
nullptr,
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_IS_HTTP2, nullptr,
[](const ChannelArgs&, const ChannelArgs&) {
return std::make_unique<CensusFixture>();
}},
@ -746,15 +743,13 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
FEATURE_MASK_IS_HTTP2 | FEATURE_MASK_DO_NOT_FUZZ,
"foo.test.google.fr",
[](const ChannelArgs& client_args, const ChannelArgs& server_args) {
return std::make_unique<SslProxyFixture>(client_args,
server_args);
return std::make_unique<SslProxyFixture>(client_args, server_args);
}},
CoreTestConfiguration{
"Chttp2InsecureCredentials",
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS_LEVEL_INSECURE |
FEATURE_MASK_IS_HTTP2 |
FEATURE_MASK_EXCLUDE_FROM_EXPERIMENT_RUNS,
FEATURE_MASK_IS_HTTP2 | FEATURE_MASK_EXCLUDE_FROM_EXPERIMENT_RUNS,
nullptr,
[](const ChannelArgs&, const ChannelArgs&) {
return std::make_unique<InsecureCredsFixture>();
@ -762,8 +757,7 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
},
CoreTestConfiguration{
"Chttp2SimpleSslWithOauth2FullstackTls12",
FEATURE_MASK_IS_SECURE |
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_IS_SECURE | FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_IS_HTTP2 |
FEATURE_MASK_EXCLUDE_FROM_EXPERIMENT_RUNS,
"foo.test.google.fr",
@ -772,8 +766,7 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
}},
CoreTestConfiguration{
"Chttp2SimpleSslWithOauth2FullstackTls13",
FEATURE_MASK_IS_SECURE |
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_IS_SECURE | FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_IS_HTTP2,
"foo.test.google.fr",
[](const ChannelArgs&, const ChannelArgs&) {
@ -781,8 +774,7 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
}},
CoreTestConfiguration{
"Chttp2SimplSslFullstackTls12",
FEATURE_MASK_IS_SECURE |
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_IS_SECURE | FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_IS_HTTP2 |
FEATURE_MASK_EXCLUDE_FROM_EXPERIMENT_RUNS,
"foo.test.google.fr",
@ -791,8 +783,7 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
}},
CoreTestConfiguration{
"Chttp2SimplSslFullstackTls13",
FEATURE_MASK_IS_SECURE |
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_IS_SECURE | FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_DOES_NOT_SUPPORT_CLIENT_HANDSHAKE_COMPLETE_FIRST |
FEATURE_MASK_IS_HTTP2,
@ -800,13 +791,13 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
[](const ChannelArgs&, const ChannelArgs&) {
return std::make_unique<SslTlsFixture>(grpc_tls_version::TLS1_3);
}},
CoreTestConfiguration{
"Chttp2SocketPair",
CoreTestConfiguration{"Chttp2SocketPair",
FEATURE_MASK_IS_HTTP2 | FEATURE_MASK_DO_NOT_FUZZ |
FEATURE_MASK_EXCLUDE_FROM_EXPERIMENT_RUNS,
nullptr,
[](const ChannelArgs&, const ChannelArgs&) {
return std::make_unique<SockpairFixture>(ChannelArgs());
return std::make_unique<SockpairFixture>(
ChannelArgs());
}},
CoreTestConfiguration{
"Chttp2SocketPair1ByteAtATime",
@ -827,8 +818,7 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
FEATURE_MASK_DO_NOT_FUZZ,
nullptr,
[](const ChannelArgs&, const ChannelArgs&) {
return std::make_unique<SockpairWithMinstackFixture>(
ChannelArgs());
return std::make_unique<SockpairWithMinstackFixture>(ChannelArgs());
}},
CoreTestConfiguration{
"Inproc",
@ -849,8 +839,7 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
},
CoreTestConfiguration{
"Chttp2SslCredReloadTls12",
FEATURE_MASK_IS_SECURE |
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_IS_SECURE | FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS |
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_IS_HTTP2 |
FEATURE_MASK_EXCLUDE_FROM_EXPERIMENT_RUNS,
"foo.test.google.fr",
@ -994,8 +983,7 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
return std::make_unique<InsecureFixtureWithPipeForWakeupFd>();
}},
#endif
CoreTestConfiguration {
"ChaoticGoodFullStack",
CoreTestConfiguration{"ChaoticGoodFullStack",
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL |
FEATURE_MASK_DOES_NOT_SUPPORT_RETRY |
FEATURE_MASK_DOES_NOT_SUPPORT_WRITE_BUFFERING |
@ -1004,9 +992,7 @@ std::vector<CoreTestConfiguration> DefaultConfigs() {
[](const ChannelArgs& /*client_args*/,
const ChannelArgs& /*server_args*/) {
return std::make_unique<ChaoticGoodFixture>();
}
}
};
}}};
}
std::vector<CoreTestConfiguration> AllConfigs() {

@ -141,13 +141,11 @@ class TestFixture : public SecureFixture {
typedef enum { SUCCESS, FAIL } test_result;
#define SSL_TEST(request_type, cert_type, result) \
{ \
{TEST_NAME(request_type, cert_type, result), \
{{TEST_NAME(request_type, cert_type, result), \
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | \
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL, \
"foo.test.google.fr", TestFixture::MakeFactory(request_type, cert_type)}, \
result \
}
result}
// All test configurations
struct CoreTestConfigWrapper {

@ -54,8 +54,7 @@ TEST(MatchTest, TestVoidReturn) {
TEST(MatchTest, TestMutable) {
absl::variant<int, double> v = 1.9;
MatchMutable(
&v, [](int*) { abort(); }, [](double* x) { *x = 0.0; });
MatchMutable(&v, [](int*) { abort(); }, [](double* x) { *x = 0.0; });
EXPECT_EQ(v, (absl::variant<int, double>(0.0)));
}

@ -112,8 +112,7 @@ int main(int argc, char** argv) {
gpr_mu_lock(&params.mu);
while (
params.queuing != THREADS &&
!gpr_cv_wait(&params.cv, &params.mu, gpr_inf_future(GPR_CLOCK_REALTIME)))
;
!gpr_cv_wait(&params.cv, &params.mu, gpr_inf_future(GPR_CLOCK_REALTIME)));
gpr_mu_unlock(&params.mu);
// Wait for the mutexes to be released. This indicates that the threads have
@ -133,8 +132,7 @@ int main(int argc, char** argv) {
gpr_mu_lock(&params.mu);
while (
params.complete != THREADS &&
!gpr_cv_wait(&params.cv, &params.mu, gpr_inf_future(GPR_CLOCK_REALTIME)))
;
!gpr_cv_wait(&params.cv, &params.mu, gpr_inf_future(GPR_CLOCK_REALTIME)));
gpr_mu_unlock(&params.mu);
for (auto& t : threads) t.Join();

@ -34,8 +34,7 @@ BENCHMARK(BM_PartyCreate);
void BM_AddParticipant(benchmark::State& state) {
auto party = Party::Make(SimpleArenaAllocator()->MakeArena());
for (auto _ : state) {
party->Spawn(
"participant", []() { return Success{}; }, [](StatusFlag) {});
party->Spawn("participant", []() { return Success{}; }, [](StatusFlag) {});
}
}
BENCHMARK(BM_AddParticipant);

@ -51,15 +51,11 @@ TEST(IfTest, ChooseFailure) {
}
TEST(IfTest, ImmediateChooseTrue) {
EXPECT_EQ(If(
true, []() { return 1; }, []() { return 2; })(),
Poll<int>(1));
EXPECT_EQ(If(true, []() { return 1; }, []() { return 2; })(), Poll<int>(1));
}
TEST(IfTest, ImmediateChooseFalse) {
EXPECT_EQ(If(
false, []() { return 1; }, []() { return 2; })(),
Poll<int>(2));
EXPECT_EQ(If(false, []() { return 1; }, []() { return 2; })(), Poll<int>(2));
}
} // namespace grpc_core

@ -118,9 +118,7 @@ TEST(PingCallbacksTest, PingRoundtrips) {
// request
EXPECT_CALL(event_engine, RunAfter(EventEngine::Duration(Duration::Hours(24)),
Matcher<absl::AnyInvocable<void()>>(_)))
.WillOnce([]() {
return EventEngine::TaskHandle{123, 456};
});
.WillOnce([]() { return EventEngine::TaskHandle{123, 456}; });
auto id = callbacks.StartPing(bitgen);
callbacks.OnPingTimeout(Duration::Hours(24), &event_engine,
[] { Crash("should not reach here"); });
@ -198,9 +196,7 @@ TEST(PingCallbacksTest, DuplicatePingIdFlagsError) {
EXPECT_FALSE(acked);
EXPECT_CALL(event_engine, RunAfter(EventEngine::Duration(Duration::Hours(24)),
Matcher<absl::AnyInvocable<void()>>(_)))
.WillOnce([]() {
return EventEngine::TaskHandle{123, 456};
});
.WillOnce([]() { return EventEngine::TaskHandle{123, 456}; });
auto id = callbacks.StartPing(bitgen);
callbacks.OnPingTimeout(Duration::Hours(24), &event_engine,
[] { Crash("should not reach here"); });
@ -240,9 +236,7 @@ TEST(PingCallbacksTest, OnPingAckCanPiggybackInflightPings) {
EXPECT_FALSE(acked_second);
EXPECT_CALL(event_engine, RunAfter(EventEngine::Duration(Duration::Hours(24)),
Matcher<absl::AnyInvocable<void()>>(_)))
.WillOnce([]() {
return EventEngine::TaskHandle{123, 456};
});
.WillOnce([]() { return EventEngine::TaskHandle{123, 456}; });
auto id = callbacks.StartPing(bitgen);
callbacks.OnPingTimeout(Duration::Hours(24), &event_engine,
[] { Crash("should not reach here"); });
@ -281,9 +275,7 @@ TEST(PingCallbacksTest, PingAckRoundtrips) {
EXPECT_FALSE(acked);
EXPECT_CALL(event_engine, RunAfter(EventEngine::Duration(Duration::Hours(24)),
Matcher<absl::AnyInvocable<void()>>(_)))
.WillOnce([]() {
return EventEngine::TaskHandle{123, 456};
});
.WillOnce([]() { return EventEngine::TaskHandle{123, 456}; });
auto id = callbacks.StartPing(bitgen);
callbacks.OnPingTimeout(Duration::Hours(24), &event_engine,
[] { Crash("should not reach here"); });
@ -321,9 +313,7 @@ TEST(PingCallbacksTest, MultiPingRoundtrips) {
EXPECT_FALSE(acked2);
EXPECT_CALL(event_engine, RunAfter(EventEngine::Duration(Duration::Hours(24)),
Matcher<absl::AnyInvocable<void()>>(_)))
.WillOnce([]() {
return EventEngine::TaskHandle{123, 456};
});
.WillOnce([]() { return EventEngine::TaskHandle{123, 456}; });
auto id1 = callbacks.StartPing(bitgen);
callbacks.OnPingTimeout(Duration::Hours(24), &event_engine,
[] { Crash("should not reach here"); });
@ -348,9 +338,7 @@ TEST(PingCallbacksTest, MultiPingRoundtrips) {
EXPECT_FALSE(acked2);
EXPECT_CALL(event_engine, RunAfter(EventEngine::Duration(Duration::Hours(24)),
Matcher<absl::AnyInvocable<void()>>(_)))
.WillOnce([]() {
return EventEngine::TaskHandle{123, 789};
});
.WillOnce([]() { return EventEngine::TaskHandle{123, 789}; });
auto id2 = callbacks.StartPing(bitgen);
callbacks.OnPingTimeout(Duration::Hours(24), &event_engine,
[] { Crash("should not reach here"); });
@ -402,9 +390,7 @@ TEST(PingCallbacksTest, MultiPingRoundtripsWithOutOfOrderAcks) {
EXPECT_FALSE(acked2);
EXPECT_CALL(event_engine, RunAfter(EventEngine::Duration(Duration::Hours(24)),
Matcher<absl::AnyInvocable<void()>>(_)))
.WillOnce([]() {
return EventEngine::TaskHandle{123, 456};
});
.WillOnce([]() { return EventEngine::TaskHandle{123, 456}; });
auto id1 = callbacks.StartPing(bitgen);
callbacks.OnPingTimeout(Duration::Hours(24), &event_engine,
[] { Crash("should not reach here"); });
@ -429,9 +415,7 @@ TEST(PingCallbacksTest, MultiPingRoundtripsWithOutOfOrderAcks) {
EXPECT_FALSE(acked2);
EXPECT_CALL(event_engine, RunAfter(EventEngine::Duration(Duration::Hours(24)),
Matcher<absl::AnyInvocable<void()>>(_)))
.WillOnce([]() {
return EventEngine::TaskHandle{123, 789};
});
.WillOnce([]() { return EventEngine::TaskHandle{123, 789}; });
auto id2 = callbacks.StartPing(bitgen);
callbacks.OnPingTimeout(Duration::Hours(24), &event_engine,
[] { Crash("should not reach here"); });
@ -492,9 +476,7 @@ TEST(PingCallbacksTest, CoalescedPingsRoundtrip) {
EXPECT_FALSE(acked2);
EXPECT_CALL(event_engine, RunAfter(EventEngine::Duration(Duration::Hours(24)),
Matcher<absl::AnyInvocable<void()>>(_)))
.WillOnce([]() {
return EventEngine::TaskHandle{123, 456};
});
.WillOnce([]() { return EventEngine::TaskHandle{123, 456}; });
auto id = callbacks.StartPing(bitgen);
callbacks.OnPingTimeout(Duration::Hours(24), &event_engine,
[] { Crash("should not reach here"); });
@ -537,9 +519,7 @@ TEST(PingCallbacksTest, CancelAllCancelsCallbacks) {
// Can still send a ping, no callback should be invoked
EXPECT_CALL(event_engine, RunAfter(EventEngine::Duration(Duration::Hours(24)),
Matcher<absl::AnyInvocable<void()>>(_)))
.WillOnce([]() {
return EventEngine::TaskHandle{123, 456};
});
.WillOnce([]() { return EventEngine::TaskHandle{123, 456}; });
auto id = callbacks.StartPing(bitgen);
callbacks.OnPingTimeout(Duration::Hours(24), &event_engine,
[] { Crash("should not reach here"); });
@ -574,9 +554,7 @@ TEST(PingCallbacksTest, CancelAllCancelsInflightPings) {
EXPECT_FALSE(acked);
EXPECT_CALL(event_engine, RunAfter(EventEngine::Duration(Duration::Hours(24)),
Matcher<absl::AnyInvocable<void()>>(_)))
.WillOnce([]() {
return EventEngine::TaskHandle{123, 456};
});
.WillOnce([]() { return EventEngine::TaskHandle{123, 456}; });
auto id = callbacks.StartPing(bitgen);
callbacks.OnPingTimeout(Duration::Hours(24), &event_engine,
[] { Crash("should not reach here"); });

@ -146,10 +146,8 @@ int byte_buffer_eq_string(ByteBuffer* bb, const char* str) {
bool ignored_ok;
cli_cq_.Shutdown();
srv_cq_->Shutdown();
while (cli_cq_.Next(&ignored_tag, &ignored_ok))
;
while (srv_cq_->Next(&ignored_tag, &ignored_ok))
;
while (cli_cq_.Next(&ignored_tag, &ignored_ok));
while (srv_cq_->Next(&ignored_tag, &ignored_ok));
[super tearDown];
}

@ -113,5 +113,5 @@ DOCKERIMAGE_CURRENT_VERSIONS = {
"tools/dockerfile/test/rbe_ubuntu2004.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rbe_ubuntu2004@sha256:b3eb1a17b7b091e3c5648a803076b2c40601242ff91c04d55997af6641305f68",
"tools/dockerfile/test/ruby_debian11_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_arm64@sha256:d2e79919b2e2d4cc36a29682ecb5170641df4fb506cfb453978ffdeb8a841bd9",
"tools/dockerfile/test/ruby_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64@sha256:6e8b4696ba0661f11a31ed0992a94d2efcd889a018f57160f0e2fb62963f3593",
"tools/dockerfile/test/sanity.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/sanity@sha256:966aa97475368b6fc308a7e9e584ab471e8c6a47b4a6c9e709c0b1b7d4e2d800",
"tools/dockerfile/test/sanity.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/sanity@sha256:4fb77e7130e10934e65ec0657e286a8ca5850e9a25441dabe2174b3cb6a56180",
}

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM silkeh/clang:17-bookworm
FROM silkeh/clang:18-bookworm
ADD clang_format_all_the_things.sh /

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM silkeh/clang:17-bookworm
FROM silkeh/clang:18-bookworm
# Install prerequisites for the clang-tidy script
RUN apt-get update && apt-get install -y python3 jq git && apt-get clean

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/sanity:f21b7692698957bebcd72e8ab5d24c485cb4cbaf@sha256:966aa97475368b6fc308a7e9e584ab471e8c6a47b4a6c9e709c0b1b7d4e2d800
us-docker.pkg.dev/grpc-testing/testing-images-public/sanity:0006a2ed3aca736f842b3e1bf758cb6ab621922d@sha256:4fb77e7130e10934e65ec0657e286a8ca5850e9a25441dabe2174b3cb6a56180

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM silkeh/clang:17-bookworm
FROM silkeh/clang:18-bookworm
#=================
# Basic C core dependencies
@ -67,13 +67,13 @@ RUN git config --global protocol.file.allow always
# (Bullseye comes with Python 3.9 which isn't supported by pytype yet)
RUN apt update && apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev \
libnss3-dev libssl-dev libreadline-dev libffi-dev libbz2-dev
RUN curl -O https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tar.xz && \
tar -xf Python-3.7.9.tar.xz && \
cd Python-3.7.9 && \
RUN curl -O https://www.python.org/ftp/python/3.7.17/Python-3.7.17.tar.xz && \
tar -xf Python-3.7.17.tar.xz && \
cd Python-3.7.17 && \
./configure && \
make -j 4 && \
make install
RUN curl https://bootstrap.pypa.io/get-pip.py | python3
RUN curl https://bootstrap.pypa.io/pip/3.7/get-pip.py | python3
# Google Cloud Platform API libraries
# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts)

Loading…
Cancel
Save