X-Git-Url: https://git.distorted.org.uk/~mdw/adns/blobdiff_plain/47b9db5941ba11277d7bd62060057202236fb921..777763cb0994893c42f4030a442d3d44a403b8fa:/regress/update-extra-select diff --git a/regress/update-extra-select b/regress/update-extra-select new file mode 100755 index 0000000..0325309 --- /dev/null +++ b/regress/update-extra-select @@ -0,0 +1,27 @@ +#!/usr/bin/perl -wp +use strict; + +our ($fd, $timeadj); + +BEGIN { + $fd = -1; +} + +if (m/^ connect fd=(\d+) /) { + $fd=$1; next; +} + +if (m/^ read fd=$fd buflen=1$/) { + die if $timeadj; + print + " select max=".($fd+1)." rfds=null wfds=[$fd]". + " efds=null to=0.000000\n". + " select=1 rfds=null wfds=[$fd] efds=null\n". + "+0.000001\n"; + $timeadj = -0.000001; +} + +if (m/^ \+([0-9.]+)$/ && $timeadj) { + $_ = sprintf " +%.6f\n", $1 + $timeadj; + $timeadj = 0; +}