Skip to contentSkip to conversation

selftests: tpm2: create a dedicated .gitignore

PATCH Superseded Khaled Elnaggar 2 participants 12 messages Jan 22, 2025 – Jan 27, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 selftests: tpm2: create a dedicated .gitignore

Create a dedicated .gitignore for the tpm2 tests. Move tpm2 related entries from parent directory's .gitignore.

---
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
tools/testing/selftests/.gitignore +0 -1
index cb24124ac5b9..674aaa02e396 100644
@@ -4,7 +4,6 @@ gpiogpio-hammer
 gpioinclude/
 gpiolsgpio
 kselftest_install/
-tpm2/SpaceTest.log
 
 # Python bytecode and cache
 __pycache__/
tools/testing/selftests/tpm2/.gitignore new file +4 -0
new file mode 100644
index 000000000000..910bbdbb336a
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+AsyncTest.log
+SpaceTest.log
+

--
2.45.2

#2 lore raw
Quoted 1 line · Jarkko Sakkinen

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

maintainer
#3 lore raw
Quoted 5 lines · Khaled Elnaggar
Quoted 1 line · Jarkko Sakkinen

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 :-)

Quoted 11 lines

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.

Quoted 4 lines

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.

Quoted 3 lines

Thanks
Khaled

BR, Jarkko

maintainer
#4 lore raw
Quoted 8 lines · Jarkko Sakkinen
Quoted 5 lines · Khaled Elnaggar
Quoted 1 line · Jarkko Sakkinen

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

#5 lore raw
Quoted 11 lines · Jarkko Sakkinen

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.

Quoted 4 lines

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

maintainer
#6 lore raw
Quoted 13 lines · Khaled Elnaggar
Quoted 11 lines · Jarkko Sakkinen

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.

Quoted 7 lines
Quoted 4 lines

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" ;-)

Quoted 2 lines

Many thanks,
Khaled

BR, Jarkko

#7 lore raw
Quoted 2 lines · Jarkko Sakkinen

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.

Quoted 1 line

BR, Jarkko

Sincerely,
Khaled

#8 lore raw

PATCH v3 1/1 selftests: tpm2: create a dedicated .gitignore

In reply to Khaled Elnaggar

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.

---
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/[email protected]

---
 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
tools/testing/selftests/.gitignore +0 -1
index cb24124ac5b9..674aaa02e396 100644
@@ -4,7 +4,6 @@ gpiogpio-hammer
 gpioinclude/
 gpiolsgpio
 kselftest_install/
-tpm2/SpaceTest.log
 
 # Python bytecode and cache
 __pycache__/
tools/testing/selftests/tpm2/.gitignore new file +4 -0
new file mode 100644
index 000000000000..917fe0065467
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+tpm2/AsyncTest.log
+tpm2/SpaceTest.log
+

--
2.45.2

maintainer Acked-by on v3 1/1
#9 lore raw
Quoted 48 lines · Khaled Elnaggar

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.

---
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/[email protected]

---
 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
tools/testing/selftests/.gitignore +0 -1
index cb24124ac5b9..674aaa02e396 100644
@@ -4,7 +4,6 @@ gpiogpio-hammer
 gpioinclude/
 gpiolsgpio
 kselftest_install/
-tpm2/SpaceTest.log
 
 # Python bytecode and cache
 __pycache__/
tools/testing/selftests/tpm2/.gitignore new file +4 -1
new file mode 100644
index 000000000000..917fe0065467
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+tpm2/AsyncTest.log
+tpm2/SpaceTest.log
+
--
Quoted 1 line

2.45.2

BR, Jarkko

#10 lore raw

PATCH v4 1/1 selftests: tpm2: create a dedicated .gitignore

In reply to Khaled Elnaggar

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.

---
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/[email protected]

---
 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
tools/testing/selftests/.gitignore +0 -1
index cb24124ac5b9..674aaa02e396 100644
@@ -4,7 +4,6 @@ gpiogpio-hammer
 gpioinclude/
 gpiolsgpio
 kselftest_install/
-tpm2/SpaceTest.log
 
 # Python bytecode and cache
 __pycache__/
tools/testing/selftests/tpm2/.gitignore new file +4 -0
new file mode 100644
index 000000000000..910bbdbb336a
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+AsyncTest.log
+SpaceTest.log
+

--
2.45.2

maintainer Reviewed-by on v4 1/1
#11 lore raw
Quoted 59 lines · Khaled Elnaggar

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.

---
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/[email protected]

---
 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
tools/testing/selftests/.gitignore +0 -1
index cb24124ac5b9..674aaa02e396 100644
@@ -4,7 +4,6 @@ gpiogpio-hammer
 gpioinclude/
 gpiolsgpio
 kselftest_install/
-tpm2/SpaceTest.log
 
 # Python bytecode and cache
 __pycache__/
tools/testing/selftests/tpm2/.gitignore new file +4 -1
new file mode 100644
index 000000000000..910bbdbb336a
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+AsyncTest.log
+SpaceTest.log
+
--
Quoted 1 line

2.45.2

BR, Jarkko