anything about their testing
flow.
2. Leave kselftests alone so we don't weaken kernel testing
Or augment them as above, so that we don't weaken kernel testing,
yes.
thanks,
--
John Hubbard
NVIDIA
to do this [1],
right?
So:
lib/tests/bitmap_kunit.c
[1] https://lore.kernel.org/20240724201354.make.730-k...@kernel.org
thanks,
--
John Hubbard
NVIDIA
F:tools/include/linux/bitfield.h
F:tools/include/linux/bitmap.h
F:tools/include/linux/bits.h
diff --git a/lib/Kconfig.debug
"_kunit" part of the name is especially helpful,
because (as I mentioned earlier) these tests really are different enough
that it's worth calling out. You can run them simply by loading the
kernel module.
So if I want to quickly run kunit tests, searching for "*_kunit.c" does
help with that.
thanks,
--
John Hubbard
NVIDIA
Gow
Cc: Brendan Higgins
Cc: Rae Moar
Cc: John Hubbard
Cc: Jonathan Corbet
Cc: Linus Torvalds
Cc: linux-kselftest@vger.kernel.org
Cc: kunit-...@googlegroups.com
Cc: linux-...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Cc: linux-harden...@vger.kernel.org
---
Documentation/dev-tools/kunit
example of up-to-date documentation there. And it's
very clear.
Cheers,
-- David
thanks,
--
John Hubbard
NVIDIA
,
--
John Hubbard
NVIDIA
On 7/16/24 11:26 AM, Kees Cook wrote:
On Tue, Jul 16, 2024 at 11:04:06AM -0700, John Hubbard wrote:
This is a classic case of testing a kernel API via ioctl into the
kernel, so I think it meets your criteria for moving to KUnit.
Having said that, I must now go try out KUnit in a bit more depth
ing on them.
Also maybe:
mm
gup_test
This is a classic case of testing a kernel API via ioctl into the
kernel, so I think it meets your criteria for moving to KUnit.
Having said that, I must now go try out KUnit in a bit more depth
before I'm sure that this will work out. But it shou
neering at Google (Apr 7, 2020), by Titus Winters
thanks,
--
John Hubbard
NVIDIA
On 7/12/24 4:51 PM, John Hubbard wrote:
Linux 6.6 does not have an opt_ipproto_off variable in gro.c at all (it
was added in later kernel versions), so attempting to initialize one
breaks the build.
This is the first time I've tried to fix something in linux-stable, and
I'm not sure that I've
es:
https://lore.kernel.org/all/8b1717db-8c4a-47ee-b28c-170b630c4...@cloudflare.com/#t
Signed-off-by: John Hubbard
---
tools/testing/selftests/net/gro.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/tools/testing/selftests/net/gro.c
b/tools/testing/selftests/net/gro.c
index b204df4f3332..30024d0ed
On 7/11/24 8:28 AM, Mina Almasry wrote:
On Wed, Jul 10, 2024 at 5:44 PM John Hubbard wrote:
On 7/9/24 5:17 PM, Mina Almasry wrote:
...
diff --git a/tools/testing/selftests/net/Makefile
b/tools/testing/selftests/net/Makefile
index bc3925200637c..39420a6e86b7f 100644
--- a/tools/testing
.sh lib.sh net_helper.sh setup_loopback.sh setup_veth.sh
@@ -104,6 +109,10 @@ TEST_INCLUDES := forwarding/lib.sh
include ../lib.mk
+# YNL build
+YNL_GENS := netdev
+include ynl.mk
This seems to be missing a rule to generate ynl.mk, right?
thanks,
--
John Hubbard
NVIDIA
On 7/9/24 1:34 PM, Shuah Khan wrote:
On 7/4/24 01:24, John Hubbard wrote:
...>> Muhammad Usama Anjum (1):
selftests: x86: test_FISTTP: use fisttps instead of ambiguous fisttp
Usama and John,
I am seeing checkpatch warnings in this series.
v4-3-7
WARNING: externs should be avoided
ource file dependencies, for visual clarity.
Signed-off-by: John Hubbard
---
tools/testing/selftests/vDSO/Makefile | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/tools/testing/selftests/vDSO/Makefile
b/tools/testing/selftests/vDSO/Makefile
index 20
of this by including ../lib.mk at the right place, and removing
the $(OUTPUT) prefix to the programs to be built, and removing the
duplicate "all:" target.
Reviewed-by: Muhammad Usama Anjum
Signed-off-by: John Hubbard
---
tools/testing/selftests/vDSO/Makefile | 15 +++
1 fi
pass tests here,
so remove it.
Reviewed-by: Carlos Llamas
Reviewed-by: Edward Liaw
Reviewed-by: Muhammad Usama Anjum
Tested-by: Muhammad Usama Anjum
Signed-off-by: John Hubbard
---
tools/testing/selftests/vDSO/parse_vdso.c | 16 +++-
.../selftests/vDSO/vdso_standalone_test
kefile.
2. Added Reviewed-by and Tested-by tags for the original patch, which
fixes all of the clang errors and warnings for this selftest.
3. Removed an obsolete blurb from the commit description of the original
patch, now that Valentin Obst LLVM build fix has been merged.
thanks,
John Hubbard
NV
On 7/5/24 10:53, Shuah Khan wrote:
On 7/3/24 20:33, John Hubbard wrote:
There were a couple of errors here:
1. TEST_GEN_PROGS was incorrectly prepending $(OUTPUT) to each program
to be built. However, lib.mk already does that because it assumes "bare"
program names are passed in, so
These warnings are all of the form, "the format specified a short
(signed or unsigned) int, but the value is a full length int".
Acked-by: Muhammad Usama Anjum
Signed-off-by: John Hubbard
---
tools/testing/selftests/x86/sigreturn.c | 2 +-
tools/testing/selftests/x86/test_vsysc
d
but probably wants to be returned from main(), as a non-zero result.
That result is also unused right now, so another option would be to
delete it entirely, but this way, main() also gets fixed. It was missing
a return value.
Acked-by: Muhammad Usama Anjum
Signed-off-by: John Hubbard
---
tools/testing
le without (wastefully) restructuring the Makefile.
Avoid the warning by simply disabling that warning, for clang builds.
Acked-by: Muhammad Usama Anjum
Signed-off-by: John Hubbard
---
tools/testing/selftests/x86/Makefile | 7 +++
1 file changed, 7 insertions(+)
diff --git a/tools/testing/sel
and
the Makefile dependencies with a single call to the new Makefile
function extra-files.
That fixes the build failure, while still providing the correct
dependencies in all cases.
Acked-by: Muhammad Usama Anjum
Signed-off-by: John Hubbard
---
tools/testing/selftests/x86/Makefile | 21
with the assembler's full set of features.
Acked-by: Muhammad Usama Anjum
Signed-off-by: John Hubbard
---
tools/testing/selftests/x86/Makefile | 1 +
.../testing/selftests/x86/clang_helpers_64.S | 16 +++
tools/testing/selftests/x86/sysret_rip.c | 20
es.
Acked-by: Muhammad Usama Anjum
Signed-off-by: John Hubbard
---
tools/testing/selftests/x86/Makefile | 2 ++
tools/testing/selftests/x86/clang_helpers_32.S | 11 +++
tools/testing/selftests/x86/clang_helpers_64.S | 12
tools/testing/selftests/x86/fsgsbase_rest
f-by: Muhammad Usama Anjum
Signed-off-by: John Hubbard
---
tools/testing/selftests/x86/test_FISTTP.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/x86/test_FISTTP.c
b/tools/testing/selftests/x86/test_FISTTP.c
index 09789c0ce3e9..b9ae9d8cebc
the first version:
1) Rebased onto Linux 6.10-rc1
Enjoy!
[1] https://lore.kernel.org/44428518-4d21-4de7-8587-04eceefb3...@nvidia.com
thanks,
John Hubbard
John Hubbard (6):
selftests/x86: fix Makefile dependencies to work with clang
selftests/x86: build fsgsbase_restore.c with clang
selftests/
On 7/3/24 8:04 PM, John Hubbard wrote:
Current practice in the selftests Makefiles is to use $(LLVM) as a way
to decide if clang is being used as the compiler (and/or the linker
front end). Unfortunately, this does not cover all of the use cases:
1) CC could have been set within selftests
On 7/2/24 3:28 AM, Muhammad Usama Anjum wrote:
On 6/29/24 1:06 AM, John Hubbard wrote:
On 5/31/24 12:38 PM, John Hubbard wrote:
Hi,
Dave Hansen, Muhammad Usama Anjum, here is the combined series that we
discussed yesterday [1].
Hi Dave, Shuah,
Are either of you planning to take this series
, then SELFTESTS_CC_IS_CLANG will be
non-empty.
SELFTESTS_CC_IS_CLANG does not specify which linker is being used.
However, it can still help with linker options, because $(CC) is often
used to do both the compile and link steps (often in the same step).
Signed-off-by: John Hubbard
---
Hi
Reviewed-by: Muhammad Usama Anjum
Signed-off-by: John Hubbard
---
Hi,
Changes since v2:
1) Commit description: removed the reference to Valentin Obst's patch
being a prerequisite, now that that has been merged.
2) Rebased on Linux 6.10-rc6+.
Changes since the first version:
1) Rebased
When building with clang, via:
make LLVM=1 -C tools/testing/selftest
...clang warns about an unused irqcount variable. clang is correct: the
variable is incremented and then ignored.
Fix this by deleting the irqcount variable.
Signed-off-by: John Hubbard
---
Changes since v2:
1) Rebased
ource file dependencies, for visual clarity.
Signed-off-by: John Hubbard
---
tools/testing/selftests/vDSO/Makefile | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/tools/testing/selftests/vDSO/Makefile
b/tools/testing/selftests/vDSO/Makefile
index 20
of this by including ../lib.mk at the right place, and removing
the $(OUTPUT) prefix to the programs to be built, and removing the
duplicate "all:" target.
Signed-off-by: John Hubbard
---
tools/testing/selftests/vDSO/Makefile | 15 +++
1 file changed, 7 insertions(+), 8
2. Added Reviewed-by and Tested-by tags for the original patch, which
fixes all of the clang errors and warnings for this selftest.
3. Removed an obsolete blurb from the commit description of the original
patch, now that Valentin Obst LLVM build fix has been merged.
John Hubbard (3):
selftests
pass tests here,
so remove it.
Reviewed-by: Carlos Llamas
Reviewed-by: Edward Liaw
Reviewed-by: Muhammad Usama Anjum
Tested-by: Muhammad Usama Anjum
Signed-off-by: John Hubbard
---
tools/testing/selftests/vDSO/parse_vdso.c | 16 +++-
.../selftests/vDSO/vdso_standalone_test
On 7/2/24 11:49 AM, Edward Liaw wrote:
On Tue, Jul 2, 2024 at 11:26 AM John Hubbard wrote:
On 7/2/24 11:12 AM, Edward Liaw wrote:
On Fri, Jun 14, 2024 at 4:31 PM John Hubbard wrote:
...
Hi John,
Could you try re-submitting this series with the RESEND prefix?
Thanks,
Edward
Sure
On 7/2/24 11:12 AM, Edward Liaw wrote:
On Fri, Jun 14, 2024 at 4:31 PM John Hubbard wrote:
...
Hi John,
Could you try re-submitting this series with the RESEND prefix?
Thanks,
Edward
Sure. Is that the key, for kselftests? Because I've got 5+ small
patchsets that are languishing
On 5/31/24 12:38 PM, John Hubbard wrote:
Hi,
Dave Hansen, Muhammad Usama Anjum, here is the combined series that we
discussed yesterday [1].
Hi Dave, Shuah,
Are either of you planning to take this series? I ask because I have a
very slightly overlapping series that enhances the LLVM/clang
parate folio->pincount, I
suppose that might take too long? Or not?
This feels like force-fitting a very specific feature (KVM/CoCo handling
of shmem pages) into a more general mechanism that is running low on
bits (gup/pup).
Maybe a good topic for LPC!
thanks,
--
John Hubbard
NVIDIA
Tree with pa
On 6/18/24 2:53 PM, Andrew Morton wrote:
On Tue, 18 Jun 2024 14:29:32 -0700 John Hubbard wrote:
OK, I've drafted an updated commit description (below)
Awesome! :)
thanks,
--
John Hubbard
NVIDIA
On 6/18/24 1:54 PM, David Hildenbrand wrote:
On 18.06.24 22:14, John Hubbard wrote:
On 6/17/24 11:56 PM, David Hildenbrand wrote:
On 18.06.24 04:24, John Hubbard wrote:
...
...
I can update the commit description with some of the above, if it helps.
I think it will. The main concern I had
On 6/17/24 7:24 PM, John Hubbard wrote:
Clean up and move some copy-pasted items into a new mseal_helpers.h.
1. The test macros can be made safer and simpler, by observing that they
are invariably called when about to return. This means that the macros
do not need an intrusive label to goto
On 6/17/24 11:56 PM, David Hildenbrand wrote:
On 18.06.24 04:24, John Hubbard wrote:
...
diff --git a/tools/testing/selftests/mm/seal_elf.c
b/tools/testing/selftests/mm/seal_elf.c
index f2babec79bb6..27bf2f84231d 100644
--- a/tools/testing/selftests/mm/seal_elf.c
+++ b/tools/testing/selftests
)
Acked-by: David Hildenbrand
Cc: Jeff Xu
Signed-off-by: John Hubbard
---
tools/testing/selftests/mm/hugepage-mremap.c | 2 +-
.../testing/selftests/mm/ksm_functional_tests.c | 8 +---
tools/testing/selftests/mm/memfd_secret.c| 14 +-
tools/testing/selftests
t;)
Acked-by: David Hildenbrand
Signed-off-by: John Hubbard
---
tools/include/uapi/linux/fs.h | 392 ++
1 file changed, 392 insertions(+)
create mode 100644 tools/include/uapi/linux/fs.h
diff --git a/tools/include/uapi/linux/fs.h b/tools/include/uapi/linux/fs.h
we settled on
in [1].
[1] commit e076eaca5906 ("selftests: break the dependency upon local
header files")
Cc: David Hildenbrand
Signed-off-by: John Hubbard
---
tools/include/uapi/linux/prctl.h | 331 +++
1 file changed, 331 insertions(+)
create mode 100644 tool
Now that the test macros are factored out into their final location, and
simplified, it's time to rename TEST_END_CHECK to something that
represents its new functionality: REPORT_TEST_PASS.
Acked-by: David Hildenbrand
Reviewed-by: Jeff Xu
Tested-by: Jeff Xu
Signed-off-by: John Hubbard
cannot, unfortunately use pkey-helpers.h. The best we
can do is to factor out these few items into mseal_helpers.h.
3. These tests still need their own definition of u64, so also move that
to the header file.
Cc: Jeff Xu
Acked-by: David Hildenbrand
Signed-off-by: John Hubbard
---
tools/testing
ak the dependency upon local
header files")
Fixes: 4926c7a52de7 ("selftest mm/mseal memory sealing")
Cc: Jeff Xu
Cc: David Hildenbrand
Signed-off-by: John Hubbard
---
tools/testing/selftests/mm/mseal_test.c | 2 +-
tools/testing/selftests/mm/seal_elf.c | 2 +-
2 files ch
m and mdwe tests require.
4. Factor out some common code from mseal_test.c and seal_elf.c, into a
new mseal_helpers.h file.
5. Remove local __NR_* definitions and checks.
[1] commit e076eaca5906 ("selftests: break the dependency upon local
header files")
John Hubbard (6):
selftests/mm: m
On 6/17/24 11:11 AM, David Hildenbrand wrote:
On 14.06.24 20:02, John Hubbard wrote:
On 6/14/24 5:41 AM, David Hildenbrand wrote:
On 14.06.24 14:28, David Hildenbrand wrote:
On 14.06.24 04:30, John Hubbard wrote:
...
... thinking again, are some of these headers arch-specific (IOW
On 6/14/24 4:34 PM, John Hubbard wrote:
On 6/14/24 4:31 PM, John Hubbard wrote:
Hi,
Jason A. Donenfeld, I've added you because I ended up looking through
your latest "implement getrandom() in vDSO" series [1], which also
touches this Makefile, so just a heads up about upcoming (mi
y/vdso/vgetrandom-chacha.S
+$(OUTPUT)/vdso_test_chacha: include/asm/rwonce.h
+include/asm/rwonce.h:
+ mkdir -p include/asm
+ touch $@
thanks,
--
John Hubbard
NVIDIA
On 6/14/24 5:31 AM, David Hildenbrand wrote:
On 14.06.24 04:30, John Hubbard wrote:
...
+#ifndef PR_SET_MEMORY_MERGE
+#define PR_SET_MEMORY_MERGE 67
+#endif
+
+#ifndef PR_GET_MEMORY_MERGE
+#define PR_GET_MEMORY_MERGE 68
+#endif
+
+#ifndef PR_SET_MDWE
+#define PR_SET_MDWE
Also Cc'ing Thomas Gleixner on this one, sorry for the omission.
On 6/14/24 4:31 PM, John Hubbard wrote:
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...there are several warnings, and an error. This fixes all of those and
allows these tests to run and pass.
1
On 6/14/24 4:31 PM, John Hubbard wrote:
Hi,
Jason A. Donenfeld, I've added you because I ended up looking through
your latest "implement getrandom() in vDSO" series [1], which also
touches this Makefile, so just a heads up about upcoming (minor) merge
conflicts.
Belatedly adding Car
pass tests here,
so remove it.
Reviewed-by: Carlos Llamas
Reviewed-by: Edward Liaw
Reviewed-by: Muhammad Usama Anjum
Tested-by: Muhammad Usama Anjum
Signed-off-by: John Hubbard
---
tools/testing/selftests/vDSO/parse_vdso.c | 16 +++-
.../selftests/vDSO/vdso_standalone_test
patch, now that Valentin Obst LLVM build fix has been merged.
[1] https://lore.kernel.org/20240614190646.2081057-1-ja...@zx2c4.com
John Hubbard (3):
selftests/vDSO: fix clang build errors and warnings
selftests/mm: remove partially duplicated "all:" target in Makefile
selftests/vD
of this by including ../lib.mk at the right place, and removing
the $(OUTPUT) prefix to the programs to be built, and removing the
duplicate "all:" target.
Signed-off-by: John Hubbard
---
tools/testing/selftests/vDSO/Makefile | 15 +++
1 file changed, 7 insertions(+), 8
ource file dependencies, for visual clarity.
Signed-off-by: John Hubbard
---
tools/testing/selftests/vDSO/Makefile | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/tools/testing/selftests/vDSO/Makefile
b/tools/testing/selftests/vDSO/Makefile
index 20
On 6/14/24 3:51 PM, John Hubbard wrote:
On 6/11/24 11:30 AM, Carlos Llamas wrote:
On Mon, May 27, 2024 at 02:16:22PM -0700, John Hubbard wrote:
...
Reviewed-by: Carlos Llamas
Thanks for the review! I have no earthly idea what will happen next.
I'd like to hear at least something from
On 6/11/24 11:30 AM, Carlos Llamas wrote:
On Mon, May 27, 2024 at 02:16:22PM -0700, John Hubbard wrote:
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...there are several warnings, and an error. This fixes all of those and
allows these tests to run and pass
On 6/14/24 5:41 AM, David Hildenbrand wrote:
On 14.06.24 14:28, David Hildenbrand wrote:
On 14.06.24 04:30, John Hubbard wrote:
The selftests/mm build isn't exactly "broken", according to the current
documentation, which still claims that one must run "make headers&qu
t;)
Cc: David Hildenbrand
Cc: Jeff Xu
Signed-off-by: John Hubbard
---
tools/testing/selftests/mm/hugepage-mremap.c | 2 +-
.../testing/selftests/mm/ksm_functional_tests.c | 8 +---
tools/testing/selftests/mm/memfd_secret.c| 14 +-
tools/testing/selftests
m the correct location. The way to do
so is to include instead of just .
[1] commit e076eaca5906 ("selftests: break the dependency upon local
header files")
Fixes: 4926c7a52de7 ("selftest mm/mseal memory sealing")
Cc: Jeff Xu
Cc: David Hildenbrand
Signed-off-by: John
'PR_SET_MDWE'
mdwe_test.c:38:18: error: use of undeclared identifier 'PR_GET_MDWE'
Fix these errors by adding the missing items to vm_util.h, and include
vm_util.h from mdwe_test.c.
Cc: David Hildenbrand
Signed-off-by: John Hubbard
---
tools/testing/selftests/mm/mdwe_test.c | 1 +
tools/testing
Now that the test macros are factored out into their final location, and
simplified, it's time to rename TEST_END_CHECK to something that
represents its new functionality: REPORT_TEST_PASS.
Cc: David Hildenbrand
Reviewed-by: Jeff Xu
Tested-by: Jeff Xu
Signed-off-by: John Hubbard
---
tools
uot;)
Cc: David Hildenbrand
Signed-off-by: John Hubbard
---
tools/include/uapi/linux/fs.h | 392 ++
1 file changed, 392 insertions(+)
create mode 100644 tools/include/uapi/linux/fs.h
diff --git a/tools/include/uapi/linux/fs.h b/tools/include/uapi/linux/fs.h
cannot, unfortunately use pkey-helpers.h. The best we
can do is to factor out these few items into mseal_helpers.h.
3. These tests still need their own definition of u64, so also move that
to the header file.
Cc: Jeff Xu
Cc: David Hildenbrand
Signed-off-by: John Hubbard
---
tools/testing
elftests: break the dependency upon local
header files")
John Hubbard (6):
selftests/mm: mseal, self_elf: fix missing __NR_mseal
selftests/mm: mseal, self_elf: factor out test macros and other
duplicated items
selftests/mm: mseal, self_elf: rename TEST_END_CHECK to
REPORT_TEST_PASS
On 6/12/24 7:11 PM, John Hubbard wrote:
On 6/12/24 1:24 AM, David Hildenbrand wrote:
On 11.06.24 22:54, John Hubbard wrote:
On 6/11/24 2:36 AM, David Hildenbrand wrote:
On 08.06.24 04:10, John Hubbard wrote:
...
You remembered correctly, but the situation is slighly muddier than
one would
On 6/12/24 1:24 AM, David Hildenbrand wrote:
On 11.06.24 22:54, John Hubbard wrote:
On 6/11/24 2:36 AM, David Hildenbrand wrote:
On 08.06.24 04:10, John Hubbard wrote:
Eventually, once the build succeeds on a sufficiently old distro, the
idea is to delete $(KHDR_INCLUDES) from the selftests
On 6/11/24 2:36 AM, David Hildenbrand wrote:
On 08.06.24 04:10, John Hubbard wrote:
Eventually, once the build succeeds on a sufficiently old distro, the
idea is to delete $(KHDR_INCLUDES) from the selftests/mm build, and then
after that, from selftests/lib.mk and all of the other selftest
On 6/10/24 9:45 PM, Jeff Xu wrote:
On Mon, Jun 10, 2024 at 9:34 PM John Hubbard wrote:
On 6/10/24 9:21 PM, Jeff Xu wrote:
Hi
On Fri, Jun 7, 2024 at 7:10 PM John Hubbard wrote:
Eventually, once the build succeeds on a sufficiently old distro, the
idea is to delete $(KHDR_INCLUDES) from
On 6/10/24 9:27 PM, Jeff Xu wrote:
Hi
On Fri, Jun 7, 2024 at 7:10 PM John Hubbard wrote:
Now that the test macros are factored out into their final location, and
simplified, it's time to rename TEST_END_CHECK to something that
represents its new functionality: REPORT_TEST_PASS.
Cc: Jeff Xu
On 6/10/24 9:21 PM, Jeff Xu wrote:
Hi
On Fri, Jun 7, 2024 at 7:10 PM John Hubbard wrote:
Eventually, once the build succeeds on a sufficiently old distro, the
idea is to delete $(KHDR_INCLUDES) from the selftests/mm build, and then
after that, from selftests/lib.mk and all of the other
On 6/7/24 7:10 PM, John Hubbard wrote:
On Ubuntu 23.04, the kvm and mdwe selftests/mm build fails due to
missing a few items that are found in prctl.h. Here is an excerpt of the
build failures:
The subject line is confused: it really should start with "selftests/mm",
not &qu
Now that the test macros are factored out into their final location, and
simplified, it's time to rename TEST_END_CHECK to something that
represents its new functionality: REPORT_TEST_PASS.
Cc: Jeff Xu
Signed-off-by: John Hubbard
---
tools/testing/selftests/mm/mseal_helpers.h | 2 +-
tools
, unfortunately use pkey-helpers.h. The best we
can do is to factor out these few items into mseal_helpers.h.
3. These tests still need their own definition of u64, so also move that
to the header file.
Cc: Jeff Xu
Signed-off-by: John Hubbard
---
tools/testing/selftests/mm/mseal_helpers.h | 40
'PR_SET_MDWE'
mdwe_test.c:38:18: error: use of undeclared identifier 'PR_GET_MDWE'
Fix these errors by adding the missing items to vm_util.h, and include
vm_util.h from mdwe_test.c.
Signed-off-by: John Hubbard
---
tools/testing/selftests/mm/mdwe_test.c | 1 +
tools/testing/selftests/mm/vm_util.h
ts: break the dependency upon local
header files")
Fixes: 4926c7a52de7 ("selftest mm/mseal memory sealing")
Cc: Jeff Xu
Signed-off-by: John Hubbard
---
tools/testing/selftests/mm/mseal_helpers.h | 5 +
tools/testing/selftests/mm/mseal_test.c| 1 +
tools/testing/self
'struct page_region'
...
vm_util.c:105:20: error: use of undeclared identifier 'PAGE_IS_SOFT_DIRTY'
To fix this, add fs.h, taken from a snapshot of ./usr/include/linux/fs.h
after running "make headers".
[1] commit e076eaca5906 ("selftests: break the dependency upon local
header f
[1] commit e076eaca5906 ("selftests: break the dependency upon local
header files")
John Hubbard (5):
selftests/mm: mseal, self_elf: fix missing __NR_mseal
selftests/mm: fix vm_util.c build failures: add snapshot of fs.h
mm/selftests: kvm, mdwe fixes to avoid requiring "make heade
On 5/31/24 12:38 PM, John Hubbard wrote:
...
diff --git a/tools/testing/selftests/x86/Makefile
b/tools/testing/selftests/x86/Makefile
index d0bb32bd5538..5c8757a25998 100644
--- a/tools/testing/selftests/x86/Makefile
+++ b/tools/testing/selftests/x86/Makefile
@@ -40,6 +40,13 @@ CFLAGS := -O2 -g
On 6/7/24 2:17 PM, Dave Hansen wrote:
On 6/7/24 13:50, Shuah Khan wrote:
These patches usually go through x86 repo.
I need ack from x86 maintainers to take these. I don't see x86 list
cc'ed.
Please make sure to include everybody on these threads to get quicker
response.
John Hubbard (cc'd
On 6/7/24 10:15 AM, Nathan Chancellor wrote:
On Fri, Jun 07, 2024 at 12:12:19PM +0100, Ryan Roberts wrote:
On 04/06/2024 05:55, John Hubbard wrote:
On 6/3/24 3:47 PM, Nathan Chancellor wrote:
...
If we are concluding that CC=clang is an invalid way to do this, then I guess we
should report
On 6/3/24 3:47 PM, Nathan Chancellor wrote:
On Mon, Jun 03, 2024 at 04:32:30PM +0100, Mark Brown wrote:
On Fri, May 31, 2024 at 11:37:50AM -0700, John Hubbard wrote:
The kselftests may be built in a couple different ways:
make LLVM=1
make CC=clang
In order to handle both cases, set
On 5/31/24 11:37 AM, John Hubbard wrote:
gcc defaults to silence (off) for the following warnings, but clang
defaults to the opposite. The warnings are not useful for the kernel
itself, which is why they have remained disabled in gcc for the main
kernel build. And it is only due to including
On 6/3/24 10:09 AM, John Hubbard wrote:
On 6/3/24 8:32 AM, Mark Brown wrote:
On Fri, May 31, 2024 at 11:37:50AM -0700, John Hubbard wrote:
The kselftests may be built in a couple different ways:
make LLVM=1
make CC=clang
In order to handle both cases, set LLVM=1 if CC=clang
On 6/3/24 8:32 AM, Mark Brown wrote:
On Fri, May 31, 2024 at 11:37:50AM -0700, John Hubbard wrote:
The kselftests may be built in a couple different ways:
make LLVM=1
make CC=clang
In order to handle both cases, set LLVM=1 if CC=clang. That way,the rest
of lib.mk, and any Makefiles
the Address Sanitizer if -fsanitize is specified. Therefore,
simply omit -static-libasan for clang builds. And leave behind a
comment, because the whole reason for static linking might not be
obvious.
Cc: Ryan Roberts
Signed-off-by: John Hubbard
---
tools/testing/selftests/fchmodat2/Makefile | 11
-by: Ryan Roberts
Signed-off-by: John Hubbard
---
tools/testing/selftests/openat2/Makefile | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/openat2/Makefile
b/tools/testing/selftests/openat2/Makefile
index 254d676a2689..185dc76ebb5f 100644
t; to
work in addition to "make LLVM=1" [2].
[1] https://lore.kernel.org/518dd1e3-e31a-41c3-b488-9b75a64b6...@arm.com
[2] https://lore.kernel.org/20240531183751.100541-2-jhubb...@nvidia.com
John Hubbard (2):
selftests/openat2: fix clang build failures: -static-libasan,
LOCAL_HDRS
self
, 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
Reviewed-by: Davidlohr Bueso
to the commit description.
Changes since the first version:
1) Rebased onto Linux 6.10-rc1
2) Added Reviewed-by's.
...and it turns out that all three patches are still required, on -rc1,
in order to get a clean clang build.
Enjoy!
thanks,
John Hubbard
John Hubbard (3):
selftests/futex: don't
://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c...@valentinobst.de/
Fixes: f17d8a87ecb5 ("selftests: fuxex: Report a unique test name per run of
futex_requeue_pi")
Reviewed-by: Davidlohr Bueso
Signed-off-by: John Hubbard
---
tools/testing/selftests/futex/
The .PHONY targets "all" and "clean" are both already defined in the
file that is included in the very next line:
../lib.mk.
Remove this duplicate code.
Reviewed-by: Davidlohr Bueso
Signed-off-by: John Hubbard
---
tools/testing/selftests/futex/Makefile | 2 -
d
but probably wants to be returned from main(), as a non-zero result.
That result is also unused right now, so another option would be to
delete it entirely, but this way, main() also gets fixed. It was missing
a return value.
Signed-off-by: John Hubbard
---
tools/testing/selftests/x86/amx.
le without (wastefully) restructuring the Makefile.
Avoid the warning by simply disabling that warning, for clang builds.
Signed-off-by: John Hubbard
---
tools/testing/selftests/x86/Makefile | 7 +++
1 file changed, 7 insertions(+)
diff --git a/tools/testing/selftests/x86/Makefile
b/too
1 - 100 of 244 matches
Mail list logo