ACK: [F/G/H/Unstable][F/oem-5.6][SRU][PATCH 1/1] selftests: fix poll error in udpgro.sh

Stefan Bader stefan.bader at canonical.com
Thu Jan 14 08:29:04 UTC 2021


On 17.12.20 10:39, Po-Hsu Lin wrote:
> From: Paolo Abeni <pabeni at redhat.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1908501
> 
> The test program udpgso_bench_rx always invokes the poll()
> syscall with a timeout of 10ms. If a larger timeout is specified
> via the command line, udpgso_bench_rx is supposed to do multiple
> poll() calls till the timeout is expired or an event is received.
> 
> Currently the poll() loop errors out after the first invocation with
> no events, and may causes self-tests failure alike:
> 
> failed
>  GRO with custom segment size            ./udpgso_bench_rx: poll: 0x0 expected 0x1
> 
> This change addresses the issue allowing the poll() loop to consume
> all the configured timeout.
> 
> Fixes: ada641ff6ed3 ("selftests: fixes for UDP GRO")
> Signed-off-by: Paolo Abeni <pabeni at redhat.com>
> Signed-off-by: David S. Miller <davem at davemloft.net>
> (cherry picked from commit 38bf8cd821be292e7d8e6f6283d67c5d9708f887)
> Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
> ---
>  tools/testing/selftests/net/udpgso_bench_rx.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/testing/selftests/net/udpgso_bench_rx.c b/tools/testing/selftests/net/udpgso_bench_rx.c
> index db3d4a8..76a2405 100644
> --- a/tools/testing/selftests/net/udpgso_bench_rx.c
> +++ b/tools/testing/selftests/net/udpgso_bench_rx.c
> @@ -113,6 +113,9 @@ static void do_poll(int fd, int timeout_ms)
>  				interrupted = true;
>  				break;
>  			}
> +
> +			/* no events and more time to wait, do poll again */
> +			continue;
>  		}
>  		if (pfd.revents != POLLIN)
>  			error(1, errno, "poll: 0x%x expected 0x%x\n",
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20210114/25fef41c/attachment.sig>


More information about the kernel-team mailing list