<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/futex/functional/Makefile, branch linux-6.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-07-25T07:49:10Z</updated>
<entry>
<title>selftests/futex: pass _GNU_SOURCE without a value to the compiler</title>
<updated>2024-07-25T07:49:10Z</updated>
<author>
<name>John Hubbard</name>
</author>
<published>2024-05-29T02:29:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4c7bf7c1c99bf427218189628f7443d8884945fd'/>
<id>urn:sha1:4c7bf7c1c99bf427218189628f7443d8884945fd</id>
<content type='text'>
[ Upstream commit cb708ab9f584f159798b60853edcf0c8b67ce295 ]

It's slightly better to set _GNU_SOURCE in the source code, but if one
must do it via the compiler invocation, then the best way to do so is
this:

    $(CC) -D_GNU_SOURCE=

...because otherwise, if this form is used:

    $(CC) -D_GNU_SOURCE

...then that leads the compiler to set a value, as if you had passed in:

    $(CC) -D_GNU_SOURCE=1

That, in turn, leads to warnings under both gcc and clang, like this:

    futex_requeue_pi.c:20: warning: "_GNU_SOURCE" redefined

Fix this by using the "-D_GNU_SOURCE=" form.

Reviewed-by: Edward Liaw &lt;edliaw@google.com&gt;
Reviewed-by: Davidlohr Bueso &lt;dave@stgolabs.net&gt;
Signed-off-by: John Hubbard &lt;jhubbard@nvidia.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: futex: Fix incorrect kernel headers search path</title>
<updated>2023-03-10T08:34:18Z</updated>
<author>
<name>Mathieu Desnoyers</name>
</author>
<published>2023-01-27T13:57:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fe2ff9d2af8523f836bd9762f0643fe187b8b88b'/>
<id>urn:sha1:fe2ff9d2af8523f836bd9762f0643fe187b8b88b</id>
<content type='text'>
commit 24c55275ba0d538def2b1220002d0e808a85d50f upstream.

Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents
building against kernel headers from the build environment in scenarios
where kernel headers are installed into a specific output directory
(O=...).

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;  # 5.18+
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/futex: fix build for clang</title>
<updated>2022-10-18T20:13:11Z</updated>
<author>
<name>Ricardo Cañuelo</name>
</author>
<published>2022-10-10T06:37:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=03cab65a07e083b6c1010fbc8f9b817e9aca75d9'/>
<id>urn:sha1:03cab65a07e083b6c1010fbc8f9b817e9aca75d9</id>
<content type='text'>
Don't use the test-specific header files as source files to force a
target dependency, as clang will complain if more than one source file
is used for a compile command with a single '-o' flag.

Use the proper Makefile variables instead as defined in
tools/testing/selftests/lib.mk.

Signed-off-by: Ricardo Cañuelo &lt;ricardo.canuelo@collabora.com&gt;
Reviewed-by: André Almeida &lt;andrealmeid@igalia.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: stop using KSFT_KHDR_INSTALL</title>
<updated>2022-07-11T23:23:30Z</updated>
<author>
<name>Guillaume Tucker</name>
</author>
<published>2022-07-08T16:23:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f2745dc0ba3dadd8fa2b2c33f48253d78e133a12'/>
<id>urn:sha1:f2745dc0ba3dadd8fa2b2c33f48253d78e133a12</id>
<content type='text'>
Stop using the KSFT_KHDR_INSTALL flag as installing the kernel headers
from the kselftest Makefile is causing some issues.  Instead, rely on
the headers to be installed directly by the top-level Makefile
"headers_install" make target prior to building kselftest.

Signed-off-by: Guillaume Tucker &lt;guillaume.tucker@collabora.com&gt;
Tested-by: Anders Roxell &lt;anders.roxell@linaro.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: futex: Add the uapi headers include variable</title>
<updated>2022-02-24T00:20:32Z</updated>
<author>
<name>Muhammad Usama Anjum</name>
</author>
<published>2022-01-19T10:15:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bd7d481c37716b21b251e6f8248ed6d8f2183445'/>
<id>urn:sha1:bd7d481c37716b21b251e6f8248ed6d8f2183445</id>
<content type='text'>
Out of tree build of this test fails if relative path of the output
directory is specified. KBUILD_OUTPUT also doesn't point to the correct
directory when relative path is used. Thus out of tree builds fail.
Remove the un-needed include paths and use KHDR_INCLUDES to correctly
reach the headers.

