diff --git a/runltp b/runltp
index 87ed746..3c8b94e 100755
--- a/runltp
+++ b/runltp
@@ -687,19 +687,7 @@ main()
     }
     }
 
-    if [ -z "$DEVICE" ]; then
-        create_block
-        if [ $? -ne 0 ]; then
-            echo "no block device was specified on commandline."
-            echo "Block device could not be created using loopback device"
-            echo "Tests which require block device are disabled."
-            echo "You can specify it with option -b"
-	else
-            LTP_DEV=$DEVICE
-        fi
-    else
-        LTP_DEV=$DEVICE
-    fi
+    set_block_device
 
     # here even if the user don't specify a big block device, we
     # also don't create the big block device.
@@ -981,14 +969,36 @@ create_block()
     fi
 }
 
+set_block_device()
+{
+    if [ -z "$DEVICE" ]; then
+        create_block
+        if [ $? -ne 0 ]; then
+            echo "no block device was specified on commandline."
+            echo "Block device could not be created using loopback device"
+            echo "Tests which require block device are disabled."
+            echo "You can specify it with option -b"
+	else
+            LTP_DEV=$DEVICE
+        fi
+    else
+        LTP_DEV=$DEVICE
+    fi
+}
+
 cleanup()
 {
     [ "$LOOP_DEV" ] && losetup -d $LOOP_DEV
     rm -rf ${TMP}
 }
 
-trap "cleanup" 0
-setup
-main "$@"
+
+LTP_SCRIPT="$(basename $0)"
+
+if [[ "$LTP_SCRIPT" == "runltp" ]]; then
+    trap "cleanup" 0
+    setup
+    main "$@"
+fi
 
 #vim: syntax=sh
diff --git a/runltplite.sh b/runltplite.sh
index 2572d09..d9ca595 100755
--- a/runltplite.sh
+++ b/runltplite.sh
@@ -37,6 +37,7 @@
 #
 #
 
+source "$(dirname $0)/runltp"
 
 setup()
 {
@@ -50,6 +51,9 @@ setup()
     export TMP="${TMPBASE}/ltp-$$"
     export PATH="${PATH}:${LTPROOT}/testcases/bin"
 
+    export LTP_DEV=""
+    export LTP_DEV_FS_TYPE="ext2"
+
     [ -d $LTPROOT/testcases/bin ] ||
     {
         echo "FATAL: LTP not installed correctly"
@@ -85,6 +89,9 @@ usage()
     -p              Human readable format logfiles.
     -q              Print less verbose output to screen.
     -r LTPROOT      Fully qualified path where testsuite is installed.
+    -b DEVICE       Some tests require an unmounted block device to run
+                    correctly.
+    -B LTP_DEV_FS_TYPE  The file system of test block devices.
 
     example: ${0##*/} -i 1024 -m 128 -p -q  -l /tmp/resultlog.$$ -d ${PWD}
 
@@ -114,7 +121,7 @@ main()
 
     local scenfile=""
 
-    while getopts c:d:hi:l:m:No:pqr: arg
+    while getopts c:d:hi:l:m:No:pqr:b:B: arg
     do  case $arg in
         c)
 	    NUM_PROCS=$(($OPTARG))
@@ -171,6 +178,11 @@ main()
 
         r)  LTPROOT=$OPTARG;;
 
+        b)  DEVICE=$OPTARG;;
+
+        B)  LTP_DEV_FS_TYPE=$OPTARG;;
+
+
         \?) usage;;
         esac
     done
@@ -305,6 +317,8 @@ main()
         }
     }
 
+    set_block_device
+
     [ ! -z "$QUIET_MODE" ] && { echo "INFO: Test start time: $(date)" ; }
     PAN_COMMAND="${LTPROOT}/bin/ltp-pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $$ \
     -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE"