support squashfs mounts (tested, working)
authorErez_Zadok <ezk@cs.sunysb.edu>
Thu, 12 Jul 2007 04:41:22 +0000 (00:41 -0400)
committerErez_Zadok <ezk@cs.sunysb.edu>
Thu, 12 Jul 2007 04:41:22 +0000 (00:41 -0400)
README
brm.conf
default.conf
scaffold
thor.conf

diff --git a/README b/README
index 75409e698b8e11a07293ecdf916d5bd67ed388f6..9b41a6e7f1a85613085bb17992ae6016ca4b19f3 100644 (file)
--- 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.
index 7222a5c4c8f50f21a1c5878c83874210deacb71f..392fcd30296ec1bb3b95ee65ff39047d09f5a4ff 100644 (file)
--- 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
index 2f5153d9f2df2f5138ed226e85e884dae3d7d26c..b7725ad0b2c78adb831e61ff12051c892e7a716e 100644 (file)
@@ -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
index dd0f2caab7b2cf7dbef06618fca32664fc79438d..c5fc11a35a6511fd716551450314008096b185e6 100644 (file)
--- 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
 }
 
index b89f225857ca13472e93cdc7def1362e175285d5..d0578bad85f59ffba2c368d2fcd44316606f7ca1 100644 (file)
--- 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