tcp_ipsec_vti.sh 595 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. # SPDX-License-Identifier: GPL-2.0-or-later
  3. # Copyright (c) 2018 Petr Vorel <pvorel@suse.cz>
  4. # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
  5. # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
  6. TST_NEEDS_TMPDIR=1
  7. TST_TESTFUNC=do_test
  8. TST_SETUP=tst_ipsec_setup_vti
  9. TST_CLEANUP=tst_ipsec_cleanup
  10. . ipsec_lib.sh
  11. max_requests=10
  12. do_test()
  13. {
  14. local opts="-n $2 -N $2"
  15. local rand_opt="$(echo $2 | cut -d'R' -f2)"
  16. [ "$2" != "$rand_opt" ] && opts="-A $rand_opt"
  17. tst_netload -H $ip_rmt_tun $opts -r $IPSEC_REQUESTS \
  18. -R $max_requests -D $tst_vti
  19. }
  20. tst_run