(command.CommandList children: [ (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:ntest) op:assign_op.Equal rhs:{<1>} spids:[4])] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:os) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<uname>} {<-s>}))} spids: [7] ) ] ) (command.Pipeline children: [ (C {<echo>} {(${ Id.VSub_Name dir)}) (command.Simple words: [{<egrep>} {(SQ <'^/'>)}] 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>}) ] do_fork: T ) ] negated: F ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>}) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:maindir) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name dir) <'/../..'>)} spids: [53] ) ] ) ] spids: [37 50] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:maindir) op: assign_op.Equal rhs: { (DQ (command_sub left_token:<Id.Left_Backtick '`'> child:(C {<pwd>})) <'/'> (${ Id.VSub_Name dir) <'/../..'> ) } spids: [64] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name LUSTRE))} {<Id.Lit_RBracket ']'>}) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZPOOL) op: assign_op.Equal rhs: {(DQ <zpool>)} spids: [102] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZFS) op: assign_op.Equal rhs: {(DQ <zfs>)} spids: [108] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZDB) op: assign_op.Equal rhs: {(DQ <zdb>)} spids: [114] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:zpool_f_flag) op: assign_op.Equal rhs: {(DQ <-f>)} spids: [120] ) ] ) ] spids: [84 99] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZPOOL) op: assign_op.Equal rhs: {(DQ <lzpool>)} spids: [128] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZFS) op: assign_op.Equal rhs: {(DQ <lzfs>)} spids: [134] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZDB) op: assign_op.Equal rhs: {(DQ <lzdb>)} spids: [140] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:zpool_f_flag) op: assign_op.Equal rhs: {(DQ <-F>)} spids: [146] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:no_mountpoint) op: assign_op.Equal rhs: {<1>} spids: [152] ) ] ) ] ) (command.Pipeline children: [ (command.Simple words: [{<stat>} {<--version>}] redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})] do_fork: T ) (command.Simple words: [{<grep>} {<GNU>}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})] do_fork: T ) ] negated: F ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>}) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GNU_STAT) op: assign_op.Equal rhs: {(DQ <yes>)} spids: [193] ) ] ) ] spids: [177 190] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name os))} {<Id.Lit_Equals '='>} {(DQ <SunOS>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:import_flags) op: assign_op.Equal rhs: {(DQ <'-d /dev/lofi'>)} spids: [222] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:mount_t_flag) op: assign_op.Equal rhs: {(DQ <-F>)} spids: [228] ) ] ) ] spids: [200 219] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:mount_t_flag) op: assign_op.Equal rhs: {(DQ <-t>)} spids: [236] ) ] ) ] ) (command.ShFunction name: die body: (BraceGroup children: [ (command.Simple words: [{<echo>} {(DQ (${ Id.VSub_Number 1))}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/stderr'>})] do_fork: T ) (C {<echo>} {(DQ <'Bail out!'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ) (command.ShFunction name: calcsum body: (BraceGroup children: [ (command.Pipeline children: [ (command.Simple words: [ {<dd>} {<Id.Lit_VarLike 'if='> (DQ (${ Id.VSub_Number 1))} {<Id.Lit_VarLike 'bs='> <1M>} ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<openssl>} {<md5>}) ] negated: F ) ] ) ) (command.ShFunction name: create_file body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:name) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 1))} spids: [316] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:size) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 2))} spids: [324] ) ] ) (command.Simple words: [ {<dd>} {<Id.Lit_VarLike 'if='> <'/dev/urandom'>} {<Id.Lit_VarLike 'of='> (${ Id.VSub_Name name)} {<Id.Lit_VarLike 'bs='> (${ Id.VSub_Name size)} {<Id.Lit_VarLike 'count='> <1>} ] 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>}) ] do_fork: T ) (C {<sync>}) ] ) ) (command.ShFunction name: expect body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:eorig) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 1))} spids: [370] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:eexp) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(DQ (${ Id.VSub_Name eorig))}) (C {<egrep>} {<-v>} {(SQ <'^[ \t]*$'>)}) (C {<sed>} { (SQ < 's/^[ \t][ \t]*//g;s/[ \t][ \t]*$//g;s/[ \t][ \t]*/ /g;s/$/%EoL%/' > ) } ) (C {<xargs>}) ] negated: F ) ) } spids: [378] ) ] ) (C {<shift>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:gorig) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Simple words: [{<sh>} {<-c>} {(DQ ($ Id.VSub_Star '$*'))}] redirects: [ (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) ) } spids: [417] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:got) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(DQ (${ Id.VSub_Name gorig))}) (C {<egrep>} {<-v>} {(SQ <'^[ \t]*$'>)}) (C {<sed>} { (SQ < 's/^[ \t][ \t]*//g;s/[ \t][ \t]*$//g;s/[ \t][ \t]*/ /g;s/$/%EoL%/' > ) } ) (C {<xargs>}) ] negated: F ) ) } spids: [434] ) ] ) (command.Pipeline children: [ (C {<echo>} {(DQ (${ Id.VSub_Name got))}) (command.Simple words: [{<egrep>} {(DQ (${ Id.VSub_Name eexp))}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] negated: F ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<echo>} {(DQ <'ok '> (${ Id.VSub_Name ntest) <' '> (${ Id.VSub_Name add_msg))}) ] spids: [492 505] ) ] else_action: [ (C {<echo>} {(DQ <'not ok '> (${ Id.VSub_Name ntest) <' '> (${ Id.VSub_Name add_msg))}) (C {<echo>} {(DQ <'# ----- expected from: '> ($ Id.VSub_Star '$*'))}) (command.Pipeline children: [(C {<echo>} {(DQ (${ Id.VSub_Name eorig))}) (C {<sed>} {(SQ <'s/^/# /'>)})] negated: F ) (C {<echo>} {(DQ <'# ----- got:'>)}) (command.Pipeline children: [(C {<echo>} {(DQ (${ Id.VSub_Name gorig))}) (C {<sed>} {(SQ <'s/^/# /'>)})] negated: F ) (C {<echo>} {(DQ <'# ----- end'>)}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ntest) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$ntest')} {<Id.Lit_Other '+'>} {<1>}) ) } spids: [598] ) ] ) ] ) ) (command.ShFunction name: expect_ok body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:out) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Simple words: [{($ Id.VSub_Star '$*')}] redirects: [ (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) ) } spids: [621] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ec) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [632] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$ec')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<echo>} {(DQ <'ok '> (${ Id.VSub_Name ntest) <' '> (${ Id.VSub_Name add_msg))}) (C {<echo>} {(DQ <'# ----- expected success from: '> ($ Id.VSub_Star '$*'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} {(DQ (${ Id.VSub_Name out))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<echo>} {(DQ <'# ----- output (exit code='> (${ Id.VSub_Name ec) <'):'>)} ) (command.Pipeline children: [ (C {<echo>} {(DQ (${ Id.VSub_Name out))}) (C {<sed>} {(SQ <'s/^/# /'>)}) ] negated: F ) (C {<echo>} {(DQ <'# ----- end'>)}) ] spids: [674 691] ) ] ) ] spids: [636 649] ) ] else_action: [ (C {<echo>} {(DQ <'not ok '> (${ Id.VSub_Name ntest) <' '> (${ Id.VSub_Name add_msg))}) (C {<echo>} {(DQ <'# ----- expected success from: '> ($ Id.VSub_Star '$*'))}) (C {<echo>} {(DQ <'# ----- output (exit code='> (${ Id.VSub_Name ec) <'):'>)}) (command.Pipeline children: [(C {<echo>} {(DQ (${ Id.VSub_Name out))}) (C {<sed>} {(SQ <'s/^/# /'>)})] negated: F ) (C {<echo>} {(DQ <'# ----- end'>)}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ntest) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$ntest')} {<Id.Lit_Other '+'>} {<1>}) ) } spids: [795] ) ] ) ] ) ) (command.ShFunction name: expect_fl body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:out) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Simple words: [{($ Id.VSub_Star '$*')}] redirects: [ (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) ) } spids: [818] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ec) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [829] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$ec')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<echo>} {(DQ <'ok '> (${ Id.VSub_Name ntest) <' '> (${ Id.VSub_Name add_msg))}) (C {<echo>} {(DQ <'# ----- expected failure from: '> ($ Id.VSub_Star '$*'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} {(DQ (${ Id.VSub_Name out))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<echo>} {(DQ <'# ----- output (exit code='> (${ Id.VSub_Name ec) <'):'>)} ) (command.Pipeline children: [ (C {<echo>} {(DQ (${ Id.VSub_Name out))}) (C {<sed>} {(SQ <'s/^/# /'>)}) ] negated: F ) (C {<echo>} {(DQ <'# ----- end'>)}) ] spids: [871 888] ) ] ) ] spids: [833 846] ) ] else_action: [ (C {<echo>} {(DQ <'not ok '> (${ Id.VSub_Name ntest) <' '> (${ Id.VSub_Name add_msg))}) (C {<echo>} {(DQ <'# ----- expected failure from: '> ($ Id.VSub_Star '$*'))}) (C {<echo>} {(DQ <'# ----- output (exit code='> (${ Id.VSub_Name ec) <'):'>)}) (command.Pipeline children: [(C {<echo>} {(DQ (${ Id.VSub_Name out))}) (C {<sed>} {(SQ <'s/^/# /'>)})] negated: F ) (C {<echo>} {(DQ <'# ----- end'>)}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ntest) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$ntest')} {<Id.Lit_Other '+'>} {<1>}) ) } spids: [992] ) ] ) ] ) ) (command.ShFunction name: quick_exit body: (BraceGroup children: [ (C {<echo>} {(DQ <1..1>)}) (C {<echo>} {(DQ <'ok 1'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] ) ) (command.ShFunction name: setup_tmpfs body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'mktemp -d /tmp/zfs-regression.XXXXXXXXXX'>)} spids: [1046] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TMPDIR) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {(${ Id.VSub_Name cmd)}) ) } spids: [1052] ) ] ) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'mount -t tmpfs none '> (${ Id.VSub_Name TMPDIR))} spids: [1073] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(${ Id.VSub_Name cmd)}) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) ] ) ) (command.ShFunction name: cleanup_tmpfs body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name TMPDIR))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: { (DQ <'umount '> (${ Id.VSub_Name TMPDIR) <' && rmdir '> (${ Id.VSub_Name TMPDIR) ) } spids: [1128] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<eval>} {(DQ (${ Id.VSub_Name cmd))}) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) ] spids: [1110 1125] ) ] ) ] ) ) (command.ShFunction name: truncate_cmd body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:size) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 1))} spids: [1176] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:file) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 2))} spids: [1184] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: { (DQ <'dd if=/dev/null of='> (${ Id.VSub_Name file) <' bs=1 count=0 seek='> (${ Id.VSub_Name size) ) } spids: [1193] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(${ Id.VSub_Name cmd)}] 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>} ) ] do_fork: T ) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) ] ) ) (command.ShFunction name: create_memdisk body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:size) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 1))} spids: [1241] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:devname) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 2))} spids: [1249] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name os))} {<Id.Lit_Equals '='>} {(DQ <FreeBSD>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name devname))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:devparam) op: assign_op.Equal rhs: {(DQ <'-u '> (${ Id.VSub_Name devname))} spids: [1298] ) ] ) ] spids: [1280 1295] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: { (DQ <'mdconfig -a -t swap -s '> (${ Id.VSub_Name size) <' '> (${ Id.VSub_Name devparam) ) } spids: [1310] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DISKNAME) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Simple words: [{($ Id.VSub_DollarName '$cmd')}] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ) } spids: [1323] ) ] ) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name devname))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DISKNAME) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name devname))} spids: [1363] ) ] ) ] spids: [1345 1360] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FDISKNAME) op: assign_op.Equal rhs: {(DQ <'/dev/'> (${ Id.VSub_Name DISKNAME))} spids: [1374] ) ] ) ] spids: [1258 1277] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name os))} {<Id.Lit_Equals '='>} {(DQ <SunOS>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'mktemp /tmp/zfstest.XXXXXXXXXX'>)} spids: [1405] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fname) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {(${ Id.VSub_Name cmd)}) ) } spids: [1411] ) ] ) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) (C {<truncate_cmd>} {(DQ (${ Id.VSub_Name size))} {(DQ (${ Id.VSub_Name fname))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name devname))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: { (DQ <'lofiadm -a '> (${ Id.VSub_Name fname) <' '> (${ Id.VSub_Name devname) ) } spids: [1467] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(${ Id.VSub_Name cmd)}) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DISKNAME) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name devname))} spids: [1496] ) ] ) ] spids: [1449 1464] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'lofiadm -a '> (${ Id.VSub_Name fname))} spids: [1507] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DISKNAME) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {(${ Id.VSub_Name cmd)}) ) } spids: [1516] ) ] ) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FDISKNAME) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name DISKNAME))} spids: [1540] ) ] ) ] spids: [1383 1402] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name os))} {<Id.Lit_Equals '='>} {(DQ <Linux>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name TMPDIR_DISKS))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<setup_tmpfs>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TMPDIR_DISKS) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name TMPDIR))} spids: [1591] ) ] ) ] spids: [1570 1585] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'mktemp '> (${ Id.VSub_Name TMPDIR_DISKS) <'/disk.XXXXXXXXXX'>)} spids: [1603] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fname) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {(${ Id.VSub_Name cmd)}) ) } spids: [1613] ) ] ) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) (C {<truncate_cmd>} {(DQ (${ Id.VSub_Name size))} {(DQ (${ Id.VSub_Name fname))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name devname))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:devname) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(${ Id.VSub_Name devname)}) (C {<cut>} {<-c>} {<9->}) ] negated: F ) ) } spids: [1669] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: { (DQ <'losetup /dev/'> (${ Id.VSub_Name devname) <' '> (${ Id.VSub_Name fname) <' 2>&1'> ) } spids: [1689] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<eval>} {(${ Id.VSub_Name cmd)}) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DISKNAME) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name devname))} spids: [1721] ) ] ) ] spids: [1651 1666] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'losetup -s -f '> (${ Id.VSub_Name fname) <' 2>&1'>)} spids: [1732] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:diskname) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<eval>} {(${ Id.VSub_Name cmd)}) ) } spids: [1742] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name diskname))} {<Id.Lit_Equals '='>} {(DQ <'losetup: could not find any free loop device'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:max) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {<'/dev/loop'> <Id.Lit_Star '*'>}) (C {<awk>} { (SQ < 'BEGIN { RS=" "; FS="loop" } {if ($2 > max) max = $2} END {print max}' > ) } ) ] negated: F ) ) } spids: [1781] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:max) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike max> right: {<Id.Lit_Digits 1>} ) ) } spids: [1800] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: { (DQ <'mknod /dev/loop'> (${ Id.VSub_Name max) <' b 7 '> (${ Id.VSub_Name max) ) } spids: [1811] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(${ Id.VSub_Name cmd)}) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'losetup -s -f '> (${ Id.VSub_Name fname))} spids: [1841] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:diskname) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {(${ Id.VSub_Name cmd)}) ) } spids: [1850] ) ] ) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) ] spids: [1755 1774] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DISKNAME) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<eval>} {<echo>} {(${ Id.VSub_Name diskname)}) (C {<sed>} {(SQ <'s/^\\/dev\\///'>)}) ] negated: F ) ) } spids: [1874] ) ] ) ] ) (C {<ln>} {<'/dev/'> (${ Id.VSub_Name DISKNAME)} {<'/dev/zfstest_'> (${ Id.VSub_Name DISKNAME)} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DISKNAME) op: assign_op.Equal rhs: {(DQ <zfstest_> (${ Id.VSub_Name DISKNAME))} spids: [1916] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FDISKNAME) op: assign_op.Equal rhs: {(DQ <'/dev/'> (${ Id.VSub_Name DISKNAME))} spids: [1925] ) ] ) ] spids: [1548 1567] ) ] else_action: [(C {<die>} {(DQ <'Sorry, your OS is not supported'>)})] ) ] ) ) (command.ShFunction name: destroy_memdisk body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:disk) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 1))} spids: [1959] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name os))} {<Id.Lit_Equals '='>} {(DQ <FreeBSD>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'mdconfig -d -u '> (${ Id.VSub_Name disk))} spids: [1990] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(${ Id.VSub_Name cmd)}) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) ] spids: [1968 1987] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name os))} {<Id.Lit_Equals '='>} {(DQ <SunOS>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'lofiadm '> (${ Id.VSub_Name disk))} spids: [2037] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fname) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {(${ Id.VSub_Name cmd)}) ) } spids: [2046] ) ] ) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'lofiadm -d '> (${ Id.VSub_Name disk))} spids: [2068] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(${ Id.VSub_Name cmd)}) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'rm '> (${ Id.VSub_Name fname))} spids: [2094] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(${ Id.VSub_Name cmd)}) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) ] spids: [2015 2034] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name os))} {<Id.Lit_Equals '='>} {(DQ <Linux>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'rm /dev/'> (${ Id.VSub_Name disk))} spids: [2141] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(${ Id.VSub_Name cmd)}) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:disk) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(${ Id.VSub_Name disk)}) (C {<cut>} {<-c>} {<9->}) ] negated: F ) ) } spids: [2166] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: { (DQ <'losetup /dev/'> (${ Id.VSub_Name disk) <' | awk \'{print substr('> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'3, 2, length('> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'3)-2)}\''> ) } spids: [2187] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fname) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<eval>} {(${ Id.VSub_Name cmd)}) ) } spids: [2201] ) ] ) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'losetup -d /dev/'> (${ Id.VSub_Name disk))} spids: [2225] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(${ Id.VSub_Name cmd)}) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'rm '> (${ Id.VSub_Name fname))} spids: [2251] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(${ Id.VSub_Name cmd)}) (C {<die>} {(DQ <'failed: '> (${ Id.VSub_Name cmd))}) ] ) ] spids: [2119 2138] ) ] else_action: [(C {<die>} {(DQ <'Sorry, your OS is not supported'>)})] ) ] ) ) (command.ShFunction name: disks_create body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name ndisks))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:start) op: assign_op.Equal rhs: {<0>} spids: [2316] ) ] ) ] spids: [2298 2313] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:start) op: assign_op.Equal rhs: {(${ Id.VSub_Name ndisks)} spids: [2323] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ndisks) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike start> right: {($ Id.VSub_Number '$1')} ) ) } spids: [2332] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:n) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: <Id.Lit_ArithVarLike ndisks> right: {($ Id.VSub_DollarName '$start')} ) ) } spids: [2341] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Number 2))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:size) op: assign_op.Equal rhs: {(DQ <96M>)} spids: [2368] ) ] ) ] spids: [2350 2365] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:size) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 2))} spids: [2377] ) ] ) ] ) (command.ForEach iter_name: i iter_words: [ { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<nums>} {($ Id.VSub_DollarName '$n')} {($ Id.VSub_DollarName '$start')}) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (C {<create_memdisk>} {(${ Id.VSub_Name size)}) (C {<eval>} {<disk> (${ Id.VSub_Name i) <Id.Lit_Equals '='> (DQ (${ Id.VSub_Name DISKNAME))} ) (C {<eval>} {<fdisk> (${ Id.VSub_Name i) <Id.Lit_Equals '='> (DQ (${ Id.VSub_Name FDISKNAME))} ) ] ) ) ] ) ) (command.ShFunction name: disks_destroy body: (BraceGroup children: [ (command.ForEach iter_name: i iter_words: [ { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<nums>} {($ Id.VSub_DollarName '$ndisks')} {<0>}) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (C {<eval>} {<Id.Lit_VarLike 'disk='> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <disk> (${ Id.VSub_Name i) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} {(DQ (${ Id.VSub_Name disk))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [(C {<destroy_memdisk>} {(${ Id.VSub_Name disk)})] spids: [2485 2502] ) ] ) ] ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name TMPDIR_DISKS))} {<Id.Lit_RBracket ']'>} ) (command.Simple words: [{<cleanup_tmpfs>}] more_env: [ (env_pair name: TMPDIR val: {(DQ (${ Id.VSub_Name TMPDIR_DISKS))} spids: [2532] ) ] do_fork: T ) ] ) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>}) ] ) ) (command.ShFunction name: disk_create body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:diskno) op: assign_op.Equal rhs: {(${ Id.VSub_Number 1)} spids: [2556] ) ] ) (C {<eval>} {<Id.Lit_VarLike 'disk='> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <disk> (${ Id.VSub_Name diskno) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} {(${ Id.VSub_Name disk)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [(C {<die>} {(DQ <disk> (${ Id.VSub_Name diskno) <' is already set'>)})] spids: [2572 2587] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dname) op: assign_op.Equal rhs: {(${ Id.VSub_Number 2)} spids: [2604] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Number 3))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:size) op: assign_op.Equal rhs: {(DQ <96M>)} spids: [2628] ) ] ) ] spids: [2610 2625] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:size) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 3))} spids: [2637] ) ] ) ] ) (C {<create_memdisk>} {(${ Id.VSub_Name size)} {(${ Id.VSub_Name dname)}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name DISKNAME))} {<Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name dname))} {<Id.Lit_RBracket ']'>} ) (C {<die>} {(DQ (${ Id.VSub_Name DISKNAME) <' != '> (${ Id.VSub_Name dname))}) ] ) (C {<eval>} {<disk> (${ Id.VSub_Name diskno) <Id.Lit_Equals '='> (DQ (${ Id.VSub_Name DISKNAME))} ) (C {<eval>} {<fdisk> (${ Id.VSub_Name diskno) <Id.Lit_Equals '='> (DQ (${ Id.VSub_Name FDISKNAME))} ) ] ) ) (command.ShFunction name: disk_destroy body: (BraceGroup children: [ (C {<eval>} {<Id.Lit_VarLike 'disk='> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <disk> (${ Id.VSub_Number 1) } ) (C {<destroy_memdisk>} {(${ Id.VSub_Name disk)}) (C {<eval>} {<disk> (${ Id.VSub_Number 1) <Id.Lit_Equals '='> (DQ )}) ] ) ) (command.ShFunction name: files_create body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name nfiles))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:start) op: assign_op.Equal rhs: {<0>} spids: [2784] ) ] ) ] spids: [2766 2781] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:start) op: assign_op.Equal rhs: {(${ Id.VSub_Name nfiles)} spids: [2791] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:nfiles) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike start> right: {($ Id.VSub_Number '$1')} ) ) } spids: [2800] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:n) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: <Id.Lit_ArithVarLike nfiles> right: {($ Id.VSub_DollarName '$start')} ) ) } spids: [2809] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Number 2))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:size) op: assign_op.Equal rhs: {(DQ <96M>)} spids: [2836] ) ] ) ] spids: [2818 2833] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:size) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 2))} spids: [2845] ) ] ) ] ) (command.ForEach iter_name: i iter_words: [ { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<nums>} {($ Id.VSub_DollarName '$n')} {($ Id.VSub_DollarName '$start')}) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name os))} {<Id.Lit_Equals '='>} {(DQ <Linux>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name TMPDIR_FILES))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<setup_tmpfs>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TMPDIR_FILES) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name TMPDIR))} spids: [2919] ) ] ) ] spids: [2898 2913] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:file) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<mktemp>} {(${ Id.VSub_Name TMPDIR_FILES) <'/zfstest.XXXXXXXX'>} ) ) } spids: [2930] ) ] ) ] spids: [2876 2895] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:file) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<mktemp>} {<'/tmp/zfstest.XXXXXXXX'>}) ) } spids: [2946] ) ] ) ] ) (C {<truncate_cmd>} {(${ Id.VSub_Name size)} {(${ Id.VSub_Name file)}) (C {<eval>} {<file> (${ Id.VSub_Name i) <Id.Lit_Equals '='> (${ Id.VSub_Name file)}) ] ) ) ] ) ) (command.ShFunction name: files_destroy body: (BraceGroup children: [ (command.ForEach iter_name: i iter_words: [ { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<nums>} {($ Id.VSub_DollarName '$nfiles')} {<0>}) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (C {<eval>} {<Id.Lit_VarLike 'file='> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <file> (${ Id.VSub_Name i) } ) (C {<rm>} {<-f>} {(${ Id.VSub_Name file)}) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:nfiles) op: assign_op.Equal rhs: {<0>} spids: [3036] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name TMPDIR_FILES))} {<Id.Lit_RBracket ']'>} ) (command.Simple words: [{<cleanup_tmpfs>}] more_env: [ (env_pair name: TMPDIR val: {(DQ (${ Id.VSub_Name TMPDIR_FILES))} spids: [3054] ) ] do_fork: T ) ] ) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>}) ] ) ) (command.ShFunction name: name_create body: (BraceGroup children: [ (C {<echo>} { (DQ <zfstest_> (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple words: [ {<dd>} {<Id.Lit_VarLike 'if='> <'/dev/urandom'>} {<Id.Lit_VarLike 'bs='> <1k>} {<Id.Lit_VarLike 'count='> <1>} ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<openssl>} {<md5>}) (C {<awk>} {(SQ <'{ print $NF }'>)}) ] negated: F ) ) ) } ) ] ) ) (command.ShFunction name: names_create body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:nnames) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [3125] ) ] ) (command.ForEach iter_name: i iter_words: [ { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<nums>} {($ Id.VSub_DollarName '$nnames')} {<0>}) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (C {<eval>} {<name> (${ Id.VSub_Name i) <Id.Lit_Equals '='> (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<name_create>}) ) } ) ] ) ) ] ) ) (command.ShFunction name: is_mountpoint body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dir) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 1))} spids: [3175] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {(DQ (${ Id.VSub_Name dir))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})] spids: [3183 3200] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name GNU_STAT))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:statcmd) op: assign_op.Equal rhs: {(DQ <'stat -c'>)} spids: [3229] ) ] ) ] spids: [3211 3226] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:statcmd) op: assign_op.Equal rhs: {(DQ <'stat -f'>)} spids: [3238] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Simple words: [ {(${ Id.VSub_Name statcmd)} {(SQ <'%d'>)} {(${ Id.VSub_Name dir)} ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ) ) } {<-eq>} { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Simple words: [ {(${ Id.VSub_Name statcmd)} {(SQ <'%d'>)} {(${ Id.VSub_Name dir) <'/..'>} ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ) ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})] spids: [3247 3299] ) ] ) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>}) ] ) ) (command.ShFunction name: nums body: (BraceGroup children: [ (command.Simple words: [{<which>} {<jot>}] 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>}) ] do_fork: T ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<jot>} {(${ Id.VSub_Number 1)} {(${ Id.VSub_Number 2)}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {($ Id.VSub_QMark '$?')} ) ] spids: [3335 3348] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:start) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 2))} spids: [3371] ) ] ) (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name start))} {<Id.Lit_RBracket ']'>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:start) op: assign_op.Equal rhs: {(DQ <1>)} spids: [3393] ) ] ) ] ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:end) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.Binary op_id: Id.Arith_Plus left: {(${ Id.VSub_Number 1)} right: {(${ Id.VSub_Name start)} ) right: {<Id.Lit_Digits 1>} ) ) } spids: [3400] ) ] ) (command.Simple words: [{<which>} {<seq>}] 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>}) ] do_fork: T ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<seq>} {(${ Id.VSub_Name start)} {(${ Id.VSub_Name end)}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {($ Id.VSub_QMark '$?')} ) ] spids: [3427 3440] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:i) op: assign_op.Equal rhs: {<1>} spids: [3463] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: [(command.Sentence child:(C {<Id.Lit_Colon ':'>}) terminator:<Id.Op_Semi _>)] body: (command.DoGroup children: [ (C {<echo>} {($ Id.VSub_DollarName '$i')}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$i')} {<-eq>} {(${ Id.VSub_Number 1)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)] spids: [3480 3495] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:i) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 1>} ) ) } spids: [3504] ) ] ) ] ) ) ] ) ) (command.ShFunction name: wait_for_resilver body: (BraceGroup children: [ (command.ForEach iter_name: i iter_words: [{(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<nums>} {<64>}))}] do_arg_iter: F body: (command.DoGroup children: [ (command.Pipeline children: [ (C {(${ Id.VSub_Name ZPOOL)} {<status>} {(${ Id.VSub_Number 1)}) (command.Simple words: [{<grep>} {<replacing>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] negated: F ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)] spids: [3563 3576] ) ] ) (C {<sleep>} {<1>}) ] ) ) ] ) ) (command.ShFunction name: get_guid body: (BraceGroup children: [ (command.Pipeline children: [ (C {(${ Id.VSub_Name ZDB)} {<-l>} {(${ Id.VSub_Number 1)}) (C {<grep>} {<-B1>} {(${ Id.VSub_Number 1)}) (C {<grep>} {<guid>}) (C {<head>} {<-n1>}) (C {<awk>} {(SQ <'BEGIN {FS="="} {print $2}'>)}) ] negated: F ) ] ) ) ] )