(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} 
                      {
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (command.Simple
                                  words: [{<sysctl>} {<-n>} {<kern.features.ufs_acl>}]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_Great '2>'>
                                      loc: (redir_loc.Fd fd:2)
                                      arg: {<'/dev/null'>}
                                    )
                                  ]
                                  more_env: []
                                  do_fork: T
                                )
                                (C {<echo>} {<0>})
                              ]
                            )
                          right: <Id.Eof_RParen _>
                        )
                      } {<-eq>} {<0>} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'1..0 # SKIP system does not have UFS ACL support'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
          ]
          spids: [113 141]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} 
                      {
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: (C {<id>} {<-u>})
                          right: <Id.Eof_RParen _>
                        )
                      } {<-ne>} {<0>} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'1..0 # SKIP you must be root'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
          ]
          spids: [157 174]
        )
      ]
      else_action: []
      redirects: []
    )
    (C {<echo>} {(DQ <1..4>)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TESTDIR='> name:TESTDIR)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (C {<dirname>} 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<realpath>} {($ Id.VSub_Number 0)})
                        right: <Id.Eof_RParen _>
                      )
                    }
                  )
                right: <Id.Eof_RParen _>
              )
            }
          spids: [198]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MD='> name:MD)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<mdconfig>} {<-at>} {<swap>} {<-s>} {<10m>})
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [213]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MNT='> name:MNT)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<mktemp>} {<-dt>} {<acltools>})
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [228]
        )
      ]
      redirects: []
    )
    (command.Simple
      words: [{<newfs>} {<'/dev/'> ($ Id.VSub_DollarName MD)}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
      more_env: []
      do_fork: T
    )
    (C {<trap>} 
      {
        (DQ <'cd /; umount -f '> ($ Id.VSub_DollarName MNT) <'; rmdir '> ($ Id.VSub_DollarName MNT) 
          <'; mdconfig -d -u '> ($ Id.VSub_DollarName MD)
        )
      } {<EXIT>}
    )
    (C {<mount>} {<-o>} {<nfsv4acls>} {<'/dev/'> ($ Id.VSub_DollarName MD)} {($ Id.VSub_DollarName MNT)})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<-ne>} {<0>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'not ok 1 - mount failed.'>)})
            (C {<echo>} {(SQ <'Bail out!'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [272 285]
        )
      ]
      else_action: []
      redirects: []
    )
    (C {<echo>} {(DQ <'ok 1'>)})
    (C {<cd>} {($ Id.VSub_DollarName MNT)})
    (C {<touch>} {<xxx>})
    (C {<setfacl>} {<-x2>} {<xxx>})
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [(command.Sentence child:(C {<Id.Lit_Colon ':'>}) terminator:<Id.Op_Semi _>)]
        )
      body: 
        (command.DoGroup
          children: [
            (command.Sentence
              child: 
                (command.Simple
                  words: [
                    {<setfacl>}
                    {<-a0>}
                    {<u> <Id.Lit_Colon ':'> <42> <Id.Lit_Colon ':'> <rwx> <Id.Lit_Colon ':'> <allow>}
                    {<xxx>}
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '2>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  more_env: []
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
            (command.Sentence
              child: 
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<-ne>} {<0>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.Sentence
                          child: (command.ControlFlow token:<Id.ControlFlow_Break break>)
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                      spids: [363 376]
                    )
                  ]
                  else_action: []
                  redirects: []
                )
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      redirects: []
    )
    (C {<chmod>} {<600>} {<xxx>})
    (C {<rm>} {<xxx>})
    (C {<echo>} {(DQ <'ok 2'>)})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} 
                      {
                        (command_sub
                          left_token: <Id.Left_Backtick '`'>
                          child: (C {<sysctl>} {<-n>} {<vfs.acl_nfs4_old_semantics>})
                          right: <Id.Backtick_Right '`'>
                        )
                      } {<Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [
                {<perl>}
                {($ Id.VSub_DollarName TESTDIR) <'/run'>}
                {($ Id.VSub_DollarName TESTDIR) <'/tools-nfs4-psarc.test'>}
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
          ]
          spids: [403 424]
        )
      ]
      else_action: [
        (command.Simple
          words: [
            {<perl>}
            {($ Id.VSub_DollarName TESTDIR) <'/run'>}
            {($ Id.VSub_DollarName TESTDIR) <'/tools-nfs4.test'>}
          ]
          redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
          more_env: []
          do_fork: T
        )
      ]
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<-eq>} {<0>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<echo>} {(DQ <'ok 3'>)})]
          spids: [455 468]
        )
      ]
      else_action: [(C {<echo>} {(DQ <'not ok 3'>)})]
      redirects: []
    )
    (C {<cd>} {<'/'>})
    (C {<echo>} {(DQ <'ok 4'>)})
  ]
)