From: Laura Nao <laura.nao@collabora.com>
To: skhan@linuxfoundation.org
Cc: kernel@collabora.com, laura.nao@collabora.com,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
shuah@kernel.org
Subject: Re: [PATCH 2/2] selftests/watchdog: convert the test output to KTAP format
Date: Wed, 3 Jul 2024 16:49:29 +0200 [thread overview]
Message-ID: <20240703144929.89966-1-laura.nao@collabora.com> (raw)
In-Reply-To: <8facf491-3c4c-4efb-8a14-f34011ffe011@linuxfoundation.org>
On 6/27/24 20:41, Shuah Khan wrote:
> On 5/6/24 05:13, Laura Nao wrote:
>> Modify the script output to conform to the KTAP format standard. The
>
> What is script here?
>
I was referring to the watchdog-test.c file addressed in this patch. I
understand this could be confusing, I will rephrase the commit message
to avoid ambiguity.
>> number of tests executed is determined by the script arguments, and
>> options such as -c, -f, -h, -i, and -p do not impact the total test
>> count.
>>
>> No functional change is intended.
>
> There are functional changes - keep_alive() coupled with changes
> tailored by a script that isn't in the kernel code which isn't
> ideal.
>
> Why not inlcude the script in this patch series to make it part
> of the kernel?
>
Right, I'll remove the 'no functional change is intended' sentence from
the commit message.
Apart from the patches already in this series, no other script is
required to run the test in a CI environment.
>>
>> Signed-off-by: Laura Nao <laura.nao@collabora.com>
>> ---
>> .../selftests/watchdog/watchdog-test.c | 154 ++++++++++--------
>> 1 file changed, 89 insertions(+), 65 deletions(-)
>>
>> diff --git a/tools/testing/selftests/watchdog/watchdog-test.c
>> b/tools/testing/selftests/watchdog/watchdog-test.c
>> index 786cc5a26206..90f32de9e194 100644
>> --- a/tools/testing/selftests/watchdog/watchdog-test.c
>> +++ b/tools/testing/selftests/watchdog/watchdog-test.c
>> @@ -22,6 +22,7 @@
>> #include <sys/ioctl.h>
>> #include <linux/types.h>
>> #include <linux/watchdog.h>
>> +#include "../kselftest.h"
>> #define DEFAULT_PING_RATE 1
>> #define DEFAULT_PING_COUNT 5
>> @@ -29,6 +30,7 @@
>> int fd;
>> const char v = 'V';
>> static const char sopts[] = "bdehp:c:st:Tn:NLf:i";
>> +static const char topts[] = "bdeLn:Nst:T";
>> static const struct option lopts[] = {
>> {"bootstatus", no_argument, NULL, 'b'},
>> {"disable", no_argument, NULL, 'd'},
>> @@ -52,7 +54,7 @@ static const struct option lopts[] = {
>> * the PC Watchdog card to reset its internal timer so it doesn't
>> trigger
>> * a computer reset.
>> */
>> -static void keep_alive(void)
>> +static int keep_alive(void)
>> {
>> int dummy;
>> int ret;
>> @@ -60,6 +62,8 @@ static void keep_alive(void)
>> ret = ioctl(fd, WDIOC_KEEPALIVE, &dummy);
>> if (!ret)
>> printf(".");
>> +
>> + return ret;
>> }
>
> Are these changes driven by the script that isn't in the kernel code?
> I don't want to see changes to keep_alive() bevator.
>
These changes are not driven by any external script; the aim of this
patch is just to conform the output to KTAP for easier parsing of the
results in CI environments.
Returning ret from keep_alive() allows to track the result for
the last WDIOC_KEEPALIVE ioctl and report it to the user through
ksft_test_result, analogously to other ioctls tested in this
same file.
Thanks,
Laura
next prev parent reply other threads:[~2024-07-03 14:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-06 11:13 [PATCH 0/2] Modify the watchdog selftest for execution with kselftest runner Laura Nao
2024-05-06 11:13 ` [PATCH 1/2] selftests/watchdog: limit ping loop and allow configuring the number of pings Laura Nao
2024-06-27 18:48 ` Shuah Khan
2024-07-03 14:48 ` Laura Nao
2024-07-03 23:10 ` Shuah Khan
2024-05-06 11:13 ` [PATCH 2/2] selftests/watchdog: convert the test output to KTAP format Laura Nao
2024-06-27 18:41 ` Shuah Khan
2024-07-03 14:49 ` Laura Nao [this message]
2024-06-06 9:57 ` [PATCH 0/2] Modify the watchdog selftest for execution with Laura Nao
2024-06-06 23:03 ` Shuah Khan
2024-06-07 9:53 ` Laura Nao
2024-06-07 21:07 ` Shuah Khan
2024-06-18 13:40 ` Laura Nao
2024-06-21 21:08 ` Shuah Khan
2024-06-24 15:00 ` Laura Nao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240703144929.89966-1-laura.nao@collabora.com \
--to=laura.nao@collabora.com \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox