xref: /aosp_15_r20/external/ltp/testcases/network/virt/sit01.sh (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Worker#!/bin/sh
2*49cdfc7eSAndroid Build Coastguard Worker# SPDX-License-Identifier: GPL-2.0-or-later
3*49cdfc7eSAndroid Build Coastguard Worker# Copyright (c) 2018 Oracle and/or its affiliates.
4*49cdfc7eSAndroid Build Coastguard Worker
5*49cdfc7eSAndroid Build Coastguard WorkerTST_NEEDS_TMPDIR=1
6*49cdfc7eSAndroid Build Coastguard WorkerTST_TESTFUNC=virt_netperf_msg_sizes
7*49cdfc7eSAndroid Build Coastguard WorkerTST_SETUP=do_setup
8*49cdfc7eSAndroid Build Coastguard WorkerTST_CLEANUP=virt_cleanup
9*49cdfc7eSAndroid Build Coastguard Workervirt_type="sit"
10*49cdfc7eSAndroid Build Coastguard Worker
11*49cdfc7eSAndroid Build Coastguard Workerdo_setup()
12*49cdfc7eSAndroid Build Coastguard Worker{
13*49cdfc7eSAndroid Build Coastguard Worker	[ -n "$TST_IPV6" ] && tst_brk TBROK "invalid option '-6' for sit tunnel"
14*49cdfc7eSAndroid Build Coastguard Worker
15*49cdfc7eSAndroid Build Coastguard Worker	virt_lib_setup
16*49cdfc7eSAndroid Build Coastguard Worker
17*49cdfc7eSAndroid Build Coastguard Worker	tst_res TINFO "test $virt_type"
18*49cdfc7eSAndroid Build Coastguard Worker	virt_setup "local $(tst_ipaddr) remote $(tst_ipaddr rhost)" \
19*49cdfc7eSAndroid Build Coastguard Worker		   "local $(tst_ipaddr rhost) remote $(tst_ipaddr)"
20*49cdfc7eSAndroid Build Coastguard Worker}
21*49cdfc7eSAndroid Build Coastguard Worker
22*49cdfc7eSAndroid Build Coastguard Worker. virt_lib.sh
23*49cdfc7eSAndroid Build Coastguard Workertst_run
24