[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7bda5c5c-3f2e-496c-b5a0-6f7d9120dacb@amd.com>
Date: Thu, 6 Mar 2025 10:19:04 +0530
From: "Jain, Ayush" <ayushjai@....com>
To: Steven Rostedt <rostedt@...dmis.org>, Ayush Jain <Ayush.jain3@....com>
Cc: warthog9@...lescrag.net, linux-kernel@...r.kernel.org,
srikanth.aithal@....com, kalpana.shetty@....com
Subject: Re: [PATCH v2] ktest: Fix Test Failures Due to Missing LOG_FILE
Directories
Hello steven,
On 3/6/2025 8:29 AM, Jain, Ayush wrote:
> 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@....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
Just to be clear on my end, you mean 4 space wide tab for indentation here.
- Ayush
>> 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
>
Powered by blists - more mailing lists