[PATCH v9 6/6] userfaultfd/selftests: add test exercising minor fault handling

2021-03-01 Thread Axel Rasmussen
Fix a dormant bug in userfaultfd_events_test(), where we did `return faulting_process(0)` instead of `exit(faulting_process(0))`. This caused the forked process to keep running, trying to execute any further test cases after the events test in parallel with the "real" process. Add a s

[PATCH 5.11 771/775] wireguard: selftests: test multiple parallel streams

2021-03-01 Thread Greg Kroah-Hartman
From: Jason A. Donenfeld commit d5a49aa6c3e264a93a7d08485d66e346be0969dd upstream. In order to test ndo_start_xmit being called in parallel, explicitly add separate tests, which should all run on different cores. This should help tease out bugs associated with queueing up packets from different

[PATCH 5.11 470/775] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
0x561532596828 in _start ... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers

[PATCH 5.11 429/775] kunit: tool: fix unit test cleanup handling

2021-03-01 Thread Greg Kroah-Hartman
From: Daniel Latypov [ Upstream commit cfd607e43da4a20753744f134e201310262b827a ] * Stop leaking file objects. * Use self.addCleanup() to ensure we call cleanup functions even if setUp() fails. * use mock.patch.stopall instead of more error-prone manual approach Signed-off-by: Daniel Latypov R

[PATCH 5.10 263/663] selftests/powerpc: Make the test check in eeh-basic.sh posix compliant

2021-03-01 Thread Greg Kroah-Hartman
From: Po-Hsu Lin [ Upstream commit 3db380570af7052620ace20c29e244938610ca71 ] The == operand is a bash extension, thus this will fail on Ubuntu with: ./eeh-basic.sh: 89: test: 2: unexpected operator As the /bin/sh on Ubuntu is pointed to DASH. Use -eq to fix this posix compatibility issue

[PATCH 5.10 354/663] kunit: tool: fix unit test cleanup handling

2021-03-01 Thread Greg Kroah-Hartman
From: Daniel Latypov [ Upstream commit cfd607e43da4a20753744f134e201310262b827a ] * Stop leaking file objects. * Use self.addCleanup() to ensure we call cleanup functions even if setUp() fails. * use mock.patch.stopall instead of more error-prone manual approach Signed-off-by: Daniel Latypov R

[PATCH 5.10 659/663] wireguard: selftests: test multiple parallel streams

2021-03-01 Thread Greg Kroah-Hartman
From: Jason A. Donenfeld commit d5a49aa6c3e264a93a7d08485d66e346be0969dd upstream. In order to test ndo_start_xmit being called in parallel, explicitly add separate tests, which should all run on different cores. This should help tease out bugs associated with queueing up packets from different

[PATCH 5.10 388/663] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
0x561532596828 in _start ... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers

[PATCH 5.11 311/775] selftests/powerpc: Make the test check in eeh-basic.sh posix compliant

2021-03-01 Thread Greg Kroah-Hartman
From: Po-Hsu Lin [ Upstream commit 3db380570af7052620ace20c29e244938610ca71 ] The == operand is a bash extension, thus this will fail on Ubuntu with: ./eeh-basic.sh: 89: test: 2: unexpected operator As the /bin/sh on Ubuntu is pointed to DASH. Use -eq to fix this posix compatibility issue

[PATCH 5.11 302/775] Input: da7280 - fix missing error test

2021-03-01 Thread Greg Kroah-Hartman
From: Dmitry Torokhov [ Upstream commit 1e2020aa0da00051d94c4690c023c45d8f3834bd ] An "if" testing for error condition has accidentally been dropped from the code. Reported-by: kernel test robot Fixes: cd3f609823a5 ("Input: new da7280 haptic driver") Reviewed-by:

[PATCH 5.4 198/340] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
0x561532596828 in _start ... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers

[PATCH 5.4 130/340] selftests/powerpc: Make the test check in eeh-basic.sh posix compliant

2021-03-01 Thread Greg Kroah-Hartman
From: Po-Hsu Lin [ Upstream commit 3db380570af7052620ace20c29e244938610ca71 ] The == operand is a bash extension, thus this will fail on Ubuntu with: ./eeh-basic.sh: 89: test: 2: unexpected operator As the /bin/sh on Ubuntu is pointed to DASH. Use -eq to fix this posix compatibility issue

Re: [PATCH 04/11] perf test: Fix cpu and thread map leaks in sw_clock_freq test

2021-03-01 Thread Jiri Olsa
On Mon, Mar 01, 2021 at 11:04:02PM +0900, Namhyung Kim wrote: > The evlist has the maps with its own refcounts so we don't need to set > the pointers to NULL. Otherwise following error was reported by Asan. > > Also change the goto label since it doesn't need to have two.

