Hi Linus,
Please pull the following Kselftest fixes update for Linux 5.17-rc4
This Kselftest fixes updated for Linux 5.17-rc4 consists of build and
run-time fixes to pidfd, clone3, and ir tests.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit ec049891b2dc16591813eacaddc476b3d27c8c14:
kselftest: Fix vdso_test_abi return status (2022-01-31 10:35:14 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-fixes-5.17-rc4
for you to fetch changes up to 183f80fd72db42c9cc483aa7a5e8e881355d0b03:
selftests/ir: fix build with ancient kernel headers (2022-02-04 13:14:41 -0700)
----------------------------------------------------------------
linux-kselftest-fixes-5.17-rc4
This Kselftest fixes updated for Linux 5.17-rc4 consists of build and
run-time fixes to pidfd, clone3, and ir tests.
----------------------------------------------------------------
Axel Rasmussen (2):
pidfd: fix test failure due to stack overflow on some arches
selftests: fixup build warnings in pidfd / clone3 tests
Sean Young (1):
selftests/ir: fix build with ancient kernel headers
tools/testing/selftests/clone3/clone3.c | 2 --
tools/testing/selftests/ir/ir_loopback.c | 10 ++++++++++
tools/testing/selftests/pidfd/pidfd.h | 13 ++++++++++---
tools/testing/selftests/pidfd/pidfd_fdinfo_test.c | 22 ++++++++++++++++++----
tools/testing/selftests/pidfd/pidfd_test.c | 6 +++---
tools/testing/selftests/pidfd/pidfd_wait.c | 5 ++---
6 files changed, 43 insertions(+), 15 deletions(-)
----------------------------------------------------------------
Hi Linus,
Please pull the following KUnit fixes update for Linux 5.17-rc4.
This KUnit fixes update for Linux 5.17-rc4 consists of bug fixes
to the test and usage documentation.
Note: The doc fix patch resolves a bugzilla issue.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 235528072f28b3b0a1446279b7eaddda36dbf743:
kunit: tool: Import missing importlib.abc (2022-01-25 12:59:43 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-kunit-fixes-5.17-rc4
for you to fetch changes up to 92a68053c3468705e2c7c752c9a3f256304a35a6:
Documentation: KUnit: Fix usage bug (2022-02-08 13:16:20 -0700)
----------------------------------------------------------------
linux-kselftest-kunit-fixes-5.17-rc4
This KUnit fixes update for Linux 5.17-rc4 consists of bug fixes
to the test and usage documentation.
----------------------------------------------------------------
Akira Kawata (1):
Documentation: KUnit: Fix usage bug
Daniel Latypov (1):
kunit: fix missing f in f-string in run_checks.py
Documentation/dev-tools/kunit/usage.rst | 2 +-
tools/testing/kunit/run_checks.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------
On 2/10/22 11:08 AM, Sherry Yang wrote:
> Yeah, -I works, but just with some compiler warnings.
>
warnings aren't good. Kees, hope you are okay with this.
> If warnings are acceptable, do I need to send V2 patch with -I?
>
> Sherry
>
No top posting please. No need to fix it to -I - please send v2
I can't find your patch on lore - not sure why.
Please cc linux-kselftest and linux-kernel(a)vger.kernel.org
Also run scripts/get_maintainer.pl for a complete list of recipients
for this patch.
thanks,
-- Shuah
On 2/2/22 1:11 PM, Sherry Yang wrote:
> seccomp_bpf failed on tests 47 global.user_notification_filter_empty
> and 48 global.user_notification_filter_empty_threaded when it's
> tested on updated kernel but with old kernel headers. Because old
> kernel headers don't have definition of macro __NR_clone3 which is
> required for these two tests. Since under selftests/, we can install
> headers once for all tests (the default INSTALL_HDR_PATH is
> usr/include), fix it by adding usr/include to the list of directories
> to be searched. Use "-isystem" to indicate it's a system directory as
> the real kernel headers directories are.
>
> Signed-off-by: Sherry Yang <sherry.yang(a)oracle.com>
> Tested-by: Sherry Yang <sherry.yang(a)oracle.com>
> ---
> tools/testing/selftests/seccomp/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile
> index 0ebfe8b0e147..585f7a0c10cb 100644
> --- a/tools/testing/selftests/seccomp/Makefile
> +++ b/tools/testing/selftests/seccomp/Makefile
> @@ -1,5 +1,5 @@
> # SPDX-License-Identifier: GPL-2.0
> -CFLAGS += -Wl,-no-as-needed -Wall
> +CFLAGS += -Wl,-no-as-needed -Wall -isystem ../../../../usr/include/
> LDFLAGS += -lpthread
>
> TEST_GEN_PROGS := seccomp_bpf seccomp_benchmark
>
Looks good to me. Adding Kees Cook for his review of this change.
thanks,
-- Shuah
Add support for common SOL_SOCKET cmsgs in ICMPv6 sockets.
Extend the cmsg tests to cover more cmsgs and socket types.
SOL_IPV6 cmsgs to follow.
Jakub Kicinski (11):
net: ping6: remove a pr_debug() statement
net: ping6: support packet timestamping
net: ping6: support setting socket options via cmsg
selftests: net: rename cmsg_so_mark
selftests: net: make cmsg_so_mark ready for more options
selftests: net: cmsg_sender: support icmp and raw sockets
selftests: net: cmsg_so_mark: test ICMP and RAW sockets
selftests: net: cmsg_so_mark: test with SO_MARK set by setsockopt
selftests: net: cmsg_sender: support setting SO_TXTIME
selftests: net: cmsg_sender: support Tx timestamping
selftests: net: test standard socket cmsgs across UDP and ICMP sockets
net/ipv6/ping.c | 14 +-
tools/testing/selftests/net/.gitignore | 2 +-
tools/testing/selftests/net/Makefile | 3 +-
tools/testing/selftests/net/cmsg_sender.c | 380 ++++++++++++++++++++
tools/testing/selftests/net/cmsg_so_mark.c | 67 ----
tools/testing/selftests/net/cmsg_so_mark.sh | 32 +-
tools/testing/selftests/net/cmsg_time.sh | 83 +++++
7 files changed, 499 insertions(+), 82 deletions(-)
create mode 100644 tools/testing/selftests/net/cmsg_sender.c
delete mode 100644 tools/testing/selftests/net/cmsg_so_mark.c
create mode 100755 tools/testing/selftests/net/cmsg_time.sh
--
2.34.1
On 2/10/22 8:03 AM, Aneesh Kumar K V wrote:
> On 2/10/22 20:09, Shuah Khan wrote:
>> On 2/9/22 9:12 PM, Aneesh Kumar K.V wrote:
>>> Shuah Khan <skhan(a)linuxfoundation.org> writes:
>>>
>>>> On 2/9/22 8:43 AM, Aneesh Kumar K.V wrote:
>>>>> Keep it simple by using a #define and limiting hugepage size to 2M.
>>>>> This keeps the test simpler instead of dynamically finding the page size
>>>>> and huge page size.
>>>>>
>>>>> Without this tests are broken w.r.t reading /proc/self/pagemap
>>>>>
>>>>> if (pread(pagemap_fd, ent, sizeof(ent),
>>>>> (uintptr_t)ptr >> (PAGE_SHIFT - 3)) != sizeof(ent))
>>>>> err(2, "read pagemap");
>>>>>
>>>>> Cc: Shuah Khan <shuah(a)kernel.org>
>>>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar(a)linux.ibm.com>
>>>>> ---
>>>>> tools/testing/selftests/vm/ksm_tests.c | 8 ++++++++
>>>>> tools/testing/selftests/vm/transhuge-stress.c | 8 ++++++++
>>>>> 2 files changed, 16 insertions(+)
>>>>>
>>>>> diff --git a/tools/testing/selftests/vm/ksm_tests.c b/tools/testing/selftests/vm/ksm_tests.c
>>>>> index 1436e1a9a3d3..8200328ff018 100644
>>>>> --- a/tools/testing/selftests/vm/ksm_tests.c
>>>>> +++ b/tools/testing/selftests/vm/ksm_tests.c
>>>>> @@ -22,8 +22,16 @@
>>>>> #define KSM_MERGE_ACROSS_NODES_DEFAULT true
>>>>> #define MB (1ul << 20)
>>>>> +#ifdef __powerpc64__
>>>>> +#define PAGE_SHIFT 16
>>>>> +/*
>>>>> + * This will only work with radix 2M hugepage size
>>>>> + */
>>>>> +#define HPAGE_SHIFT 21
>>>>> +#else
>>>>> #define PAGE_SHIFT 12
>>>>> #define HPAGE_SHIFT 21
>>>>> +#endif
>>>>> #define PAGE_SIZE (1 << PAGE_SHIFT)
>>>>> #define HPAGE_SIZE (1 << HPAGE_SHIFT)
>>>>> diff --git a/tools/testing/selftests/vm/transhuge-stress.c b/tools/testing/selftests/vm/transhuge-stress.c
>>>>> index 5e4c036f6ad3..f04c8aa4bcf6 100644
>>>>> --- a/tools/testing/selftests/vm/transhuge-stress.c
>>>>> +++ b/tools/testing/selftests/vm/transhuge-stress.c
>>>>> @@ -16,8 +16,16 @@
>>>>> #include <string.h>
>>>>> #include <sys/mman.h>
>>>>> +#ifdef __powerpc64__
>>>>> +#define PAGE_SHIFT 16
>>>>> +/*
>>>>> + * This will only work with radix 2M hugepage size
>>>>> + */
>>>>> +#define HPAGE_SHIFT 21
>>>>
>>>> Why not have this is in common code?
>>>
>>> Can you suggest where I can move that. We also have helper functions
>>> like allocate_transhuge() duplicated between tests. I didn't find
>>> libutil.a or anything similar supported by the selftets build.
>>>
>>>>
>>
>> I noticed that HPAGE_SHIFT is defined in #ifdef __powerpc64__ block
>> as well as #else. I am asking is it necessary to be part of both
>> blocks.
>>
>> +#ifdef __powerpc64__
>> +#define PAGE_SHIFT 16
>> +/*
>> + * This will only work with radix 2M hugepage size
>> + */
>> +#define HPAGE_SHIFT 21 --- this one
>> +#else
>> #define PAGE_SHIFT 12
>> #define HPAGE_SHIFT 21 --- this one
>> +#endif
>>
>
>
> The reason I did that was to add the comment which is relevant only for ppc64. ppc64 supports two hugepage sizes, 2M and 16M. The test won't work correctly with 16M hugepage size. We do have other tests in selftest/vm/ with similar restrictions.
>
>
Right. You don't have to duplicate code for the comment. You can add the
comment and then clarify in the comment that it is only relevant to ppc64.
This way the comment is clear and we can avoid duplicate code that makes it
hard to maintain in the future.
thanks,
-- Shuah