linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] new: Improvements to new script
@ 2025-05-22  5:41 Nirjhar Roy (IBM)
  2025-05-22  5:41 ` [PATCH v4 1/2] new: Add a new parameter (copyright-owner) in the "new" script Nirjhar Roy (IBM)
  2025-05-22  5:41 ` [PATCH v4 2/2] new: Replace "status=0; exit 0" with _exit 0 Nirjhar Roy (IBM)
  0 siblings, 2 replies; 4+ messages in thread
From: Nirjhar Roy (IBM) @ 2025-05-22  5:41 UTC (permalink / raw)
  To: fstests
  Cc: linux-ext4, linux-xfs, ritesh.list, ojaswin, djwong, zlang, david,
	nirjhar.roy.lists

This series adds a couple of improvements to the "new" script.
Patch-1/2 - Adds an optional copyright-owner 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".

[v3] -> v4
 - Modified the prompt message to "Enter <copyright owner>: " (Suggested by Dave)

[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/cover.1747123422.git.nirjhar.roy.lists@gmail.com/
[v2] https://lore.kernel.org/all/cover.1747306604.git.nirjhar.roy.lists@gmail.com/
[v3] https://lore.kernel.org/all/cover.1747635261.git.nirjhar.roy.lists@gmail.com/

Nirjhar Roy (IBM) (2):
  new: Add a new parameter (copyright-owner) 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v4 1/2] new: Add a new parameter (copyright-owner) in the "new" script
  2025-05-22  5:41 [PATCH v4 0/2] new: Improvements to new script Nirjhar Roy (IBM)
@ 2025-05-22  5:41 ` Nirjhar Roy (IBM)
  2025-05-23 15:11   ` Zorro Lang
  2025-05-22  5:41 ` [PATCH v4 2/2] new: Replace "status=0; exit 0" with _exit 0 Nirjhar Roy (IBM)
  1 sibling, 1 reply; 4+ messages in thread
From: Nirjhar Roy (IBM) @ 2025-05-22  5:41 UTC (permalink / raw)
  To: fstests
  Cc: linux-ext4, linux-xfs, ritesh.list, ojaswin, djwong, zlang, david,
	nirjhar.roy.lists

This patch another optional interactive prompt to enter the
copyright-owner 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 <copyright owner>: IBM Corporation
Creating skeletal script for you to edit ...
 done.

Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com>
---
 new | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/new b/new
index 6b50ffed..a7ad7135 100755
--- a/new
+++ b/new
@@ -136,6 +136,9 @@ else
 	check_groups "${new_groups[@]}" || exit 1
 fi
 
+read -p "Enter <copyright owner>: " -r
+copyright_owner="${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 $copyright_owner.  All Rights Reserved.
 #
 # FS QA Test $id
 #
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v4 2/2] new: Replace "status=0; exit 0" with _exit 0
  2025-05-22  5:41 [PATCH v4 0/2] new: Improvements to new script Nirjhar Roy (IBM)
  2025-05-22  5:41 ` [PATCH v4 1/2] new: Add a new parameter (copyright-owner) in the "new" script Nirjhar Roy (IBM)
@ 2025-05-22  5:41 ` Nirjhar Roy (IBM)
  1 sibling, 0 replies; 4+ messages in thread
From: Nirjhar Roy (IBM) @ 2025-05-22  5:41 UTC (permalink / raw)
  To: fstests
  Cc: linux-ext4, linux-xfs, ritesh.list, ojaswin, djwong, zlang, david,
	nirjhar.roy.lists

We should now start using _exit 0 for every new test
that we add.

Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
---
 new | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/new b/new
index a7ad7135..60ace812 100755
--- a/new
+++ b/new
@@ -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
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 1/2] new: Add a new parameter (copyright-owner) in the "new" script
  2025-05-22  5:41 ` [PATCH v4 1/2] new: Add a new parameter (copyright-owner) in the "new" script Nirjhar Roy (IBM)
@ 2025-05-23 15:11   ` Zorro Lang
  0 siblings, 0 replies; 4+ messages in thread
From: Zorro Lang @ 2025-05-23 15:11 UTC (permalink / raw)
  To: Nirjhar Roy (IBM)
  Cc: fstests, linux-ext4, linux-xfs, ritesh.list, ojaswin, djwong,
	zlang, david

On Thu, May 22, 2025 at 05:41:34AM +0000, Nirjhar Roy (IBM) wrote:
> This patch another optional interactive prompt to enter the
> copyright-owner 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 <copyright owner>: IBM Corporation
> Creating skeletal script for you to edit ...
>  done.
> 
> Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com>
> ---

Reviewed-by: Zorro Lang <zlang@redhat.com>

>  new | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/new b/new
> index 6b50ffed..a7ad7135 100755
> --- a/new
> +++ b/new
> @@ -136,6 +136,9 @@ else
>  	check_groups "${new_groups[@]}" || exit 1
>  fi
>  
> +read -p "Enter <copyright owner>: " -r
> +copyright_owner="${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 $copyright_owner.  All Rights Reserved.
>  #
>  # FS QA Test $id
>  #
> -- 
> 2.34.1
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-23 15:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22  5:41 [PATCH v4 0/2] new: Improvements to new script Nirjhar Roy (IBM)
2025-05-22  5:41 ` [PATCH v4 1/2] new: Add a new parameter (copyright-owner) in the "new" script Nirjhar Roy (IBM)
2025-05-23 15:11   ` Zorro Lang
2025-05-22  5:41 ` [PATCH v4 2/2] new: Replace "status=0; exit 0" with _exit 0 Nirjhar Roy (IBM)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).