[PATCH 5.4 002/340] kvm: x86: replace kvm_spec_ctrl_test_value with runtime test on the host

2021-03-01 Thread Greg Kroah-Hartman
se is when host CPU supports STIBP mitigation but doesn't support IBRS (as is the case with some Zen2 AMD cpus), and in this case we were giving guest #GP when it tried to use STIBP The reason why can can do the host test is that IA32_SPEC_CTRL msr is passed to the guest, after the guest s

[PATCH 4.19 151/247] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
0x561532596828 in _start ... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers

[PATCH 4.14 100/176] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
0x561532596828 in _start ... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers

[PATCH 4.9 071/134] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
0x561532596828 in _start ... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers

[PATCH 4.4 50/93] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
0x561532596828 in _start ... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers

[PATCH 11/11] perf test: Fix cpu and thread map leaks in perf_time_to_tsc test

2021-03-01 Thread Namhyung Kim
It should release the maps at the end. $ perf test -v 71 71: Convert perf time to TSC : --- start --- test child forked, pid 178744 mmap size 528384B 1st event perf time 59207256505278 tsc 13187166645142 rdtsc time 59207256542151 tsc 13187166723020 2nd

[PATCH 10/11] perf test: Fix cpu map leaks in cpu_map_print test

2021-03-01 Thread Namhyung Kim
It should be released after printing the map. $ perf test -v 52 52: Print cpu map : --- start --- test child forked, pid 172233 = ==172233==ERROR: LeakSanitizer: detected memory leaks

[PATCH 06/11] perf test: Fix cpu and thread map leaks in keep_tracking test

2021-03-01 Thread Namhyung Kim
The evlist and the cpu/thread maps should be released together. Otherwise following error was reported by Asan. $ perf test -v 28 28: Use a dummy software event to keep tracking: --- start --- test child forked, pid 156810 mmap size 528384B

[PATCH 08/11] perf test: Fix a thread map leak in thread_map_synthesize test

2021-03-01 Thread Namhyung Kim
It missed to call perf_thread_map__put() after using the map. $ perf test -v 43 43: Synthesize thread map : --- start --- test child forked, pid 162640 = ==162640==ERROR: LeakSanitizer: detected

[PATCH 02/11] perf test: Fix a memory leak in attr test

2021-03-01 Thread Namhyung Kim
The get_argv_exec_path() returns a dynamic memory so it should be freed after use. $ perf test -v 17 ... ==141682==ERROR: LeakSanitizer: detected memory leaks Direct leak of 33 byte(s) in 1 object(s) allocated from: #0 0x7f09107d2e8f in __interceptor_malloc ../../../../src

[PATCH 05/11] perf test: Fix cpu and thread map leaks in code_reading test

2021-03-01 Thread Namhyung Kim
The evlist and the cpu/thread maps should be released together. Otherwise following error was reported by Asan. Note that this test still has memory leaks in DSOs so it still fails even after this change. I'll take a look at that too. # perf test -v 26 26: Object code re

[PATCH 03/11] perf test: Fix cpu and thread map leaks in task_exit test

2021-03-01 Thread Namhyung Kim
The evlist has the maps with its own refcounts so we don't need to set the pointers to NULL. Otherwise following error was reported by Asan. Also change the goto label since it doesn't need to have two. # perf test -v 24 24: Number of exit events of a simple workload :

[PATCH 04/11] perf test: Fix cpu and thread map leaks in sw_clock_freq test

2021-03-01 Thread Namhyung Kim
The evlist has the maps with its own refcounts so we don't need to set the pointers to NULL. Otherwise following error was reported by Asan. Also change the goto label since it doesn't need to have two. # perf test -v 25 25: Software clock events period values:

[PATCHSET 00/11] perf test: Fix cpu/thread map leaks

2021-03-01 Thread Namhyung Kim
Hi, This patchset fixes memory leaks in the perf test code. In my company setup, it runs daily with various sanitizers on, so I want to reduce the failures due to the leaks not the logic. This time I've focused on the cpu and thread maps as they are obvious and easy to fix. I'll take

[PATCH 01/11] perf test: Fix cpu and thread map leaks in basic mmap test

2021-03-01 Thread Namhyung Kim
The evlist has the maps with its own refcounts so we don't need to set the pointers to NULL. Otherwise following error was reported by Asan. # perf test -v 4 4: Read samples using the mmap interface : --- start --- test child forked, pid 139782 mmap size 52

[PATCH 09/11] perf test: Fix a memory leak in thread_map_remove test

2021-03-01 Thread Namhyung Kim
The str should be freed after creating a thread map. Also change the open-coded thread map deletion to a call to perf_thread_map__put(). $ perf test -v 44 44: Remove thread map : --- start --- test child forked, pid 165536 2 threads: 165535, 165536 1 thread

