Re: [PATCH v4 0/7] selftests/x86: fix build errors and warnings found via clang

2024-07-09 Thread Shuah Khan
On 7/9/24 14:51, Shuah Khan wrote: On 7/9/24 14:40, John Hubbard wrote: 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 chec

Re: [PATCH v2 1/4] kselftests: vdso: vdso_test_clock_getres: conform test to TAP output

2024-07-09 Thread Shuah Khan
On 6/12/24 02:17, Muhammad Usama Anjum wrote: On 6/12/24 1:32 AM, Shuah Khan wrote: On 6/9/24 23:41, 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. Use kselftest_harness.h to

Re: [PATCH] selftests: tpm2: conform test to TAP output

2024-07-09 Thread Shuah Khan
On 7/2/24 00:55, 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 "#" prefix to the python unittest output which will

Re: [PATCH v2 1/2] selftests/thermel/intel: conform the test to TAP output

2024-07-09 Thread Shuah Khan
On 7/2/24 04:12, 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. The test has infitie loop to read the value of index_str. Break the loop after successfully reading the value once

Re: [PATCH v2 2/2] selftests/thermel/intel: conform the test to TAP output

2024-07-09 Thread Shuah Khan
On 7/2/24 04:12, 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. The test has infinite loop to read the value of status_str. Break the loop after getting the value once and finish

Re: [PATCH 0/4] selftest: x86: conform tests to TAP format output

2024-07-09 Thread Shuah Khan
On 7/2/24 04:17, Muhammad Usama Anjum wrote: On 6/10/24 10:19 AM, Muhammad Usama Anjum wrote: Adding Borislav, Dave and x86 mailing list: Please review the series. Kind reminder Usama, As I mentioned another TAP conversion patch from you patch if the following command gives you TAP

Re: [PATCH bpf-next v2] selftests/bpf:fix a resource leak

2024-07-10 Thread Shuah Khan
On 7/9/24 19:59, Zhu Jun wrote: The requested resources should be closed before return in main(), otherwise resource leak will occur Signed-off-by: Zhu Jun How did you find this problem? Please give more details on the tool used including the output from the tool. --- Changes in v2: - chec

Re: [PATCH v2] selftests/breakpoints:Add return value in main function

2024-07-10 Thread Shuah Khan
On 7/9/24 20:16, Zhu Jun wrote: Main function return value is int type, so add return value in the end that this problem was discovered by reading the code Signed-off-by: Zhu Jun --- Changes in v2: - modify commit info tools/testing/selftests/breakpoints/step_after_suspend_test.c | 4 +++-

Re: [PATCH] selftests/dma:Fix a resource leak

2024-07-10 Thread Shuah Khan
On 7/10/24 00:30, Zhu Jun wrote: The opened file should be closed in main(), otherwise resource leak will occur that this problem was discovered by reading code Signed-off-by: Zhu Jun --- tools/testing/selftests/dma/dma_map_benchmark.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t

Re: [PATCH v2] selftests/breakpoints:Remove unused variable

2024-07-10 Thread Shuah Khan
On 7/9/24 20:11, Zhu Jun wrote: This variable is never referenced in the code, just remove them that this problem was discovered by reading the code Signed-off-by: Zhu Jun --- Changes in v2: - modify commit info tools/testing/selftests/breakpoints/step_after_suspend_test.c | 1 - 1 file c

Re: [PATCH] selftests/dma:remove unused variable

2024-07-10 Thread Shuah Khan
On 7/10/24 00:57, Zhu Jun wrote: The variable are never referenced in the code, just remove it that this problem was discovered by reading code Signed-off-by: Zhu Jun --- tools/testing/selftests/dma/dma_map_benchmark.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftest

Re: [PATCH v2] selftests/rtc:Fix a resource leak

2024-07-10 Thread Shuah Khan
On 7/10/24 01:55, Alexandre Belloni wrote: On 10/07/2024 00:43:09-0700, Zhu Jun wrote: The opened file should be closed before exit, otherwise resource leak will occur that this problem was discovered by code reading The question is still why should it be closed before exit as it will be close

Re: [PATCH] selftests/memfd:Fix a resource leak

2024-07-10 Thread Shuah Khan
On 7/10/24 01:33, Zhu Jun wrote: From a good programming practice perspective, especially in more complex programs, explicitly freeing allocated memory is a good habit. The change looks good to me, however can you elaborate more on what kind of leak your fixing here? Signed-off-by: Zhu Jun

Re: [PATCH v2] selftests: x86: conform test to TAP format output

2024-07-10 Thread Shuah Khan
On 7/10/24 03:37, Muhammad Usama Anjum wrote: This patch brings just readability implements by using kselftests wrappers instead of manual pass/fail test cases counting. It has been on mailing list from several months now. Please can someone ack or nack? Okay. I think I responded to your other

Re: [PATCH] selftests: openat2: don't print total number of tests and then skip

2024-07-10 Thread Shuah Khan
On 7/10/24 03:33, Muhammad Usama Anjum wrote: Hi Shuah, Can you take the patch as is or by removing following from this patch: - if (geteuid() != 0) + if (geteuid()) As Aleksa mentioned, geteuid() != 0 is preferred. On 7/2/24 12:02 PM, Muhammad Usama Anjum wrote: On 7/1/24 2:1

