[PATCH v2] selftests: tpm2: create a dedicated .gitignore

Khaled Elnaggar posted 1 patch 11 months ago
There is a newer version of this series
tools/testing/selftests/.gitignore      | 1 -
tools/testing/selftests/tpm2/.gitignore | 4 ++++
2 files changed, 4 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/tpm2/.gitignore
[PATCH v2] selftests: tpm2: create a dedicated .gitignore
Posted by Khaled Elnaggar 11 months ago
Create a dedicated .gitignore for the tpm2 tests.
Move tpm2 related entries from parent directory's .gitignore.

Signed-off-by: Khaled Elnaggar <khaledelnaggarlinux@gmail.com>
---
Hello, as per Shuah's review, instead of adding another entry at
selftests/.gitignore, I created the dedicated .gitignore for
tpm2 tests.

Aside: CCing linux-kernel-mentees as I am working on the mentorship
application tasks.

Thanks

Changes in v2:
- Created a dedicated .gitignore
---

 tools/testing/selftests/.gitignore      | 1 -
 tools/testing/selftests/tpm2/.gitignore | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/tpm2/.gitignore

diff --git a/tools/testing/selftests/.gitignore b/tools/testing/selftests/.gitignore
index cb24124ac5b9..674aaa02e396 100644
--- a/tools/testing/selftests/.gitignore
+++ b/tools/testing/selftests/.gitignore
@@ -4,7 +4,6 @@ gpiogpio-hammer
 gpioinclude/
 gpiolsgpio
 kselftest_install/
-tpm2/SpaceTest.log

 # Python bytecode and cache
 __pycache__/
diff --git a/tools/testing/selftests/tpm2/.gitignore b/tools/testing/selftests/tpm2/.gitignore
new file mode 100644
index 000000000000..910bbdbb336a
--- /dev/null
+++ b/tools/testing/selftests/tpm2/.gitignore
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+AsyncTest.log
+SpaceTest.log
+
--
2.45.2
Re: [PATCH v2] selftests: tpm2: create a dedicated .gitignore
Posted by Jarkko Sakkinen 11 months ago
On Wed Jan 22, 2025 at 8:50 AM EET, Khaled Elnaggar wrote:
> Create a dedicated .gitignore for the tpm2 tests.
> Move tpm2 related entries from parent directory's .gitignore.
>
> Signed-off-by: Khaled Elnaggar <khaledelnaggarlinux@gmail.com>
> ---

Why?

BR, Jarkko
Re: [PATCH v2] selftests: tpm2: create a dedicated .gitignore
Posted by Khaled Elnaggar 10 months, 4 weeks ago
On 1/23/25 11:47 AM, Jarkko Sakkinen wrote: 
> Why?

Sorry I should have included v1 in the thread but I am still
new to the LKML process.

Basically tpm2 selftests have 2 leftover log files after running
(namely AsyncTest.log and SpaceTest.log). Only SpaceTest.log
is in selftests/.gitignore while AsyncTest.log appears untracked
with git status.

To solve this, one could either append AsyncTest.log to 
selftests/.gitignore or create a dedicated .gitignore for 
the tpm2 subsystem tests. The 2nd approach is better in order
to not clutter selftests/.gitignore and keep tpm2 isolated.

Shuah actually suggested the 2nd approach in reply to v1.

Would you like me to resubmit this patch with a clearer message?
Or include v1 in the thread?

Thanks
Khaled
Re: [PATCH v2] selftests: tpm2: create a dedicated .gitignore
Posted by Jarkko Sakkinen 10 months, 4 weeks ago
On Fri Jan 24, 2025 at 4:35 PM EET, Khaled Elnaggar wrote:
> On 1/23/25 11:47 AM, Jarkko Sakkinen wrote: 
> > Why?
>
> Sorry I should have included v1 in the thread but I am still
> new to the LKML process.

No worries, relax, it was just  a one wonder question :-)

>
> Basically tpm2 selftests have 2 leftover log files after running
> (namely AsyncTest.log and SpaceTest.log). Only SpaceTest.log
> is in selftests/.gitignore while AsyncTest.log appears untracked
> with git status.
>
> To solve this, one could either append AsyncTest.log to 
> selftests/.gitignore or create a dedicated .gitignore for 
> the tpm2 subsystem tests. The 2nd approach is better in order
> to not clutter selftests/.gitignore and keep tpm2 isolated.
>
> Shuah actually suggested the 2nd approach in reply to v1.
>
> Would you like me to resubmit this patch with a clearer message?
> Or include v1 in the thread?

