]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex-ntfs
libFuzzer: add encoding fuzzer
[wimlib] / tests / test-imagex-ntfs
index 8abab0d368bb4557f1b1f084ae03f0a4f9f10d9f..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
 }
@@ -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;