<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffcc" text="#000066">
<tt>Sunil,<br>
<br>
I think this script should run as a regular user, not root. Just to
prevent any major accident with troubled scripts.<br>
<br>
Below is a diff against your version from some changes I made. <br>
<br>
---
/home/mmatsuna/git/ocfs2-test/programs/python_common/single_run-WIP.sh     
2009-08-21 08:08:07.953741000 -0700<br>
+++ single_run-WIP.sh   2009-08-21 23:30:45.000000000 -0700<br>
@@ -12,9 +12,10 @@ DEBUGFS_BIN="`which sudo` -u root `which<br>
 TUNEFS_BIN="`which sudo` -u root `which tunefs.ocfs2`"<br>
 MKFS_BIN="`which sudo` -u root `which mkfs.ocfs2`"<br>
 CUT=`which cut`<br>
+CHOWN=`which chown`<br>
 AWK=`which awk`<br>
-MOUNT=`which mount`<br>
-UMOUNT=`which umount`<br>
+MOUNT="`which sudo` -u root `which mount`"<br>
+UMOUNT="`which sudo` -u root `which umount`"<br>
 ECHO=`which echo`<br>
 MKDIR=`which mkdir`<br>
 CAT=`which cat`<br>
@@ -205,7 +206,8 @@ run_aiostress()<br>
<br>
                do_format ${blocksize} ${clustersize} ${features}
${device}<br>
                do_mount ${device} ${mountpoint} ${mountopts}<br>
-               ${MKDIR} -p ${workdir}<br>
+               ${SUDO} ${MKDIR} -p ${workdir}<br>
+               ${SUDO} ${CHOWN} -R ${USERNAME} ${workdir}<br>
<br>
                F1="${workdir}/aiostress1.dat"<br>
                F2="${workdir}/aiostress2.dat"<br>
@@ -250,7 +252,8 @@ run_buildkernel()<br>
<br>
                do_format ${blocksize} ${clustersize} ${features}
${device}<br>
                do_mount ${device} ${mountpoint} ${mountopts}<br>
-               ${MKDIR} -p ${workdir}<br>
+               ${SUDO} ${MKDIR} -p ${workdir}<br>
+               ${SUDO} ${CHOWN} -R ${USERNAME} ${workdir}<br>
<br>
                log_start "buildkernel" ${mountopts}<br>
<br>
@@ -297,7 +300,8 @@ run_filesizelimits()<br>
<br>
        do_format 4096 4096 sparse,unwritten,inline-data ${device}<br>
        do_mount ${device} ${mountpoint} ${mountopts}<br>
-       ${MKDIR} -p ${workdir}<br>
+       ${SUDO} ${MKDIR} -p ${workdir}<br>
+       ${SUDO} ${CHOWN} -R ${USERNAME} ${workdir}<br>
<br>
        file="${workdir}/filesizelimits.dat"<br>
        outlog=${logdir}/filesizelimits.log<br>
@@ -423,6 +427,7 @@ EOF<br>
<br>
                do_format ${blocksize} ${clustersize} ${features}
${device}<br>
                do_mount ${device} ${mountpoint} ${mountopts}<br>
+               ${SUDO} ${CHOWN} -R ${USERNAME} ${mountpoint}<br>
<br>
                ${bindir}/mmap_truncate -c ${CLUSTERSIZE_BITS} -s
${runtime} ${workfile}<br>
                RC=$?<br>
@@ -461,7 +466,8 @@ run_renamewriterace()<br>
<br>
                do_format ${blocksize} ${clustersize} ${features}
${device}<br>
                do_mount ${device} ${mountpoint} ${mountopts}<br>
-               ${MKDIR} -p ${workdir}<br>
+               ${SUDO} ${MKDIR} -p ${workdir}<br>
+               ${SUDO} ${CHOWN} -R ${USERNAME} ${workdir}<br>
<br>
                 outlog=${logdir}/renamewriterace_${mopt}.log<br>
<br>
@@ -514,12 +520,12 @@ else<br>
 #      COMMONDIR=${O2TDIR}/common<br>
 #      WORKFILESDIR=${O2TDIR}/workfiles<br>
 #      LIBDIR=${O2TDIR}/lib<br>
