Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/host_tools/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def mac_from_ip(ip_address):
"""Create a MAC address based on the provided IP.

Algorithm:
- the first 2 bytes are fixed to 06:00
- the first 2 bytes are fixed to 06:00, which is in an LAA range
- https://en.wikipedia.org/wiki/MAC_address#Ranges_of_group_and_locally_administered_addresses
- the next 4 bytes are the IP address

Example of function call:
Expand Down
19 changes: 19 additions & 0 deletions tests/integration_tests/functional/test_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,22 @@ def test_release_debuginfo(microvm_factory):
}
missing_sections = needed_sections - matches
assert missing_sections == set()


def test_release_no_gdb(microvm_factory):
"""Ensure the gdb feature is not enabled in releases"""
fc_binary = microvm_factory.fc_binary_path
# We use C++ demangle since there's no Rust support, but it's good enough
# for our purposes.
stdout = subprocess.check_output(
["readelf", "-W", "--demangle", "-s", str(fc_binary)],
encoding="ascii",
)
gdb_symbols = []
for line in stdout.splitlines():
parts = line.split(maxsplit=7)
if len(parts) == 8:
symbol_name = parts[-1]
if "gdb" in symbol_name:
gdb_symbols.append(symbol_name)
assert not gdb_symbols
Loading