(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{<sysctl>} {<vfs.zfs.version.spa>}]
                          redirects: [
                            (redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {<'/dev/null'>}
                            )
                            (redir
                              op: <Id.Redir_GreatAnd '2>&'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<1>}
                            )
                          ]
                          more_env: []
                          do_fork: T
                        )
                      ]
                      negated: T
                      stderr_indices: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'1..0 # SKIP system doesn\'t have ZFS loaded'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
          ]
          spids: [119 134]
        )
      ]
      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: [150 167]
        )
      ]
      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: [191]
        )
      ]
      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>} {<64m>})
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [206]
        )
      ]
      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: [221]
        )
      ]
      redirects: []
    )
    (C {<trap>} 
      {
        (DQ <'cd /; zpool destroy -f acltools; rmdir '> ($ Id.VSub_DollarName MNT) 
          <'; mdconfig -d -u '> ($ Id.VSub_DollarName MD)
        )
      } {<EXIT>}
    )
    (C {<zpool>} {<create>} {<-m>} {($ Id.VSub_DollarName MNT)} {<acltools>} 
      {<'/dev/'> ($ Id.VSub_DollarName MD)}
    )
    (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 - \'zpool create\' failed.'>)})
            (C {<echo>} {(SQ <'Bail out!'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [256 269]
        )
      ]
      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: [347 360]
                    )
                  ]
                  else_action: []
                  redirects: []
                )
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      redirects: []
    )
    (C {<chmod>} {<600>} {<xxx>})
    (C {<rm>} {<xxx>})
    (C {<echo>} {(DQ <'ok 2'>)})
    (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
    )
    (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: [399 412]
        )
      ]
      else_action: [(C {<echo>} {(DQ <'not ok 3 # TODO: fails due to ACL changes in ZFS; bug 212323'>)})]
      redirects: []
    )
    (C {<echo>} {(DQ <'ok 4'>)})
  ]
)