Skip to content

Commit c2c11e5

Browse files
authored
Merge pull request #417 from libos-nuse/fix-pipe-test
lkl: fix pipe test to avoid long wait
2 parents cfcfa8f + b5a39e1 commit c2c11e5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tools/lkl/tests/net.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ setup_backend()
5858
"loopback")
5959
;;
6060
"pipe")
61-
if [ -n "$VALGRIND" ]; then
62-
echo "pipe test with valgrind takes so long: skip"
63-
return $TEST_SKIP
64-
fi
6561
if [ -z $(lkl_test_cmd which mkfifo) ]; then
6662
echo "no mkfifo command"
6763
return $TEST_SKIP
@@ -126,14 +122,17 @@ run_tests()
126122
lkl_test_exec $script_dir/net-test --backend pipe \
127123
--ifname "$fifo1|$fifo2" \
128124
--ip $(ip_host) --netmask-len $TEST_IP_NETMASK \
129-
--sleep 30 >/dev/null &
125+
--sleep 1800 >/dev/null &
130126
cp $script_dir/net-test $script_dir/net-test2
127+
128+
sleep 10
131129
lkl_test_exec $script_dir/net-test2 --backend pipe \
132130
--ifname "$fifo2|$fifo1" \
133131
--ip $(ip_lkl) --netmask-len $TEST_IP_NETMASK \
134132
--dst $(ip_host)
135133
rm -f $script_dir/net-test2
136-
wait
134+
kill $!
135+
wait $! 2>/dev/null
137136
;;
138137
"tap")
139138
lkl_test_exec $script_dir/net-test --backend tap \

0 commit comments

Comments
 (0)