Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: net: io_uring_zerocopy: 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.

Signed-off-by: Aleksei Oladko <aleksey.oladko@virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
Link: https://patch.msgid.link/20260321215908.175465-5-aleksey.oladko@virtuozzo.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Aleksei Oladko and committed by
Jakub Kicinski
9d463f78 a897e194

+9
+9
tools/testing/selftests/net/io_uring_zerocopy_tx.sh
··· 77 77 78 78 # Start of state changes: install cleanup handler 79 79 80 + old_io_uring_disabled=0 80 81 cleanup() { 81 82 ip netns del "${NS2}" 82 83 ip netns del "${NS1}" 84 + if [ "$old_io_uring_disabled" -ne 0 ]; then 85 + sysctl -w -q kernel.io_uring_disabled="$old_io_uring_disabled" 2>/dev/null || true 86 + fi 83 87 } 84 88 85 89 trap cleanup EXIT ··· 125 121 ip netns exec "${NS1}" "${BIN_TX}" "-${IP}" -t 1 -D "${DADDR}" ${ARGS} "${TXMODE}" 126 122 wait 127 123 } 124 + 125 + old_io_uring_disabled=$(sysctl -n kernel.io_uring_disabled 2>/dev/null || echo "0") 126 + if [ "$old_io_uring_disabled" -ne 0 ]; then 127 + sysctl -w -q kernel.io_uring_disabled=0 128 + fi 128 129 129 130 do_test "${EXTRA_ARGS}" 130 131 echo ok