From: Eric Bollengier Date: Mon, 23 May 2022 09:22:48 +0000 (+0200) Subject: regress: Fix accurate-only-meta-bextract-test for freebsd X-Git-Tag: Release-13.0.0~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=608beff57b8e01aeb966e061363c5574e39168bf;p=thirdparty%2Fbacula.git regress: Fix accurate-only-meta-bextract-test for freebsd --- diff --git a/regress/tests/accurate-only-meta-bextract-test b/regress/tests/accurate-only-meta-bextract-test index 2401e8bb9..64d4ecfef 100755 --- a/regress/tests/accurate-only-meta-bextract-test +++ b/regress/tests/accurate-only-meta-bextract-test @@ -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}"