fix test_loads_binary_with_core_without_crashing on debian10 (#1389)

* fix test_loads_binary_with_core_without_crashing on debian10

* fix test_loads_binary_without_crashing

* fix lint
pull/1390/head
Disconnect3d 3 years ago committed by GitHub
parent 1224cf75ef
commit 8c30304c32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,13 +26,12 @@ def test_loads_binary_without_crashing():
compile_binary(BINARY_SOURCE, BINARY)
output = run_gdb_with_script(binary=BINARY).splitlines()
expected = [
"Reading symbols from %s..." % BINARY,
"(No debugging symbols found in %s)" % BINARY,
]
expected += HELLO
assert all(item in output for item in expected)
for h in HELLO:
assert h in output
assert any("Reading symbols from %s..." % BINARY in line for line in output)
# Old GDB says f"(no debugging symbols found)"
# New GDB says f"(No debugging symbols found in ${BINARY})"
assert any("(no debugging symbols found" in line.lower() for line in output)
def test_loads_binary_with_core_without_crashing():
@ -44,14 +43,13 @@ def test_loads_binary_with_core_without_crashing():
assert os.path.isfile(CORE)
output = run_gdb_with_script(binary=BINARY, core=CORE).splitlines()
expected = [
"Reading symbols from %s..." % BINARY,
"(No debugging symbols found in %s)" % BINARY,
"Program terminated with signal SIGFPE, Arithmetic exception.",
]
expected += HELLO
assert all(item in output for item in expected)
assert any("Reading symbols from %s..." % BINARY in line for line in output)
# Old GDB says f"(no debugging symbols found)"
# New GDB says f"(No debugging symbols found in ${BINARY})"
assert any("(no debugging symbols found" in line.lower() for line in output)
assert "Program terminated with signal SIGFPE, Arithmetic exception." in output
for h in HELLO:
assert h in output
lwp_line = re.compile(r"^\[New LWP \d+\]$")
assert any([lwp_line.match(line) for line in output])

Loading…
Cancel
Save