new file mode 100755
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+# Mount ext4 via fuse. Put tests/fuse2fs/ at the start of PATH if you want
+# to run the metadata checksumming tests with fuse2fs.
+
+for arg in "$@"; do
+ if [ -b "${arg}" ]; then
+ DEV="${arg}"
+ elif [ -d "${arg}" ]; then
+ MNT="${arg}"
+ fi
+done
+
+if [ -z "${DEV}" -o -z "${MNT}" ]; then
+ echo "Please specify a device and a mountpoint."
+fi
+
+DIR="$(readlink -f "$(dirname "$0")")"
+if [ -n "${FUSE2FS_DEBUG}" ]; then
+ "${DIR}/../../misc/fuse2fs" "${DEV}" "${MNT}" -d >> "${FUSE2FS_DEBUG}" 2>&1 &
+ sleep 1
+ exit 0
+else
+ "${DIR}/../../misc/fuse2fs" "${DEV}" "${MNT}"
+ ERR=$?
+ sleep 1
+ exit "${ERR}"
+fi
new file mode 100755
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# unmount a filesystem
+sync
+sync
+sync
+
+sleep 2
+if [ -x /bin/umount ]; then
+ /bin/umount "$@"
+ ERR=$?
+elif [ -x /sbin/umount ]; then
+ /sbin/umount "$@"
+ ERR=$?
+else
+ echo "Where is umount?"
+ exit 5
+fi
+sleep 1
+
+exit "${ERR}"
Create custom mount/umount commands so that we can run the metadata checksumming tests against fuse2fs. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> --- tests/fuse2fs/mount | 28 ++++++++++++++++++++++++++++ tests/fuse2fs/umount | 21 +++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100755 tests/fuse2fs/mount create mode 100755 tests/fuse2fs/umount -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html