[PATCH 07/11] perf test: Fix cpu and thread map leaks in switch_tracking test

2021-03-01 Thread Namhyung Kim
The evlist and cpu/thread maps should be released together. Otherwise the following error was reported by Asan. $ perf test -v 35 35: Track with sched_switch: --- start --- test child forked, pid 159287 Using CPUID GenuineIntel-6-8E-C mmap size 528384B 1295

[PATCH 2/2] perf daemon: Allow test for non root user

2021-03-01 Thread Jiri Olsa
John reported that the daemon test is not working for non root user. Changing the tests configurations so it's allowed to run under normal user. Fixes: 2291bb915b55 ("perf tests: Add daemon 'list' command test") Reported-by: John Garry Tested-by: John Garry Signed-off-

[RFC PATCH v3 8/8] KVM: selftests: Add a test for kvm page table code

2021-02-28 Thread Yanan Wang
This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), so it gives guidance for people trying to make some improvement for kvm. The function guest_code() can cover the conditions where a single vcpu or multiple vcpus access guest pages wit

[RFC PATCH v3 0/7] KVM: selftests: some improvement and a new test for kvm page table

2021-02-28 Thread Yanan Wang
listed, it's appropriate for all architectures. Besides, a helper that can get granularity of different backing src types(anonumous/thp/hugetlb) is added, so that we can use the accurate backing src granularity for kinds of alignment or guest memory accessing of vcpus. In the second part, a new

[PATCH v6 6/6] selftest/x86/signal: Include test cases for validating sigaltstack

2021-02-27 Thread Chang S. Bae
The test measures the kernel's signal delivery with different (enough vs. insufficient) stack sizes. Signed-off-by: Chang S. Bae Reviewed-by: Len Brown Cc: x...@kernel.org Cc: linux-kselft...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- Changes from v3: * Revised test messages

Re: [PATCH] perf buildid-cache: Add test for PE executable

2021-02-27 Thread Jiri Olsa
00 2001 > > > From: Nicholas Fraser > > > Date: Thu, 18 Feb 2021 13:24:03 -0500 > > > Subject: [PATCH] perf buildid-cache: Add test for PE executable > > > > > > This builds on the previous changes to tests/shell/buildid.sh, adding > > > tests for

Re: [PATCH] perf buildid-cache: Add test for PE executable

2021-02-26 Thread Arnaldo Carvalho de Melo
> Subject: [PATCH] perf buildid-cache: Add test for PE executable > > > > This builds on the previous changes to tests/shell/buildid.sh, adding > > tests for a PE file. It adds it to the build-id cache manually and, if > > Wine is available, runs it under "perf

Re: perf test for daemon

2021-02-26 Thread John Garry
On 25/02/2021 19:35, Jiri Olsa wrote: On Thu, Feb 25, 2021 at 08:13:07PM +0100, Jiri Olsa wrote: On Thu, Feb 25, 2021 at 06:39:22PM +, John Garry wrote: Hi, I notice that "perf test" when run without root priviledges now hangs at the daemon test - is this expected behaviour? C

Re: [reiser4 SFRN 5.1.3] kernel [5.10.x] read not supported for file /test-exec \(pid: 10094 comm: debootstrap\)

2021-02-25 Thread Jose R Rodriguez
> > > > > > > VirtualBox 6.1.16: > > > > > > > ... > > > > > > > Dec 22 20:19:56 main-menu[330]: INFO: Menu item 'bootstrap- > > > > > > > base' selected > > > > > > > Dec 22 20:19:56 debootstrap: /u

Re: [RFC PATCH v2 0/7] Some improvement and a new test for kvm page table

2021-02-25 Thread Ben Gardon
ugetlb page sizes are > listed, it's appropriate for all architectures. Besides, a helper that > can get granularity of different backing src types(anonumous/thp/hugetlb) > is added, so that we can use the accurate backing src granularity for > kinds of alignment or guest memory acce

[PATCH v6 bpf-next 4/6] selftests/bpf: test deadlock from recursive bpf_task_storage_[get|delete]

2021-02-25 Thread Song Liu
Add a test with recursive bpf_task_storage_[get|delete] from fentry programs on bpf_local_storage_lookup and bpf_local_storage_update. Without proper deadlock prevent mechanism, this test would cause deadlock. Signed-off-by: Song Liu --- .../bpf/prog_tests/task_local_storage.c | 23

[PATCH v6 bpf-next 3/6] selftests/bpf: add non-BPF_LSM test for task local storage

