mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jain, Ayush" <ayushjai@amd.com>
To: Steven Rostedt <rostedt@goodmis.org>, Ayush Jain <Ayush.jain3@amd.com>
Cc: warthog9@eaglescrag.net, linux-kernel@vger.kernel.org,
	srikanth.aithal@amd.com, kalpana.shetty@amd.com
Subject: Re: [PATCH v2] ktest: Fix Test Failures Due to Missing LOG_FILE Directories
Date: Thu, 6 Mar 2025 08:29:38 +0530	[thread overview]
Message-ID: <faadd6ad-3b85-4ad3-8d17-acb5e0991a18@amd.com> (raw)
In-Reply-To: <20250305190159.7c590242@gandalf.local.home>

Hello steven,

On 3/6/2025 5:31 AM, Steven Rostedt wrote:
> On Wed, 5 Mar 2025 04:19:13 +0000
> Ayush Jain <Ayush.jain3@amd.com> wrote:
>
>> diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
>> index 8c8da966c641..13b97e6b8459 100755
>> --- a/tools/testing/ktest/ktest.pl
>> +++ b/tools/testing/ktest/ktest.pl
>> @@ -4303,6 +4303,14 @@ if (defined($opt{"LOG_FILE"})) {
>>      if ($opt{"CLEAR_LOG"}) {
>>  	unlink $opt{"LOG_FILE"};
>>      }
>> +
>> +	if (! -e $opt{"LOG_FILE"} && $opt{"LOG_FILE"} =~ m,^(.*/),) {
>> +	my $dir = $1;
>> +	if (! -d $dir) {
>> +	mkpath($dir) or die "Failed to create directories '$dir': $!";
>> +	print "\nThe log directory $dir did not exist, so it was created.\n";
>> +	}
>> +	}
> Hmm, somehow the indentation is messed up here. Should be:

Sure, will update it in next version

> diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
> index 8c8da966c641..13b97e6b8459 100755
> --- a/tools/testing/ktest/ktest.pl
> +++ b/tools/testing/ktest/ktest.pl
> @@ -4303,6 +4303,14 @@ if (defined($opt{"LOG_FILE"})) {
>      if ($opt{"CLEAR_LOG"}) {
>  	unlink $opt{"LOG_FILE"};
>      }
> +
> +    if (! -e $opt{"LOG_FILE"} && $opt{"LOG_FILE"} =~ m,^(.*/),) {
> +	my $dir = $1;
> +	if (! -d $dir) {
> +	    mkpath($dir) or die "Failed to create directories '$dir': $!";
> +	    print "\nThe log directory $dir did not exist, so it was created.\n";
> +	}
> +    }
>
> -- Steve

Regards,

Ayush Jain


  reply	other threads:[~2025-03-06  2:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05  4:19 Ayush Jain
2025-03-06  0:01 ` Steven Rostedt
2025-03-06  2:59   ` Jain, Ayush [this message]
2025-03-06  4:49     ` Jain, Ayush
2025-03-06 15:12       ` Steven Rostedt
2025-03-07  4:12         ` Jain, Ayush

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=faadd6ad-3b85-4ad3-8d17-acb5e0991a18@amd.com \
    --to=ayushjai@amd.com \
    --cc=Ayush.jain3@amd.com \
    --cc=kalpana.shetty@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=srikanth.aithal@amd.com \
    --cc=warthog9@eaglescrag.net \
    /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

all inboxes | Powered by JetHome®