]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: Fix accurate-only-meta-bextract-test for freebsd
authorEric Bollengier <eric@baculasystems.com>
Mon, 23 May 2022 09:22:48 +0000 (11:22 +0200)
committerEric Bollengier <eric@baculasystems.com>
Fri, 27 May 2022 08:32:06 +0000 (10:32 +0200)
regress/tests/accurate-only-meta-bextract-test

index 2401e8bb9d02a0042c51f8f0e2aa4724e80b18e5..64d4ecfef54d3ecf7e44bca08a0458cb656707e4 100755 (executable)
@@ -63,7 +63,7 @@ files_count=`find ${cwd}/build -type f | wc -l`
 find ${cwd}/build -type f -exec touch {} + > /dev/null
 # Change some properties of testfile
 chmod 740 ${cwd}/build/testfile
-perm_after=`stat -c %a ${cwd}/build/testfile`
+perm_after=`$bperl -e "get_perm('${cwd}/build/testfile')"`
 
 # Run backup for the second time, this time we expect that only metadata part for each file will be
 # backed up, so we expect the backup size to be much smaller than the first one.
@@ -101,7 +101,7 @@ grep "^  Termination: *Backup OK" ${cwd}/tmp/log1.out 2>&1 >/dev/null
 bstat=$?
 
 # Check if testfile's restored permission are correctly changed
-perm_restored=`stat -c %a ${cwd}/tmp/bacula-restores/${cwd}/build/testfile`
+perm_restored=`$bperl -e "get_perm('${cwd}/tmp/bacula-restores/${cwd}/build/testfile')`
 if [ ${perm_after} -ne ${perm_restored} ]; then
    estat=1
    print_debug "Wrong permissions restored: ${perm_restored}, expected: ${perm_after}"