2021-02-25 Thread Song Liu
Task local storage is enabled for tracing programs. Add two tests for task local storage without CONFIG_BPF_LSM. The first test stores a value in sys_enter and read it back in sys_exit. The second test checks whether the kernel allows allocating task local storage in exit_creds() (which it

Re: [PATCH] perf buildid-cache: Add test for PE executable

2021-02-25 Thread Jiri Olsa
On Wed, Feb 24, 2021 at 02:59:16PM -0500, Nicholas Fraser wrote: > From 9fd0b3889f00ad13662879767d833309d8a035b6 Mon Sep 17 00:00:00 2001 > From: Nicholas Fraser > Date: Thu, 18 Feb 2021 13:24:03 -0500 > Subject: [PATCH] perf buildid-cache: Add test for PE executable > >

Re: perf test for daemon

2021-02-25 Thread Jiri Olsa
On Thu, Feb 25, 2021 at 08:13:07PM +0100, Jiri Olsa wrote: > On Thu, Feb 25, 2021 at 06:39:22PM +, John Garry wrote: > > > > Hi, > > > > I notice that "perf test" when run without root priviledges now hangs at the > > daemon test - is this expect

Re: perf test for daemon

2021-02-25 Thread Jiri Olsa
On Thu, Feb 25, 2021 at 06:39:22PM +, John Garry wrote: > > Hi, > > I notice that "perf test" when run without root priviledges now hangs at the > daemon test - is this expected behaviour? Can we skip and warn the user > instead? > > I'm checking

perf test for daemon

2021-02-25 Thread John Garry
Hi, I notice that "perf test" when run without root priviledges now hangs at the daemon test - is this expected behaviour? Can we skip and warn the user instead? I'm checking acme perf/core today. Thanks Forwarded Message Subject: [GIT PULL] perf tools ch

[PATCH v9 8/9] ecdsa: Register NIST P384 and extend test suite

2021-02-25 Thread Stefan Berger
From: Saulo Alessandre * crypto/ecdsa.c - add ecdsa_nist_p384_init_tfm - register and unregister P384 tfm * crypto/testmgr.c - add test vector for P384 on vector of tests * crypto/testmgr.h - add test vector params for P384(sha1, sha224, sha256, sha384 and sha512) Signed-off-by

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-25 Thread Matthew Wilcox
nk folio is absolutely more suitable even for this specific issue, > > > I'll go review and test the four patches you listed. Sounds good? > > > > Umm. It seems to me that no matter what you do, it'll be equivalent to > > this, only without the type-safety? >

[PATCH 6/6] testing/selftest: test vDSO prefetch_page()

2021-02-24 Thread Nadav Amit
From: Nadav Amit Test prefetch_page() in cases of invalid pointer, file-mmap and anonymous memory. Partial checks are also done with mincore syscall to ensure the output of prefetch_page() is consistent with mincore (taking into account the different semantics of the two). The tests are not

[RFC PATCH v2 7/7] KVM: selftests: Add a test for kvm page table code

2021-02-24 Thread Yanan Wang
This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), so it gives guidance for people trying to make some improvement for kvm. The function guest_code() can cover the conditions where a single vcpu or multiple vcpus access guest pages wit

[RFC PATCH v2 0/7] Some improvement and a new test for kvm page table

2021-02-24 Thread Yanan Wang
ty of different backing src types(anonumous/thp/hugetlb) is added, so that we can use the accurate backing src granularity for kinds of alignment or guest memory accessing of vcpus. In the second part, a new test is added: This test is added to serve as a performance tester and a bug reproducer fo

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Yu Zhao
criticism but a compliment. > > It's not overkill, that really is the point of a folio! If you > think about it, only head pages can be on the LRU list (because the > compound_head is in the union with the lru list_head). So it > always makes sense to talk about folios on the LR

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Matthew Wilcox
compound_head() > in page_lru() -- this is not a criticism but a compliment. It's not overkill, that really is the point of a folio! If you think about it, only head pages can be on the LRU list (because the compound_head is in the union with the lru list_head). So it always makes sen

[PATCH 4/5] userfaultfd/selftests: reinitialize test context in each test

