Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10657

testAclCLI.xml setfacl test should expect mask r-x

    Details

    • Type: Test
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha2
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      The following test case should expect mask::r-x ACL entry instead of mask::rwx:

            <description>setfacl : check inherit default ACL to dir</description>
            <test-commands>
              <command>-fs NAMENODE -mkdir /dir1</command>
              <command>-fs NAMENODE -setfacl -m default:user:charlie:r-x,default:group:admin:rwx /dir1</command>
              <command>-fs NAMENODE -mkdir /dir1/dir2</command>
              <command>-fs NAMENODE -getfacl /dir1/dir2</command>
      ...
              <comparator>
                <type>SubstringComparator</type>
                <expected-output>mask::rwx</expected-output>
              </comparator>
      

      But why does it pass? Because the comparator type is SubstringComparator and it matches the wrong line default:mask::rwx in the output of getfacl:

      # file: /dir1/dir2
      # owner: jzhuge
      # group: supergroup
      user::rwx
      user:charlie:r-x
      group::r-x
      group:admin:rwx	#effective:r-x
      mask::r-x
      other::r-x
      default:user::rwx
      default:user:charlie:r-x
      default:group::r-x
      default:group:admin:rwx
      default:mask::rwx
      default:other::r-x
      

      The comparator should match the entire line instead of just substring. Other comparators in testAclCLI.xml have the same problem.

        Attachments

          Activity

            People

            • Assignee:
              jzhuge John Zhuge
              Reporter:
              jzhuge John Zhuge
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: