From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D021FC433F5 for ; Tue, 14 Sep 2021 01:11:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B023F60EC0 for ; Tue, 14 Sep 2021 01:11:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237239AbhINBMX convert rfc822-to-8bit (ORCPT ); Mon, 13 Sep 2021 21:12:23 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:36774 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232241AbhINBMV (ORCPT ); Mon, 13 Sep 2021 21:12:21 -0400 Received: from localhost (unknown [IPv6:2a00:5f00:102:0:f4d2:afff:fe2b:18b5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: krisman) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 30B301F42CB3; Tue, 14 Sep 2021 02:11:04 +0100 (BST) From: Gabriel Krisman Bertazi To: =?utf-8?Q?Andr=C3=A9?= Almeida Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , linux-kernel@vger.kernel.org, Steven Rostedt , Sebastian Andrzej Siewior , kernel@collabora.com, linux-api@vger.kernel.org, libc-alpha@sourceware.org, mtk.manpages@gmail.com, Davidlohr Bueso , Arnd Bergmann Subject: Re: [PATCH v3 5/6] selftests: futex2: Add waitv test Organization: Collabora References: <20210913175249.81074-1-andrealmeid@collabora.com> <20210913175249.81074-6-andrealmeid@collabora.com> Date: Mon, 13 Sep 2021 21:11:00 -0400 In-Reply-To: <20210913175249.81074-6-andrealmeid@collabora.com> (=?utf-8?Q?=22Andr=C3=A9?= Almeida"'s message of "Mon, 13 Sep 2021 14:52:48 -0300") Message-ID: <87wnnkezbv.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org André Almeida writes: > Create a new file to test the waitv mechanism. Test both private and > shared futexes. Wake the last futex in the array, and check if the > return value from futex_waitv() is the right index. > > Signed-off-by: André Almeida > --- > .../selftests/futex/functional/.gitignore | 1 + > .../selftests/futex/functional/Makefile | 3 +- > .../selftests/futex/functional/futex_waitv.c | 158 ++++++++++++++++++ > .../testing/selftests/futex/functional/run.sh | 3 + > .../selftests/futex/include/futex2test.h | 31 ++++ > 5 files changed, 195 insertions(+), 1 deletion(-) > create mode 100644 tools/testing/selftests/futex/functional/futex_waitv.c > create mode 100644 tools/testing/selftests/futex/include/futex2test.h > > diff --git a/tools/testing/selftests/futex/functional/.gitignore b/tools/testing/selftests/futex/functional/.gitignore > index 0e78b49d0f2f..fbcbdb6963b3 100644 > --- a/tools/testing/selftests/futex/functional/.gitignore > +++ b/tools/testing/selftests/futex/functional/.gitignore > @@ -8,3 +8,4 @@ futex_wait_uninitialized_heap > futex_wait_wouldblock > futex_wait > futex_requeue > +futex_waitv > diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile > index bd1fec59e010..5cc38de9d8ea 100644 > --- a/tools/testing/selftests/futex/functional/Makefile > +++ b/tools/testing/selftests/futex/functional/Makefile > @@ -17,7 +17,8 @@ TEST_GEN_FILES := \ > futex_wait_uninitialized_heap \ > futex_wait_private_mapped_file \ > futex_wait \ > - futex_requeue > + futex_requeue \ > + futex_waitv > > TEST_PROGS := run.sh > > diff --git a/tools/testing/selftests/futex/functional/futex_waitv.c b/tools/testing/selftests/futex/functional/futex_waitv.c > new file mode 100644 > index 000000000000..567667dfa7cf > --- /dev/null > +++ b/tools/testing/selftests/futex/functional/futex_waitv.c > @@ -0,0 +1,158 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +/****************************************************************************** > + * > + * Copyright Collabora Ltd., 2021 > + * > + * DESCRIPTION > + * Test waitv/wake mechanism of futex2, using 32bit sized futexes. > + * > + * AUTHOR > + * André Almeida > + * > + * HISTORY > + * 2021-Feb-5: Initial version by André We have git to keep history nowadays. This type of changelog is a relic from less civilized times and adds no extra information. :) -- Gabriel Krisman Bertazi