Skip to content

Commit

Permalink
wasm: remove no longer needed Emscripten metadata. (#13667)
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Sikora <[email protected]>
  • Loading branch information
PiotrSikora authored Oct 21, 2020
1 parent 6096517 commit 3e0ed73
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 57 deletions.
6 changes: 3 additions & 3 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -830,8 +830,8 @@ REPOSITORY_LOCATIONS_SPEC = dict(
project_name = "WebAssembly for Proxies (C++ host implementation)",
project_desc = "WebAssembly for Proxies (C++ host implementation)",
project_url = "https://github.com/proxy-wasm/proxy-wasm-cpp-host",
version = "c5658d34979abece30882b1eeaa95b6ee965d825",
sha256 = "dc3a794424b7679c3dbcf23548e202aa01e9f9093791b95446b99e8524e03c4f",
version = "2d4bfe9c29fc957c3c4e81e6575773801eedade1",
sha256 = "02b50d42ee715f07314f928dd959ff558a32ea6332a698ee6e21e93632c64f52",
strip_prefix = "proxy-wasm-cpp-host-{version}",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-host/archive/{version}.tar.gz"],
use_category = ["dataplane_ext"],
Expand All @@ -842,7 +842,7 @@ REPOSITORY_LOCATIONS_SPEC = dict(
"envoy.filters.network.wasm",
"envoy.stat_sinks.wasm",
],
release_date = "2020-10-16",
release_date = "2020-10-21",
cpe = "N/A",
),
# TODO: upgrade to the latest version (1.41 currently fails tests)
Expand Down
15 changes: 0 additions & 15 deletions test/extensions/bootstrap/wasm/wasm_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -222,21 +222,6 @@ TEST_P(WasmTest, DivByZero) {
wasm_->isFailed();
}

TEST_P(WasmTest, EmscriptenVersion) {
createWasm();
const auto code = TestEnvironment::readFileToStringForTest(TestEnvironment::substitute(
"{{ test_rundir }}/test/extensions/bootstrap/wasm/test_data/segv_cpp.wasm"));
EXPECT_FALSE(code.empty());
EXPECT_TRUE(wasm_->initialize(code, false));
uint32_t major = 9, minor = 9, abi_major = 9, abi_minor = 9;
EXPECT_TRUE(wasm_->getEmscriptenVersion(&major, &minor, &abi_major, &abi_minor));
EXPECT_EQ(major, 0);
EXPECT_LE(minor, 3);
// Up to (at least) emsdk 1.39.6.
EXPECT_EQ(abi_major, 0);
EXPECT_LE(abi_minor, 20);
}

TEST_P(WasmTest, IntrinsicGlobals) {
createWasm();
const auto code = TestEnvironment::readFileToStringForTest(TestEnvironment::substitute(
Expand Down
38 changes: 0 additions & 38 deletions test/extensions/common/wasm/wasm_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,44 +348,6 @@ TEST_P(WasmCommonTest, DivByZero) {
wasm->start(plugin);
}

TEST_P(WasmCommonTest, EmscriptenVersion) {
if (GetParam() != "v8") {
return;
}
Stats::IsolatedStoreImpl stats_store;
Api::ApiPtr api = Api::createApiForTest(stats_store);
Upstream::MockClusterManager cluster_manager;
Event::DispatcherPtr dispatcher(api->allocateDispatcher("wasm_test"));
auto scope = Stats::ScopeSharedPtr(stats_store.createScope("wasm."));
NiceMock<LocalInfo::MockLocalInfo> local_info;
auto name = "";
auto root_id = "";
auto vm_id = "";
auto vm_configuration = "";
auto plugin_configuration = "";
const auto code = TestEnvironment::readFileToStringForTest(TestEnvironment::substitute(
"{{ test_rundir }}/test/extensions/common/wasm/test_data/test_cpp.wasm"));
EXPECT_FALSE(code.empty());
auto plugin = std::make_shared<Extensions::Common::Wasm::Plugin>(
name, root_id, vm_id, GetParam(), plugin_configuration, false,
envoy::config::core::v3::TrafficDirection::UNSPECIFIED, local_info, nullptr);
auto vm_key = proxy_wasm::makeVmKey(vm_id, vm_configuration, code);
auto wasm = std::make_unique<Extensions::Common::Wasm::Wasm>(
absl::StrCat("envoy.wasm.runtime.", GetParam()), vm_id, vm_configuration, vm_key, scope,
cluster_manager, *dispatcher);
EXPECT_NE(wasm, nullptr);
auto context = std::make_unique<TestContext>(wasm.get());
EXPECT_TRUE(wasm->initialize(code, false));

uint32_t major = 9, minor = 9, abi_major = 9, abi_minor = 9;
EXPECT_TRUE(wasm->getEmscriptenVersion(&major, &minor, &abi_major, &abi_minor));
EXPECT_EQ(major, 0);
EXPECT_LE(minor, 3);
// Up to (at least) emsdk 1.39.6.
EXPECT_EQ(abi_major, 0);
EXPECT_LE(abi_minor, 20);
}

TEST_P(WasmCommonTest, IntrinsicGlobals) {
Stats::IsolatedStoreImpl stats_store;
Api::ApiPtr api = Api::createApiForTest(stats_store);
Expand Down
1 change: 0 additions & 1 deletion test/extensions/common/wasm/wasm_vm_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ TEST_P(WasmVmTest, V8Code) {
EXPECT_TRUE(!wasm_vm->getCustomSection(wasm_vm->getPrecompiledSectionName()).empty());
}
EXPECT_THAT(wasm_vm->getCustomSection("producers"), HasSubstr("rustc"));
EXPECT_TRUE(wasm_vm->getCustomSection("emscripten_metadata").empty());

EXPECT_TRUE(wasm_vm->cloneable() == Cloneable::CompiledBytecode);
EXPECT_TRUE(wasm_vm->clone() != nullptr);
Expand Down

0 comments on commit 3e0ed73

Please sign in to comment.