From: Stanislav kholmanskikh <[email protected]> * now it uses tst_kvercmp (to support kernels >= 3) * some distros doesn't allow creation of quota files in directories with SELinux file_t type. Now we explicitly change file type of the test directory to tmp_t
Signed-off-by: Stanislav kholmanskikh <[email protected]> --- .../fs/quota_remount/quota_remount_test01.sh | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/testcases/kernel/fs/quota_remount/quota_remount_test01.sh b/testcases/kernel/fs/quota_remount/quota_remount_test01.sh index 98b15d6..7790d16 100755 --- a/testcases/kernel/fs/quota_remount/quota_remount_test01.sh +++ b/testcases/kernel/fs/quota_remount/quota_remount_test01.sh @@ -47,14 +47,8 @@ then fi MNTDIR=$TMPDIR/mnt -uname -r | { - IFS='.-' - read MAJOR MINOR RELEASE REST - if [ "$MAJOR" -lt 2 -o "$MINOR" -lt 6 -o "$RELEASE" -lt 26 ]; then - exit 1 - fi - exit 0; } -if [ $? -gt 0 ]; then +tst_kvercmp 2 6 26 +if [ $? -eq 0 ]; then tst_resm TCONF "Remounting with quotas enabled is not supported!" tst_resm TCONF "You should have kernel 2.6.26 and above running....." exit 0 @@ -83,6 +77,13 @@ mkdir $MNTDIR || die 2 "Could not create the mountpoint" mount -t ext3 -o loop,usrquota,grpquota $IMAGE $MNTDIR || die 2 "Could not mount the filesystem" tst_resm TINFO "Successfully mounted the File System" +# some distros (CentOS 6.x, for example) doesn't permit creating +# of quota files in a directory with SELinux file_t type +if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then + chcon -t tmp_t $MNTDIR || die 2 "Could not change SELinux file type" + tst_resm TINFO "Successfully changed SELinux file type" +fi + quotacheck -cug $MNTDIR || die 2 "Could not create quota files" tst_resm TINFO "Successfully Created Quota Files" -- 1.7.1 ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
