Skip to content

Commit

Permalink
Redirect ldns-testns output from test scripts
Browse files Browse the repository at this point in the history
So they can exit
On some systems they do not exit with open file descriptors
  • Loading branch information
wtoorop committed Dec 5, 2024
1 parent 8a95b98 commit f804e15
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tpkg/ixfr_faildel.tdir/ixfr_faildel.pre
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TPKG_NSD="$PRE/nsd"

sed -e "s/TESTNS_PORT/"$TESTNS_PORT"/" < ixfr_faildel.conf > edit.conf

ldns-testns -p $TESTNS_PORT ixfr_faildel.datafile &
ldns-testns -p $TESTNS_PORT ixfr_faildel.datafile >testns.log 2>&1 &
TESTNS_PID=$!

# share the vars
Expand Down
2 changes: 1 addition & 1 deletion tpkg/ixfr_wildcard.tdir/ixfr_wildcard.pre
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LDNS_PORT=$RND_PORT
echo port: $LDNS_PORT

# start ldns-testns, be extra verbose
ldns-testns -p $LDNS_PORT ixfr_wildcard.datafile1 &
ldns-testns -p $LDNS_PORT ixfr_wildcard.datafile1 >testns.log 2>&1 &
echo "export TESTNS_PID=$!" >> .tpkg.var.test
sleep 1

Expand Down
4 changes: 2 additions & 2 deletions tpkg/ixfr_wildcard.tdir/ixfr_wildcard.test
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if grep CNAME out1; then echo OK; else echo noCNAME; exit 1; fi

# next ixfr datafile.
kill_pid $TESTNS_PID
ldns-testns -p $LDNS_PORT ixfr_wildcard.datafile2 &
ldns-testns -p $LDNS_PORT ixfr_wildcard.datafile2 >testns2.log 2>&1 &
TESTNS_PID=$!
echo "export TESTNS_PID=$TESTNS_PID" >> .tpkg.var.test
sleep 1
Expand All @@ -37,7 +37,7 @@ if grep foo.dom out2; then echo OK; else echo noNS; exit 1; fi

# next ixfr datafile.
kill_pid $TESTNS_PID
ldns-testns -p $LDNS_PORT ixfr_wildcard.datafile3 &
ldns-testns -p $LDNS_PORT ixfr_wildcard.datafile3 >testns3.log 2>&1 &
TESTNS_PID=$!
echo "export TESTNS_PID=$TESTNS_PID" >> .tpkg.var.test
sleep 1
Expand Down
2 changes: 1 addition & 1 deletion tpkg/ixfrout.tdir/ixfrout.pre
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TPKG_NSD="$PRE/nsd"

sed -e "s/TESTNS_PORT/"$TESTNS_PORT"/" < ixfrout.conf > edit.conf

ldns-testns -p $TESTNS_PORT ixfrout.testns &
ldns-testns -p $TESTNS_PORT ixfrout.testns >testns.log 2>&1 &
TESTNS_PID=$!

# share the vars
Expand Down
2 changes: 1 addition & 1 deletion tpkg/ixfrout_large.tdir/ixfrout_large.pre
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ cat >>edit.testns <<EOF
ENTRY_END
EOF

ldns-testns -p $TESTNS_PORT edit.testns &
ldns-testns -p $TESTNS_PORT edit.testns >testns.log 2>&1 &
TESTNS_PID=$!
sleep 1

Expand Down
2 changes: 1 addition & 1 deletion tpkg/ixfrout_threeread.tdir/ixfrout_threeread.pre
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TPKG_NSD="$PRE/nsd"

sed -e "s/TESTNS_PORT/"$TESTNS_PORT"/" < ixfrout_threeread.conf > edit.conf

ldns-testns -p $TESTNS_PORT ixfrout_threeread.testns &
ldns-testns -p $TESTNS_PORT ixfrout_threeread.testns >testns.log 2>&1 &
TESTNS_PID=$!

# share the vars
Expand Down
2 changes: 1 addition & 1 deletion tpkg/ixfrout_threeversions.tdir/ixfrout_threeversions.pre
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TPKG_NSD="$PRE/nsd"

sed -e "s/TESTNS_PORT/"$TESTNS_PORT"/" < ixfrout_threeversions.conf > edit.conf

ldns-testns -p $TESTNS_PORT ixfrout_threeversions.testns &
ldns-testns -p $TESTNS_PORT ixfrout_threeversions.testns >testns.log 2>&1 &
TESTNS_PID=$!

# share the vars
Expand Down
2 changes: 1 addition & 1 deletion tpkg/ixfrout_threewrite.tdir/ixfrout_threewrite.pre
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ TPKG_NSD="$PRE/nsd"

sed -e "s/TESTNS_PORT/"$TESTNS_PORT"/" -e "s/TPKG_CTRL_PORT/"$TPKG_CTRL_PORT"/" < ixfrout_threewrite.conf > edit.conf

ldns-testns -p $TESTNS_PORT ixfrout_threewrite.testns &
ldns-testns -p $TESTNS_PORT ixfrout_threewrite.testns >testns.log 2>&1 &
TESTNS_PID=$!

# share the vars
Expand Down
2 changes: 1 addition & 1 deletion tpkg/ixfrout_tsig.tdir/ixfrout_tsig.pre
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TPKG_NSD="$PRE/nsd"

sed -e "s/TESTNS_PORT/"$TESTNS_PORT"/" < ixfrout_tsig.conf > edit.conf

ldns-testns -p $TESTNS_PORT ixfrout_tsig.testns &
ldns-testns -p $TESTNS_PORT ixfrout_tsig.testns >testns.log 2>&1 &
TESTNS_PID=$!

# share the vars
Expand Down
2 changes: 1 addition & 1 deletion tpkg/nsec3_parentaxfr.tdir/nsec3_parentaxfr.pre
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TPKG_NSD="$PRE/nsd"

sed -e "s/TESTNS_PORT/"$TESTNS_PORT"/" < nsec3_parentaxfr.conf > edit.conf

ldns-testns -p $TESTNS_PORT nsec3_parentaxfr.datafile &
ldns-testns -p $TESTNS_PORT nsec3_parentaxfr.datafile >testns.log 2>&1 &
TESTNS_PID=$!

# share the vars
Expand Down
2 changes: 1 addition & 1 deletion tpkg/xfr_udp.tdir/xfr_udp.pre
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LDNS_PORT=$RND_PORT
echo port: $LDNS_PORT

# start ldns-testns, be extra verbose
ldns-testns -vvv -p $LDNS_PORT xfr_udp.datafile &
ldns-testns -vvv -p $LDNS_PORT xfr_udp.datafile >testns.log 2>&1 &
echo "export TESTNS_PID=$!" >> .tpkg.var.test
sleep 1

Expand Down
2 changes: 1 addition & 1 deletion tpkg/xfr_update.tdir/xfr_update.pre
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ echo port: $LDNS_PORT
echo controlport: $CONTROL_PORT

# start ldns-testns, be extra verbose
ldns-testns -p $LDNS_PORT xfr_update.datafile &
ldns-testns -p $LDNS_PORT xfr_update.datafile >testns.log 2>&1 &
echo "export TESTNS_PID=$!" >> .tpkg.var.test
sleep 1

Expand Down

0 comments on commit f804e15

Please sign in to comment.