Re: [PATCH] selftests: firmware: conform test to TAP

2024-07-10 Thread Shuah Khan
On 7/1/24 02:33, Muhammad Usama Anjum wrote: Adding missing maintainer and reviser. On 5/20/24 9:37 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. Without using TAP messages

Re: [PATCH 1/2] selftests/thermel/intel: conform the test to TAP output

2024-07-10 Thread Shuah Khan
On 7/1/24 03:38, srinivas pandruvada wrote: On Mon, 2024-07-01 at 13:36 +0500, Muhammad Usama Anjum wrote: Soft reminder On 5/22/24 10:06 PM, Muhammad Usama Anjum wrote: Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of outp

Re: [PATCH] selftests:Fix printf format string in kselftest_harness.h

2024-07-10 Thread Shuah Khan
On 7/9/24 21:28, Zhu Jun wrote: '%u' in format string requires 'unsigned int' in __wait_for_test() but the argument type is 'signed int'. Signed-off-by: Zhu Jun --- tools/testing/selftests/kselftest_harness.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/s

Re: [PATCH v2 0/3] kselftest: Add test to report device log errors

2024-07-10 Thread Shuah Khan
On 7/10/24 07:11, Greg Kroah-Hartman wrote: On Fri, Jul 05, 2024 at 07:29:53PM -0400, Nícolas F. R. A. Prado wrote: Log errors are the most widely used mechanism for reporting issues in the kernel. When an error is logged using the device helpers, eg dev_err(), it gets metadata attached that ide

Re: [PATCH 0/4] selftest: x86: conform tests to TAP format output

2024-07-11 Thread Shuah Khan
On 7/10/24 02:58, Muhammad Usama Anjum wrote: Hi Shuah, Thank you for replying. On 7/10/24 4:39 AM, Shuah Khan wrote: On 7/2/24 04:17, Muhammad Usama Anjum wrote: On 6/10/24 10:19 AM, Muhammad Usama Anjum wrote: Adding Borislav, Dave and x86 mailing list: Please review the series

Re: [PATCH v2] selftests: x86: conform test to TAP format output

2024-07-11 Thread Shuah Khan
On 7/11/24 00:52, Muhammad Usama Anjum wrote: On 7/10/24 9:16 PM, Shuah Khan wrote: On 7/10/24 03:37, Muhammad Usama Anjum wrote: This patch brings just readability implements by using kselftests wrappers instead of manual pass/fail test cases counting. It has been on mailing list from several

Re: [PATCH v2 0/4] add tests to verify IFS (In Field Scan) driver functionality

2024-07-11 Thread Shuah Khan
On 7/10/24 19:42, Joseph, Jithu wrote: Acked-by: Jithu Joseph Applied to linux-kselftest next for Linux 6.11-rc1. thanks, -- Shuah

Re: [PATCH v2 0/3] kselftest: Add test to report device log errors

2024-07-11 Thread Shuah Khan
On 7/10/24 15:49, Shuah Khan wrote: On 7/10/24 07:11, Greg Kroah-Hartman wrote: On Fri, Jul 05, 2024 at 07:29:53PM -0400, Nícolas F. R. A. Prado wrote: Log errors are the most widely used mechanism for reporting issues in the kernel. When an error is logged using the device helpers, eg dev_err

Re: [PATCH v2 0/3] kselftest: Add test to report device log errors

2024-07-11 Thread Shuah Khan
On 7/11/24 15:44, Nícolas F. R. A. Prado wrote: On Thu, Jul 11, 2024 at 01:53:37PM -0600, Shuah Khan wrote: On 7/10/24 15:49, Shuah Khan wrote: On 7/10/24 07:11, Greg Kroah-Hartman wrote: On Fri, Jul 05, 2024 at 07:29:53PM -0400, Nícolas F. R. A. Prado wrote: Log errors are the most widely

[GIT PULL] KUnit update for Linux 6.11-rc1

2024-07-16 Thread Shuah Khan
Hi Linus, Please pull the following KUnit next update for Linux 6.11-rc1. This KUnit next update for Linux 6.11-rc1 consists of: -- adds vm_mmap() allocation resource manager -- converts usercopy kselftest to KUnit -- disables usercopy testing on !CONFIG_MMU -- adds MODULE_DESCRIPTION() to core

[GIT PULL] Kselftest update for Linux 6.11-rc1

2024-07-16 Thread Shuah Khan
Hi Linus, Please pull the kselftest update for Linux 6.11-rc1. This kselftest next update for Linux 6.11-rc1 consists of: -- changes to resctrl test to cleanup resctrl_val() and generalize it by removing test name specific handling from the function. -- several clang build failure fixes

Re: [PATCH 1/2] selftests: x86: vdso_restorer: remove manual counting of pass/fail tests

2024-07-16 Thread Shuah Khan
On 7/12/24 01:30, Muhammad Usama Anjum wrote: Use kselftest wrapper to mark tests pass/fail instead of manually counting. This is needed to return correct exit status. This also improves readability and mainability. Signed-off-by: Muhammad Usama Anjum As mentioned earlier, include before and

Re: [PATCH 2/2] selftests: x86: vdso_restorer: Return correct exit statuses

