From: "Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com>
To: Shuah Khan <skhan@linuxfoundation.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>
Cc: "shuah@kernel.org" <shuah@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH for-next v3] selftests/zram: gitignore output file
Date: Wed, 4 Dec 2024 02:11:07 +0000 [thread overview]
Message-ID: <79c762c6-77fc-4784-a86e-42be7977d86d@fujitsu.com> (raw)
In-Reply-To: <95484cb4-b2fa-49fe-889c-03ad64e89c91@linuxfoundation.org>
On 04/12/2024 09:21, Shuah Khan wrote:
> On 11/22/24 00:49, Li Zhijian wrote:
>> After `make run_tests`, the git status complains:
>> Untracked files:
>> (use "git add <file>..." to include in what will be committed)
>> zram/err.log
>>
>> This file will be cleaned up when execute 'make clean'
>>
>> Cc: Shuah Khan <shuah@kernel.org>
>> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
>> ---
>> Hello,
>> Cover letter is here.
>>
>> This patch set aims to make 'git status' clear after 'make' and 'make
>> run_tests' for kselftests.
>> ---
>> V3:
>> Add Copyright description
>> V2:
>> split as a separate patch from a small one [0]
>> [0] https://lore.kernel.org/linux-kselftest/20241015010817.453539-1-lizhijian@fujitsu.com/
>>
>> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
>> ---
>> tools/testing/selftests/zram/.gitignore | 2 ++
>> 1 file changed, 2 insertions(+)
>> create mode 100644 tools/testing/selftests/zram/.gitignore
>>
>> diff --git a/tools/testing/selftests/zram/.gitignore b/tools/testing/selftests/zram/.gitignore
>> new file mode 100644
>> index 000000000000..088cd9bad87a
>> --- /dev/null
>> +++ b/tools/testing/selftests/zram/.gitignore
>> @@ -0,0 +1,2 @@
>> +# SPDX-License-Identifier: GPL-2.0-only
>> +err.log
>
> This doesn't sound right. err.log is a generated file
> when the test runs.
IIUC, generally, there are 2 ways to handle files generated by the tests
- 1. clean/remove it if it's a temporary file before the test exits.
- 2. add it to the gitignore if it's the test result or log that needs to be referred to later.
In this zram case, it seems it intended to log and print the error
only if some commands get something wrong.
And this file have been already tracked in the Makefile
tools/testing/selftests/zram/Makefile:EXTRA_CLEAN := err.log
Given that I also think it's fine to add it to gitignore.
Thanks
Zhijian
>
> thanks,
> -- Shuah
>
next prev parent reply other threads:[~2024-12-04 2:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 7:49 Li Zhijian
2024-12-04 1:21 ` Shuah Khan
2024-12-04 2:11 ` Zhijian Li (Fujitsu) [this message]
2024-12-10 17:09 ` Shuah Khan
2024-12-11 0:50 ` Zhijian Li (Fujitsu)
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=79c762c6-77fc-4784-a86e-42be7977d86d@fujitsu.com \
--to=lizhijian@fujitsu.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
all inboxes | Powered by JetHome®