2021-02-24 Thread Axel Rasmussen
Currently, the context (fds, mmap-ed areas, etc.) are global. Each test mutates this state in some way, in some cases really "clobbering it" (e.g., the events test mremap-ing area_dst over the top of area_src, or the minor faults tests overwriting the count_verify values in the test area

[PATCH 3/5] userfaultfd/selftests: create alias mappings in the shmem test

2021-02-24 Thread Axel Rasmussen
, we'll leverage this setup to exercise minor fault handling support for shmem, just like we do in the hugetlb_shared test. Signed-off-by: Axel Rasmussen --- tools/testing/selftests/vm/userfaultfd.c | 29 +--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/

[PATCH 2/5] userfaultfd/selftests: use memfd_create for shmem test type

2021-02-24 Thread Axel Rasmussen
This is a preparatory commit. In the future, we want to be able to setup alias mappings for area_src and area_dst in the shmem test, like we do in the hugetlb_shared test. With a VMA obtained via mmap(MAP_ANONYMOUS | MAP_SHARED), it isn't clear how to do this. So, mmap() with an fd, so w

[PATCH v8 6/6] userfaultfd/selftests: add test exercising minor fault handling

2021-02-24 Thread Axel Rasmussen
Fix a dormant bug in userfaultfd_events_test(), where we did `return faulting_process(0)` instead of `exit(faulting_process(0))`. This caused the forked process to keep running, trying to execute any further test cases after the events test in parallel with the "real" process. Add a s

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Yu Zhao
ompound_head() in page_lru() -- this is not a criticism but a compliment. Let me work out something *conceptually* smaller first, and if you think folio is absolutely more suitable even for this specific issue, I'll go review and test the four patches you listed. Sounds good?

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Matthew Wilcox
On Wed, Feb 24, 2021 at 03:34:16PM -0700, Yu Zhao wrote: > > If only somebody were working on a patch series to get rid of > > all those calls to compound_head()! Some reviews on > > https://lore.kernel.org/linux-mm/20210128070404.1922318-2-wi...@infradead.org/ > > would be nice. > > I'm on board

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Yu Zhao
; ".popsection" : : "i" > > ("./include/linux/page-flags.h"), "i" (338), "i" (0), "i" (sizeof(struct > > bug_entry))); } while (0); do { ({ asm volatile("%c0:\n\t" ".pushsection > > .discard.unreachable\n\t"

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Matthew Wilcox
ord %c1" "\t# bug_entry::line\n" "\t.word %c2" "\t# > bug_entry::flags\n" "\t.org 2b+%c3\n" ".popsection" : : "i" > ("./include/linux/page-flags.h"), "i" (338), "i" (0), "i" (sizeof(struc

[PATCH] perf buildid-cache: Add test for PE executable

2021-02-24 Thread Nicholas Fraser
>From 9fd0b3889f00ad13662879767d833309d8a035b6 Mon Sep 17 00:00:00 2001 From: Nicholas Fraser Date: Thu, 18 Feb 2021 13:24:03 -0500 Subject: [PATCH] perf buildid-cache: Add test for PE executable This builds on the previous changes to tests/shell/buildid.sh, adding tests for a PE file. It a

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Yu Zhao
> may be other cases that need compound_head(). This patch makes > > page_lru() and __clear_page_lru_flags(), which are used immediately > > before and after operations on page->lru, test > > PG_{active,unevictable} directly against page->flags instead. > > Oh geeze. > >

Re: [PATCH 2/2] perf buildid-cache: Add test for PE executable

2021-02-24 Thread Nicholas Fraser
On 2021-02-24 8:43 a.m., Jiri Olsa wrote: > On Fri, Feb 19, 2021 at 11:10:34AM -0500, Nicholas Fraser wrote: >> +# the build id must be rearranged into a GUID >> +id=`objcopy -O binary --only-section=.buildid $1 /dev/stdout | \ >> +cut -c 33-48 | hexdum

Re: [PATCH 2/2] perf buildid-cache: Add test for PE executable

2021-02-24 Thread Jiri Olsa
mp /tmp/perf.ex.SHA1.XXX) > +ex_pe=$(dirname $0)/../pe-file.exe > > echo 'int main(void) { return 0; }' | cc -Wl,--build-id=sha1 -o ${ex_sha1} > -x c - > echo 'int main(void) { return 0; }' | cc -Wl,--build-id=md5 -o ${ex_md5} -x > c - > > -echo &qu

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Andrew Morton
inlined many places. > And removing compound_head() entirely from Page{Active,Unevictable} > may not be the best option (for the moment) either because there > may be other cases that need compound_head(). This patch makes > page_lru() and __clear_page_lru_flags(), which are used immediately

[PATCH] Documentation: kselftest: fix path to test module files

2021-02-24 Thread Antonio Terceiro
b/Documentation/dev-tools/kselftest.rst index a901def730d9..dcefee707ccd 100644 --- a/Documentation/dev-tools/kselftest.rst +++ b/Documentation/dev-tools/kselftest.rst @@ -239,8 +239,8 @@ using a shell script test runner. ``kselftest/module.sh`` is designed to facilitate this process. There is

[PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Yu Zhao
st option (for the moment) either because there may be other cases that need compound_head(). This patch makes page_lru() and __clear_page_lru_flags(), which are used immediately before and after operations on page->lru, test PG_{active,unevictable} directly against page->flags instead.

this is mail test since the mail also rejected

2021-02-23 Thread campion test

[PATCH v5 bpf-next 3/6] selftests/bpf: add non-BPF_LSM test for task local storage

2021-02-23 Thread Song Liu
Task local storage is enabled for tracing programs. Add two tests for task local storage without CONFIG_BPF_LSM. The first test stores a value in sys_enter and read it back in sys_exit. The second test checks whether the kernel allows allocating task local storage in exit_creds() (which it

[PATCH v5 bpf-next 4/6] selftests/bpf: test deadlock from recursive bpf_task_storage_[get|delete]

2021-02-23 Thread Song Liu
Add a test with recursive bpf_task_storage_[get|delete] from fentry programs on bpf_local_storage_lookup and bpf_local_storage_update. Without proper deadlock prevent mechanism, this test would cause deadlock. Signed-off-by: Song Liu --- .../bpf/prog_tests/task_local_storage.c | 23

[PATCH v2 0/3] x86/entry: A compat syscall bugfix and some test stuff

2021-02-23 Thread Andy Lutomirski
The compat syscall argument fixup error path is wrong. Fix it. This also adds some sanity checks to the kernel that catch the bug when running selftests. Changes from v1: - The fix is actually correct this time, I hope Andy Lutomirski (3): entry: Check that syscall entries and syscall exits

[PATCH 0/3] x86/entry: A compat syscall bugfix and some test stuff

2021-02-22 Thread Andy Lutomirski
The compat syscall argument fixup error path is wrong. Fix it. This also adds some sanity checks to the kernel that catch the bug when running selftests. Andy Lutomirski (3): entry: Check that syscall entries and syscall exits match x86/entry: Fix entry/exit mismatch on failed fast 32-bit sy

[PATCH v4 bpf-next 3/6] selftests/bpf: add non-BPF_LSM test for task local storage

2021-02-22 Thread Song Liu
Task local storage is enabled for tracing programs. Add two tests for task local storage without CONFIG_BPF_LSM. The first test stores a value in sys_enter and read it back in sys_exit. The second test checks whether the kernel allows allocating task local storage in exit_creds() (which it

[PATCH v4 bpf-next 4/6] selftests/bpf: test deadlock from recursive bpf_task_storage_[get|delete]

2021-02-22 Thread Song Liu
Add a test with recursive bpf_task_storage_[get|delete] from fentry programs on bpf_local_storage_lookup and bpf_local_storage_update. Without proper deadlock prevent mechanism, this test would cause deadlock. Signed-off-by: Song Liu --- .../bpf/prog_tests/task_local_storage.c | 23

[PATCH v7 7/7] kselftests: Add test to check for rlimit changes in different user namespaces

2021-02-22 Thread Alexey Gladkov
pid, -child[i], WEXITSTATUS(wstatus[i])); + else if (WIFSIGNALED(wstatus[i])) + warnx("(pid=%d): pid %d killed by signal %d", + pid, -child[i], WTERMSIG(wstatus[i])); + + if (WIFSIGNALED(wstatus[i]) && WTERMSIG(wstatus[i]) == SIGUSR1) + continue; + + warnx("(pid=%d): Test failed", pid); + exit(EXIT_FAILURE); + } + + warnx("(pid=%d): Test passed", pid); + exit(EXIT_SUCCESS); +} -- 2.29.2

[PATCH 3/4] tpm: Fix test for interrupts

2021-02-21 Thread Lino Sanfilippo
The current test for functional interrupts is broken in multiple ways: 1. The needed flag TPM_CHIP_FLAG_IRQ is never set, so the test is never executed. 2. The test includes the check for two variables and the check is done for each transmission which is unnecessarily complicated. 3. Part of the

[PATCH v4 20/22] selftest/x86/amx: Include test cases for the AMX state management

2021-02-21 Thread Chang S. Bae
d has initialized its AMX state. Collect the test cases of validating those operations together, as they share some common setup for the AMX state. These test cases do not depend on AMX compiler support, as they employ userspace-XSAVE directly to access AMX state. Signed-off-by: Chang S. Bae Review

Re: [PATCH 3/3] crypto: hisilicon/sec - fixes shash test error

2021-02-20 Thread liulongfang
On 2021/2/5 19:44, Herbert Xu Wrote: > On Fri, Feb 05, 2021 at 06:10:57PM +0800, Longfang Liu wrote: >> If this configuration item is not turned on, >> the allocation of crypto_tfm will fail when >> the shash algorithm calculates the hash >> through the software. >> >> Signed-off-by: Longfang Liu

Re: [PATCH v2 3/3] crypto: hisilicon/sec - fixes shash test error

2021-02-20 Thread liulongfang
ready included that. > > Cheers, > On this kernel version, those modules set to Y will not use the sha512 algorithm. And our SEC module selects it "select CRYPTO_SHA512", so it is compiled into ko: "sha512_generic.ko". Because we did not load the "sha512_generic.ko" when we loaded the ko of SEC, the sha512 algorithm test failed, Therefore, before using SEC, we need to load this ko first, so this patch is not required, please ignore it. Thanks Longfang.

[RFC PATCH 3/3] selftests/seccomp: Add test for wait killable notifier

2021-02-20 Thread Sargun Dhillon
This adds a test for the positive case of the wait killable notifier, in testing that when the feature is activated the process acts as expected -- in not terminating on a non-fatal signal, and instead queueing it up. There is already a test case for normal handlers and preemption. Signed-off-by

[PATCH 2/2] perf buildid-cache: Add test for PE executable

2021-02-19 Thread Nicholas Fraser
This builds on the previous changes to tests/shell/buildid.sh, adding tests for a PE file. It adds it to the build-id cache manually and, if Wine is available, runs it under "perf record" and verifies that it was added automatically. If wine is not installed, only warnings are printed

[PATCH v7 6/6] userfaultfd/selftests: add test exercising minor fault handling

2021-02-18 Thread Axel Rasmussen
Fix a dormant bug in userfaultfd_events_test(), where we did `return faulting_process(0)` instead of `exit(faulting_process(0))`. This caused the forked process to keep running, trying to execute any further test cases after the events test in parallel with the "real" process. Add a s

Re: [PATCH v1 0/2] perf test: Output sub testing result in cs-etm

2021-02-18 Thread Arnaldo Carvalho de Melo
Em Mon, Feb 15, 2021 at 07:59:42PM +0800, Leo Yan escreveu: > The "perf test" can be integrated into testing framework, e.g. Linux > kernel functional testing (LKFT) [1]. We are not satisfied with only > outputting the summarized result for Arm CoreSight testing but lacking >

Re: [PATCH] perf test: Fix unaligned access in sample parsing test

2021-02-18 Thread Arnaldo Carvalho de Melo
#12 0x561532596828 in _start ... > > > > SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use > > util/synthetic-events.c:1539:4 in Thanks, applied. - Arnaldo > > Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") > > Cc: Adrian Hunte

[PATCH] perf buildid-cache: Add test for PE executable

2021-02-18 Thread Nicholas Fraser
This builds on the previous changes to tests/shell/buildid.sh, adding tests for a PE file. It adds it to the build-id cache manually and, if Wine is available, runs it under "perf record" and verifies that it was added automatically. If wine is not installed, only warnings are printed

Re: [PATCH v3 8/8] kselftests: cgroup: update kmem test for new vmstat implementation

2021-02-18 Thread Michal Koutný
On Tue, Feb 09, 2021 at 11:33:04AM -0500, Johannes Weiner wrote: > --- > tools/testing/selftests/cgroup/test_kmem.c | 22 ++ > 1 file changed, 14 insertions(+), 8 deletions(-) Reviewed-by: Michal Koutný signature.asc Description: Digital signature

Re: [PATCH v2 3/3] crypto: hisilicon/sec - fixes shash test error

2021-02-17 Thread Herbert Xu
On Thu, Feb 18, 2021 at 10:01:58AM +0800, liulongfang wrote: > > >> diff --git a/drivers/crypto/hisilicon/sec2/sec_crypto.c > >> b/drivers/crypto/hisilicon/sec2/sec_crypto.c > >> index d2c4a2c..988faf7 100644 > >> --- a/drivers/crypto/hisilicon/sec2/sec_crypto.c > >> +++ b/drivers/crypto/hisilicon

Re: [PATCH v2 3/3] crypto: hisilicon/sec - fixes shash test error

2021-02-17 Thread liulongfang
On 2021/2/10 14:43, Herbert Xu Wrote: > On Sun, Feb 07, 2021 at 06:04:40PM +0800, Longfang Liu wrote: >> If the header file "crypto/internal/hash.h" not >> added, the allocation of crypto_tfm will fail when >> the shash algorithm calculates the hash >> through the software. >> >> Signed-off-by: Lon

Re: [PATCH v3 1/1] rcuscale: add kfree_rcu() single-argument scale test

2021-02-17 Thread Paul E. McKenney
On Wed, Feb 17, 2021 at 07:51:10PM +0100, Uladzislau Rezki (Sony) wrote: > To stress and test a single argument of kfree_rcu() call, we > should to have a special coverage for it. We used to have it > in the test-suite related to vmalloc stressing. The reason is > the rcuscale is a c

Re: [PATCH 2/2] perf buildid-cache: Add test for 16-byte build-id

2021-02-17 Thread Jiri Olsa
ted > from the list. > > A previous commit fixed the bug that left it out of the list. This adds > a test for it. > > Signed-off-by: Nicholas Fraser Acked-by: Jiri Olsa few nits below > --- > tools/perf/tests/shell/buildid.sh | 6 ++ > 1 file changed, 6 insertio

[PATCH v3 1/1] rcuscale: add kfree_rcu() single-argument scale test

2021-02-17 Thread Uladzislau Rezki (Sony)
To stress and test a single argument of kfree_rcu() call, we should to have a special coverage for it. We used to have it in the test-suite related to vmalloc stressing. The reason is the rcuscale is a correct place for RCU related things. Therefore introduce two torture_param() variables, one is

Re: [PATCH] test-media: wrap vivid code around $vivid variable

2021-02-17 Thread Helen Koike
On 2/17/21 3:22 PM, Hans Verkuil wrote: On 17/02/2021 19:11, Helen Koike wrote: The script was trying to load vivid and run some commands on top of it even when $vivid = 0. Wrap all vivid code under $vivid variable. Signed-off-by: Helen Koike --- contrib/test/test-media | 66

Re: [PATCH] test-media: wrap vivid code around $vivid variable

2021-02-17 Thread Hans Verkuil
On 17/02/2021 19:11, Helen Koike wrote: > The script was trying to load vivid and run some commands on top of it > even when $vivid = 0. > Wrap all vivid code under $vivid variable. > > Signed-off-by: Helen Koike > --- > contrib

[PATCH] test-media: wrap vivid code around $vivid variable

2021-02-17 Thread Helen Koike
The script was trying to load vivid and run some commands on top of it even when $vivid = 0. Wrap all vivid code under $vivid variable. Signed-off-by: Helen Koike --- contrib/test/test-media | 66 - 1 file changed, 33 insertions(+), 33 deletions(-) diff

Re: [PATCH 1/2] rcuscale: add kfree_rcu() single-argument scale test

2021-02-17 Thread Uladzislau Rezki
> > > On Thu, Feb 04, 2021 at 01:46:48PM -0800, Paul E. McKenney wrote: > > > > > On Fri, Jan 29, 2021 at 09:05:04PM +0100, Uladzislau Rezki (Sony) > > > > > wrote: > > > > > > To stress and test a single argument of kfree_rcu() cal

RE: [Intel-gfx] [drm/i915] 04ff178484: phoronix-test-suite.supertuxkart.1024x768.Fullscreen.Ultimate.1.GranParadisoIsland.frames_per_second -30.4% regression

2021-02-16 Thread Chiou, Cooper
Hi upstream committee, Please consider to merge this patch which resolved VP8 hardware encoding GPU hang critical issue on Gen9 sku, and there is no performance regression on this fix. Best Regards, Cooper -Original Message- From: kernel test robot Sent: Monday, February 8, 2021 8

[PATCH 2/2] perf buildid-cache: Add test for 16-byte build-id

2021-02-16 Thread Nicholas Fraser
This adds a test for it. Signed-off-by: Nicholas Fraser --- tools/perf/tests/shell/buildid.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/perf/tests/shell/buildid.sh b/tools/perf/tests/shell/buildid.sh index 4861a20edee2..de02a23b7c7b 100755 --- a/tools/perf/tests/shell/

Re: [PATCH 2/2] perf buildid-cache: Add test for 16-byte build-id

2021-02-16 Thread Nicholas Fraser
r the object was printed > by a subsequent call to "perf buildid-cache -l". It was being omitted > from the list. > > A previous commit fixed the bug that left it out of the list. This adds > a test for it. > --- > tools/perf/tests/shell/buildid.sh | 6 ++ > 1 fil

[PATCH 2/2] perf buildid-cache: Add test for 16-byte build-id

2021-02-16 Thread Nicholas Fraser
This adds a test for it. --- tools/perf/tests/shell/buildid.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/perf/tests/shell/buildid.sh b/tools/perf/tests/shell/buildid.sh index 4861a20edee2..de02a23b7c7b 100755 --- a/tools/perf/tests/shell/buildid.sh +++ b/tools/perf/t

Re: [reiser4 SFRN 5.1.3] kernel [5.10.x] read not supported for file /test-exec \(pid: 10094 comm: debootstrap\)

2021-02-16 Thread Edward Shishkin
:56 debootstrap: /usr/sbin/debootstrap -- components=main --debian-installer --resolve-deps -- keyring=/usr/share/keyrings/archive.gpg buster /target http://deb.debian.org/debian/ Dec 22 20:19:56 debootstrap: /usr/sbin/debootstrap: line 1596: /target/test-exec: Invalid argument Dec 22 20:19:56 kernel:

<    4   5   6   7   8   9   10   11   12   13   >