From: Neeraj Pratap Singh Date: Wed, 13 Apr 2022 08:00:14 +0000 (+0530) Subject: qa: test chmod is allowed above 0777. X-Git-Tag: v18.0.0~958^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5aa304e12894cf1646a3e4efd2134ac8a194f029;p=ceph.git qa: test chmod is allowed above 0777. Signed-off-by: Neeraj Pratap Singh --- diff --git a/qa/tasks/cephfs/test_cephfs_shell.py b/qa/tasks/cephfs/test_cephfs_shell.py index 1ee5c7f84645d..f944cf312b561 100644 --- a/qa/tasks/cephfs/test_cephfs_shell.py +++ b/qa/tasks/cephfs/test_cephfs_shell.py @@ -168,11 +168,11 @@ class TestMkdir(TestCephFSShell): o = self.mount_a.stat('d1') log.info("mount_a output:\n{}".format(o)) - def test_mkdir_with_07000_octal_mode(self): + def test_mkdir_with_070000_octal_mode(self): """ - Test that mkdir fails with octal mode greater than 0777 + Test that mkdir fails with octal mode greater than 07777 """ - self.negtest_cephfs_shell_cmd(cmd="mkdir -m 07000 d2") + self.negtest_cephfs_shell_cmd(cmd="mkdir -m 070000 d2") try: self.mount_a.stat('d2') except CommandFailedError: @@ -968,6 +968,14 @@ class TestMisc(TestCephFSShell): o = self.get_cephfs_shell_cmd_output("help all") log.info("output:\n{}".format(o)) + def test_chmod(self): + """Test chmod is allowed above o0777 """ + + test_file1 = "test_file2.txt" + file1_content = 'A' * 102 + self.run_cephfs_shell_cmd(f"write {test_file1}", stdin=file1_content) + self.run_cephfs_shell_cmd(f"chmod 01777 {test_file1}") + class TestShellOpts(TestCephFSShell): """ Contains tests for shell options from conf file and shell prompt.