[LTP] uevent02: Make wait_for_uevents() order-independent
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Tue Aug 25 19:36:13 CEST 2026
Hi Avinesh,
On Tue, 25 Aug 2026, Avinesh Kumar wrote:
> uevent02: Make wait_for_uevents() order-independent
> + for (i = 0; i < cnt; i++) {
> + if (!pending[i])
> + continue;
> +
> + if (uevent_match(buf, len, pending[i])) {
> + tst_res(TPASS, "Got expected UEVENT");
> + pending[i] = NULL;
> + remaining--;
> + break;
> }
> }
Could this preserve ordering between dependent lifecycle phases?
The callers put add and remove events for the same objects in one array.
Matching every pending entry means that a remove received before its add is
accepted, causing the test to pass despite an invalid lifecycle order. The
kernel change only requires the interface and queue add events to be
order-independent.
Could each independent group be matched without order while retaining the
ordering between the add and remove phases?
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list