From 37d54e58144a17ab8d4b9dea59f25a3193afe43d Mon Sep 17 00:00:00 2001 From: Erez_Zadok Date: Thu, 12 Jul 2007 00:41:22 -0400 Subject: [PATCH] support squashfs mounts (tested, working) --- README | 2 +- brm.conf | 2 +- default.conf | 2 +- scaffold | 12 ++++++++++-- thor.conf | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README b/README index 75409e6..9b41a6e 100644 --- a/README +++ b/README @@ -93,7 +93,7 @@ Tested with ramfs and tmpfs. Compressed File System Tests ---------------------------- -Tested cramfs. +Tested cramfs and squashfs. The cramfs configuration by default, uses tmpfs as the leftmost branch, because this is a common user configuration scenario. diff --git a/brm.conf b/brm.conf index 7222a5c..392fcd3 100644 --- a/brm.conf +++ b/brm.conf @@ -57,7 +57,7 @@ case ${MYFS} in # cramfs is special: only thek rightmost filesystem uses it but the cramfs # will be generated *inside* run-tests, because this is a read-only file # system and each test has a different configuration. - cramfs ) + cramfs | squashfs ) SPECIAL_FS=${MYFS} FS0=tmpfs FS1=ext2 diff --git a/default.conf b/default.conf index 2f5153d..b7725ad 100644 --- a/default.conf +++ b/default.conf @@ -59,7 +59,7 @@ case ${MYFS} in # cramfs is special: only thek rightmost filesystem uses it but the cramfs # will be generated *inside* run-tests, because this is a read-only file # system and each test has a different configuration. - cramfs ) + cramfs | squashfs ) SPECIAL_FS=${MYFS} FS0=tmpfs FS1=ext2 diff --git a/scaffold b/scaffold index dd0f2ca..c5fc11a 100644 --- a/scaffold +++ b/scaffold @@ -149,8 +149,15 @@ function cramit { # show internal state in yellow echo -e -n "\033[1;33m${fs}@/n/lower/b$i\033[m " test -n "$OUTPUT_COLOR" && echo -e -n "\033[${OUTPUT_COLOR}m" - tmpimg=/tmp/$fs.img.$i - runcmd mkfs -t $fs /n/lower/b$i $tmpimg + tmpimg=/tmp/fs.img.$i + case $fs in + cramfs ) + runcmd mkfs -t $fs /n/lower/b$i $tmpimg + ;; + squashfs ) + runcmd mksquashfs /n/lower/b$i $tmpimg -noappend > /dev/null 2>&1 + ;; + esac runcmd mount -t $fs -o loop $tmpimg /n/lower/b$i CRAMFS_BRANCHES="$CRAMFS_BRANCHES $i" ;; @@ -162,6 +169,7 @@ function cramit { function uncramit { for i in $CRAMFS_BRANCHES ; do runcmd umount /n/lower/b$i + rm -f /tmp/fs.img.$i done } diff --git a/thor.conf b/thor.conf index b89f225..d0578ba 100644 --- a/thor.conf +++ b/thor.conf @@ -58,7 +58,7 @@ case ${MYFS} in # cramfs is special: only thek rightmost filesystem uses it but the cramfs # will be generated *inside* run-tests, because this is a read-only file # system and each test has a different configuration. - cramfs ) + cramfs | squashfs ) SPECIAL_FS=${MYFS} FS0=tmpfs FS1=ext2 -- 2.43.0