~samiam/MaraDNS

d819a46f579a61a5df1ae7645ea553ad2df02680 — Sam Trenholme a month ago 34f8b37
coLunacyDNS tests cover line 1740,1741 of coLunacyDNS.c. Ocverage: 98.71%
1 files changed, 8 insertions(+), 2 deletions(-)

M deadwood-github/tools/coLunacyDNS/sqa/sqa_gCovNoOpenDNS/do.test
M deadwood-github/tools/coLunacyDNS/sqa/sqa_gCovNoOpenDNS/do.test => deadwood-github/tools/coLunacyDNS/sqa/sqa_gCovNoOpenDNS/do.test +8 -2
@@ 19,12 19,18 @@ function processQuery(Q) -- Called for every DNS query received
   local t = {}
   if string.sub(Q.coQuery,1,1) == "a" then
     gCovNoOpenDNS = 1
     coDNS.open1("upstream.lua")
     line = coDNS.read1()
     if line then coDNS.log(line) else coDNS.log("read1 error") end
     t = coDNS.solve({name=Q.coQuery, type="A", upstreamIp4=u})
     line = coDNS.read1()
     if line then coDNS.log(line) else coDNS.log("read1 error") end
     gCovNoOpenDNS = 0
   elseif string.sub(Q.coQuery,1,1) == "b" then
     t = coDNS.solve({name=Q.coQuery, type="A", upstreamIp4=u})
     gCovNoOpenDNS = 1
     t = coDNS.solve({name=Q.coQuery, type="A", upstreamIp4=u})
     coDNS.open1("upstream.lua")
     gCovNoOpenDNS = 0
   elseif string.sub(Q.coQuery,1,1) == "c" then
     gCovNoOpenDNS = 0


@@ 55,11 61,11 @@ done
sleep 1

if ! cmp output.success output.test > /dev/null 2>&1 ; then
        echo gCovSendsFail test failed
        echo gCovNoOpenDNS test failed
        exit 255
fi

echo gCovSendsFail test Success
echo gCovNoOpenDNS test Success
# Clean up
rm test.lua
rm upstream.lua