Signed-off-by: Muhammad Usama Anjum &lt;usama.anjum@collabora.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: futex: set DEFAULT_INSTALL_HDR_PATH</title>
<updated>2022-02-24T00:14:36Z</updated>
<author>
<name>Muhammad Usama Anjum</name>
</author>
<published>2022-01-19T10:33:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cef757808666de8400d09ac11521418d8122edd5'/>
<id>urn:sha1:cef757808666de8400d09ac11521418d8122edd5</id>
<content type='text'>
If only futex selftest is compiled, uapi header files are copied to the
selftests/futex/functional directory. This copy isn't needed. Set the
DEFAULT_INSTALL_HDR_PATH variable to 1 to use the default header install
path only. This removes extra copy of header file.

Signed-off-by: Muhammad Usama Anjum &lt;usama.anjum@collabora.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: futex: Add sys_futex_waitv() test</title>
<updated>2021-10-07T11:51:12Z</updated>
<author>
<name>André Almeida</name>
</author>
<published>2021-09-23T17:11:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5e59c1d1c78c9cdd8834f3242db4a76f617fa4ad'/>
<id>urn:sha1:5e59c1d1c78c9cdd8834f3242db4a76f617fa4ad</id>
<content type='text'>
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 &lt;andrealmeid@collabora.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20210923171111.300673-20-andrealmeid@collabora.com
</content>
</entry>
<entry>
<title>selftests: futex: Add futex compare requeue test</title>
<updated>2021-06-22T09:20:16Z</updated>
<author>
<name>André Almeida</name>
</author>
<published>2021-05-31T16:50:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7cb5dd8e2c8ce2b8f778f37cfd8bb955d663d16d'/>
<id>urn:sha1:7cb5dd8e2c8ce2b8f778f37cfd8bb955d663d16d</id>
<content type='text'>
Add testing for futex_cmp_requeue(). The first test just requeues from one
waiter to another one, and wakes it. The second performs both wake and
requeue, and checks the return values to see if the operation woke/requeued
the expected number of waiters.

Signed-off-by: André Almeida &lt;andrealmeid@collabora.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Davidlohr Bueso &lt;dbueso@suse.de&gt;
Link: https://lore.kernel.org/r/20210531165036.41468-3-andrealmeid@collabora.com

</content>
</entry>
<entry>
<title>selftests: futex: Add futex wait test</title>
<updated>2021-06-22T09:20:15Z</updated>
<author>
<name>André Almeida</name>
</author>
<published>2021-05-31T16:50:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3d128581f64a9b3729e697a63760ff0a2c4a8fe'/>
<id>urn:sha1:c3d128581f64a9b3729e697a63760ff0a2c4a8fe</id>
<content type='text'>
There are three different strategies to uniquely identify a futex in the
kernel:

 - Private futexes: uses the pointer to mm_struct and the page address

 - Shared futexes: checks if the page containing the address is a PageAnon:
   - If it is, uses the same data as a private futexes
   - If it isn't, uses an inode sequence number from struct inode and
      the page's index

Create a selftest to check those three paths and basic wait/wake
mechanism.

Signed-off-by: André Almeida &lt;andrealmeid@collabora.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Davidlohr Bueso &lt;dbueso@suse.de&gt;
Link: https://lore.kernel.org/r/20210531165036.41468-2-andrealmeid@collabora.com

</content>
</entry>
<entry>
<title>selftests: futex: Correctly include headers dirs</title>
<updated>2021-05-12T18:44:58Z</updated>
<author>
<name>André Almeida</name>
</author>
<published>2021-04-27T13:53:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c7d84e7ff5a651d186a6ec41361c4f07acc2fb9c'/>
<id>urn:sha1:c7d84e7ff5a651d186a6ec41361c4f07acc2fb9c</id>
<content type='text'>
When building selftests, the build system will install uapi linux
headers at usr/include in kernel source's root directory. When building
with a different output folder, the headers will be installed at
kselftests/usr/include.

Add both paths so we can build the tests using up-to-date headers.

Currently, this is uncommon to happen since it's rare to find a
build system with an outdated futex header, but it happens
when testing new futex operations.

Signed-off-by: André Almeida &lt;andrealmeid@collabora.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20210427135328.11013-2-andrealmeid@collabora.com
</content>
</entry>
</feed>
