From 79e42ff448cbf9edbda676a2b33c39b57e2106e7 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 11 Oct 2019 20:09:29 +0100 Subject: [PATCH 1/1] test: Send initial confirmation byte, and wait for some rx Now this hangs indefinitely because we don't send a packet. That comes next. Signed-off-by: Ian Jackson --- test/invoke | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/invoke b/test/invoke index 2f8835e..5920532 100755 --- a/test/invoke +++ b/test/invoke @@ -45,6 +45,7 @@ exec <$pipefp.t exec 3<&- exec cat " + close $fakeuh set cfg " netlink userv-ipif { name \"netlink\"; @@ -90,6 +91,7 @@ exec cat } proc spawn-secnet {which} { + global netlinkfh upvar #0 pids($which) pid set cf test/$which.conf set ch [open $cf w] @@ -100,7 +102,26 @@ proc spawn-secnet {which} { if {!$pid} { execl ./secnet $argl } + puts -nonewline $netlinkfh($which.t) "\xc0" +} + +proc netlink-readable {which} { + global ok + upvar #0 netlinkfh($which.r) fh + read $fh; # empty the buffer + switch -exact $which { + outside { + puts OK + set ok 1; # what a bodge + return + } + inside { + error "inside rx'd!" + } + } } spawn-secnet inside spawn-secnet outside + +vwait ok -- 2.30.2