2024-07-16 Thread Shuah Khan
On 7/12/24 01:30, Muhammad Usama Anjum wrote: Return correct exit status, KSFT_SKIP if the pre-conditions aren't met. Return KSFT_FAIL if error occurs. Use ksft_finished() which will compmare the total planned tests with passed tests to return the exit value. Signed-off-by: Muhammad Usama Anjum

Re: [PATCH v2 0/4] selftest: x86: conform tests to TAP format output

2024-07-16 Thread Shuah Khan
On 7/12/24 02:46, Muhammad Usama Anjum wrote: In this series, 4 tests are being conformed to TAP. Changes since v1: - Correct the description of patches with what improvements they are bringing and why they are required Muhammad Usama Anjum (4): selftests: x86: check_initial_reg_state: re

Re: [PATCH v3 1/4] selftests: x86: check_initial_reg_state: remove manual counting and increase maintainability

2024-07-18 Thread Shuah Khan
On 7/18/24 05:32, Muhammad Usama Anjum wrote: Removes manual counting of pass and fail tests. This increases readability of tests, but also improves maintainability of the tests. Print logs in standard format (without [RUN], [OK] tags) Signed-off-by: Muhammad Usama Anjum --- Changes since v1: -

Re: [PATCH v3 0/4] selftest: x86: improve tests

2024-07-18 Thread Shuah Khan
On 7/18/24 05:32, Muhammad Usama Anjum wrote: Changes since v1: - Correct the description of patches with what improvements they are bringing and why they are required Changes since v2: - Update descriptions of patches and add output before/after Muhammad Usama Anjum (4): selftests: x86:

Re: [PATCH 1/2] selftests: x86: vdso_restorer: remove manual counting of pass/fail tests

2024-07-19 Thread Shuah Khan
On 7/12/24 01:30, Muhammad Usama Anjum wrote: Use kselftest wrapper to mark tests pass/fail instead of manually counting. You care combining two changes in the patch. This is needed to return correct exit status. This also improves readability and mainability. Spelling - "mainability" - che

Re: [PATCH v3 1/4] selftests: x86: check_initial_reg_state: remove manual counting and increase maintainability

2024-07-19 Thread Shuah Khan
On 7/19/24 01:28, Muhammad Usama Anjum wrote: On 7/18/24 8:48 PM, Shuah Khan wrote: On 7/18/24 05:32, Muhammad Usama Anjum wrote: Removes manual counting of pass and fail tests. This increases readability of tests, but also improves maintainability of the tests. Print logs in standard format

Re: [PATCH v4 2/2] selftests: Add a test mangling with uc_sigmask

