Skip to content

Commit

Permalink
Merge branch 'main' into test-debug-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
roypat authored Oct 22, 2024
2 parents 8cfed0d + a0f1c6f commit 448190d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/host_tools/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,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

0 comments on commit 448190d

Please sign in to comment.