From fc024f81d6c564f493efcca65a90dda7eab2457f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 1 Aug 2019 14:35:53 +0930 Subject: [PATCH] pytest: check that --daemon still means we recognize our own children. We create our children then fork, so we're not a parent. I noticed this because 'lightning-cli stop' takes a long time: this is because it tries to wait for them and they don't respond. Signed-off-by: Rusty Russell --- tests/test_misc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_misc.py b/tests/test_misc.py index a912970af..7e29b9214 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -659,6 +659,7 @@ def test_cli(node_factory): assert only_one(j['invoices'])['label'] == 'l"[]{}' +@pytest.mark.xfail(strict=True) def test_daemon_option(node_factory): """ Make sure --daemon at least vaguely works! @@ -683,6 +684,10 @@ def test_daemon_option(node_factory): '--lightning-dir={}'.format(l1.daemon.lightning_dir), 'stop'], check=True) + # It should not complain that subdaemons aren't children. + with open('{}/log-daemon'.format(l1.daemon.lightning_dir), 'r') as f: + assert 'No child process' not in f.read() + @flaky @unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1")