tmpfs: don't require {TEST|SCRATCH}_DEV
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 3 Sep 2018 12:27:28 +0000 (14:27 +0200)
committerEryu Guan <guaneryu@gmail.com>
Sun, 9 Sep 2018 14:50:48 +0000 (22:50 +0800)
tmpfs doesn't require a device and the source argument of the mount
is ignored.  If {TEST|SCRATCH}_DEV is not given then set them to
proper strings.

[Eryu: don't require SCRATCH_DEV too]

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/config

index d85519a8cb921cf1bec4637797fe132259283fd5..1ba8d96cf05c585178d2f7ed81b1e392654b4eaf 100644 (file)
@@ -456,8 +456,9 @@ _check_device()
        fi
 
        case "$FSTYP" in
-       9p)
+       9p|tmpfs)
                # 9p mount tags are just plain strings, so anything is allowed
+               # tmpfs doesn't use mount source, ignore
                ;;
        overlay)
                if [ ! -d "$dev" ]; then
@@ -657,6 +658,15 @@ get_next_config() {
                export RESULT_BASE="$here/results/"
        fi
 
+       if [ "$FSTYP" == "tmpfs" ]; then
+               if [ -z "TEST_DEV" ]; then
+                       export TEST_DEV=tmpfs_test
+               fi
+               if [ -z "SCRATCH_DEV" ]; then
+                       export TEST_DEV=tmpfs_scratch
+               fi
+       fi
+
        #  Mandatory Config values.
        MC=""
        [ -z "$EMAIL" ]          && MC="$MC EMAIL"