X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=tests%2Ftest-imagex-ntfs;h=66c39de4846bb8d90060eec53b112bbb38427e8b;hp=1012c344707b7abea53ca1c44d4722241bd7a48b;hb=40beb80283a2df7af88c8359ca41adb814585e9a;hpb=5a172ad88105a66fe903aeacc0f576d7ff2211cd diff --git a/tests/test-imagex-ntfs b/tests/test-imagex-ntfs index 1012c344..66c39de4 100755 --- a/tests/test-imagex-ntfs +++ b/tests/test-imagex-ntfs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script does some sanity testing of the 'imagex' program, specifically # checking the NTFS capture and apply features. @@ -9,20 +9,22 @@ # remain mounted. set -e -srcdir=${srcdir:-.} -srcdir=`realpath $srcdir` cd tests +srcdir="${srcdir:-.}/.." +srcdir="$(cd $srcdir; pwd)" +. "$srcdir/tests/tests-common.sh" imagex() { ../imagex $@ > /dev/null } __do_unmount() { - if ! fusermount -u $1; then + if ! fusermount -z -u $1; then error "Failed to unmount \"$1\"" fi } + do_unmount() { if mountpoint $1 &> /dev/null; then __do_unmount $1 @@ -199,7 +201,7 @@ do_test 'echo 1 > file; setfattr -n user.aa -v 1111 file; setfattr -n user.aaa -v 1111 file; setfattr -n user.aaaa -v 1111 file;' - + msg "file with named data streams with same contents as other file" do_test 'echo -n > file; setfattr -n user.a -v 1111 file; @@ -236,7 +238,7 @@ do_test 'touch file; touch file2; setfattr -n system.ntfs_acl -v 0s`cat $srcdir/tests/security_descriptor_1.base64` file setfattr -n system.ntfs_acl -v 0s`cat $srcdir/tests/security_descriptor_2.base64` file' - + msg "files with different security descriptors and some with the same security descriptor" do_test 'touch file; touch file2;