The commit is pushed to "vz10.kselftest.net-forwarding" and will appear at 
[email protected]:openvz/vzkernel.git
after rh10-6.12.0-55.13.1.3.26.vz10
------>
commit b011b29deaf8e371ff3b92298410283025b46b57
Author: Aleksei Oladko <[email protected]>
Date:   Mon Dec 22 19:48:39 2025 +0000

    selftests: net/forwarding: skip test if team driver is not supported
    
    Some kselftests rely on teamd to create LAG devices. If the kernel is
    built without CONFIG_NET_TEAM, the teamd command fails with:
    Failed: Operation not supported
    
    Currently, the exit code of teamd is not properly checked, causing
    the test to proceed and eventually fail instead of being skipped.
    
    Add a check for the teamd exit code, mark the test as skipped
    to avoid self-positive failures.
    
    https://virtuozzo.atlassian.net/browse/VSTOR-121418
    
    Signed-off-by: Aleksei Oladko <[email protected]>
---
 tools/testing/selftests/net/forwarding/lib.sh | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/forwarding/lib.sh 
b/tools/testing/selftests/net/forwarding/lib.sh
index 89c25f72b10c5..7f22496bfdf9d 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -955,9 +955,21 @@ team_create()
 {
        local if_name=$1; shift
        local mode=$1; shift
+       local output
+       local status
 
        require_command $TEAMD
-       $TEAMD -t $if_name -d -c '{"runner": {"name": "'$mode'"}}'
+       output=$($TEAMD -t $if_name -d -c '{"runner": {"name": "'$mode'"}}' 
2>&1)
+       status=$?
+
+       if [ $status -ne 0 ]; then
+               if echo "$output" | grep -q "Operation not supported"; then
+                       exit $ksft_skip
+               else
+                       exit 1
+               fi
+       fi
+
        for slave in "$@"; do
                ip link set dev $slave down
                ip link set dev $slave master $if_name
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to