You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to test ^C behavior and long running but interruptible programs and not having a pid from & I don't know how to do it
otherwise testscript is near perfect!
# how to do this
dnsping www.google.com 8.8.8.8 &
exec sleep 3
exec kill %1 # this doesn't exist/work - doesn't reference the dnsping sub process above
wait
stderr 'will query until interrupted'
stdout '0 errors \(0.00%\), [34] success.'
right now I found this workaround but it's brittle (relies on the exec being called same as the go command and nothing else being called same - and also doesn't work on ci)
exec pkill -x dnsping # todo want something like kill %1 instead
Am I not seeing an existing easy way to achieve this? (got reminded of this reading #228 where setup go side is mentioned but I am also looking for something in txtar)
I want to be able to test ^C behavior and long running but interruptible programs and not having a pid from
&
I don't know how to do itotherwise testscript is near perfect!
right now I found this workaround but it's brittle (relies on the exec being called same as the go command and nothing else being called same - and also doesn't work on ci)
https://github.com/fortio/dnsping/pull/17/files#diff-c93182c79a5fb9ceb9b9ba653ab9acd3ea10510a75167c5972e3890fa799389bR76
The text was updated successfully, but these errors were encountered: