Skip to content

Commit 839f29e

Browse files
committed
Revert "Fix assertions for rust plugin after updating rustc"
This reverts commit c19e738. Signed-off-by: Matt Leon <mattleon@google.com>
1 parent 68ad60a commit 839f29e

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

test/runtime_test.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ TEST_P(TestVm, WasmMemoryLimit) {
132132
// Backtrace
133133
if (engine_ == "v8") {
134134
EXPECT_TRUE(host->isErrorLogged("Proxy-Wasm plugin in-VM backtrace:"));
135-
EXPECT_TRUE(host->isErrorLogged("rust_oom"));
135+
EXPECT_TRUE(host->isErrorLogged("rg_oom"));
136136
EXPECT_TRUE(host->isErrorLogged(" - alloc::alloc::handle_alloc_error"));
137137
}
138138
}
@@ -157,8 +157,8 @@ TEST_P(TestVm, Trap) {
157157
// Backtrace
158158
if (engine_ == "v8") {
159159
EXPECT_TRUE(host->isErrorLogged("Proxy-Wasm plugin in-VM backtrace:"));
160-
EXPECT_TRUE(host->isErrorLogged(" - std::panicking"));
161-
// Check for the function name 'two' in the backtrace, which may appear with or without
160+
EXPECT_TRUE(host->isErrorLogged(" - std::panicking::begin_panic"));
161+
// Check for the function name 'one' in the backtrace, which may appear with or without
162162
// module prefix depending on Rust compiler version and symbol generation.
163163
bool has_one_symbol = host->isErrorLogged("::one") || host->isErrorLogged(" - one");
164164
EXPECT_TRUE(has_one_symbol) << "Expected to find '::one' or ' - one' in backtrace";
@@ -185,7 +185,7 @@ TEST_P(TestVm, Trap2) {
185185
// Backtrace
186186
if (engine_ == "v8") {
187187
EXPECT_TRUE(host->isErrorLogged("Proxy-Wasm plugin in-VM backtrace:"));
188-
EXPECT_TRUE(host->isErrorLogged(" - std::panicking"));
188+
EXPECT_TRUE(host->isErrorLogged(" - std::panicking::begin_panic"));
189189
EXPECT_TRUE(host->isErrorLogged(" - trigger2"));
190190
}
191191
}

test/test_data/trap.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,12 @@ fn one() {
3636
two();
3737
}
3838

39-
// Proxy-Wasm only prints up to 9 stack frames in V8.
40-
// Ensure that we can see the `one` frame in the stack trace for assertions by inlining two and
41-
// three.
42-
#[inline(always)]
39+
#[inline(never)]
4340
fn two() {
4441
three();
4542
}
4643

47-
#[inline(always)]
44+
#[inline(never)]
4845
fn three() {
4946
panic!("trap!");
5047
}

0 commit comments

Comments
 (0)