Skip to content
This repository was archived by the owner on Dec 16, 2020. It is now read-only.

Commit 7de1f38

Browse files
committed
fix
Signed-off-by: Shikugawa <[email protected]>
1 parent 0636a2f commit 7de1f38

File tree

12 files changed

+31
-32
lines changed

12 files changed

+31
-32
lines changed

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ build:remote --spawn_strategy=remote,sandboxed,local
140140
build:remote --strategy=Javac=remote,sandboxed,local
141141
build:remote --strategy=Closure=remote,sandboxed,local
142142
build:remote --strategy=Genrule=remote,sandboxed,local
143+
build:remote --strategy_regexp=_wasm_.*_rust=local
143144
build:remote --remote_timeout=7200
144145
build:remote --auth_enabled=true
145146
build:remote --remote_download_toplevel

bazel/wasm/wasm.bzl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ def wasm_rust_binary(name, **kwargs):
9898
)
9999

100100
wasm_rust_binary_rule(
101-
name = name,
101+
name = "precompile_" + name,
102102
binary = ":" + wasm_name,
103103
)
104104

105105
native.genrule(
106-
name = "wee8_" + name,
107-
srcs = [":" + name],
108-
outs = ["wee8_" + name],
106+
name = name,
107+
srcs = [":precompile_" + name],
108+
outs = [name],
109109
tools = ["//test/tools/wee8_compile:wee8_compile_tool"],
110-
cmd = "$(location //test/tools/wee8_compile:wee8_compile_tool) $(SRCS).runfiles $(OUTS).runtimes",
110+
cmd = "$(location //test/tools/wee8_compile:wee8_compile_tool) $(SRCS).runfiles $(OUTS).runfiles",
111111
)