-       LOGDIR=${O2TDIR}/${RUNDATE}<br>
-       LOGFILE=${LOGDIR}/single_run.log<br>
 #      MPIHOSTS=${O2TDIR}/tmp/mpihosts<br>
 #      MPIRUN=${MPIDIR}/mpirun<br>
 #      NPROC=1<br>
 fi<br>
+LOGDIR=${O2TDIR}/${RUNDATE}<br>
+LOGFILE=${LOGDIR}/single_run.log<br>
<br>
 if [ -z ${DEVICE} ] ; then<br>
        ${ECHO} "ERROR: No device"<br>
<br>
<br>
--------------------------<br>
<br>
The last change is to prevent LOGDIR from not being defined as LOGFILE
is not currently defined in config.sh. LOGFILE is defined, but it
directs output to a generic logfile and you're trying to keep it all in
one place for single run.<br>
</tt>
<pre class="moz-signature" cols="72">Regards,

Marcos Eduardo Matsunaga

Oracle USA
Linux Engineering

“The statements and opinions expressed here are my own and do not
necessarily represent those of Oracle Corporation.”
</pre>
<br>
<br>
Sunil Mushran wrote:
<blockquote
 cite="mid:1250731269-12227-2-git-send-email-sunil.mushran@oracle.com"
 type="cite">
  <pre wrap="">single_run-WIP is a work-in-progress single_run.

Signed-off-by: Sunil Mushran <a class="moz-txt-link-rfc2396E" href="mailto:sunil.mushran@oracle.com">&lt;sunil.mushran@oracle.com&gt;</a>
---
 programs/python_common/Makefile          |    2 +
 programs/python_common/single_run-WIP.sh |  572 ++++++++++++++++++++++++++++++
 vendor/common/ocfs2-test.spec-generic.in |    1 +
 3 files changed, 575 insertions(+), 0 deletions(-)
 create mode 100755 programs/python_common/single_run-WIP.sh

diff --git a/programs/python_common/Makefile b/programs/python_common/Makefile
index b95d675..289b1fd 100644
--- a/programs/python_common/Makefile
+++ b/programs/python_common/Makefile
@@ -14,6 +14,7 @@ DIST_FILES =         config_py.skel \
                 setup.sh \
                 o2tf.py \
                 single_run.sh \
+                single_run-WIP.sh \
                 multiple_run.sh \
                 remote_mount.py \
                 remote_umount.py \
@@ -24,6 +25,7 @@ BIN_EXTRA =         config_py.skel \
                 config_shell.skel \
                 o2tf.py \
                 single_run.sh \
+                single_run-WIP.sh \
                 remote_mount.py \
                 remote_umount.py \
                 command.py        \
