[Devel] [PATCH RHEL10 COMMIT] selftests: net: io_uring_zerocopy.sh: enable io_uring for the test

Konstantin Khorenko khorenko at virtuozzo.com
Thu Dec 25 14:26:40 MSK 2025


The commit is pushed to "branch-rh10-6.12.0-55.13.1.3.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-55.13.1.3.28.vz10
------>
commit 7737199e24cc0d5517fe96e4996744d9f77c3c66
Author: Aleksei Oladko <aleksey.oladko at virtuozzo.com>
Date:   Tue Dec 23 22:22:50 2025 +0000

    selftests: net: io_uring_zerocopy.sh: enable io_uring for the test
    
    The io_uring_zerocopy.sh kselftest assumes that io_uring support is
    enabled on the host system. When io_uring is disabled via the
    kernel.io_uring_disabled sysctl, the test fails.
    
    Explicitly enable io_uring for the test by setting
    kernel.io_uring_disabled=0.
    
    Save the original value of kernel.io_uring_disabled before changing
    it and restore it in cleanup handler to ensure the system state is
    restored regardless of test outcome.
    
    https://virtuozzo.atlassian.net/browse/VSTOR-120995
    
    Signed-off-by: Aleksei Oladko <aleksey.oladko at virtuozzo.com>
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
    Reviewed-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
    
    Feature: fix selftests
---
 tools/testing/selftests/net/io_uring_zerocopy_tx.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/testing/selftests/net/io_uring_zerocopy_tx.sh b/tools/testing/selftests/net/io_uring_zerocopy_tx.sh
index 123439545013d..8c3647de9b4cb 100755
--- a/tools/testing/selftests/net/io_uring_zerocopy_tx.sh
+++ b/tools/testing/selftests/net/io_uring_zerocopy_tx.sh
@@ -77,9 +77,13 @@ esac
 
 # Start of state changes: install cleanup handler
 
+old_io_uring_disabled=0
 cleanup() {
 	ip netns del "${NS2}"
 	ip netns del "${NS1}"
+	if [ "$old_io_uring_disabled" -ne 0 ]; then
+		sysctl -w -q kernel.io_uring_disabled="$old_io_uring_disabled" 2>/dev/null || true
+	fi
 }
 
 trap cleanup EXIT
@@ -122,5 +126,10 @@ do_test() {
 	wait
 }
 
+old_io_uring_disabled=$(sysctl -n kernel.io_uring_disabled 2>/dev/null || echo "0")
+if [ "$old_io_uring_disabled" -ne 0 ]; then
+	sysctl -w -q kernel.io_uring_disabled=0
+fi
+
 do_test "${EXTRA_ARGS}"
 echo ok


More information about the Devel mailing list