output6.sh (a3525bd16698f90db2144436f6c36e342c08f593) output6.sh (01f3f35447b0a43b37ecc71ebb9296aad123cd43)
1#!/usr/bin/env atf-sh
2#-
3# SPDX-License-Identifier: BSD-2-Clause
4#
5# Copyright (c) 2020 Alexander V. Chernikov
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions

--- 213 unchanged lines hidden (view full) ---

222 # wait for DAD to complete
223 while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
224 sleep 0.1
225 done
226 while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
227 sleep 0.1
228 done
229
1#!/usr/bin/env atf-sh
2#-
3# SPDX-License-Identifier: BSD-2-Clause
4#
5# Copyright (c) 2020 Alexander V. Chernikov
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions

--- 213 unchanged lines hidden (view full) ---

222 # wait for DAD to complete
223 while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
224 sleep 0.1
225 done
226 while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
227 sleep 0.1
228 done
229
230 atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping6 -nc1 ${ip_dst}
230 atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping -6 -nc1 ${ip_dst}
231}
232
233output6_raw_success_cleanup()
234{
235 vnet_cleanup
236}
237
238# Multipath tests are done the following way:

--- 96 unchanged lines hidden (view full) ---

335 ll=`jexec ${jname}b ifconfig ${epair1}b inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
336 jexec ${jname}a route add -6 -net ${net_dst}::/${plen} ${ll}%${epair1}a
337
338 # B towards A via epair0b LL
339 ll=`jexec ${jname}a ifconfig ${epair1}a inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
340 jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
341
342 # Base setup verification
231}
232
233output6_raw_success_cleanup()
234{
235 vnet_cleanup
236}
237
238# Multipath tests are done the following way:

--- 96 unchanged lines hidden (view full) ---

335 ll=`jexec ${jname}b ifconfig ${epair1}b inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
336 jexec ${jname}a route add -6 -net ${net_dst}::/${plen} ${ll}%${epair1}a
337
338 # B towards A via epair0b LL
339 ll=`jexec ${jname}a ifconfig ${epair1}a inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
340 jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
341
342 # Base setup verification
343 atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping6 -c1 ${ip_dst}
343 atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping -6 -c1 ${ip_dst}
344
345 # run listener
346 num_ports=`echo ${ports} | wc -w`
347 num_ips=`echo ${ips} | wc -w`
348 count_examples=$((num_ports*num_ips))
349 listener_ports=`echo ${ports} | tr ' ' '\n' | sort -n | tr '\n' ',' | sed -e 's?,$??'`
350 args="--family inet6 --ports ${listener_ports} --count ${count_examples} --match_str ${text}"
351 echo jexec ${jname}b ${script_name} ${args}

--- 125 unchanged lines hidden (view full) ---

477 ll=`jexec ${jname}b ifconfig ${epair1}b inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
478 jexec ${jname}a route add -6 -net ${net_dst}::/${plen} ${ll}%${epair1}a
479
480 # B towards A via epair0b LL
481 ll=`jexec ${jname}a ifconfig ${epair1}a inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
482 jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
483
484 # Base setup verification
344
345 # run listener
346 num_ports=`echo ${ports} | wc -w`
347 num_ips=`echo ${ips} | wc -w`
348 count_examples=$((num_ports*num_ips))
349 listener_ports=`echo ${ports} | tr ' ' '\n' | sort -n | tr '\n' ',' | sed -e 's?,$??'`
350 args="--family inet6 --ports ${listener_ports} --count ${count_examples} --match_str ${text}"
351 echo jexec ${jname}b ${script_name} ${args}

--- 125 unchanged lines hidden (view full) ---

477 ll=`jexec ${jname}b ifconfig ${epair1}b inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
478 jexec ${jname}a route add -6 -net ${net_dst}::/${plen} ${ll}%${epair1}a
479
480 # B towards A via epair0b LL
481 ll=`jexec ${jname}a ifconfig ${epair1}a inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
482 jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
483
484 # Base setup verification
485 atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping6 -c1 ${ip_dst}
485 atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping -6 -c1 ${ip_dst}
486
487 # run listener
488 num_ports=`echo ${ports} | wc -w`
489 num_ips=`echo ${ips} | wc -w`
490 count_examples=$((num_ports*num_ips))
491 listener_ports=`echo ${ports} | tr ' ' '\n' | sort -n | tr '\n' ',' | sed -e 's?,$??'`
492 args="--family inet6 --ports ${listener_ports} --count ${count_examples} --match_str ${text}"
493 echo jexec ${jname}b ${script_name} ${args}

--- 122 unchanged lines hidden (view full) ---

616 ll=`jexec ${jname}b ifconfig ${epair1}b inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
617 jexec ${jname}a route add -6 -net ${net_dst}::/${plen} ${ll}%${epair1}a
618
619 # B towards A via epair0b LL
620 ll=`jexec ${jname}a ifconfig ${epair1}a inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
621 jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
622
623 # Base setup verification
486
487 # run listener
488 num_ports=`echo ${ports} | wc -w`
489 num_ips=`echo ${ips} | wc -w`
490 count_examples=$((num_ports*num_ips))
491 listener_ports=`echo ${ports} | tr ' ' '\n' | sort -n | tr '\n' ',' | sed -e 's?,$??'`
492 args="--family inet6 --ports ${listener_ports} --count ${count_examples} --match_str ${text}"
493 echo jexec ${jname}b ${script_name} ${args}

--- 122 unchanged lines hidden (view full) ---

616 ll=`jexec ${jname}b ifconfig ${epair1}b inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
617 jexec ${jname}a route add -6 -net ${net_dst}::/${plen} ${ll}%${epair1}a
618
619 # B towards A via epair0b LL
620 ll=`jexec ${jname}a ifconfig ${epair1}a inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
621 jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
622
623 # Base setup verification
624 atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping6 -nc1 ${ip_dst}
624 atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping -6 -nc1 ${ip_dst}
625
626 # run sender
627 valid_message='1 packets transmitted, 1 packets received'
628 for _ip in ${ips}; do
629 ip="${net_dst}:${_ip}"
625
626 # run sender
627 valid_message='1 packets transmitted, 1 packets received'
628 for _ip in ${ips}; do
629 ip="${net_dst}:${_ip}"
630 atf_check -o match:"${valid_message}" jexec ${jname}a ping6 -nc1 ${ip}
630 atf_check -o match:"${valid_message}" jexec ${jname}a ping -6 -nc1 ${ip}
631 done
632
633 pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'`
634 pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'`
635
636 jexec ${jname}a netstat -bWf link -I ${epair0}a
637 jexec ${jname}a netstat -bWf link -I ${epair1}a
638 if [ ${pkt_0} -le 10 ]; then

--- 26 unchanged lines hidden ---
631 done
632
633 pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'`
634 pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'`
635
636 jexec ${jname}a netstat -bWf link -I ${epair0}a
637 jexec ${jname}a netstat -bWf link -I ${epair1}a
638 if [ ${pkt_0} -le 10 ]; then

--- 26 unchanged lines hidden ---