new: Improvements to new script
v3 cover new: Improvements to new script
This series adds a couple of improvements to the "new" script.
Patch-1/2 - Adds an optional name/email id parameter prompt to the new script while creating
a new test file using the "new" file.
Patch 2/2 - Replace "status=0;exit 0" with _exit 0 in the skeleton file in "new".
[v2] -> v3
- Modified the commit message to remove "email-id" from it (patch 1).
[v1] -> [v2]
- Added RB of Zorro in patch 2 of [v1]
- Modified the prompt message for entering the author name (patch 1 of [v1])
- Removed patch 3 (Suggested by Zorro) of [v1]
[v1] https://lore.kernel.org/all/[email protected]/
[v2] https://lore.kernel.org/all/[email protected]/
Nirjhar Roy (IBM) (2):
new: Add a new parameter (name) in the "new" script
new: Replace "status=0; exit 0" with _exit 0
new | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
--
2.34.1
PATCH v3 1/2 new: Add a new parameter (name) in the "new" script
This patch another optional interactive prompt to enter the author name for each new test file that is created using the "new" file.
The sample output looks like something like the following:
./new selftest
Next test id is 007
Append a name to the ID? Test name will be 007-$name. y,[n]:
Creating test file '007'
Add to group(s) [auto] (separate by space, ? for list): selftest quick Enter <author_name>: Nirjhar Roy <[email protected]> Creating skeletal script for you to edit ...
done.
--- new | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
new +4 -1
@@ -136,6 +136,9 @@ else check_groups "${new_groups[@]}" || exit 1 fi +read -p "Enter <author_name>: " -r +author_name="${REPLY:=YOUR NAME HERE}" + echo -n "Creating skeletal script for you to edit ..." year=`date +%Y`
@@ -143,7 +146,7 @@ year=`date +%Y` cat <<End-of-File >$tdir/$id #! /bin/bash # SPDX-License-Identifier: GPL-2.0 -# Copyright (c) $year YOUR NAME HERE. All Rights Reserved. +# Copyright (c) $year $author_name. All Rights Reserved. # # FS QA Test $id #
Signature · 1 line
2.34.1
PATCH v3 2/2 new: Replace "status=0; exit 0" with _exit 0
In reply to Nirjhar Roy (IBM)We should now start using _exit 0 for every new test that we add.
--- new | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
new +1 -2
@@ -176,8 +176,7 @@ exit #echo "If failure, check \$seqres.full (this) and \$seqres.full.ok (reference)" # success, all done -status=0 -exit +_exit 0 End-of-File sleep 2 # latency to read messages to this point
Signature · 1 line
2.34.1
Re: [PATCH v3 1/2] new: Add a new parameter (name) in the "new" script
In reply to Nirjhar Roy (IBM)Quoted 35 lines · Nirjhar Roy (IBM)
This patch another optional interactive prompt to enter the author name for each new test file that is created using the "new" file.
The sample output looks like something like the following:
./new selftest
Next test id is 007
Append a name to the ID? Test name will be 007-$name. y,[n]:
Creating test file '007'
Add to group(s) [auto] (separate by space, ? for list): selftest quick Enter <author_name>: Nirjhar Roy <[email protected]> Creating skeletal script for you to edit ...
done.Signed-off-by Nirjhar Roy (IBM) <[email protected]>--- new | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)new +3
-0@@ -136,6 +136,9 @@ else check_groups "${new_groups[@]}" || exit 1 fi +read -p "Enter <author_name>: " -r +author_name="${REPLY:=YOUR NAME HERE}" + echo -n "Creating skeletal script for you to edit ..." year=`date +%Y`
new year=`date +%Y` · line 149
Quoted 5 lines
new +1
-1@@ -143,7 +146,7 @@ year=`date +%Y` cat <<End-of-File >$tdir/$id #! /bin/bash # SPDX-License-Identifier: GPL-2.0 -# Copyright (c) $year YOUR NAME HERE. All Rights Reserved. +# Copyright (c) $year $author_name. All Rights Reserved.
Dave thought we shouldn't use "author_name" at here:
https://lore.kernel.org/fstests/[email protected]/
If you don't mind, I'll merge PATCH 2/2 this week. If you still hope to have the 1/2, please consider the review point from Dave.
Thanks,
Zorro
Quoted 7 lines
new +0
-0# # FS QA Test $id #Signature · 1 line
2.34.1
Re: [PATCH v3 1/2] new: Add a new parameter (name) in the "new" script
Quoted 45 lines · Zorro Lang
Quoted 35 lines · Nirjhar Roy (IBM)
This patch another optional interactive prompt to enter the author name for each new test file that is created using the "new" file.
The sample output looks like something like the following:
./new selftest
Next test id is 007
Append a name to the ID? Test name will be 007-$name. y,[n]:
Creating test file '007'
Add to group(s) [auto] (separate by space, ? for list): selftest quick Enter <author_name>: Nirjhar Roy <[email protected]> Creating skeletal script for you to edit ...
done.Signed-off-by Nirjhar Roy (IBM) <[email protected]>--- new | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)new +3
-0@@ -136,6 +136,9 @@ else check_groups "${new_groups[@]}" || exit 1 fi +read -p "Enter <author_name>: " -r +author_name="${REPLY:=YOUR NAME HERE}" + echo -n "Creating skeletal script for you to edit ..." year=`date +%Y`new year=`date +%Y` · line 149
Quoted 5 lines
new +1
-1@@ -143,7 +146,7 @@ year=`date +%Y` cat <<End-of-File >$tdir/$id #! /bin/bash # SPDX-License-Identifier: GPL-2.0 -# Copyright (c) $year YOUR NAME HERE. All Rights Reserved. +# Copyright (c) $year $author_name. All Rights Reserved.Dave thought we shouldn't use "
author_name" at here:
https://lore.kernel.org/fstests/[email protected]/
Quoted 2 lines
If you don't mind, I'll merge PATCH 2/2 this week. If you still hope to have the 1/2, please consider the review point from Dave.
Oh, sorry, you've sent a V4... Please ignore this one, I'm going to review your V4.
Quoted 11 lines
Thanks,
ZorroQuoted 7 lines
new +0
-0# # FS QA Test $id #Signature · 1 line
2.34.1
Re: [PATCH v3 1/2] new: Add a new parameter (name) in the "new" script
Quoted 45 lines · Zorro Lang
Quoted 44 lines · Zorro Lang
Quoted 35 lines · Nirjhar Roy (IBM)
This patch another optional interactive prompt to enter the author name for each new test file that is created using the "new" file.
The sample output looks like something like the following:
./new selftest
Next test id is 007
Append a name to the ID? Test name will be 007-$name. y,[n]:
Creating test file '007'
Add to group(s) [auto] (separate by space, ? for list): selftest quick Enter <author_name>: Nirjhar Roy <[email protected]> Creating skeletal script for you to edit ...
done.Signed-off-by Nirjhar Roy (IBM) <[email protected]>--- new | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)new +3
-0@@ -136,6 +136,9 @@ else check_groups "${new_groups[@]}" || exit 1 fi +read -p "Enter <author_name>: " -r +author_name="${REPLY:=YOUR NAME HERE}" + echo -n "Creating skeletal script for you to edit ..." year=`date +%Y`new year=`date +%Y` · line 149
Quoted 5 lines
new +1
-1@@ -143,7 +146,7 @@ year=`date +%Y` cat <<End-of-File >$tdir/$id #! /bin/bash # SPDX-License-Identifier: GPL-2.0 -# Copyright (c) $year YOUR NAME HERE. All Rights Reserved. +# Copyright (c) $year $author_name. All Rights Reserved.Dave thought we shouldn't use "
author_name" at here:
https://lore.kernel.org/fstests/[email protected]/
Quoted 4 lines
Quoted 2 lines
If you don't mind, I'll merge PATCH 2/2 this week. If you still hope to have the 1/2, please consider the review point from Dave.
Oh, sorry, you've sent a V4... Please ignore this one, I'm going to review your V4.
Yes, I have sent the v4 after addressing the review comments.
--NR
Quoted 11 lines
Quoted 11 lines
Thanks,
ZorroQuoted 7 lines
new +0
-0# # FS QA Test $id #Signature · 1 line
2.34.1
Signature · 3 lines
Nirjhar Roy Linux Kernel Developer IBM, Bangalore