1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3# 4# Regression tests for IPv6 flowlabels 5# 6# run in separate namespaces to avoid mgmt db conflicts betweent tests 7 8set -e 9 10echo "TEST datapath" 11./in_netns.sh \ 12 sh -c 'sysctl -q -w net.ipv6.auto_flowlabels=0 && ./ipv6_flowlabel -l 1' 13 14echo "TEST datapath (with auto-flowlabels)" 15./in_netns.sh \ 16 sh -c 'sysctl -q -w net.ipv6.auto_flowlabels=1 && ./ipv6_flowlabel -l 1' 17 18echo "TEST datapath (with ping-sockets)" 19./in_netns.sh \ 20 sh -c 'sysctl -q -w net.ipv6.flowlabel_reflect=4 && \ 21 sysctl -q -w net.ipv4.ping_group_range="0 2147483647" && \ 22 ./ipv6_flowlabel -l 1 -p' 23 24echo "TEST datapath (with flowinfo-send)" 25./in_netns.sh \ 26 sh -c './ipv6_flowlabel -l 1 -s' 27 28echo "TEST datapath (with ping-sockets flowinfo-send)" 29./in_netns.sh \ 30 sh -c 'sysctl -q -w net.ipv6.flowlabel_reflect=4 && \ 31 sysctl -q -w net.ipv4.ping_group_range="0 2147483647" && \ 32 ./ipv6_flowlabel -l 1 -p -s' 33 34echo OK. All tests passed 35