2024-07-22 Thread Shuah Khan
On 7/15/24 05:49, Dev Jain wrote: On 6/30/24 20:48, Oleg Nesterov wrote: I see nothing wrong, but perhaps this test can be simplified? Feel free to ignore. Say, On 06/27, Dev Jain wrote: +void handler_usr(int signo, siginfo_t *info, void *uc) +{ +    int ret; + +    /* + * Break out of i

Re: [PATCH 1/2] selftests: x86: vdso_restorer: remove manual counting of pass/fail tests

2024-07-22 Thread Shuah Khan
On 7/21/24 10:37, Muhammad Usama Anjum wrote: On 7/21/24 9:24 PM, Muhammad Usama Anjum wrote: On 7/19/24 9:40 PM, Shuah Khan wrote: On 7/12/24 01:30, Muhammad Usama Anjum wrote: Use kselftest wrapper to mark tests pass/fail instead of manually counting. You care combining two changes in the

Re: [PATCH] selftests: ksft: Track skipped tests when finishing the test suite

2024-07-22 Thread Shuah Khan
On 7/22/24 09:43, Laura Nao wrote: Consider skipped tests in addition to passed tests when evaluating the overall result of the test suite in the finished() helper. Signed-off-by: Laura Nao --- tools/testing/selftests/kselftest/ksft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

Re: [PATCH] selftests: ksft: Track skipped tests when finishing the test suite

2024-07-22 Thread Shuah Khan
On 7/22/24 11:32, Shuah Khan wrote: On 7/22/24 09:43, Laura Nao wrote: Consider skipped tests in addition to passed tests when evaluating the overall result of the test suite in the finished() helper. Signed-off-by: Laura Nao ---   tools/testing/selftests/kselftest/ksft.py | 2 +-   1 file

Re: [PATCH v4 2/2] selftests: Add a test mangling with uc_sigmask

2024-07-23 Thread Shuah Khan
On 7/22/24 22:30, Dev Jain wrote: On 7/22/24 20:28, Shuah Khan wrote: On 7/15/24 05:49, Dev Jain wrote: On 6/30/24 20:48, Oleg Nesterov wrote: I see nothing wrong, but perhaps this test can be simplified? Feel free to ignore. Say, On 06/27, Dev Jain wrote: +void handler_usr(int signo

Re: [PATCH] selftests: ksft: Track skipped tests when finishing the test suite

2024-07-23 Thread Shuah Khan
On 7/22/24 09:43, Laura Nao wrote: Consider skipped tests in addition to passed tests when evaluating the overall result of the test suite in the finished() helper. Signed-off-by: Laura Nao --- tools/testing/selftests/kselftest/ksft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

Re: [PATCH v3] selftests:Fix printf format string in kselftest_harness.h

2024-07-24 Thread Shuah Khan
On 7/24/24 00:26, Zhu Jun wrote: '%u' in format string requires 'unsigned int' in __wait_for_test() but the argument type is 'signed int' that this problem was discovered by reading code.use macro WTERMSIG like those above usage to fix the wrong format specifier. Now the commit summary doesn't

Re: [PATCH] selftests: user: remove user suite

2024-07-25 Thread Shuah Khan
On 7/25/24 05:08, Muhammad Usama Anjum wrote: The user test suite has only one test, test_user_copy which loads test_user_copy module for testing. But test_user_copy module has already been converted to kunit (see fixes). Hence remove the entire suite. Fixes: cf6219ee889f ("usercopy: Convert tes

Re: [PATCH v2] selftests: lib: remove strscpy test

2024-07-25 Thread Shuah Khan
On 7/25/24 06:11, Muhammad Usama Anjum wrote: The strscpy test loads test_strscpy module for testing. But test_strscpy was converted to Kunit (see fixes). Hence remove strscpy. Fixes: 41eefc46a3a4 ("string: Convert strscpy() self-test to KUnit") Remove fixes tag - this isn't a fix and we don't

Re: [PATCH v4] tools/testing:Fix the wrong format specifier

2024-07-25 Thread Shuah Khan
On 7/24/24 20:34, Zhu Jun wrote: The format specifier in fprintf is "%u", that "%u" should use unsigned int type instead.the problem is discovered by reading code. Signed-off-by: Zhu Jun --- v1->v2: modify commit info add how to find the problem in the log v2->v3: Seems this

Re: [RFC PATCH 0/1] Add kselftest to detect boot event slowdowns

2024-07-25 Thread Shuah Khan
On 7/25/24 05:06, Laura Nao wrote: Add a new kselftest to detect and report slowdowns in key boot events. The test uses ftrace to track timings for specific boot events and compares these timestamps against reference values provided in YAML format. The test includes the following files: - `b

Re: [RFC PATCH 1/1] kselftests: Add test to detect boot event slowdowns

2024-07-25 Thread Shuah Khan
On 7/25/24 05:06, Laura Nao wrote: Introduce a new kselftest to identify slowdowns in key boot events. The test uses ftrace to track timings for specific boot events. The kprobe_timestamps_to_yaml.py script can be run once to generate a YAML file with the initial reference timestamps for these ev

Re: [PATCH v2] kselftest: cpufreq: Add RTC wakeup alarm

2024-07-25 Thread Shuah Khan
On 7/24/24 21:57, Viresh Kumar wrote: On 16-07-24, 00:56, Shreeya Patel wrote: Add RTC wakeup alarm for devices to resume after specific time interval. This improvement in the test will help in enabling this test in the CI systems and will eliminate the need of manual intervention for resuming b

Re: [PATCH] selftests: user: remove user suite

2024-07-26 Thread Shuah Khan
On 7/26/24 02:16, Muhammad Usama Anjum wrote: On 7/25/24 7:44 PM, Shuah Khan wrote: On 7/25/24 05:08, Muhammad Usama Anjum wrote: The user test suite has only one test, test_user_copy which loads test_user_copy module for testing. But test_user_copy module has already been converted to kunit

Re: [PATCH v5] tools/testing:Fix the wrong format specifier

2024-07-26 Thread Shuah Khan
On 7/25/24 20:32, Zhu Jun wrote: The format specifier in fprintf is "%u", that "%u" should use unsigned int type instead.the problem is discovered by reading code. Signed-off-by: Zhu Jun --- v1->v2: modify commit info add how to find the problem in the log v2->v3: Seems this

Re: [PATCH 3/3] selftests: lib: remove test_bitmap

2024-07-26 Thread Shuah Khan
On 7/26/24 05:06, Muhammad Usama Anjum wrote: Remove the test_bitmap as it has been converted to kunit test. Care to give some commit information on this change? This change will take the ability away to run bitmap tests during boot - as it will now be dependent on kunit Why are we making cha

Re: [PATCH 2/3] bitmap: Rename module

2024-07-26 Thread Shuah Khan
On 7/26/24 05:06, Muhammad Usama Anjum wrote: Rename module to bitmap_kunit and rename the configuration option compliant with kunit framework. Cc: k...@kernel.org Signed-off-by: Muhammad Usama Anjum --- MAINTAINERS | 2 +- lib/Kconfig.debug | 1

Re: [PATCH 0/3] bitmap: Convert test_bitmap to kunit test

2024-07-26 Thread Shuah Khan
On 7/26/24 05:06, Muhammad Usama Anjum wrote: In this series, test_bitmap is being converted to kunit test. Multiple patches will make the review process smooth. - Patch-1: Convert the tests in lib/test_bitmap.c to kunit - Patch-2: Rename the lib/test_bitmap.c to lib/bitmap_kunit.c and other

Re: Converting kselftest test modules to kunit

2024-07-26 Thread Shuah Khan
On 7/15/24 04:09, Muhammad Usama Anjum wrote: Hi Kees and All, There are several tests in kselftest subsystem which load modules to tests the internals of the kernel. Most of these test modules are just loaded by the kselftest, their status isn't read and reported to the user logs. Hence they do

Re: [PATCH 00/12] tools/nolibc: improve LLVM/clang support

2024-07-29 Thread Shuah Khan
ugh LLVM Reviewed-by: Shuah Khan thanks, -- Shuah

Re: [PATCH 00/12] tools/nolibc: improve LLVM/clang support

2024-07-29 Thread Shuah Khan
On 7/29/24 13:26, Shuah Khan wrote: On 7/28/24 04:09, Thomas Weißschuh wrote: The current support for LLVM and clang in nolibc and its testsuite is very limited. * Various architectures plain do not compile * The user *has* to specify "-Os" otherwise the program crashes * Cross-comp

Re: [PATCH] selftests: ksft: Track skipped tests when finishing the test suite

2024-07-29 Thread Shuah Khan
On 7/29/24 08:52, Laura Nao wrote: Hi Shuah, On 7/23/24 18:17, Shuah Khan wrote: On 7/22/24 09:43, Laura Nao wrote: Consider skipped tests in addition to passed tests when evaluating the overall result of the test suite in the finished() helper. I am finally with you now. Can you please

Re: [PATCH 0/3] bitmap: Convert test_bitmap to kunit test

2024-07-30 Thread Shuah Khan
On 7/29/24 02:15, Muhammad Usama Anjum wrote: On 7/27/24 11:10 PM, Yury Norov wrote: On Fri, Jul 26, 2024 at 01:26:48PM -0600, Shuah Khan wrote: On 7/26/24 05:06, Muhammad Usama Anjum wrote: In this series, test_bitmap is being converted to kunit test. Multiple patches will make the review

Re: [PATCH 0/3] bitmap: Convert test_bitmap to kunit test

2024-07-30 Thread Shuah Khan
On 7/29/24 02:29, Muhammad Usama Anjum wrote: On 7/27/24 12:26 AM, Shuah Khan wrote: On 7/26/24 05:06, Muhammad Usama Anjum wrote: In this series, test_bitmap is being converted to kunit test. Multiple patches will make the review process smooth. - Patch-1: Convert the tests in lib

Re: [PATCH 2/3] bitmap: Rename module

2024-07-30 Thread Shuah Khan
On 7/30/24 04:10, David Gow wrote: On Mon, 29 Jul 2024 at 22:09, Randy Dunlap wrote: On 7/29/24 1:07 AM, Muhammad Usama Anjum wrote: On 7/27/24 10:35 PM, Yury Norov wrote: On Fri, Jul 26, 2024 at 04:06:57PM +0500, Muhammad Usama Anjum wrote: Rename module to bitmap_kunit and rename the co

Re: [PATCH 2/3] bitmap: Rename module

2024-07-30 Thread Shuah Khan
On 7/30/24 09:55, Shuah Khan wrote: On 7/30/24 04:10, David Gow wrote: On Mon, 29 Jul 2024 at 22:09, Randy Dunlap wrote: On 7/29/24 1:07 AM, Muhammad Usama Anjum wrote: On 7/27/24 10:35 PM, Yury Norov wrote: On Fri, Jul 26, 2024 at 04:06:57PM +0500, Muhammad Usama Anjum wrote: Rename

Re: [PATCH 0/1] selftest: drivers: Add support its msi hwirq checking

2024-07-30 Thread Shuah Khan
On 5/29/24 19:27, Joseph Jang wrote: In order to validate ITS-MSI hwirq entry in the /proc/interrupts, we have created a shell script to check is there any duplicated ITS-MSI hwirq entry. Joseph Jang (1): selftest: drivers: Add support its msi hwirq checking tools/testing/selftests/drivers

Re: [PATCH] selftests: user: remove user suite

2024-07-30 Thread Shuah Khan
On 7/25/24 08:44, Shuah Khan wrote: On 7/25/24 05:08, Muhammad Usama Anjum wrote: The user test suite has only one test, test_user_copy which loads test_user_copy module for testing. But test_user_copy module has already been converted to kunit (see fixes). Hence remove the entire suite. Fixes

Re: [PATCH v2] selftests: lib: remove strscpy test

2024-07-30 Thread Shuah Khan
On 7/25/24 06:11, Muhammad Usama Anjum wrote: The strscpy test loads test_strscpy module for testing. But test_strscpy was converted to Kunit (see fixes). Hence remove strscpy. Fixes: 41eefc46a3a4 ("string: Convert strscpy() self-test to KUnit") Signed-off-by: Muhammad Usama Anjum --- Changes s

Re: Converting kselftest test modules to kunit

2024-07-30 Thread Shuah Khan
On 7/29/24 23:23, David Gow wrote: On Sat, 27 Jul 2024 at 03:35, Shuah Khan wrote: On 7/15/24 04:09, Muhammad Usama Anjum wrote: Hi Kees and All, There are several tests in kselftest subsystem which load modules to tests the internals of the kernel. Most of these test modules are just

Re: Converting kselftest test modules to kunit

2024-07-30 Thread Shuah Khan
On 7/29/24 01:55, Muhammad Usama Anjum wrote: On 7/27/24 12:35 AM, Shuah Khan wrote: On 7/15/24 04:09, Muhammad Usama Anjum wrote: Hi Kees and All, There are several tests in kselftest subsystem which load modules to tests the internals of the kernel. Most of these test modules are just

Re: [PATCH 0/3] bitmap: Convert test_bitmap to kunit test

2024-07-31 Thread Shuah Khan
On 7/30/24 21:06, David Gow wrote: On Tue, 30 Jul 2024 at 23:49, Shuah Khan wrote: On 7/29/24 02:29, Muhammad Usama Anjum wrote: On 7/27/24 12:26 AM, Shuah Khan wrote: On 7/26/24 05:06, Muhammad Usama Anjum wrote: In this series, test_bitmap is being converted to kunit test. Multiple

Re: [PATCH v2] selftests: openat2: don't print total number of tests and then skip

2024-07-31 Thread Shuah Khan
On 7/31/24 07:39, Muhammad Usama Anjum wrote: Don't print that 88 sub-tests are going to be executed, but then skip. This is against TAP compliance. Instead check pre-requisites first before printing total number of tests. Does TAP clearly mention this? Old non-tap compliant output: TAP v

Re: [PATCH] selftests/exec: Fix grammar in an error message.

2024-07-31 Thread Shuah Khan
On 7/23/24 22:21, Chang Yu wrote: Replace "not ... nor" in the error message with "neither ... nor". Signed-off-by: Chang Yu --- tools/testing/selftests/exec/execveat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/exec/execveat.c b/tools/testin

Re: [PATCH] selftests: tpm2: redirect python unittest logs to stdout

2024-07-31 Thread Shuah Khan
On 7/31/24 07:42, Muhammad Usama Anjum wrote: Reminder top post??? On 7/10/24 1:15 PM, Muhammad Usama Anjum wrote: The python unittest module writes all its output to stderr, even when the run is clean. Redirect its output logs to stdout. Cc: Jarkko Sakkinen Signed-off-by: Muhammad Usama

Re: [PATCH v2] selftests: ksft: Fix finished() helper exit code on skipped tests

2024-07-31 Thread Shuah Khan
On 7/31/24 07:05, Muhammad Usama Anjum wrote: On 7/30/24 3:29 PM, Laura Nao wrote: The Python finished() helper currently exits with KSFT_FAIL when there are only passed and skipped tests. Fix the logic to exit with KSFT_PASS instead, making it consistent with its C and bash counterparts (ksft_f

Re: [PATCH] selftests: user: remove user suite

2024-07-31 Thread Shuah Khan
On 7/30/24 23:13, Muhammad Usama Anjum wrote: On 7/31/24 7:33 AM, Kees Cook wrote: On July 30, 2024 3:36:11 PM PDT, Shuah Khan wrote: On 7/25/24 08:44, Shuah Khan wrote: On 7/25/24 05:08, Muhammad Usama Anjum wrote: The user test suite has only one test, test_user_copy which loads

Re: [PATCH v2] selftests: lib: remove strscpy test

2024-07-31 Thread Shuah Khan
On 7/31/24 02:32, Muhammad Usama Anjum wrote: On 7/31/24 3:37 AM, Shuah Khan wrote: On 7/25/24 06:11, Muhammad Usama Anjum wrote: The strscpy test loads test_strscpy module for testing. But test_strscpy was converted to Kunit (see fixes). Hence remove strscpy. Fixes: 41eefc46a3a4 ("s

Re: [PATCH] MAINTAINERS: Add selftests/x86 entry

2024-07-31 Thread Shuah Khan
On 7/31/24 07:42, Muhammad Usama Anjum wrote: Kind reminder On 7/2/24 3:17 PM, Muhammad Usama Anjum wrote: Kind reminder Top post ??? On 6/10/24 10:28 AM, Muhammad Usama Anjum wrote: There are no maintainers specified for tools/testing/selftests/x86. Shuah has mentioned [1] that the patch

Re: kselftest/next kselftest-lib: 1 runs, 1 regressions (v6.11-rc1-6-g38cde27f74d8)

2024-07-31 Thread Shuah Khan
On 7/31/24 16:21, kernelci.org bot wrote: kselftest/next kselftest-lib: 1 runs, 1 regressions (v6.11-rc1-6-g38cde27f74d8) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions ---

Re: [PATCH 0/2] tools/nolibc: add support for [v]sscanf()

2024-07-31 Thread Shuah Khan
On 7/31/24 12:32, Thomas Weißschuh wrote: The implementation is limited and only supports numeric arguments. It would help to add more details on why this is needed especially in the commit log. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (2): tools/nolibc: add support for [

Re: [PATCH 1/2] tools/nolibc: add support for [v]sscanf()

2024-07-31 Thread Shuah Khan
On 7/31/24 12:32, Thomas Weißschuh wrote: The implementation is limited and only supports numeric arguments. I would like to see more information in here. Why is this needed etc. etc. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/stdio.h | 93 +++

Re: [PATCH] selftests: ksft: Track skipped tests when finishing the test suite

2024-07-31 Thread Shuah Khan
On 7/30/24 04:35, Laura Nao wrote: On 7/29/24 22:06, Shuah Khan wrote: On 7/29/24 08:52, Laura Nao wrote: Hi Shuah, On 7/23/24 18:17, Shuah Khan wrote: On 7/22/24 09:43, Laura Nao wrote: Consider skipped tests in addition to passed tests when evaluating the overall result of the test suite

Re: [PATCH RFC] kselftest: devices: Add test to detect missing devices

2024-07-31 Thread Shuah Khan
On 7/24/24 15:40, Nícolas F. R. A. Prado wrote: Introduce a new test to identify regressions causing devices to go missing on the system. For each bus and class on the system the test checks the number of devices present against a reference file, which needs to have been generated by the program

Re: [PATCH v3] selftest: acct: Add selftest for the acct() syscall

2024-07-31 Thread Shuah Khan
On 7/23/24 04:28, Abdulrasaq Lawani wrote: The acct() system call enables or disables process accounting. If accounting is turned on, records for each terminating process are appended to a specified filename as it terminates. An argument of NULL causes accounting to be turned off. This patch wil

Re: [PATCH v2] selftests: openat2: don't print total number of tests and then skip

2024-08-01 Thread Shuah Khan
On 8/1/24 02:42, Muhammad Usama Anjum wrote: On 7/31/24 9:57 PM, Shuah Khan wrote: On 7/31/24 07:39, Muhammad Usama Anjum wrote: Don't print that 88 sub-tests are going to be executed, but then skip. This is against TAP compliance. Instead check pre-requisites first before printing

Re: [PATCH v2] selftests: openat2: don't print total number of tests and then skip

2024-08-01 Thread Shuah Khan
On 8/1/24 10:27, Shuah Khan wrote: On 8/1/24 02:42, Muhammad Usama Anjum wrote: On 7/31/24 9:57 PM, Shuah Khan wrote: On 7/31/24 07:39, Muhammad Usama Anjum wrote: Don't print that 88 sub-tests are going to be executed, but then skip. This is against TAP compliance. Instead chec

Re: [PATCH v4] selftest: acct: Add selftest for the acct() syscall

2024-08-01 Thread Shuah Khan
On 8/1/24 03:29, Abdulrasaq Lawani wrote: The acct() system call enables or disables process accounting. If accounting is turned on, records for each terminating process are appended to a specified filename as it terminates. An argument of NULL causes accounting to be turned off. This patch will

Re: [PATCH] MAINTAINERS: Add selftests/x86 entry

2024-08-01 Thread Shuah Khan
On 7/31/24 15:23, Peter Zijlstra wrote: On Wed, Jul 31, 2024 at 12:14:16PM -0600, Shuah Khan wrote: On 7/31/24 07:42, Muhammad Usama Anjum wrote: Kind reminder On 7/2/24 3:17 PM, Muhammad Usama Anjum wrote: Kind reminder Top post ??? On 6/10/24 10:28 AM, Muhammad Usama Anjum wrote

Re: [PATCH] MAINTAINERS: Add selftests/x86 entry

2024-08-01 Thread Shuah Khan
On 8/1/24 13:27, Shuah Khan wrote: On 7/31/24 15:23, Peter Zijlstra wrote: On Wed, Jul 31, 2024 at 12:14:16PM -0600, Shuah Khan wrote: On 7/31/24 07:42, Muhammad Usama Anjum wrote: Kind reminder On 7/2/24 3:17 PM, Muhammad Usama Anjum wrote: Kind reminder Top post ??? On 6/10/24 10:28

Re: [PATCH RFC] kselftest: devices: Add test to detect missing devices

2024-08-01 Thread Shuah Khan
On 8/1/24 13:15, Nícolas F. R. A. Prado wrote: On Wed, Jul 31, 2024 at 05:19:45PM -0600, Shuah Khan wrote: On 7/24/24 15:40, Nícolas F. R. A. Prado wrote: Introduce a new test to identify regressions causing devices to go missing on the system. For each bus and class on the system the test

Re: [PATCH RFC] kselftest: devices: Add test to detect missing devices

2024-08-01 Thread Shuah Khan
On 8/1/24 15:03, Nícolas F. R. A. Prado wrote: On Thu, Aug 01, 2024 at 02:13:05PM -0600, Shuah Khan wrote: On 8/1/24 13:15, Nícolas F. R. A. Prado wrote: On Wed, Jul 31, 2024 at 05:19:45PM -0600, Shuah Khan wrote: On 7/24/24 15:40, Nícolas F. R. A. Prado wrote: Introduce a new test to

Re: [PATCH] selftests: tpm2: redirect python unittest logs to stdout

2024-08-01 Thread Shuah Khan
On 8/1/24 16:24, Jarkko Sakkinen wrote: On Wed Jul 31, 2024 at 8:45 PM EEST, Shuah Khan wrote: On 7/31/24 07:42, Muhammad Usama Anjum wrote: Reminder top post??? On 7/10/24 1:15 PM, Muhammad Usama Anjum wrote: The python unittest module writes all its output to stderr, even when the run

Re: [PATCH 0/2] selftests/nolibc: run-user improvements

2024-08-02 Thread Shuah Khan
On 11/9/23 11:04, Konstantin Ryabitsev wrote: On Thu, Nov 09, 2023 at 06:44:44PM +0100, Thomas Weißschuh wrote: On Wed, Sep 15, 2077 at 02:13:51AM +0200, Thomas Weißschuh wrote:     I'm curious how this happened, especially since this was sent with b4. My system time was me

Re: [PATCH 1/2] tools/nolibc: add support for [v]sscanf()

2024-08-02 Thread Shuah Khan
On 8/2/24 09:48, Thomas Weißschuh wrote: On 2024-07-31 17:01:09+, Shuah Khan wrote: On 7/31/24 12:32, Thomas Weißschuh wrote: The implementation is limited and only supports numeric arguments. I would like to see more information in here. Why is this needed etc. etc. Ack. Signed-off

Re: [PATCH v2] selftests: openat2: don't print total number of tests and then skip

2024-08-02 Thread Shuah Khan
On 8/1/24 23:38, Muhammad Usama Anjum wrote: On 8/1/24 9:27 PM, Shuah Khan wrote: On 8/1/24 02:42, Muhammad Usama Anjum wrote: On 7/31/24 9:57 PM, Shuah Khan wrote: On 7/31/24 07:39, Muhammad Usama Anjum wrote: Don't print that 88 sub-tests are going to be executed, but then skip. Th

Re: [PATCH 1/3] selftests: timers: Fix posix_timers ksft_print_msg warning

2024-04-11 Thread Shuah Khan
I started seeing the following warning building with an older gcc: posix_timers.c:250:2: warning: format not a string literal and no format arguments [-Wformat-security] 250 | ksft_print_msg(errmsg); | ^~ Fix this up by changing it to ksft_print_msg("%s", errmsg)

Re: [PATCH] selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior

2024-04-11 Thread Shuah Khan
. So fix our use of shifting negative values in the valid-adjtimex test case to use multiply by (1<<16) to avoid this. The patch also aligns the values a bit to make it look nicer. Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Anna-Maria Behnsen Cc: Frederic Weisbecker Cc: Shuah Kh

Re: [PATCH] selftests/clone3: Check that the child exited cleanly

2024-04-11 Thread Shuah Khan
On 4/9/24 14:39, Mark Brown wrote: When the child exits during the clone3() selftest we use WEXITSTATUS() to get the exit status from the process without first checking WIFEXITED() to see if the result will be valid. This can lead to incorrect results, for example if the child exits due to signal

Re: [PATCH] selftests/clone3: Correct log message for waitpid() failures

2024-04-11 Thread Shuah Khan
On 4/9/24 14:40, Mark Brown wrote: When logging an error from calling waitpid() on the child we print a misleading error message saying that the error we report was returned by the chilld. Fix this to say the error is from waitpid(). Signed-off-by: Mark Brown --- tools/testing/selftests/clone

Re: [PATCH] selftests/clone3: Fix compiler warning

2024-04-11 Thread Shuah Khan
‘long unsigned int’} [-Wformat=] Reported-by: Shuah Khan Signed-off-by: Mark Brown --- tools/testing/selftests/clone3/clone3_set_tid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/clone3/clone3_set_tid.c b/tools/testing/selftests/clone3/clone3_set_

Re: [PATCH] kselftest: Mark functions that unconditionally call exit() as __noreturn

2024-04-11 Thread Shuah Khan
uch as main(), so I did not change the return type of these functions from 'int' to 'void' to minimize the necessary changes for a backport (it is an existing issue anyways). I see there is another instance of this problem that will need to be addressed in -next, introduced by

Re: [PATCH 1/3] selftests: timers: Fix posix_timers ksft_print_msg warning

2024-04-11 Thread Shuah Khan
On 4/11/24 14:53, John Stultz wrote: On Thu, Apr 11, 2024 at 1:45 PM Shuah Khan wrote: On 4/10/24 17:26, John Stultz wrote: After commit 6d029c25b71f ("selftests/timers/posix_timers: Tried to apply this for linux-kselftest next with Nathan's patch. I can't find this commit i

[GIT PULL] Kselftest fixes update for Linux 6.9-rc5

2024-04-15 Thread Shuah Khan
Hi Linus, Please pull the following kselftest fixes update for Linux 6.9-rc5. This kselftest fixes update for Linux 6.9-rc5 consists of a fix to kselftest harness to prevent infinite loop triggered in an assert in FIXTURE_TEARDOWN and a fix to a problem seen in being able to stop subsystem-enabl

Re: [PATCH] selftests: Mark ksft_exit_fail_perror() as __noreturn

2024-04-16 Thread Shuah Khan
On 4/15/24 09:41, Nathan Chancellor wrote: On Sun, Apr 14, 2024 at 11:26:53AM +0500, Muhammad Usama Anjum wrote: Let the compilers (clang) know that this function would just call exit() and would never return. It is needed to avoid false positive static analysis errors. All similar functions cal

Re: [PATCH 0/2] selftests: Make sh helper and power supply test POSIX-compliant

2024-04-24 Thread Shuah Khan
On 4/15/24 09:32, Nícolas F. R. A. Prado wrote: The patches in this series make the ktap sh helper and the power_supply selftest POSIX-compliant. Tested with bash, dash and busybox ash. Signed-off-by: Nícolas F. R. A. Prado --- Nícolas F. R. A. Prado (2): selftests: ktap_helpers: Make it

Re: [PATCH] selftests: Make ksft_exit functions return void instead of int

2024-04-24 Thread Shuah Khan
On 4/17/24 09:37, Nathan Chancellor wrote: Commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn") marked functions that call exit() as __noreturn but it did not change the return type of these functions from 'void' to 'int' like it should have

<    1   2   3   4   5   >