xref: /aosp_15_r20/external/ltp/testcases/network/virt/vxlan02.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 Petr Vorel <[email protected]>
4*49cdfc7eSAndroid Build Coastguard Worker# Copyright (c) 2014-2015 Oracle and/or its affiliates. All Rights Reserved.
5*49cdfc7eSAndroid Build Coastguard Worker# Author: Alexey Kodanev <[email protected]>
6*49cdfc7eSAndroid Build Coastguard Worker#
7*49cdfc7eSAndroid Build Coastguard Worker# Local test, check if we can create and then delete VXLAN
8*49cdfc7eSAndroid Build Coastguard Worker# interface 5000 times.
9*49cdfc7eSAndroid Build Coastguard Worker
10*49cdfc7eSAndroid Build Coastguard WorkerTST_OPTS="hi:d:"
11*49cdfc7eSAndroid Build Coastguard WorkerTST_PARSE_ARGS=virt_lib_parse_args
12*49cdfc7eSAndroid Build Coastguard WorkerTST_USAGE=virt_lib_usage
13*49cdfc7eSAndroid Build Coastguard WorkerTST_TESTFUNC=do_test
14*49cdfc7eSAndroid Build Coastguard Worker
15*49cdfc7eSAndroid Build Coastguard Workervirt_type="vxlan"
16*49cdfc7eSAndroid Build Coastguard Workerstart_id=16700000
17*49cdfc7eSAndroid Build Coastguard Worker
18*49cdfc7eSAndroid Build Coastguard Workerdo_test()
19*49cdfc7eSAndroid Build Coastguard Worker{
20*49cdfc7eSAndroid Build Coastguard Worker	local mult_addr="239.1.1.1"
21*49cdfc7eSAndroid Build Coastguard Worker	[ "$TST_IPV6" ] && mult_addr="ff02::abc"
22*49cdfc7eSAndroid Build Coastguard Worker
23*49cdfc7eSAndroid Build Coastguard Worker	virt_add_delete_test "id $start_id group $mult_addr"
24*49cdfc7eSAndroid Build Coastguard Worker}
25*49cdfc7eSAndroid Build Coastguard Worker
26*49cdfc7eSAndroid Build Coastguard Worker. virt_lib.sh
27*49cdfc7eSAndroid Build Coastguard Workertst_run
28