linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] selftests/zram: Remove obsolete max_comp_streams interface
@ 2021-12-15  9:56 Yang Xu
  2021-12-15  9:56 ` [PATCH 2/3] selftests/zram01.sh: Fix compression ratio calculation Yang Xu
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Yang Xu @ 2021-12-15  9:56 UTC (permalink / raw)
  To: linux-kselftest, shuah
  Cc: linux-kernel, naresh.kamboju, aleksei.kodanev, Yang Xu

Since kernel commit 43209ea2d17a ("zram: remove max_comp_streams internals"), zram has
switched to per-cpu streams. Even kernel still keep this interface for some reasons, but
writing to max_comp_stream doesn't take any effect. So remove it.

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 tools/testing/selftests/zram/zram01.sh   |  4 ----
 tools/testing/selftests/zram/zram02.sh   |  4 ----
 tools/testing/selftests/zram/zram_lib.sh | 22 ----------------------
 3 files changed, 30 deletions(-)

diff --git a/tools/testing/selftests/zram/zram01.sh b/tools/testing/selftests/zram/zram01.sh
index 114863d9fb87..28583e4ae546 100755
--- a/tools/testing/selftests/zram/zram01.sh
+++ b/tools/testing/selftests/zram/zram01.sh
@@ -15,9 +15,6 @@ ERR_CODE=0
 
 # Test will create the following number of zram devices:
 dev_num=1
-# This is a list of parameters for zram devices.
-# Number of items must be equal to 'dev_num' parameter.
-zram_max_streams="2"
 
 # The zram sysfs node 'disksize' value can be either in bytes,
 # or you can use mem suffixes. But in some old kernels, mem
@@ -72,7 +69,6 @@ zram_fill_fs()
 
 check_prereqs
 zram_load
-zram_max_streams
 zram_compress_alg
 zram_set_disksizes
 zram_set_memlimit
diff --git a/tools/testing/selftests/zram/zram02.sh b/tools/testing/selftests/zram/zram02.sh
index e83b404807c0..d664974a1317 100755
--- a/tools/testing/selftests/zram/zram02.sh
+++ b/tools/testing/selftests/zram/zram02.sh
@@ -14,9 +14,6 @@ ERR_CODE=0
 
 # Test will create the following number of zram devices:
 dev_num=1
-# This is a list of parameters for zram devices.
-# Number of items must be equal to 'dev_num' parameter.
-zram_max_streams="2"
 
 # The zram sysfs node 'disksize' value can be either in bytes,
 # or you can use mem suffixes. But in some old kernels, mem
@@ -30,7 +27,6 @@ zram_mem_limits="1M"
 
 check_prereqs
 zram_load
-zram_max_streams
 zram_set_disksizes
 zram_set_memlimit
 zram_makeswap
diff --git a/tools/testing/selftests/zram/zram_lib.sh b/tools/testing/selftests/zram/zram_lib.sh
index 6f872f266fd1..0c49f9d1d563 100755
--- a/tools/testing/selftests/zram/zram_lib.sh
+++ b/tools/testing/selftests/zram/zram_lib.sh
@@ -82,28 +82,6 @@ zram_load()
 	fi
 }
 
-zram_max_streams()
-{
-	echo "set max_comp_streams to zram device(s)"
-
-	local i=0
-	for max_s in $zram_max_streams; do
-		local sys_path="/sys/block/zram${i}/max_comp_streams"
-		echo $max_s > $sys_path || \
-			echo "FAIL failed to set '$max_s' to $sys_path"
-		sleep 1
-		local max_streams=$(cat $sys_path)
-
-		[ "$max_s" -ne "$max_streams" ] && \
-			echo "FAIL can't set max_streams '$max_s', get $max_stream"
-
-		i=$(($i + 1))
-		echo "$sys_path = '$max_streams' ($i/$dev_num)"
-	done
-
-	echo "zram max streams: OK"
-}
-
 zram_compress_alg()
 {
 	echo "test that we can set compression algorithm"
-- 
2.23.0


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

end of thread, other threads:[~2022-01-28  1:17 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15  9:56 [PATCH 1/3] selftests/zram: Remove obsolete max_comp_streams interface Yang Xu
2021-12-15  9:56 ` [PATCH 2/3] selftests/zram01.sh: Fix compression ratio calculation Yang Xu
2022-01-25 20:37   ` Shuah Khan
2022-01-26  6:08     ` xuyang2018.jy
2021-12-15  9:56 ` [PATCH 3/3] selftests/zram: Adapt the situation that /dev/zram0 is being used Yang Xu
2022-01-25 20:40   ` Shuah Khan
2022-01-13  6:26 ` [PATCH 1/3] selftests/zram: Remove obsolete max_comp_streams interface xuyang2018.jy
2022-01-25 20:52   ` Shuah Khan
2022-01-25 20:33 ` Shuah Khan
2022-01-26  5:19   ` xuyang2018.jy
2022-01-26  7:13     ` Petr Vorel
2022-01-26 17:35       ` Shuah Khan
2022-01-26 18:24         ` Petr Vorel
2022-01-26 18:37           ` Shuah Khan
2022-01-27  9:11         ` [PATCH v2 1/3] selftests/zram: Skip max_comp_streams interface on newer kernel Yang Xu
2022-01-27  9:11           ` [PATCH v2 2/3] selftests/zram01.sh: Fix compression ratio calculation Yang Xu
2022-01-27  9:11           ` [PATCH v2 3/3] selftests/zram: Adapt the situation that /dev/zram0 is being used Yang Xu
2022-01-27 18:05           ` [PATCH v2 1/3] selftests/zram: Skip max_comp_streams interface on newer kernel Shuah Khan
2022-01-28  1:17             ` xuyang2018.jy

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