Yep, please do, your rationale makes sense, just write it down
to the commit message, and that's all I'm asking for.

>
> Thanks
> Khaled

BR, Jarkko
Re: [PATCH v2] selftests: tpm2: create a dedicated .gitignore
Posted by Jarkko Sakkinen 10 months, 4 weeks ago
On Fri Jan 24, 2025 at 6:37 PM EET, Jarkko Sakkinen wrote:
> On Fri Jan 24, 2025 at 4:35 PM EET, Khaled Elnaggar wrote:
> > On 1/23/25 11:47 AM, Jarkko Sakkinen wrote: 
> > > Why?
> >
> > Sorry I should have included v1 in the thread but I am still
> > new to the LKML process.
>
> No worries, relax, it was just  a one wonder question :-)

Shortest ever commit message tutorial:

1. Problem
2. Motivation
3. Solution with explanation how it will map on addressing the problem.

Do this for every possible commit and you will get it right 99%
of time. I can admit that even today I don't always get this myself
fully right but I try my best ;-) That does not mean you could not
do better than me.

And generally, depending on subsystem tho, people usually feel more
confortable with "imperative form" rather than "science paper" form.

Example:

1. Imperative: "Check the pointer for nullness."
2. Sciency: "We must check the the pointer for nullness."

BR, Jarkko
Re: [PATCH v2] selftests: tpm2: create a dedicated .gitignore
Posted by Khaled Elnaggar 10 months, 4 weeks ago
On 1/24/25 6:42 PM, Jarkko Sakkinen wrote:

> Shortest ever commit message tutorial:
> 
> 1. Problem
> 2. Motivation
> 3. Solution with explanation how it will map on addressing the problem.
> 
> Do this for every possible commit and you will get it right 99%
> of time. I can admit that even today I don't always get this myself
> fully right but I try my best ;-) That does not mean you could not
> do better than me.
> 
> And generally, depending on subsystem tho, people usually feel more
> confortable with "imperative form" rather than "science paper" form.
> 
> BR, Jarkko

Ah great, thank you for the review the tutorial.
Hopefully, I will do better in v3 :)

Many thanks,
Khaled
Re: [PATCH v2] selftests: tpm2: create a dedicated .gitignore
Posted by Jarkko Sakkinen 10 months, 4 weeks ago
On Sat Jan 25, 2025 at 10:58 AM EET, Khaled Elnaggar wrote:
> On 1/24/25 6:42 PM, Jarkko Sakkinen wrote:
>
> > Shortest ever commit message tutorial:
> > 
> > 1. Problem
> > 2. Motivation
> > 3. Solution with explanation how it will map on addressing the problem.
> > 
> > Do this for every possible commit and you will get it right 99%
> > of time. I can admit that even today I don't always get this myself
> > fully right but I try my best ;-) That does not mean you could not
> > do better than me.
> > 
> > And generally, depending on subsystem tho, people usually feel more
> > confortable with "imperative form" rather than "science paper" form.
> > 
> > BR, Jarkko
>
> Ah great, thank you for the review the tutorial.
> Hopefully, I will do better in v3 :)

Ya, sorry if I sounded rude. My "why" is "actually why", not "WTF why"
;-)

> Many thanks,
> Khaled

BR, Jarkko
Re: [PATCH v2] selftests: tpm2: create a dedicated .gitignore
Posted by Khaled Elnaggar 10 months, 3 weeks ago
On 1/25/25 9:20 PM, Jarkko Sakkinen wrote:

> Ya, sorry if I sounded rude. My "why" is "actually why", not "WTF why"
> ;-)

Oh no you absolutely were not. I actually dropped you guys into the 
middle of the change without providing context and was nervous afterwards
as it is my 2nd time using LKML and trying to get everything right. 

You've been a gentleman asking for clarification, providing guidance,
and showing compassion. It's a welcoming experience.

> BR, Jarkko

Sincerely,
Khaled
[PATCH v3] selftests: tpm2: create a dedicated .gitignore
Posted by Khaled Elnaggar 10 months, 3 weeks ago
The tpm2 selftests produce two logs: SpaceTest.log and
AsyncTest.log. Only SpaceTest.log was listed in selftests/.gitignore,
while AsyncTest.log remained untracked.

This change creates a dedicated .gitignore in the tpm2/ directory to
manage these entries, keeping tpm2-specific patterns isolated from
parent .gitignore.

