(command.CommandList children: [ (command.ShFunction name: usage body: (BraceGroup children: [ (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 107 stdin_parts: [ <'Usage: '> ($ Id.VSub_Number '$0') <' [options] command [arguments]\n'> <'\n'> <'OPTIONS\n'> <'\t-p percent\n'> <'\t--probability=percent\n'> <'\t\tlikelihood of failure injection, in percent.\n'> <'\t\tDefault value is 1\n'> <'\n'> <'\t-t value\n'> <'\t--times=value\n'> <'\t\tspecifies how many times failures may happen at most.\n'> <'\t\tDefault value is 1\n'> <'\n'> <'\t--oom-kill-allocating-task=value\n'> <'\t\tset /proc/sys/vm/oom_kill_allocating_task to specified value\n'> <'\t\tbefore running the command.\n'> <'\t\tDefault value is 1\n'> <'\n'> <'\t-h, --help\n'> <'\t\tDisplay a usage message and exit\n'> <'\n'> < '\t--interval=value, --space=value, --verbose=value, --task-filter=value,\n' > < '\t--stacktrace-depth=value, --require-start=value, --require-end=value,\n' > <'\t--reject-start=value, --reject-end=value, --ignore-gfp-wait=value\n'> <'\t\tSee Documentation/fault-injection/fault-injection.txt for more\n'> <'\t\tinformation\n'> <'\n'> <'\tfailslab options:\n'> <'\t--cache-filter=value\n'> <'\n'> <'\tfail_page_alloc options:\n'> <'\t--ignore-gfp-highmem=value, --min-order=value\n'> <'\n'> <'ENVIRONMENT\n'> <'\tFAILCMD_TYPE\n'> <'\t\tThe following values for FAILCMD_TYPE are recognized:\n'> <'\n'> <'\t\tfailslab\n'> <'\t\t\tinject slab allocation failures\n'> <'\t\tfail_page_alloc\n'> <'\t\t\tinject page allocation failures\n'> <'\n'> <'\t\tIf FAILCMD_TYPE is not defined, then failslab is used.\n'> ] ) ) ] do_fork: T ) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$UID')} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {<must>} {<be>} {<run>} {<as>} {<root>}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [111 125] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DEBUGFS) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<mount>} {<-t>} {<debugfs>}) (C {<head>} {<-1>}) (C {<awk>} {(SQ <'{ print $3}'>)}) ] negated: F ) ) } spids: [151] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {(DQ ($ Id.VSub_DollarName '$DEBUGFS'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {<debugfs>} {<is>} {<not>} {<mounted>}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [177 192] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FAILCMD_TYPE) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name FAILCMD_TYPE> suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{<failslab>}) ) } spids: [216] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FAULTATTR) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$DEBUGFS') <'/'> ($ Id.VSub_DollarName '$FAILCMD_TYPE')} spids: [223] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {($ Id.VSub_DollarName '$FAULTATTR')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {($ Id.VSub_DollarName '$FAILCMD_TYPE')} {<is>} {<not>} {<available>}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [229 242] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LONGOPTS) op: assign_op.Equal rhs: {<probability> <Id.Lit_Colon ':'> <Id.Lit_Comma ','> <interval> <Id.Lit_Colon ':'> <Id.Lit_Comma ','> <times> <Id.Lit_Colon ':'> <Id.Lit_Comma ','> <space> <Id.Lit_Colon ':'> <Id.Lit_Comma ','> <verbose> <Id.Lit_Colon ':'> <Id.Lit_Comma ','> <task-filter> <Id.Lit_Colon ':'> } spids: [266] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LONGOPTS) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$LONGOPTS') <Id.Lit_Comma ','> <stacktrace-depth> <Id.Lit_Colon ':'> <Id.Lit_Comma ','> <require-start> <Id.Lit_Colon ':'> <Id.Lit_Comma ','> <require-end> <Id.Lit_Colon ':'> } spids: [285] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LONGOPTS) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$LONGOPTS') <Id.Lit_Comma ','> <reject-start> <Id.Lit_Colon ':'> <Id.Lit_Comma ','> <reject-end> <Id.Lit_Colon ':'> <Id.Lit_Comma ','> <oom-kill-allocating-task> <Id.Lit_Colon ':'> <Id.Lit_Comma ','> <help> } spids: [297] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$FAILCMD_TYPE')} {<Id.Lit_Equals '='>} {<failslab>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LONGOPTS) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$LONGOPTS') <Id.Lit_Comma ','> <ignore-gfp-wait> <Id.Lit_Colon ':'> <Id.Lit_Comma ','> <cache-filter> <Id.Lit_Colon ':'> } spids: [328] ) ] ) ] spids: [312 325] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$FAILCMD_TYPE')} {<Id.Lit_Equals '='>} {<fail_page_alloc>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LONGOPTS) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$LONGOPTS') <Id.Lit_Comma ','> <ignore-gfp-wait> <Id.Lit_Colon ':'> <Id.Lit_Comma ','> <ignore-gfp-highmem> <Id.Lit_Colon ':'> <Id.Lit_Comma ','> <min-order> <Id.Lit_Colon ':'> } spids: [353] ) ] ) ] spids: [337 350] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TEMP) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<getopt>} {<-o>} {<p> <Id.Lit_Colon ':'> <i> <Id.Lit_Colon ':'> <t> <Id.Lit_Colon ':'> <s> <Id.Lit_Colon ':'> <v> <Id.Lit_Colon ':'> <h> } {<--long>} {($ Id.VSub_DollarName '$LONGOPTS')} {<-n>} {(SQ <failcmd.sh>)} {<-->} {(DQ ($ Id.VSub_At '$@'))} ) ) } spids: [368] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<usage>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})] spids: [406 420] ) ] ) (C {<eval>} {<set>} {<-->} {(DQ ($ Id.VSub_DollarName '$TEMP'))}) (command.ShFunction name: fault_attr_default body: (BraceGroup children: [ (command.Simple words: [{<echo>} {<N>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/task-filter'>} ) ] do_fork: T ) (command.Simple words: [{<echo>} {<0>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/probability'>} ) ] do_fork: T ) (command.Simple words: [{<echo>} {<1>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/times'>} ) ] do_fork: T ) ] ) ) (C {<fault_attr_default>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:oom_kill_allocating_task_saved) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<cat>} {<'/proc/sys/vm/oom_kill_allocating_task'>}) ) } spids: [486] ) ] ) (command.ShFunction name: restore_values body: (BraceGroup children: [ (C {<fault_attr_default>}) (command.Simple words: [{<echo>} {($ Id.VSub_DollarName '$oom_kill_allocating_task_saved')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/proc/sys/vm/oom_kill_allocating_task'>} ) ] do_fork: T ) ] ) ) (C {<declare>} {<-i>} {<Id.Lit_VarLike 'oom_kill_allocating_task='> <1>}) (C {<declare>} {<Id.Lit_VarLike 'task_filter='> <Y>}) (C {<declare>} {<-i>} {<Id.Lit_VarLike 'probability='> <1>}) (C {<declare>} {<-i>} {<Id.Lit_VarLike 'times='> <1>}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [(command.Sentence child:(C {<true>}) terminator:<Id.Op_Semi _>)] ) body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{<-p>} {<--probability>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:probability) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [578] ) ] ) (C {<shift>} {<2>}) ] spids: [572 575 587 -1] ) (case_arm pat_list: [{<-i>} {<--interval>}] action: [ (command.Simple words: [{<echo>} {($ Id.VSub_Number '$2')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/interval'>} ) ] do_fork: T ) (C {<shift>} {<2>}) ] spids: [590 593 611 -1] ) (case_arm pat_list: [{<-t>} {<--times>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:times) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [620] ) ] ) (C {<shift>} {<2>}) ] spids: [614 617 629 -1] ) (case_arm pat_list: [{<-s>} {<--space>}] action: [ (command.Simple words: [{<echo>} {($ Id.VSub_Number '$2')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/space'>} ) ] do_fork: T ) (C {<shift>} {<2>}) ] spids: [632 635 653 -1] ) (case_arm pat_list: [{<-v>} {<--verbose>}] action: [ (command.Simple words: [{<echo>} {($ Id.VSub_Number '$2')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/verbose'>} ) ] do_fork: T ) (C {<shift>} {<2>}) ] spids: [656 659 677 -1] ) (case_arm pat_list: [{<--task-filter>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:task_filter) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [684] ) ] ) (C {<shift>} {<2>}) ] spids: [680 681 693 -1] ) (case_arm pat_list: [{<--stacktrace-depth>}] action: [ (command.Simple words: [{<echo>} {($ Id.VSub_Number '$2')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/stacktrace-depth'>} ) ] do_fork: T ) (C {<shift>} {<2>}) ] spids: [696 697 715 -1] ) (case_arm pat_list: [{<--require-start>}] action: [ (command.Simple words: [{<echo>} {($ Id.VSub_Number '$2')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/require-start'>} ) ] do_fork: T ) (C {<shift>} {<2>}) ] spids: [718 719 737 -1] ) (case_arm pat_list: [{<--require-end>}] action: [ (command.Simple words: [{<echo>} {($ Id.VSub_Number '$2')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/require-end'>} ) ] do_fork: T ) (C {<shift>} {<2>}) ] spids: [740 741 759 -1] ) (case_arm pat_list: [{<--reject-start>}] action: [ (command.Simple words: [{<echo>} {($ Id.VSub_Number '$2')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/reject-start'>} ) ] do_fork: T ) (C {<shift>} {<2>}) ] spids: [762 763 781 -1] ) (case_arm pat_list: [{<--reject-end>}] action: [ (command.Simple words: [{<echo>} {($ Id.VSub_Number '$2')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/reject-end'>} ) ] do_fork: T ) (C {<shift>} {<2>}) ] spids: [784 785 803 -1] ) (case_arm pat_list: [{<--oom-kill-allocating-task>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:oom_kill_allocating_task) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [810] ) ] ) (C {<shift>} {<2>}) ] spids: [806 807 819 -1] ) (case_arm pat_list: [{<--ignore-gfp-wait>}] action: [ (command.Simple words: [{<echo>} {($ Id.VSub_Number '$2')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/ignore-gfp-wait'>} ) ] do_fork: T ) (C {<shift>} {<2>}) ] spids: [822 823 841 -1] ) (case_arm pat_list: [{<--cache-filter>}] action: [ (command.Simple words: [{<echo>} {($ Id.VSub_Number '$2')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/cache_filter'>} ) ] do_fork: T ) (C {<shift>} {<2>}) ] spids: [844 845 863 -1] ) (case_arm pat_list: [{<--ignore-gfp-highmem>}] action: [ (command.Simple words: [{<echo>} {($ Id.VSub_Number '$2')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/ignore-gfp-highmem'>} ) ] do_fork: T ) (C {<shift>} {<2>}) ] spids: [866 867 885 -1] ) (case_arm pat_list: [{<--min-order>}] action: [ (command.Simple words: [{<echo>} {($ Id.VSub_Number '$2')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/min-order'>} ) ] do_fork: T ) (C {<shift>} {<2>}) ] spids: [888 889 907 -1] ) (case_arm pat_list: [{<-h>} {<--help>}] action: [ (C {<usage>}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<0>} ) (C {<shift>}) ] spids: [910 913 927 -1] ) (case_arm pat_list: [{<-->}] action: [(C {<shift>}) (command.ControlFlow token:<Id.ControlFlow_Break break>)] spids: [930 931 940 -1] ) ] ) ] ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_Number '$1'))} {<Id.Lit_RBracket ']'>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] ) (command.Simple words: [{<echo>} {($ Id.VSub_DollarName '$oom_kill_allocating_task')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/proc/sys/vm/oom_kill_allocating_task'>} ) ] do_fork: T ) (command.Simple words: [{<echo>} {($ Id.VSub_DollarName '$task_filter')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/task-filter'>} ) ] do_fork: T ) (command.Simple words: [{<echo>} {($ Id.VSub_DollarName '$probability')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/probability'>} ) ] do_fork: T ) (command.Simple words: [{<echo>} {($ Id.VSub_DollarName '$times')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$FAULTATTR') <'/times'>} ) ] do_fork: T ) (C {<trap>} {(DQ <restore_values>)} {<SIGINT>} {<SIGTERM>} {<EXIT>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd) op: assign_op.Equal rhs: {(DQ <'echo 1 > /proc/self/make-it-fail && exec '> ($ Id.VSub_At '$@'))} spids: [1014] ) ] ) (C {<bash>} {<-c>} {(DQ ($ Id.VSub_DollarName '$cmd'))}) ] )