MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_crashlog

Function test_crashlog

tests/test_misc.py:2046–2057  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

2044@unittest.skipIf(VALGRIND,
2045 "Valgrind sometimes fails assert on injected SEGV")
2046def test_crashlog(node_factory):
2047 l1 = node_factory.get_node(may_fail=True,
2048 broken_log=' lightningd: ')
2049
2050 def has_crash_log(n):
2051 files = os.listdir(os.path.join(n.daemon.lightning_dir, TEST_NETWORK))
2052 crashfiles = [f for f in files if 'crash.log' in f]
2053 return len(crashfiles) > 0
2054
2055 assert not has_crash_log(l1)
2056 l1.daemon.proc.send_signal(signal.SIGSEGV)
2057 wait_for(lambda: has_crash_log(l1))
2058
2059
2060def test_configfile_before_chdir(node_factory):

Callers

nothing calls this directly

Calls 3

wait_forFunction · 0.90
has_crash_logFunction · 0.85
get_nodeMethod · 0.45

Tested by

no test coverage detected