test would
fail with clang. Should we disable this test for now when clang is used
until the bug is fixed in clang? Not sure. Any opinions?
[1] https://github.com/llvm/llvm-project/issues/53728
Muhammad Usama Anjum (8):
selftests: x86: Remove dependence of headers file
selftests
Remove header file dependence to remove the following error caught by
clang.
clang: error: cannot specify -o when generating multiple output files
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/x86/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
The -static clang flag ignores -no-pie flag. Hence following warning is
generated. Fix the warning by removing the -no-pie flag before
specifying -static flag.
clang: warning: argument unused during compilation: '-no-pie'
[-Wunused-command-line-argument]
Signed-off-by: Muhammad U
Remove unused function to fix the following warning:
test_vsyscall.c:100:19: warning: unused function 'sys_clock_gettime'
[-Wunused-function]
100 | static inline int sys_clock_gettime(clockid_t id, struct timespec *ts)
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/sel
;mov %" SEG ":(0), %0" : "=rm" (ret));
| ^
:1:2: note: instantiated into assembly here
1 | mov %fs:(0), 20(%esp)
| ^
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/x86/fsgsbase_restore.c | 2 +-
1 file change
Remove unused global variable.
syscall_arg_fault.c:32:30: warning: unused variable 'sig_traps'
[-Wunused-variable]
32 | static volatile sig_atomic_t sig_traps;
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/x86/syscall_arg_fault.c | 1 -
1 file changed, 1 deletio
res16""\n"
| ^
:4:2: note: instantiated into assembly here
4 | fisttp res16
| ^
test_FISTTP.c:91:3: error: ambiguous instructions require an explicit suffix
(could be 'fisttps', or 'fisttpl')
91 | " fisttp res16&q
15 | static volatile bool remote_hard_zero;
| ^~~~
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/x86/fsgsbase.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/tools/testing/selftests/x86/fsgsbase.c
b/tools/testing/selftests/
int64_t get_xstatebv(struct xsave_buffer *buffer)
|^~~~
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/x86/amx.c | 16
1 file changed, 16 deletions(-)
diff --git a/tools/testing/selftests/x86/amx.c
b/tools/testing/selft
ned the first time stdio.h was included hence
the definition of asprintf isn't present. The second inclusion of stdio.h
when _GNU_SOURCE is defined is ignored as it was already included.
This is being fixed in following series:
https://lore.kernel.org/all/20240430235057.1351993-1-edl...@google.com
--
BR,
Muhammad Usama Anjum
On 4/5/24 1:06 AM, Yonghong Song wrote:
>
> On 4/3/24 5:03 AM, Muhammad Usama Anjum wrote:
>> On 4/3/24 7:36 AM, Yonghong Song wrote:
>>> On 4/2/24 8:16 AM, Muhammad Usama Anjum wrote:
>>>> Yonghong Song,
>>>>
>>>> Thank you so much for
1-2f9ed7d1c...@valentinobst.de/
>
> Signed-off-by: John Hubbard
Thanks for fixing!
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/timens/exec.c | 6 +++---
> tools/testing/selftests/timens/timer.c | 2 +-
> tools/testing/selftests/timens/timer
rocess’
> declared with attribute ‘warn_unused_result’ [-Wunused-result]
>47 | capng_get_caps_process();
> | ^~~~
>
> Signed-off-by: Amer Al Shanawany
LGTM
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/capabili
://lore.kernel.org/oe-lkp/202404301040.3bea5782-oliver.s...@intel.com
> Signed-off-by: Edward Liaw
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/Makefile| 4 ++--
> tools/testing/selftests/kselftest_harness.h | 2 +-
> tools/testing/selftests/lib.
quot;)
> Reported-by: kernel test robot
> Closes:
> https://lore.kernel.org/oe-lkp/202404301040.3bea5782-oliver.s...@intel.com
> Signed-off-by: Edward Liaw
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/sgx/Makefile| 2 +-
> tools/testing/self
On 5/8/24 2:38 AM, Edward Liaw wrote:
> _GNU_SOURCE is provided by KHDR_INCLUDES, so it should be dropped to
> prevent _GNU_SOURCE redefined warnings.
>
> Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX")
> Signed-off-by: Edward Liaw
Reviewed
On 5/8/24 2:38 AM, Edward Liaw wrote:
> Add KHDR_INCLUDES to CFLAGS to pull in the kselftest harness
> dependencies (-D_GNU_SOURCE).
>
> Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX")
> Signed-off-by: Edward Liaw
Reviewed-by: Muhammad Usama Anjum
On 5/8/24 2:38 AM, Edward Liaw wrote:
> -D_GNU_SOURCE can be de-duplicated here, as it is added by
> KHDR_INCLUDES.
>
> Signed-off-by: Edward Liaw
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/futex/functional/Makefile | 2 +-
> tools/testing/sel
nd them split - it will be easier to review and apply. You
>> might as well wait until the merge window is done. I don't think
>> anybody would have time to review now since merge window starts
>> next week.
>
> Sorry, I have them split already; is it ok if I send them now? I will
> be on leave soon and may not be able to get back to it in a while.
Feel free to send the patches. There is no restriction on that.
>
> Thanks,
> Edward
>
>>
>>
>> thanks,
>> -- Shuah
>
--
BR,
Muhammad Usama Anjum
ates)
> + return -ENOMEM;
>
> for (int i = 0; i < subtest_num; i++) {
> subtest_state = &state->subtest_states[i];
--
BR,
Muhammad Usama Anjum
f-by: Kunwu Chan
LGTM
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/bpf/prog_tests/sockopt.c | 6 ++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/sockopt.c
> b/tools/testing/selftests/bpf/prog_tests/sockopt
On 5/10/24 2:58 PM, kunwu.c...@linux.dev wrote:
> From: Kunwu Chan
>
> There is a 'malloc' call, which can be unsuccessful.
> Add the malloc failure checking to avoid possible null
> dereference.
>
> Signed-off-by: Kunwu Chan
LGTM
Reviewed-by: Muhammad Usama
uery(void)
> attr.wakeup_events = 1;
>
> query = malloc(sizeof(*query) + sizeof(__u32) * num_progs);
> + if (!ASSERT_OK_PTR(query, "malloc"))
> + return;
> +
LGTM
Reviewed-by: Muhammad Usama Anjum
> for (i =
ument name to test->func(), in order to address another
> warning from clang.
>
> Cc: Ryan Roberts
> Signed-off-by: John Hubbard
LGTM
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/mqueue/mq_perf_tests.c | 15 ---
> 1 file changed, 8 inserti
> Also, there is no reason why a hugepage allocation should fail, since we
> are using a simple mmap() using MAP_HUGETLB; hence, instead of skipping
> the test, make it fail.
>
> Signed-off-by: Dev Jain
LGTM
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testin
On 5/1/24 6:29 AM, Muhammad Usama Anjum wrote:
> This series fixes build errors found by clang to allow the x86 suite to
> get built with the clang.
>
> Unfortunately, there is one bug [1] in the clang becuase of which
> extended asm isn't handled correctly by it
ould provide some futureproofing.
>
> Fixes: daef47b89efd ("selftests: Compile kselftest headers with
> -D_GNU_SOURCE")
> Signed-off-by: Mark Brown
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/alsa/Makefile | 2 +-
> 1 file changed, 1 insertion(+
ze_ref, TEST_SIZE, 10)) {
> + ksft_print_msg(
> + "file working set size difference too large:
> actual=%ld, expected=%ld\n",
> + ws_size_test - ws_size_ref, TEST_SIZE);
> + goto cleanup;
> + }
> + }
> + ret = KSFT_PASS;
> +
> +cleanup:
> + if (pid > 0)
> + kill(pid, SIGKILL);
> + cleanup_file_workingset();
> + return ret;
> +}
> +
> +static int test_anon(void)
> +{
> + ssize_t ws_size_ref, ws_size_test;
> + pid_t pid = 0;
> + int ret = KSFT_FAIL, i;
> +
> + ws_size_ref = read_interval_all_nodes(PAGETYPE_ANON, 0);
> + if (ws_size_ref < 0)
> + goto cleanup;
> +
> + pid = clone_and_run(alloc_anon_workingset, (void *)TEST_SIZE);
> + if (pid < 0)
> + goto cleanup;
> +
> + sleep_ms(REFRESH_INTERVAL);
> + read_interval_all_nodes(PAGETYPE_ANON, 0);
> +
> + for (i = 0; i < 5; ++i) {
> + sleep_ms(REFRESH_INTERVAL);
> + ws_size_test = read_interval_all_nodes(PAGETYPE_ANON, 0);
> + ws_size_test += read_interval_all_nodes(PAGETYPE_ANON, 1);
> + if (ws_size_test < 0)
> + goto cleanup;
> +
> + if (!values_close(ws_size_test - ws_size_ref, TEST_SIZE, 10)) {
> + ksft_print_msg(
> + "anon working set size difference too large:
> actual=%ld, expected=%ld\n",
> + ws_size_test - ws_size_ref, TEST_SIZE);
> + goto cleanup;
> + }
> + }
> + ret = KSFT_PASS;
> +
> +cleanup:
> + if (pid > 0)
> + kill(pid, SIGKILL);
> + return ret;
> +}
> +
> +
> +#define T(x) { x, #x }
> +struct workingset_test {
> + int (*fn)(void);
> + const char *name;
> +} tests[] = {
> + T(test_anon),
> + T(test_file),
> +};
> +#undef T
> +
> +int main(int argc, char **argv)
> +{
> + int ret = EXIT_SUCCESS, i, err;
> +
> + for (i = 0; i < ARRAY_SIZE(tests); i++) {
> + err = run_test(tests[i].fn);
> + switch (err) {
> + case KSFT_PASS:
> + ksft_test_result_pass("%s\n", tests[i].name);
> + break;
> + case KSFT_SKIP:
> + ksft_test_result_skip("%s\n", tests[i].name);
> + break;
> + default:
> + ret = EXIT_FAILURE;
> + ksft_test_result_fail("%s with error %d\n",
> + tests[i].name, err);
> + break;
> + }
Replace this switch-case with ksft_test_result*().
> + }
> + return ret;
> +}
--
BR,
Muhammad Usama Anjum
completely.
Signed-off-by: Muhammad Usama Anjum
---
.../selftests/firmware/fw_run_tests.sh| 63 ---
1 file changed, 40 insertions(+), 23 deletions(-)
diff --git a/tools/testing/selftests/firmware/fw_run_tests.sh
b/tools/testing/selftests/firmware/fw_run_tests.sh
index
Check return value and return error/skip the tests.
Fixes: 46fd75d4a3c9 ("selftests: mm: add pagemap ioctl tests")
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/pagemap_ioctl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/se
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
.../intel/workload_hint/workload_hint_test.c | 98 ---
1 file changed, 39 insertions(+), 59 deletions
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
.../intel/power_floor/power_floor_test.c | 68 ---
1 file changed, 28 insertions(+), 40 deletions
ail:0 xfail:0 xpass:0 skip:1 error:0
New and correct output:
TAP version 13
1..0 # SKIP all tests require euid == 0
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/openat2/resolve_test.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/self
pages freed successfully !\n");
> + }
> +}
> +
> +int main(void)
> +{
> + size_t pagesize = 0;
> +
> + ksft_print_header();
> + ksft_set_plan(4);
> +
> + /* Get base page size */
> + pagesize = psize();
> +
> + /* start and end is aligned to pagesize */
> + run_dio_using_hugetlb(0, (pagesize * 3));
> +
> + /* start is aligned but end is not aligned */
> + run_dio_using_hugetlb(0, (pagesize * 3) - (pagesize / 2));
> +
> + /* start is unaligned and end is aligned */
> + run_dio_using_hugetlb(pagesize / 2, (pagesize * 3));
> +
> + /* both start and end are unaligned */
> + run_dio_using_hugetlb(pagesize / 2, (pagesize * 3) + (pagesize / 2));
> +
> + ksft_finished();
ksft_finished() never returns. Remove the following line.
> + return 0;
> +}
> +
--
BR,
Muhammad Usama Anjum
t set, the test will fail.
>
> Add the event file to `required` line so that the test will return
> `unsupported` result.
>
> Fixes: 297e1dcdca3d ("selftests/ftrace: Add selftest for testing duplicate
> eprobes and kprobes")
> Signed-off-by: Masami Hiramatsu (G
On 5/20/24 5:00 PM, Masami Hiramatsu (Google) wrote:
> From: Masami Hiramatsu (Google)
>
> Update required config options for running all tests.
> This also sorts the config entries alphabetically.
>
> Signed-off-by: Masami Hiramatsu (Google)
LGTM
Reviewed-by: Mu
from
individual files. But until then the current solution seems fine:
Reviewed-by: Muhammad Usama Anjum
On 5/20/24 8:03 PM, Michael Ellerman wrote:
> Fix warnings like:
>
> openat2_test.c: In function ‘test_openat2_flags’:
> openat2_test.c:303:73: warning: format ‘%llX’ expects
t’, but argument 3 has type ‘__u64’ {aka ‘long
> unsigned int’} [-Wformat=]
>
> By switching to unsigned long long for u64 for ppc64 builds.
>
> Signed-off-by: Michael Ellerman
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/mm/gup_test.c| 1 +
> to
Kind reminder
On 4/14/24 6:18 PM, Muhammad Usama Anjum wrote:
> In this series, 4 tests are being conformed to TAP.
>
> Muhammad Usama Anjum (4):
> selftests: x86: check_initial_reg_state: conform test to TAP format
> output
> selftests: x86: corrupt_xstate_header: c
Soft reminder
On 5/1/24 5:29 PM, Muhammad Usama Anjum wrote:
> This series fixes build errors found by clang to allow the x86 suite to
> get built with the clang.
>
> Unfortunately, there is one bug [1] in the clang becuase of which
> extended asm isn't handled correctly b
Kind reminder
On 4/14/24 6:18 PM, Muhammad Usama Anjum wrote:
> In this series, 4 tests are being conformed to TAP.
>
> Muhammad Usama Anjum (4):
> selftests: x86: check_initial_reg_state: conform test to TAP format
> output
> selftests: x86: corrupt_xstate_header: c
Kind reminder
On 4/26/24 3:18 PM, Muhammad Usama Anjum wrote:
> Conform the layout, informational and status messages to TAP. No
> functional change is intended other than the layout of output messages.
>
> Signed-off-by: Muhammad Usama Anjum
> ---
> Changes since v1:
> - N
Kind reminder
On 4/26/24 2:14 PM, Muhammad Usama Anjum wrote:
> The python unittest is being used for executing tests. TAP output
> cannot be added in the unittest framework. The python unittest is being
> run from a script. Add the output TAP logs to the script. Add "#"
>
Conform individual tests to TAP output. One patch conform one test. With
this series, all vDSO tests become TAP conformant.
Muhammad Usama Anjum (4):
kselftests: vdso: vdso_test_clock_getres: conform test to TAP output
kselftests: vdso: vdso_test_correctness: conform test to TAP output
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
.../selftests/vDSO/vdso_test_clock_getres.c | 68 +--
1 file changed, 33 insertions(+), 35 deletions
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
.../selftests/vDSO/vdso_test_correctness.c| 146 +-
1 file changed, 74 insertions(+), 72 deletions
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/vDSO/vdso_test_getcpu.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
.../selftests/vDSO/vdso_test_gettimeofday.c | 23 ++-
1 file changed, 12 insertions(+), 11 deletions
tps://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c...@valentinobst.de/
>
> Signed-off-by: John Hubbard
LGTM
Reviewed-by: Muhammad Usama Anjum
Tested-by: Muhammad Usama Anjum
> ---
>
> Changes since the first version:
>
> 1) Rebased onto Linux 6.10-rc1
>
gt;>
>>> +
>>> +LOCAL_HDRS += helpers.h
>>> +
>>> include ../lib.mk
>>> -$(TEST_GEN_PROGS): helpers.c helpers.h
>>> +$(TEST_GEN_PROGS): helpers.c
>>>
>>> base-commit: ddb4c3f25b7b95df3d6932db0b379d768a6ebdf7
>>> prerequisite-patch-id: b901ece2a5b78503e2fb5480f20e304d36a0ea27
>>
>
> thanks,
--
BR,
Muhammad Usama Anjum
isions
> solely on whether or not LLVM is set.
>
> Cc: Nathan Chancellor
> Cc: Ryan Roberts
>
> Signed-off-by: John Hubbard
LGTM
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/lib.mk | 12
> 1 file changed, 12 insertions(+)
>
> is that it is more intrusive. Which I think is appropriate.
>
> Would you be OK with my posting v3 that uses your patch for
> test_FISTTP.c [1], and the rest of my patches for the rest?
Yeah, sure go ahead. I'll test/review the v3 series.
>
>
> [1]
> https://lore.kernel.org/all/20240501122918.3831734-7-usama.an...@collabora.com/
>
> thanks,
--
BR,
Muhammad Usama Anjum
st-test.c
> @@ -1201,12 +1201,6 @@ static struct kunit_suite hlist_test_module = {
> };
>
>
> -struct klist_test_struct {
> - int data;
> - struct klist klist;
> - struct klist_node klist_node;
> -};
> -
> static int node_count;
> static struct klist_node *last_node;
>
--
BR,
Muhammad Usama Anjum
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/arm64/tags/tags_test.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff
The run_tags_test.sh script is used to run tags_test and print out if
the test succeeded or failed. As tags_test has been TAP conformed, this
script is unneeded and hence can be removed.
Signed-off-by: Muhammad Usama Anjum
---
make run_tests TARGETS="arm64/tags"
Before:
➜ self
Hi,
I'm trying to build arm64 selftests on next-20240529. I'm getting build
failures. Complete logs are attached while some snippets are as following:
gcc pac.c /pauth/pac_corruptor.o /pauth/helper.o -o /pauth/pac -Wall -O2 -g
-I/linux_mainline/tools/testing/selftests/ -I/linux_mainline/tools/in
On 6/3/24 6:31 PM, Mark Brown wrote:
> On Mon, Jun 03, 2024 at 06:28:16PM +0500, Muhammad Usama Anjum wrote:
>
>> gcc pac.c /pauth/pac_corruptor.o /pauth/helper.o -o /pauth/pac -Wall -O2 -g
>> -I/linux_mainline/tools/testing/selftests/ -I/linux_mainline/tools/include
>>
: 4838cf70e539 ("selftests/mm: map_fixed_noreplace: conform test to TAP
> format output")
> Signed-off-by: Mark Brown
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/mm/map_fixed_noreplace.c | 24
>
> 1 file changed,
The mkdir generates an error when kvm suite is build for non-supported
architecture such as arm. Fix it by ignoring the error from mkdir.
mkdir: missing operand
Try 'mkdir --help' for more information.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/kvm/Makefile | 2
On 8/6/24 9:00 PM, Shuah Khan wrote:
> On 8/6/24 06:10, Muhammad Usama Anjum wrote:
>> The mkdir generates an error when kvm suite is build for non-supported
>
> built
> unsupported
>
>> architecture such as arm. Fix it by ignoring the error from mkdir.
>>
>&g
On 8/7/24 11:08 AM, Muhammad Usama Anjum wrote:
> On 8/6/24 9:00 PM, Shuah Khan wrote:
>> On 8/6/24 06:10, Muhammad Usama Anjum wrote:
>>> The mkdir generates an error when kvm suite is build for non-supported
>>
>> built
>> unsupported
>>
>>> arc
ueabihf/12/../../../../arm-linux-gnueabihf/bin/ld:
cannot find rcrt1.o: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:39:
/home/usama/repos/kernel/linux_mainline/tools/testing/selftests/exec/load_address.static.0x1000]
Error 1
--
BR,
Muhammad Usama Anjum
Adding Sean
On 8/7/24 11:33 AM, Muhammad Usama Anjum wrote:
> On 8/7/24 11:08 AM, Muhammad Usama Anjum wrote:
>> On 8/6/24 9:00 PM, Shuah Khan wrote:
>>> On 8/6/24 06:10, Muhammad Usama Anjum wrote:
>>>> The mkdir generates an error when kvm suite is build f
this suite only for x86 and
x86_64 architectures.
Fixes: b733143cc455 ("selftests/resctrl: Make resctrl_tests run using kselftest
framework")
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/resctrl/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/te
memfd_secret(2)")
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/Makefile | 2 ++
tools/testing/selftests/mm/run_vmtests.sh | 3 +++
2 files changed, 5 insertions(+)
diff --git a/tools/testing/selftests/mm/Makefile
b/tools/testing/selftests/mm/Makefile
index 1a83b70e
On 8/9/24 12:23 PM, Ilpo Järvinen wrote:
> On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote:
>
>> This test doesn't have support for other architectures. Altough resctrl
>> is supported on x86 and ARM, but arch_supports_noncont_cat() shows that
>> only x86 for AMD a
sret = (void *) syscall(__NR_mmap, addr, len, prot,
| ^
Cc: sta...@vger.kernel.org
Fixes: 4926c7a52de7 ("selftest mm/mseal memory sealing")
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/mm/mseal_test.c | 37 +
("$@" 2>&1) | tap_prefix
> local ret=${PIPESTATUS[0]}
> count_total=$(( count_total + 1 ))
> - if [ $ret -eq 0 ]; then
> + # page_frag_test.ko returns 11(EAGAIN) when insmod'ing to avoid
> rmmod
> + if [ $ret -eq 0 ] | [ $ret -eq 11 -a ${CATEGORY} == "page_frag"
> ]; then
> count_pass=$(( count_pass + 1 ))
> echo "[PASS]" | tap_prefix
> echo "ok ${count_total} ${test}" | tap_output
> @@ -453,6 +456,10 @@ CATEGORY="mkdirty" run_test ./mkdirty
>
> CATEGORY="mdwe" run_test ./mdwe_test
>
> +CATEGORY="page_frag" run_test insmod ./page_frag/page_frag_test.ko
> +
> +CATEGORY="page_frag" run_test insmod ./page_frag/page_frag_test.ko
> test_alloc_len=12 test_align=1
> +
You are loading the test module. How will we verify if the test passed
or failed? There must be a way to mark the test passed or failed after
running it. You can definitely parse the dmesg to get results. But it
would be complex to do it. KUnit is way to go as all such tools are
already present there.
> echo "SUMMARY: PASS=${count_pass} SKIP=${count_skip} FAIL=${count_fail}" |
> tap_prefix
> echo "1..${count_total}" | tap_output
>
--
BR,
Muhammad Usama Anjum
"secretmem: test: add basic selftest for memfd_secret(2)")
Reviewed-by: Shuah Khan
Acked-by: Mike Rapoport (Microsoft)
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- Add error message to the patch and reviewed-by tags
---
tools/testing/selftests/mm/Makefile | 2 ++
tools/te
On 8/7/24 3:22 PM, Muhammad Usama Anjum wrote:
> On 5/9/24 11:16 AM, Kees Cook wrote:
>> On Wed, May 08, 2024 at 07:54:13PM -0700, John Hubbard wrote:
>>> Didn't we learn recently, though, that -static-pie is gcc 8.1+, while the
>>> kernel's minimum gcc versio
Signed-off-by: Muhammad Usama Anjum
---
Changes since v1:
- Instead of ignoring error, check TEST_GEN_PROGS's validity first
---
tools/testing/selftests/kvm/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/kvm/Makefile
b/tools/testing/selftests/kv
On 8/14/24 3:29 AM, Jeff Xu wrote:
> Hi Muhammad
>
> On Fri, Aug 9, 2024 at 1:25 AM Muhammad Usama Anjum
> wrote:
>>
>> The __NR_mmap isn't found on armhf. The mmap() is commonly available
>> system call and its wrapper is presnet on all architectures. So it
&g
On 8/19/24 9:33 PM, Sean Christopherson wrote:
> +KVM arch maintainers
>
> On Mon, Aug 19, 2024, Muhammad Usama Anjum wrote:
>> The tests are built on per architecture basis. When unsupported
>> architecture is specified, it has no tests and TEST_GEN_PROGS is empty.
>>
he vendor check using switch/case logic and return false
> for unknown vendors.
>
> Signed-off-by: Ilpo Järvinen
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/resctrl/cat_test.c | 26 +-
> 1 file changed, 16 insertions(+), 10 deletions(-
On 8/13/24 3:45 PM, Ilpo Järvinen wrote:
> To avoid warnings when __cpuid_count() is an empty stub, always
> initialize ecx because it is used in the return statement.
>
> Signed-off-by: Ilpo Järvinen
Reviewed-by: Muhammad Usama Anjum
> ---
> tools/testing/selftests/resc
un that code only on Intel CPUs but
> as is, the code cannot be build at all.
>
> Provide an empty stub for __cpuid_count() if it is not supported
> to allow build to succeed.
>
> Reported-by: Muhammad Usama Anjum
> Signed-off-by: Ilpo Järvinen
Reviewed-by: Muhammad
seeing?
Yeah, build errors are resolved.
>
> Hi Reinette - do these look okay to you? Can you give me an ack if they do?
>
> thanks,
> -- Shuah
>
--
BR,
Muhammad Usama Anjum
On 6/20/25 8:28 AM, Wei Yang wrote:
> Each fixture could support variant. Add fixture with variant to verify
> the behavior, so we can validate for further change.
>
> Signed-off-by: Wei Yang
> Cc: Muhammad Usama Anjum
> Cc: Thomas Weißschuh
>
> ---
> v2:
>
On 6/16/25 5:23 PM, Wei Yang wrote:
> Each fixture could support variant. Add fixture with variant to verify
> the behavior, so we can validate for further change.
>
> Signed-off-by: Wei Yang
Reviewed-by: Muhammad Usama Anjum
> ---
> .../kselftest_harness/harness-se
On 6/16/25 5:23 PM, Wei Yang wrote:
> In case there is no test chosen, e.g -t non-exist, the following message
> would be printed at start.
>
> TAP version 13
> 1..0
>
> Change it to print 0 if no test is chosen.
Please give reference from TAP format guidelines for this change.
>
> Sign
On 7/12/25 5:26 AM, Mohsin Bashir wrote:
> Test XDP_PASS/DROP in single buffer and multi buffer mode when
> XDP native support is available.
>
> ./drivers/net/xdp.py
> TAP version 13
> 1..6
> ok 1 xdp.test_xdp_native_pass_sb
> ok 2 xdp.test_xdp_native_pass_mb
> ok 3 xdp.test_xdp_native_drop_sb
> o
401 - 481 of 481 matches
Mail list logo