Server IP : 13.213.54.232 / Your IP : 216.73.216.72 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ip-172-31-17-110 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 7.1.33-67+ubuntu22.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/modules/6.8.0-1031-aws/build/tools/testing/selftests/bpf/ |
Upload File : |
#!/bin/bash # SPDX-License-Identifier: GPL-2.0 # Copyright(c) 2020 Intel Corporation. ksft_pass=0 ksft_fail=1 ksft_xfail=2 ksft_xpass=3 ksft_skip=4 XSKOBJ=xskxceiver validate_root_exec() { msg="skip all tests:" if [ $UID != 0 ]; then echo $msg must be run as root >&2 test_exit $ksft_fail else return $ksft_pass fi } validate_veth_support() { msg="skip all tests:" if [ $(ip link add $1 type veth 2>/dev/null; echo $?;) != 0 ]; then echo $msg veth kernel support not available >&2 test_exit $ksft_skip else ip link del $1 return $ksft_pass fi } test_status() { statusval=$1 if [ $statusval -eq $ksft_fail ]; then echo "$2: [ FAIL ]" elif [ $statusval -eq $ksft_skip ]; then echo "$2: [ SKIPPED ]" elif [ $statusval -eq $ksft_pass ]; then echo "$2: [ PASS ]" fi } test_exit() { if [ $1 -ne 0 ]; then test_status $1 $(basename $0) fi exit 1 } cleanup_iface() { ip link set $1 mtu $2 ip link set $1 xdp off ip link set $1 xdpgeneric off } clear_configs() { [ $(ip link show $1 &>/dev/null; echo $?;) == 0 ] && { ip link del $1; } } cleanup_exit() { clear_configs $1 $2 } validate_ip_utility() { [ ! $(type -P ip) ] && { echo "'ip' not found. Skipping tests."; test_exit $ksft_skip; } } exec_xskxceiver() { if [[ $busy_poll -eq 1 ]]; then ARGS+="-b " fi ./${XSKOBJ} -i ${VETH0} -i ${VETH1} ${ARGS} retval=$? if [[ $list -ne 1 ]]; then test_status $retval "${TEST_NAME}" statusList+=($retval) nameList+=(${TEST_NAME}) fi }