Skip to contentSkip to conversation

common/config: Correctly ignore {TEST|SCRATCH}_DEV for tmpfs

PATCH In review André Almeida 2 participants 2 messages Aug 21, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/config: Correctly ignore {TEST|SCRATCH}_DEV for tmpfs

As per commit 264e5358e2c2 ("tmpfs: don't require {TEST|SCRATCH}_DEV"), tmpfs doesn't need TEST or SCRATCH devices due to being a RAM-based filesystem.

Fix the check by comparing the content of the variable TEST_DEV, instead of comparing with the string TEST_DEV. Same for SCRATCH_DEV.

Fixes 264e5358e2c2 ("tmpfs: don't require {TEST|SCRATCH}_DEV")
---
 common/config | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
common/config +2 -2
index 22740c0a..307f93fb 100644
@@ -829,10 +829,10 @@ get_next_config() {
 	fi
 
 	if [ "$FSTYP" == "tmpfs" ]; then
-		if [ -z "TEST_DEV" ]; then
+		if [ -z "$TEST_DEV" ]; then
 			export TEST_DEV=tmpfs_test
 		fi
-		if [ -z "SCRATCH_DEV" ]; then
+		if [ -z "$SCRATCH_DEV" ]; then
 			export TEST_DEV=tmpfs_scratch
 		fi
 	fi
Signature · 1 line
2.46.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · André Almeida

As per commit 264e5358e2c2 ("tmpfs: don't require {TEST|SCRATCH}_DEV"), tmpfs doesn't need TEST or SCRATCH devices due to being a RAM-based filesystem.

Fix the check by comparing the content of the variable TEST_DEV, instead of comparing with the string TEST_DEV. Same for SCRATCH_DEV.

Fixes 264e5358e2c2 ("tmpfs: don't require {TEST|SCRATCH}_DEV")

Looks good,

--D

Quoted 25 lines
---
 common/config | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
common/config +2 -2
index 22740c0a..307f93fb 100644
@@ -829,10 +829,10 @@ get_next_config() {
 	fi
 
 	if [ "$FSTYP" == "tmpfs" ]; then
-		if [ -z "TEST_DEV" ]; then
+		if [ -z "$TEST_DEV" ]; then
 			export TEST_DEV=tmpfs_test
 		fi
-		if [ -z "SCRATCH_DEV" ]; then
+		if [ -z "$SCRATCH_DEV" ]; then
 			export TEST_DEV=tmpfs_scratch
 		fi
 	fi
Signature · 1 line
2.46.0