Signed-off-by: Khaled Elnaggar <khaledelnaggarlinux@gmail.com>
---
Hello, please let me if you have comments on anything.

Thanks,
Khaled

Changes:
v3: Improve commit message
v2: Created a dedicated .gitignore
v1: https://lore.kernel.org/linux-kselftest/20250116085929.313677-1-eng.khaled.elnaggar@gmail.com
---
 tools/testing/selftests/.gitignore      | 1 -
 tools/testing/selftests/tpm2/.gitignore | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/tpm2/.gitignore

diff --git a/tools/testing/selftests/.gitignore b/tools/testing/selftests/.gitignore
index cb24124ac5b9..674aaa02e396 100644
--- a/tools/testing/selftests/.gitignore
+++ b/tools/testing/selftests/.gitignore
@@ -4,7 +4,6 @@ gpiogpio-hammer
 gpioinclude/
 gpiolsgpio
 kselftest_install/
-tpm2/SpaceTest.log

 # Python bytecode and cache
 __pycache__/
diff --git a/tools/testing/selftests/tpm2/.gitignore b/tools/testing/selftests/tpm2/.gitignore
new file mode 100644
index 000000000000..917fe0065467
--- /dev/null
+++ b/tools/testing/selftests/tpm2/.gitignore
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+tpm2/AsyncTest.log
+tpm2/SpaceTest.log
+
--
2.45.2
Re: [PATCH v3] selftests: tpm2: create a dedicated .gitignore
Posted by Jarkko Sakkinen 10 months, 3 weeks ago
On Sun Jan 26, 2025 at 4:22 PM EET, Khaled Elnaggar wrote:
> The tpm2 selftests produce two logs: SpaceTest.log and
> AsyncTest.log. Only SpaceTest.log was listed in selftests/.gitignore,
> while AsyncTest.log remained untracked.
>
> This change creates a dedicated .gitignore in the tpm2/ directory to
> manage these entries, keeping tpm2-specific patterns isolated from
> parent .gitignore.
>
> Signed-off-by: Khaled Elnaggar <khaledelnaggarlinux@gmail.com>
> ---
> Hello, please let me if you have comments on anything.
>
> Thanks,
> Khaled
>
> Changes:
> v3: Improve commit message
> v2: Created a dedicated .gitignore
> v1: https://lore.kernel.org/linux-kselftest/20250116085929.313677-1-eng.khaled.elnaggar@gmail.com
> ---
>  tools/testing/selftests/.gitignore      | 1 -
>  tools/testing/selftests/tpm2/.gitignore | 4 ++++
>  2 files changed, 4 insertions(+), 1 deletion(-)
>  create mode 100644 tools/testing/selftests/tpm2/.gitignore
>
> diff --git a/tools/testing/selftests/.gitignore b/tools/testing/selftests/.gitignore
> index cb24124ac5b9..674aaa02e396 100644
> --- a/tools/testing/selftests/.gitignore
> +++ b/tools/testing/selftests/.gitignore
> @@ -4,7 +4,6 @@ gpiogpio-hammer
>  gpioinclude/
>  gpiolsgpio
>  kselftest_install/
> -tpm2/SpaceTest.log
>
>  # Python bytecode and cache
>  __pycache__/
> diff --git a/tools/testing/selftests/tpm2/.gitignore b/tools/testing/selftests/tpm2/.gitignore
> new file mode 100644
> index 000000000000..917fe0065467
> --- /dev/null
> +++ b/tools/testing/selftests/tpm2/.gitignore
> @@ -0,0 +1,4 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +tpm2/AsyncTest.log
> +tpm2/SpaceTest.log
> +
> --
> 2.45.2


Acked-by: Jarkko Sakkinen <jarkko@kernel.org>

BR, Jarkko
[PATCH v4] selftests: tpm2: create a dedicated .gitignore
Posted by Khaled Elnaggar 10 months, 3 weeks ago
The tpm2 selftests produce two logs: SpaceTest.log and
AsyncTest.log. Only SpaceTest.log was listed in selftests/.gitignore,
while AsyncTest.log remained untracked.

This change creates a dedicated .gitignore in the tpm2/ directory to
manage these entries, keeping tpm2-specific patterns isolated from
parent .gitignore.

