arping01.sh 506 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. # SPDX-License-Identifier: GPL-2.0-or-later
  3. # Copyright (c) 2016-2019 Oracle and/or its affiliates. All Rights Reserved.
  4. # Author: Alexey Kodanev <alexey.kodanev@oracle.com>
  5. TST_TESTFUNC="do_test"
  6. TST_NEEDS_ROOT=1
  7. TST_NEEDS_CMDS="arping"
  8. . tst_net.sh
  9. do_test()
  10. {
  11. local timeout="10"
  12. local ip_addr=$(tst_ipaddr rhost)
  13. local dev=$(tst_iface)
  14. tst_res TINFO "arping host '$ip_addr' via dev '$dev' with timeout '$timeout' secs"
  15. EXPECT_PASS arping -w $timeout "$ip_addr" -I $dev -fq
  16. }
  17. tst_run