diff --git a/programs/python_common/single_run-WIP.sh b/programs/python_common/single_run-WIP.sh
new file mode 100755
index 0000000..50ce38c
--- /dev/null
+++ b/programs/python_common/single_run-WIP.sh
@@ -0,0 +1,572 @@
+#!/bin/bash
+#
+
+PATH=$PATH:/sbin        # Add /sbin to the path for ocfs2 tools
+RUNTIME=300                # seconds
+APP=`basename ${0}`
+USERNAME=`/usr/bin/whoami`
+DATE=`which date`
+HOSTNAME=`which hostname`
+SUDO="`which sudo` -u root"
+DEBUGFS_BIN="`which sudo` -u root `which debugfs.ocfs2`"
+TUNEFS_BIN="`which sudo` -u root `which tunefs.ocfs2`"
+MKFS_BIN="`which sudo` -u root `which mkfs.ocfs2`"
+CUT=`which cut`
+AWK=`which awk`
+MOUNT=`which mount`
+UMOUNT=`which umount`
+ECHO=`which echo`
+MKDIR=`which mkdir`
+CAT=`which cat`
+MD5SUM=`which md5sum`
+WGET=`which wget`
+DWNLD_PATH=<a class="moz-txt-link-rfc2396E" href="http://oss.oracle.com/~smushran/ocfs2-test">"http://oss.oracle.com/~smushran/ocfs2-test"</a>
+KERNEL_TARBALL="linux-kernel.tar.gz"
+KERNEL_TARBALL_CHECK="${KERNEL_TARBALL}.md5sum"
+
+# log_message message
+log_message()
+{
+        ${ECHO} "`${DATE}  +\"%F %H:%M:%S\"` $@" &gt;&gt; ${LOGFILE}
+}
+
+log_start()
+{
+        log_message $@
+        START=$(date +%s)
+}
+
+# log_end $?
+log_end()
+{
+        if [ "$#" -lt "1" ]; then
+                      ${ECHO} "Error in log_end()"
+                exit 1
+        fi
+
+        END=$(date +%s)
+        DIFF=$(( ${END} - ${START} ))
+
+        if [ ${1} -ne 0 ]; then
+                log_message "FAILED (${DIFF} secs)"
+        else
+                log_message "PASSED (${DIFF} secs)"
+        fi
+
+        START=0
+}
+
+# get_kernel_source $LOGDIR $DWNLD_PATH $KERNEL_TARBALL $KERNEL_TARBALL_CHECK
+get_kernel_source()
+{
+        if [ "$#" -lt "4" ]; then
+                ${ECHO} "Error in get_kernel_source()"
+                exit 1
+        fi
+
+        logdir=$1
+        dwnld_path=$2
+        kernel_tarball=$3
+        kernel_tarball_check=$4
+
+        cd ${logdir}
+        ${WGET} ${dwnld_path}/${kernel_tarball_check}
+        if [ $? -ne 0 ]; then
+                ${ECHO} "ERROR downloading ${dwnld_path}/${kernel_tarball_check}"
+                cd -
+                exit 1
+        fi
+
+        ${WGET} ${dwnld_path}/${kernel_tarball}
+        if [ $? -ne 0 ]; then
+                ${ECHO} "ERROR downloading ${dwnld_path}/${kernel_tarball}"
+                cd -
+                exit 1
+        fi
+
+        ${MD5SUM} -c ${kernel_tarball_check}
+        if [ $? -ne 0 ]; then
+                ${ECHO} "ERROR ${kernel_tarball_check} check failed"
+                cd -
+                exit 1
+        fi
+        cd -
+}
+
+# get_device_info ${DEVICE}
+get_device_info()
+{
+        if [ "$#" -lt "1" ]; then
+                ${ECHO} "Error in get_device_info()"
+                exit 1
+        fi
+
+        LABEL=`${TUNEFS_BIN} -q -Q "label=%V\n" ${1}|${CUT} -f2 -d"="`
+        if [ "X${LABEL}" == "X" ]; then
+                LABEL="testlabel"
+        fi
+
+        SLOTS=`${TUNEFS_BIN} -q -Q "slots=%N\n" ${DEVICE}|${CUT} -f2 -d"="`
+
+        CLUSTERSIZE_BITS=`${DEBUGFS_BIN} -R stats ${DEVICE} | grep Bits| ${AWK} -F" " '{print $8}'`
+        BLOCKSIZE_BITS=`${DEBUGFS_BIN} -R stats ${DEVICE} | grep Bits| ${AWK} -F" " '{print $4}'`
+
+        CLUSTERSIZE=`${ECHO} 2^${CLUSTERSIZE_BITS} |bc`
+        BLOCKSIZE=`${ECHO} 2^${BLOCKSIZE_BITS} |bc`
+}
+
+# do_format() ${BLOCKSIZE} ${CLUSTERSIZE} ${FEATURES} ${DEVICE}
+do_format() {
+        if [ "$#" -lt "4" ]; then
+                      ${ECHO} "Error in do_format() $@"
+                exit 1
+        fi
+
+        blocksize=$1
+        clustersize=$2
+        features=$3
+        device=$4
+
+#        log_message "format ${device}"
+
+        ${MKFS_BIN} -x -b ${blocksize} -C ${clustersize} --fs-features=${features} \
+                -N 1 -L single_run -M local ${device} &gt;/dev/null
+        if [ $? -ne 0 ]; then
+                ${ECHO} "ERROR: mkfs.ocfs2 -b ${blocksize} -C ${clustersize} " \
+                        "--fs-features=${features} -N 1 -L single_run -M local ${device}"
+                exit 1
+        fi
+
+        get_device_info        ${device}
+}
+
+# do_mount ${DEVICE} ${MOUNTPOINT} ${MOUNTOPTS}
+do_mount() {
+        if [ "$#" -lt "3" ]; then
+                      ${ECHO} "Error in do_mount()"
+                exit 1
+        fi
+
+        device=$1
+        mountpoint=$2
+        mountopts=$3        
+
+#        log_message "mount ${DEVICE} ${MOUNTPOINT}"
+
+        ${MOUNT} -o ${mountopts} ${device} ${mountpoint} &gt;/dev/null
+        if [ $? -ne 0 ]; then
+                ${ECHO} "ERROR: mount -o ${mountopts} ${device} ${mountpoint}"
+                exit 1
+        fi
+}
+
+# do_umount ${MOUNTPOINT}
+do_umount() {
+        if [ "$#" -lt "1" ]; then
+                ${ECHO} "Error in do_umount()"
+                exit 1
+        fi
+
+        mountpoint=$1
+
+#        log_message "umount ${MOUNTPOINT}"
+
+        ${UMOUNT} ${mountpoint}
+        if [ $? -ne 0 ]; then
+                ${ECHO} "ERROR: umount ${mountpoint}"
+                exit 1
+        fi
+}
+
+# run_aiostress ${BINDIR} ${LOGDIR} ${DEVICE} ${MOUNTPOINT}
+run_aiostress()
+{
+        log_message "run_aiostress" $@
+        if [ "$#" -lt "4" ]; then
+                echo "Error in run_aiostress()"
+                exit 1
+        fi
+
+        bindir=$1
+        logdir=$2
+        device=$3
+        mountpoint=$4
+
+        workdir=${mountpoint}/testme
+        blocksize=4096
+        clustersize=8192
+        features="sparse,unwritten,inline-data"
+
+        for mopt in writeback ordered
+        do
+                mountopts="data=${mopt}"
+
+                log_start "aio-stress" ${mountopts}
+
+                do_format ${blocksize} ${clustersize} ${features} ${device}
+                do_mount ${device} ${mountpoint} ${mountopts}
+                ${MKDIR} -p ${workdir}
+
+                F1="${workdir}/aiostress1.dat"
+                F2="${workdir}/aiostress2.dat"
+                F3="${workdir}/aiostress3.dat"
+                F4="${workdir}/aiostress4.dat"
+
+                outlog=${logdir}/aiostress_${mopt}.log
+
+                ${bindir}/aio-stress -a 4k -b 32 -i 16 -O -l -L -t 8 -v ${F1} ${F2} ${F3} ${F4} &gt;${outlog} 2&gt;&amp;1
+                RC=$?
+
+                do_umount ${mountpoint}
+        
+                log_end ${RC}
+        done
+}
+
+# run_buildkernel ${BINDIR} ${LOGDIR} ${DEVICE} {MOUNTPOINT} ${KERNELSRC}
+run_buildkernel()
+{
+        log_message "run_buildkernel" $@
+        if [ "$#" -lt "5" ]; then
+                echo "Error in run_buildkernel()"
+                exit 1
+        fi
+
+        bindir=$1
+        logdir=$2
+        device=$3
+        mountpoint=$4
+        kernelsrc=$5
+
+        node=`${HOSTNAME}`
+        workdir=${mountpoint}/testme
+        blocksize=4096
+        clustersize=4096
+        features="sparse,unwritten,inline-data"
+
+        for mopt in writeback ordered
+        do
+                mountopts="data=${mopt}"
+
+                do_format ${blocksize} ${clustersize} ${features} ${device}
+                do_mount ${device} ${mountpoint} ${mountopts}
+                ${MKDIR} -p ${workdir}
+
+                log_start "buildkernel" ${mountopts}
+
+                outlog=${logdir}/buildkernel_${mopt}.log
+
+                ${bindir}/buildkernel.py -e -d ${workdir} -t ${kernelsrc} -n ${node} -l ${outlog}.1
+                RC=$?
+                if [ ${RC} -eq 0 ]; then
+                        ${bindir}/buildkernel.py -d ${workdir} -t ${kernelsrc} -n ${node} -l ${outlog}.2
+                        RC=$?
+                fi
+
+                do_umount ${mountpoint}
+
+                log_end ${RC}
+        done
+}
+
+# run_filesizelimits ${BINDIR} ${LOGDIR} ${DEVICE} {MOUNTPOINT}
+run_filesizelimits()
+{
+        log_message "run_filesizelimits" $@
+        if [ "$#" -lt "4" ]; then
+                echo "Error in run_filesizelimits()"
+                exit 1
+        fi
+
+        bindir=$1
+        logdir=$2
+        device=$3
+        mountpoint=$4
+
+        mountopts=defaults
+
+        workdir=${mountpoint}/testme
+
+        if [ `uname -m` == "i686" ]; then
+                bitsperlong=32
+        else
+                bitsperlong=64
+        fi
+
+        log_start "check_file_size_limits"
+
+        do_format 4096 4096 sparse,unwritten,inline-data ${device}
+        do_mount ${device} ${mountpoint} ${mountopts}
+        ${MKDIR} -p ${workdir}
+
+        file="${workdir}/filesizelimits.dat"
+        outlog=${logdir}/filesizelimits.log
+
+        ${bindir}/check_file_size_limits -B ${bitsperlong} -b ${BLOCKSIZE_BITS} \
+                -c ${CLUSTERSIZE_BITS} ${file} &gt;${outlog} 2&gt;&amp;1
+        RC=$?
+
+        do_umount ${mountpoint}
+
+        log_end ${RC}
+}
+
+# run_fillverifyholes ${BINDIR} ${LOGDIR} ${DEVICE} ${MOUNTPOINT}
+run_fillverifyholes()
+{
+        log_message "run_fillverifyholes" $@
+        if [ "$#" -lt "4" ]; then
+                echo "Error in run_fillverifyholes()"
+                exit 1
+        fi
+
+        bindir=$1
+        logdir=$2
+        device=$3
+        mountpoint=$4
+
+        workdir=${mountpoint}/testme
+
+        varfile=${logdir}/fillverifyholes.txt
+
+        ${CAT} &gt; ${varfile} &lt;&lt;EOF
+2048        4096        nosparse,nounwritten,noinline-data        data=ordered
+2048        65536        sparse,unwritten,inline-data                data=writeback
+4096        4096        sparse,unwritten,inline-data                data=ordered
+4096        8192        nosparse,nounwritten,noinline-data        data=writeback
+4096        131072        nosparse,nounwritten,noinline-data        data=ordered
+4096        1048576        sparse,unwritten,inline-data                data=writeback
+EOF
+        if [ $? != 0 ]; then
+                ${ECHO} "ERROR writing ${varfile}"
+                exit 1
+        fi
+
+        i=0
+        ${CAT} ${varfile} | while read LINE
+        do
+                blocksize=`echo ${LINE} | cut -f1 -d' '`
+                clustersize=`echo ${LINE} | cut -f2 -d' '`
+                features=`echo ${LINE} | cut -f3 -d' '`
+                mountopts=`echo ${LINE} | cut -f4 -d' '`
+
+                log_start "fill_verify_holes" ${blocksize} ${clustersize} ${features} ${mountopts}
+
+                outlog=${logdir}/fillverifyholes_${i}.log
+                ldir=${logdir}/fillverifyholes_${i}
+                ${MKDIR} -p ${ldir}
+
+                do_format ${blocksize} ${clustersize} ${features} ${device}
+                do_mount ${device} ${mountpoint} ${mountopts}
+                ${MKDIR} -p ${workdir}
+
+                ${bindir}/burn-in.sh -b ${bindir} -l ${ldir} -c 10 -d ${workdir} -i 100 -s 5000000 &gt;${outlog} 2&gt;&amp;1
+                RC=$?
+
+                do_umount ${mountpoint}
+
+                log_end ${RC}
+
+                i=$[$i+1]
+        done
+}
+
+# run_mmaptruncate ${BINDIR} ${LOGDIR} ${DEVICE} ${MOUNTPOINT}
+run_mmaptruncate()
+{
+        log_message "run_mmaptruncate" $@
+        if [ "$#" -lt "4" ]; then
+                echo "Error in run_mmaptruncate()"
+                exit 1
+        fi
+
+        bindir=$1
+        logdir=$2
+        device=$3
+        mountpoint=$4
+
+        runtime=300
+        workfile=${mountpoint}/mmaptruncate.txt
+        varfile=${logdir}/mmaptruncate.conf
+
+        ${CAT} &gt; ${varfile} &lt;&lt;EOF
+2048        4096        nosparse,nounwritten,noinline-data        data=ordered
+2048        65536        sparse,unwritten,inline-data                data=writeback
+4096        4096        sparse,unwritten,inline-data                data=ordered
+4096        8192        nosparse,nounwritten,noinline-data        data=writeback
+4096        131072        sparse,unwritten,inline-data                data=ordered
+4096        1048576        sparse,unwritten,inline-data                data=writeback
+EOF
+        if [ $? != 0 ]; then
+                ${ECHO} "ERROR writing ${varfile}"
+                exit 1
+        fi
+
+        ${CAT} ${varfile} | while read LINE
+        do
+                blocksize=`echo ${LINE} | cut -f1 -d' '`
+                clustersize=`echo ${LINE} | cut -f2 -d' '`
+                features=`echo ${LINE} | cut -f3 -d' '`
+                mountopts=`echo ${LINE} | cut -f4 -d' '`
+
+                log_start "mmap_truncate" ${blocksize} ${clustersize} ${features} ${mountopts}
+
+                do_format ${blocksize} ${clustersize} ${features} ${device}
+                do_mount ${device} ${mountpoint} ${mountopts}
+
+                ${bindir}/mmap_truncate -c ${CLUSTERSIZE_BITS} -s ${runtime} ${workfile}
+                RC=$?
+
+                sleep 10
+                do_umount ${mountpoint}
+
+                log_end ${RC}
+        done
+}
+
+# run_renamewriterace ${BINDIR} ${LOGDIR} ${DEVICE} ${MOUNTPOINT}
+run_renamewriterace()
+{
+        log_message "run_renamewriterace" $@
+        if [ "$#" -lt "4" ]; then
+                echo "Error in run_renamewriterace()"
+                exit 1
+        fi
+
+        bindir=$1
+        logdir=$2
+        device=$3
+        mountpoint=$4
+
+        workdir=${mountpoint}/testme
+        blocksize=4096
+        clustersize=4096
+        features="sparse,unwritten,inline-data"
+
+        for mopt in writeback ordered
+        do
+                mountopts="data=${mopt}"
+
+                log_start "rename_write_race" ${mountopts}
+
+                do_format ${blocksize} ${clustersize} ${features} ${device}
+                do_mount ${device} ${mountpoint} ${mountopts}
+                ${MKDIR} -p ${workdir}
+
+                outlog=${logdir}/renamewriterace_${mopt}.log
+
+                ${bindir}/rename_write_race.sh -d ${workdir} -i 10000 &gt;${outlog} 2&gt;&amp;1
+                RC=$?
+
+                do_umount ${mountpoint}
+
+                log_end ${RC}
+        done
+}
+
+#
+#
+# MAIN
+#
+#
+
+usage()
+{
+        ${ECHO} "usage: ${APP} [-k kerneltarball] -m mountpoint -l logdir -d device"
+        exit 1
+}
+
+while getopts "d:m:k:l:h?" args
+do
+        case "$args" in
+                d) DEVICE="$OPTARG";;
+                m) MOUNTPOINT="$OPTARG";;
+                k) KERNELSRC="$OPTARG";;
+                l) O2TDIR="$OPTARG";;
+                    h) USAGE="yes";;
+                    ?) USAGE="yes";;
+          esac
+done
+
+
+if [ ! -z ${USAGE} ]; then
+        usage
+fi
+
+RUNDATE=`${DATE} +%F_%H:%M`
+
+if [ -f ./config.sh ] ; then
+        . ./config.sh
+else
+#        O2TDIR=/usr/local/ocfs2-test
+        MPIDIR=/usr/lib/openmpi/1.2.7-gcc/bin
+        BINDIR=/usr/local/ocfs2-test/bin/
+#        COMMONDIR=${O2TDIR}/common
+#        WORKFILESDIR=${O2TDIR}/workfiles
+#        LIBDIR=${O2TDIR}/lib
+        LOGDIR=${O2TDIR}/${RUNDATE}
+        LOGFILE=${LOGDIR}/single_run.log
+#        MPIHOSTS=${O2TDIR}/tmp/mpihosts
+#        MPIRUN=${MPIDIR}/mpirun
+#        NPROC=1
+fi
+
+if [ -z ${DEVICE} ] ; then
+        ${ECHO} "ERROR: No device"
+        usage
+elif [ ! -b ${DEVICE} ] ; then
+        ${ECHO} "ERROR: Invalid device ${DEVICE}"
+        exit 1
+fi
+
+if [ -z ${MOUNTPOINT} ] ; then
+        ${ECHO} "ERROR: No mountpoint"
+        usage
+elif [ ! -d ${MOUNTPOINT} ] ; then
+        ${ECHO} "ERROR: Invalid mountpoint ${MOUNTPOINT}"
+        exit 1
+fi
+
+if [ -z ${O2TDIR} ]; then
+        ${ECHO} "ERROR: No logdir"
+        usage
+fi
+
+if [ ! -d ${O2TDIR} ]; then
+        mkdir -p ${O2TDIR}
+fi
+
+${MKDIR} -p ${LOGDIR}
+
+if [ -z ${KERNELSRC} ]; then
+        get_kernel_source $LOGDIR $DWNLD_PATH $KERNEL_TARBALL $KERNEL_TARBALL_CHECK
+        KERNELSRC=${LOGDIR}/${KERNEL_TARBALL}
+fi
+
+if [ ! -f ${KERNELSRC} ]; then
+        ${ECHO} "No kernel source"
+        usage
+fi
+
+STARTRUN=$(date +%s)
+log_message "*** Start Single Node test ***"
+
+${ECHO} "Output log is ${LOGFILE}"
+
+run_fillverifyholes ${BINDIR} ${LOGDIR} ${DEVICE} ${MOUNTPOINT}
+
+run_renamewriterace ${BINDIR} ${LOGDIR} ${DEVICE} ${MOUNTPOINT}
+
+run_aiostress ${BINDIR} ${LOGDIR} ${DEVICE} ${MOUNTPOINT}
+
+run_filesizelimits ${BINDIR} ${LOGDIR} ${DEVICE} ${MOUNTPOINT}
+
+run_mmaptruncate ${BINDIR} ${LOGDIR} ${DEVICE} ${MOUNTPOINT}
+
+run_buildkernel ${BINDIR} ${LOGDIR} ${DEVICE} ${MOUNTPOINT} ${KERNELSRC}
+
+ENDRUN=$(date +%s)
+
+DIFF=$(( ${ENDRUN} - ${STARTRUN} ))
+log_message "Total Runtime ${DIFF} seconds"
+log_message "*** End Single Node test ***"
diff --git a/vendor/common/ocfs2-test.spec-generic.in b/vendor/common/ocfs2-test.spec-generic.in
index bae26d2..b37e870 100644
--- a/vendor/common/ocfs2-test.spec-generic.in
+++ b/vendor/common/ocfs2-test.spec-generic.in
@@ -113,6 +113,7 @@ rm -rf "$RPM_BUILD_ROOT"
 %{_installdir}/bin/open_delete.py
 %{_installdir}/bin/o2tf.py
 %{_installdir}/bin/single_run.sh
+%{_installdir}/bin/single_run-WIP.sh
 %{_installdir}/bin/remote_mount.py
 %{_installdir}/bin/remote_umount.py
 %{_installdir}/bin/command.py
  </pre>
</blockquote>
</body>
</html>