]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex-ntfs
mount_image.c: add fallback definitions of RENAME_* constants
[wimlib] / tests / test-imagex-ntfs
index 4fd1baa1145926328e98f1e4f186d3419729faf6..f1a0f910d0dfcb72b261da362dcbf1db01bd0e83 100755 (executable)
@@ -12,10 +12,13 @@ set -e
 cd tests
 srcdir="${srcdir:-.}/.."
 srcdir="$(cd $srcdir; pwd)"
-. "$srcdir/tests/tests-common.sh"
+. "$srcdir/tests/test_utils.sh"
 
 TEST_SUBDIR=tmpdir_test-imagex-ntfs
 
+# In Debian, mkntfs is at /sbin/mkntfs but /sbin is not on the $PATH by default.
+PATH+=":/sbin"
+
 __do_unmount() {
        for ((i = 0; i < 10; i++)); do
                if fusermount -z -u $1; then
@@ -59,7 +62,7 @@ do_mount() {
 }
 
 do_mkntfs() {
-       if ! mkntfs --force --fast $1 > /dev/null; then
+       if ! mkntfs --force --fast $1 >/dev/null; then
                error "Could not create NTFS volume \"$1\"!  Make sure ntfsprogs are installed."
        fi
 }
@@ -195,15 +198,15 @@ do_test 'echo -n > file;
 
 msg "file with empty named data stream and non-empty unnamed data stream"
 do_test 'echo 1 > file;
-        setfattr -n user.ads -v "" file;'
+        setfattr -n user.ads -v 0x file;'
 
 msg "file with empty named data stream and empty unnamed data stream"
 do_test 'echo -n > file;
-        setfattr -n user.ads -v "" file;'
+        setfattr -n user.ads -v 0x file;'
 
 msg "file with named data stream with hardlink"
 do_test 'echo 999 > file;
-        setfattr -n user.ads -v "888" file;
+        setfattr -n user.ads -v 0x123456 file;
         ln file link;'
 
 msg "C source code of wimlib"
@@ -213,6 +216,12 @@ msg "file with security descriptor"
 do_test 'touch file;
         setfattr -n system.ntfs_acl -v 0s`cat $srcdir/tests/security_descriptor_1.base64` file'
 
+msg "file with object ID"
+do_test 'touch file;
+        touch file2;
+        setfattr -n system.ntfs_object_id -v 0x15ac83a36dc6cf8ec459b8017dd8626f file
+        setfattr -n system.ntfs_object_id -v 0xf67394c12b17608e1d050d181ba8ffd27df80cbdf620f4c82c79b9e6799147b697621aff72915ade05abb96b15dea1a3e0bda4caa9e33cfd461c92c16be9713d file2'
+
 msg "files with different security descriptors"
 do_test 'touch file;
         touch file2;