Signed-off-by: Khaled Elnaggar <khaledelnaggarlinux@gmail.com>
---
Oh no, I realized there was a mistake in v3. I wrote tpm2/*.log in the
tpm2/.gitignore file, which is unnecessary since tpm2/.gitignore is
already scoped to the tpm2 directory.
All entries are automatically relative to the tpm2 directory.

I’ve fixed it by removing the redundant tpm2/ prefix from the entries
in tpm2/.gitignore.

Apologies for not catching this earlier, I tested it after submitting
the patch because I was confident v2 was correct, but the issue was
introduced in v3.

Thanks,
Khaled

Changes:
v4: Correct the mistake in v3
v3: Improve commit message (and introduce a mistake)
v2: Created a dedicated .gitignore
v1: https://lore.kernel.org/linux-kselftest/20250116085929.313677-1-eng.khaled.elnaggar@gmail.com
---
 tools/testing/selftests/.gitignore      | 1 -
 tools/testing/selftests/tpm2/.gitignore | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/tpm2/.gitignore

diff --git a/tools/testing/selftests/.gitignore b/tools/testing/selftests/.gitignore
index cb24124ac5b9..674aaa02e396 100644
--- a/tools/testing/selftests/.gitignore
+++ b/tools/testing/selftests/.gitignore
@@ -4,7 +4,6 @@ gpiogpio-hammer
 gpioinclude/
 gpiolsgpio
 kselftest_install/
-tpm2/SpaceTest.log

 # Python bytecode and cache
 __pycache__/
diff --git a/tools/testing/selftests/tpm2/.gitignore b/tools/testing/selftests/tpm2/.gitignore
new file mode 100644
index 000000000000..910bbdbb336a
--- /dev/null
+++ b/tools/testing/selftests/tpm2/.gitignore
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+AsyncTest.log
+SpaceTest.log
+
--
2.45.2

Re: [PATCH v4] selftests: tpm2: create a dedicated .gitignore
Posted by Jarkko Sakkinen 10 months, 3 weeks ago
On Sun Jan 26, 2025 at 9:51 PM EET, Khaled Elnaggar wrote:
> The tpm2 selftests produce two logs: SpaceTest.log and
> AsyncTest.log. Only SpaceTest.log was listed in selftests/.gitignore,
> while AsyncTest.log remained untracked.
>
> This change creates a dedicated .gitignore in the tpm2/ directory to
> manage these entries, keeping tpm2-specific patterns isolated from
> parent .gitignore.
>
> Signed-off-by: Khaled Elnaggar <khaledelnaggarlinux@gmail.com>
> ---
> Oh no, I realized there was a mistake in v3. I wrote tpm2/*.log in the
> tpm2/.gitignore file, which is unnecessary since tpm2/.gitignore is
> already scoped to the tpm2 directory.
> All entries are automatically relative to the tpm2 directory.
>
> I’ve fixed it by removing the redundant tpm2/ prefix from the entries
> in tpm2/.gitignore.
>
> Apologies for not catching this earlier, I tested it after submitting
> the patch because I was confident v2 was correct, but the issue was
> introduced in v3.
>
> Thanks,
> Khaled
>
> Changes:
> v4: Correct the mistake in v3
> v3: Improve commit message (and introduce a mistake)
> v2: Created a dedicated .gitignore
> v1: https://lore.kernel.org/linux-kselftest/20250116085929.313677-1-eng.khaled.elnaggar@gmail.com
> ---
>  tools/testing/selftests/.gitignore      | 1 -
>  tools/testing/selftests/tpm2/.gitignore | 4 ++++
>  2 files changed, 4 insertions(+), 1 deletion(-)
>  create mode 100644 tools/testing/selftests/tpm2/.gitignore
>
> diff --git a/tools/testing/selftests/.gitignore b/tools/testing/selftests/.gitignore
> index cb24124ac5b9..674aaa02e396 100644
> --- a/tools/testing/selftests/.gitignore
> +++ b/tools/testing/selftests/.gitignore
> @@ -4,7 +4,6 @@ gpiogpio-hammer
>  gpioinclude/
>  gpiolsgpio
>  kselftest_install/
> -tpm2/SpaceTest.log
>
>  # Python bytecode and cache
>  __pycache__/
> diff --git a/tools/testing/selftests/tpm2/.gitignore b/tools/testing/selftests/tpm2/.gitignore
> new file mode 100644
> index 000000000000..910bbdbb336a
> --- /dev/null
> +++ b/tools/testing/selftests/tpm2/.gitignore
> @@ -0,0 +1,4 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +AsyncTest.log
> +SpaceTest.log
> +
> --
> 2.45.2

Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

BR, Jarkko