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 conform to TAP as the number of tests depend on the available options at build time. The kselftest_harness makes the
How does converting to kselftest_harness help with available options ay build time? Can you explain?
I am not seeing any value in converting this test to the harness? I want to see a better justification.
Before: ./vdso_test_clock_getres clock_id: CLOCK_REALTIME [PASS] clock_id: CLOCK_BOOTTIME [PASS] clock_id: CLOCK_TAI [PASS] clock_id: CLOCK_REALTIME_COARSE [PASS] clock_id: CLOCK_MONOTONIC [PASS] clock_id: CLOCK_MONOTONIC_RAW [PASS] clock_id: CLOCK_MONOTONIC_COARSE [PASS]
Here is the output of the test before this patch. The test output test names and if they are passed or failed. It doesn't output information related to error when it occurs. I wanted to convert it to standard format by using kselftest.h where we can get the error related information as well. But as the number of tests depend on how many of CLOCK_BOOTTIME, CLOCK_TAI etc are defined, static counting is difficult. Test harness is best suited for this. Output:
./vdso_test_clock_getres
The reason I don't want to take this patch is if you run the test using the recommended method:
make -C tools/testing/selftests/vDSO/ run_tests you will get the TAP output because lib.mk runtests framework takes care of this.
or
make kselftest TARGETS=vDSO will do the same.
Please don't send TAP conversions for individual runs. You will start seeing duplicate TAP output which will make it unreadable.
Run the test using make -C or make kselftest TARGETS before investing time to concert to TAP. I am not going to take TAP conversions patches if make -C or make kselftest TARGETS shows TAP.
thanks, -- Shuah