source/common/common/thread.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ class CondVar {
6060
* @return WaitStatus whether the condition timed out or not.
6161
*/
6262
template <class Rep, class Period>
63-
WaitStatus waitFor(MutexBasicLockable& mutex,
64-
std::chrono::duration<Rep, Period> duration) noexcept
65-
ABSL_EXCLUSIVE_LOCKS_REQUIRED(mutex) {
63+
WaitStatus waitFor(
64+
MutexBasicLockable& mutex,
65+
std::chrono::duration<Rep, Period> duration) noexcept ABSL_EXCLUSIVE_LOCKS_REQUIRED(mutex) {
6666
return condvar_.WaitWithTimeout(&mutex.mutex_, absl::FromChrono(duration))
6767
? WaitStatus::Timeout
6868
: WaitStatus::NoTimeout;

source/extensions/common/tap/admin.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void AdminHandler::AdminPerTapSinkHandle::submitTrace(
110110
std::shared_ptr<envoy::data::tap::v3::TraceWrapper> shared_trace{std::move(trace)};
111111
// The handle can be destroyed before the cross thread post is complete. Thus, we capture a
112112
// reference to our parent.
113-
parent_.main_thread_dispatcher_.post([&parent = parent_, trace = shared_trace, format]() {
113+
parent_.main_thread_dispatcher_.post([& parent = parent_, trace = shared_trace, format]() {
114114
if (!parent.attached_request_.has_value()) {
115115
return;
116116
}

source/extensions/filters/http/ext_authz/ext_authz.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ void Filter::onComplete(Filters::Common::ExtAuthz::ResponsePtr&& response) {
201201

202202
callbacks_->sendLocalReply(
203203
response->status_code, response->body,
204-
[&headers = response->headers_to_add,
204+
[& headers = response->headers_to_add,
205205
&callbacks = *callbacks_](Http::HeaderMap& response_headers) -> void {
206206
ENVOY_STREAM_LOG(trace,
207207
"ext_authz filter added header(s) to the local response:", callbacks);

test/extensions/common/wasm/wasm_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class TestContext : public Extensions::Common::Wasm::Context {
5050
const Extensions::Common::Wasm::PluginSharedPtr& plugin)
5151
: Extensions::Common::Wasm::Context(wasm, root_context_id, plugin) {}
5252
~TestContext() override = default;
53-
proxy_wasm::WasmResult log(uint32_t level, absl::string_view message) {
53+
proxy_wasm::WasmResult log(uint32_t level, absl::string_view message) override {
5454
std::cerr << std::string(message) << "\n";
5555
log_(static_cast<spdlog::level::level_enum>(level), message);
5656
Extensions::Common::Wasm::Context::log(static_cast<spdlog::level::level_enum>(level), message);

test/extensions/wasm/wasm_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class TestContext : public Extensions::Common::Wasm::Context {
2525
using Extensions::Common::Wasm::Context::log;
2626
TestContext(Extensions::Common::Wasm::Wasm* wasm) : Extensions::Common::Wasm::Context(wasm) {}
2727
~TestContext() override = default;
28-
proxy_wasm::WasmResult log(uint32_t level, absl::string_view message) {
28+
proxy_wasm::WasmResult log(uint32_t level, absl::string_view message) override {
2929
std::cerr << std::string(message) << "\n";
3030
log_(static_cast<spdlog::level::level_enum>(level), message);
3131
return proxy_wasm::WasmResult::Ok;

test/mocks/common.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ class MockTimeSystem : public Event::TestTimeSystem {
5757
void advanceTimeAsync(const Duration& duration) override {
5858
real_time_.advanceTimeAsync(duration);
5959
}
60-
Thread::CondVar::WaitStatus waitFor(Thread::MutexBasicLockable& mutex, Thread::CondVar& condvar,
61-
const Duration& duration) noexcept
62-
ABSL_EXCLUSIVE_LOCKS_REQUIRED(mutex) override {
60+
Thread::CondVar::WaitStatus
61+
waitFor(Thread::MutexBasicLockable& mutex, Thread::CondVar& condvar,
62+
const Duration& duration) noexcept ABSL_EXCLUSIVE_LOCKS_REQUIRED(mutex) override {
6363
return real_time_.waitFor(mutex, condvar, duration); // NO_CHECK_FORMAT(real_time)
6464
}
6565
MOCK_METHOD(SystemTime, systemTime, ());

test/test_common/simulated_time_system.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,9 @@ void SimulatedTimeSystemHelper::waitForNoPendingLockHeld() const EXCLUSIVE_LOCKS
247247
&pending_alarms_));
248248
}
249249

250-
Thread::CondVar::WaitStatus SimulatedTimeSystemHelper::waitFor(Thread::MutexBasicLockable& mutex,
251-
Thread::CondVar& condvar,
252-
const Duration& duration) noexcept
253-
EXCLUSIVE_LOCKS_REQUIRED(mutex) {
250+
Thread::CondVar::WaitStatus SimulatedTimeSystemHelper::waitFor(
251+
Thread::MutexBasicLockable& mutex, Thread::CondVar& condvar,
252+
const Duration& duration) noexcept EXCLUSIVE_LOCKS_REQUIRED(mutex) {
254253
only_one_thread_.checkOneThread();
255254

256255
// TODO(#10568): This real-time polling delay should not be necessary. Without

test/test_common/simulated_time_system.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class SimulatedTimeSystemHelper : public TestTimeSystem {
2828
// TestTimeSystem
2929
void advanceTimeWait(const Duration& duration) override;
3030
void advanceTimeAsync(const Duration& duration) override;
31-
Thread::CondVar::WaitStatus waitFor(Thread::MutexBasicLockable& mutex, Thread::CondVar& condvar,
32-
const Duration& duration) noexcept
33-
EXCLUSIVE_LOCKS_REQUIRED(mutex) override;
31+
Thread::CondVar::WaitStatus
32+
waitFor(Thread::MutexBasicLockable& mutex, Thread::CondVar& condvar,
33+
const Duration& duration) noexcept EXCLUSIVE_LOCKS_REQUIRED(mutex) override;
3434

3535
// TimeSource
3636
SystemTime systemTime() override;

0 commit comments

Comments
 (0)