From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring <io-uring@vger.kernel.org>
Subject: Re: [PATCH] io_uring/register: use correct location for io_rings_layout
Date: Fri, 21 Nov 2025 13:49:33 +0000 [thread overview]
Message-ID: <fa3ab544-e9fd-4746-993c-a4d446a4c19a@gmail.com> (raw)
In-Reply-To: <335af53b-034e-4403-b5e9-5dab46064a1e@kernel.dk>
On 11/19/25 20:22, Jens Axboe wrote:
> On 11/19/25 10:18 AM, Pavel Begunkov wrote:
>> On 11/19/25 02:36, Jens Axboe wrote:
>>> A previous consolidated the ring size etc calculations into
>>> io_prepare_config(), but missed updating io_register_resize_rings()
>>> correctly to use the calculated values. As a result, it ended up using
>>> on-stack uninitialized values, and hence either failed validating the
>>> size correctly, or just failed resizing because the sizes were random.
>>>
>>> This caused failures in the liburing regression tests:
>>
>> That made me wonder how it could possibly pass tests for me. I even
>> made sure it was reaching the final return. Turns out the layout was
>> 0 initialised, region creation fails with -EINVAL, and then the
>> resizing test just silently skips sub-cases. It'd be great to have
>> a "not supported, skip" message.
>
> Looks like the test runs into -EINVAL, then tries the DEFER case,
> and then doesn't check for SKIP for that. And then it returns
> success. I've added a commit for that now, so it'll return 77/SKIP
> if it does skip.
>
> I try to avoid having tests be verbose, unless they fail. Otherwise
> it's easy to lose information you actually want in the noise. But
> it certainly should return T_EXIT_SKIP, when it skips!
Printing when tests are skipped was pretty useful because I
expect a latest kernel (+configured for testing setup) to be
to run all tests, and I'd find "test skipped" suspicious by
default. Certainly a test infra problem, but at least it
worked.
At some point it might be great to distinguish when it skips
because of unsupported io_uring features from when some
resources are not available.
On the topic, I've found this in the runner:
elif [ "${#SKIPPED[*]}" -ne 0 ] && [ -n "$TEST_GNU_EXITCODE" ]; then
exit 77
else
echo "All tests passed"
exit 0
fi
But not sure who would even define TEST_GNU_EXITCODE. It should
be more helpful to always print skipped tests:
else
echo "Tests: skipped $SKIPPED"
echo "All tests passed"
exit 0
fi
--
Pavel Begunkov
next prev parent reply other threads:[~2025-11-21 13:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 2:36 [PATCH] io_uring/register: use correct location for io_rings_layout Jens Axboe
2025-11-19 17:18 ` Pavel Begunkov
2025-11-19 20:22 ` Jens Axboe
2025-11-21 13:49 ` Pavel Begunkov [this message]
2025-11-21 13:59 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa3ab544-e9fd-4746-993c-a4d446a4c19a@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.