X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fqa%2Fworkunits%2Ffs%2Fmisc%2Fchmod.sh;fp=src%2Fceph%2Fqa%2Fworkunits%2Ffs%2Fmisc%2Fchmod.sh;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=de66776f108be359ccf5f6b40e8275a258f746a4;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/qa/workunits/fs/misc/chmod.sh b/src/ceph/qa/workunits/fs/misc/chmod.sh deleted file mode 100755 index de66776..0000000 --- a/src/ceph/qa/workunits/fs/misc/chmod.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -x - -set -e - -check_perms() { - - file=$1 - r=$(ls -la ${file}) - if test $? != 0; then - echo "ERROR: File listing/stat failed" - exit 1 - fi - - perms=$2 - if test "${perms}" != $(echo ${r} | awk '{print $1}') && \ - test "${perms}." != $(echo ${r} | awk '{print $1}') && \ - test "${perms}+" != $(echo ${r} | awk '{print $1}'); then - echo "ERROR: Permissions should be ${perms}" - exit 1 - fi -} - -file=test_chmod.$$ - -echo "foo" > ${file} -if test $? != 0; then - echo "ERROR: Failed to create file ${file}" - exit 1 -fi - -chmod 400 ${file} -if test $? != 0; then - echo "ERROR: Failed to change mode of ${file}" - exit 1 -fi - -check_perms ${file} "-r--------" - -set +e -echo "bar" >> ${file} -if test $? = 0; then - echo "ERROR: Write to read-only file should Fail" - exit 1 -fi - -set -e -chmod 600 ${file} -echo "bar" >> ${file} -if test $? != 0; then - echo "ERROR: Write to writeable file failed" - exit 1 -fi - -check_perms ${file} "-rw-------" - -echo "foo" >> ${file} -if test $? != 0; then - echo "ERROR: Failed to write to file" - exit 1 -fi