All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: tests: remove duplicated helper
@ 2022-08-02  3:11 Chung-Chiang Cheng
  2022-08-02 15:01 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Chung-Chiang Cheng @ 2022-08-02  3:11 UTC (permalink / raw)
  To: dsterba, linux-btrfs; +Cc: Chung-Chiang Cheng

The helper `check_min_kernel_version` is duplicated and can be removed.

Signed-off-by: Chung-Chiang Cheng <cccheng@synology.com>
---
 tests/common | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/tests/common b/tests/common
index 69f5aae0f6ac..368ca654d5c2 100644
--- a/tests/common
+++ b/tests/common
@@ -688,28 +688,6 @@ _get_subvolid()
 
 }
 
-# compare running kernel version to the given parameter, return success
-# if running is newer than requested (let caller decide if to fail or skip)
-# $1: minimum version of running kernel in major.minor format (eg. 4.19)
-check_min_kernel_version()
-{
-	local unamemajor
-	local unameminor
-	local argmajor
-	local argminor
-
-	# 4.19.1-1-default
-	uname=$(uname -r)
-	# 4.19.1
-	uname=${uname%%-*}
-	IFS=. read unamemajor unameminor tmp <<< "$uname"
-	IFS=. read argmajor argminor tmp <<< "$1"
-	# "compare versions: ${unamemajor}.${unameminor} ? ${argmajor}.${argminor}"
-	[ "$unamemajor" -ge "$argmajor" ] || return 1
-	[ "$unameminor" -ge "$argminor" ] || return 1
-	return 0
-}
-
 # how many files to create.
 DATASET_SIZE=50
 
-- 
2.34.1


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

* Re: [PATCH] btrfs-progs: tests: remove duplicated helper
  2022-08-02  3:11 [PATCH] btrfs-progs: tests: remove duplicated helper Chung-Chiang Cheng
@ 2022-08-02 15:01 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2022-08-02 15:01 UTC (permalink / raw)
  To: Chung-Chiang Cheng; +Cc: dsterba, linux-btrfs

On Tue, Aug 02, 2022 at 11:11:10AM +0800, Chung-Chiang Cheng wrote:
> The helper `check_min_kernel_version` is duplicated and can be removed.
> 
> Signed-off-by: Chung-Chiang Cheng <cccheng@synology.com>

Added to devel, thanks.

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

end of thread, other threads:[~2022-08-02 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02  3:11 [PATCH] btrfs-progs: tests: remove duplicated helper Chung-Chiang Cheng
2022-08-02 15:01 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.