(CommandList children: [ (FuncDef name: usage body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[55]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("Usage: ") ($ 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_expansion: True here_end: EOF was_filled: True spids: [58] ) ] ) ] spids: [50] ) spids: [46 49] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$UID")} {(KW_Bang "!") (Lit_Other "=")} {(0)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(echo)} {(must)} {(be)} {(run)} {(as)} {(root)}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[138])] ) (C {(exit)} {(1)}) ] spids: [-1 123] ) ] spids: [-1 146] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DEBUGFS) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(mount)} {(-t)} {(debugfs)}) (C {(head)} {(-1)}) (C {(awk)} {(SQ <"{ print $3}">)}) ] negated: False ) ] ) left_token: <Left_Backtick "`"> spids: [150 170] ) } spids: [149] ) ] spids: [149] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-d)} {(DQ ($ VSub_Name "$DEBUGFS"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(echo)} {(debugfs)} {(is)} {(not)} {(mounted)}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[201])] ) (C {(exit)} {(1)}) ] spids: [-1 188] ) ] spids: [-1 209] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FAILCMD_TYPE) op: Equal rhs: { (BracedVarSub token: <VSub_Name FAILCMD_TYPE> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(failslab)}) spids: [213 217] ) } spids: [212] ) ] spids: [212] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FAULTATTR) op: Equal rhs: {($ VSub_Name "$DEBUGFS") (/) ($ VSub_Name "$FAILCMD_TYPE")} spids: [219] ) ] spids: [219] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-d)} {($ VSub_Name "$FAULTATTR")} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Name "$FAILCMD_TYPE")} {(is)} {(not)} {(available)}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[251])] ) (C {(exit)} {(1)}) ] spids: [-1 238] ) ] spids: [-1 259] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LONGOPTS) op: Equal rhs: {(probability) (Lit_Other ":") (Lit_Comma ",") (interval) (Lit_Other ":") (Lit_Comma ",") (times) (Lit_Other ":") (Lit_Comma ",") (space) (Lit_Other ":") (Lit_Comma ",") (verbose) (Lit_Other ":") (Lit_Comma ",") (task-filter) (Lit_Other ":") } spids: [262] ) ] spids: [262] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LONGOPTS) op: Equal rhs: {($ VSub_Name "$LONGOPTS") (Lit_Comma ",") (stacktrace-depth) (Lit_Other ":") (Lit_Comma ",") (require-start) (Lit_Other ":") (Lit_Comma ",") (require-end) (Lit_Other ":") } spids: [281] ) ] spids: [281] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LONGOPTS) op: Equal rhs: {($ VSub_Name "$LONGOPTS") (Lit_Comma ",") (reject-start) (Lit_Other ":") (Lit_Comma ",") (reject-end) (Lit_Other ":") (Lit_Comma ",") (oom-kill-allocating-task) (Lit_Other ":") (Lit_Comma ",") (help) } spids: [293] ) ] spids: [293] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$FAILCMD_TYPE")} {(Lit_Other "=")} {(failslab)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LONGOPTS) op: Equal rhs: {($ VSub_Name "$LONGOPTS") (Lit_Comma ",") (ignore-gfp-wait) (Lit_Other ":") (Lit_Comma ",") (cache-filter) (Lit_Other ":") } spids: [324] ) ] spids: [324] ) ] spids: [-1 321] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$FAILCMD_TYPE")} {(Lit_Other "=")} {(fail_page_alloc)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:LONGOPTS) op: Equal rhs: {($ VSub_Name "$LONGOPTS") (Lit_Comma ",") (ignore-gfp-wait) (Lit_Other ":") (Lit_Comma ",") (ignore-gfp-highmem) (Lit_Other ":") (Lit_Comma ",") (min-order) (Lit_Other ":") } spids: [349] ) ] spids: [349] ) ] spids: [333 346] ) ] spids: [-1 361] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TEMP) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(getopt)} {(-o)} {(p) (Lit_Other ":") (i) (Lit_Other ":") (t) (Lit_Other ":") (s) (Lit_Other ":") (v) (Lit_Other ":") (h) } {(--long)} {($ VSub_Name "$LONGOPTS")} {(-n)} {(SQ <failcmd.sh>)} {(--)} {(DQ ($ VSub_At "$@"))} ) ] ) left_token: <Left_Backtick "`"> spids: [365 397] ) } spids: [364] ) ] spids: [364] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(KW_Bang "!") (Lit_Other "=")} {(0)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [(C {(usage)}) (C {(exit)} {(1)})] spids: [-1 414] ) ] spids: [-1 424] ) (C {(eval)} {(set)} {(--)} {(DQ ($ VSub_Name "$TEMP"))}) (FuncDef name: fault_attr_default body: (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(N)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/task-filter)} spids: [449] ) ] ) (SimpleCommand words: [{(echo)} {(0)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/probability)} spids: [459] ) ] ) (SimpleCommand words: [{(echo)} {(1)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/times)} spids: [469] ) ] ) ] spids: [442] ) spids: [438 441] ) (C {(fault_attr_default)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:oom_kill_allocating_task_saved) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(cat)} {(/proc/sys/vm/oom_kill_allocating_task)})] ) left_token: <Left_Backtick "`"> spids: [481 485] ) } spids: [480] ) ] spids: [480] ) (FuncDef name: restore_values body: (BraceGroup children: [ (C {(fault_attr_default)}) (SimpleCommand words: [{(echo)} {($ VSub_Name "$oom_kill_allocating_task_saved")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/proc/sys/vm/oom_kill_allocating_task)} spids: [504] ) ] ) ] spids: [492] ) spids: [488 491] ) (Assignment keyword: Assign_Declare flags: ["'-i'"] pairs: [ (assign_pair lhs: (LhsName name:oom_kill_allocating_task) op: Equal rhs: {(1)} spids: [524] ) ] spids: [520] ) (Assignment keyword: Assign_Declare pairs: [(assign_pair lhs:(LhsName name:task_filter) op:Equal rhs:{(Y)} spids:[529])] spids: [527] ) (Assignment keyword: Assign_Declare flags: ["'-i'"] pairs: [(assign_pair lhs:(LhsName name:probability) op:Equal rhs:{(1)} spids:[536])] spids: [532] ) (Assignment keyword: Assign_Declare flags: ["'-i'"] pairs: [(assign_pair lhs:(LhsName name:times) op:Equal rhs:{(1)} spids:[543])] spids: [539] ) (While cond: [(Sentence child:(C {(true)}) terminator:<Op_Semi ";">)] body: (DoGroup children: [ (Case to_match: {(DQ ($ VSub_Number "$1"))} arms: [ (case_arm pat_list: [{(-p)} {(--probability)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:probability) op: Equal rhs: {($ VSub_Number "$2")} spids: [570] ) ] spids: [570] ) (C {(shift)} {(2)}) ] spids: [564 567 579 -1] ) (case_arm pat_list: [{(-i)} {(--interval)}] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Number "$2")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/interval)} spids: [592] ) ] ) (C {(shift)} {(2)}) ] spids: [582 585 603 -1] ) (case_arm pat_list: [{(-t)} {(--times)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:times) op: Equal rhs: {($ VSub_Number "$2")} spids: [612] ) ] spids: [612] ) (C {(shift)} {(2)}) ] spids: [606 609 621 -1] ) (case_arm pat_list: [{(-s)} {(--space)}] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Number "$2")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/space)} spids: [634] ) ] ) (C {(shift)} {(2)}) ] spids: [624 627 645 -1] ) (case_arm pat_list: [{(-v)} {(--verbose)}] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Number "$2")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/verbose)} spids: [658] ) ] ) (C {(shift)} {(2)}) ] spids: [648 651 669 -1] ) (case_arm pat_list: [{(--task-filter)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:task_filter) op: Equal rhs: {($ VSub_Number "$2")} spids: [676] ) ] spids: [676] ) (C {(shift)} {(2)}) ] spids: [672 673 685 -1] ) (case_arm pat_list: [{(--stacktrace-depth)}] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Number "$2")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/stacktrace-depth)} spids: [696] ) ] ) (C {(shift)} {(2)}) ] spids: [688 689 707 -1] ) (case_arm pat_list: [{(--require-start)}] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Number "$2")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/require-start)} spids: [718] ) ] ) (C {(shift)} {(2)}) ] spids: [710 711 729 -1] ) (case_arm pat_list: [{(--require-end)}] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Number "$2")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/require-end)} spids: [740] ) ] ) (C {(shift)} {(2)}) ] spids: [732 733 751 -1] ) (case_arm pat_list: [{(--reject-start)}] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Number "$2")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/reject-start)} spids: [762] ) ] ) (C {(shift)} {(2)}) ] spids: [754 755 773 -1] ) (case_arm pat_list: [{(--reject-end)}] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Number "$2")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/reject-end)} spids: [784] ) ] ) (C {(shift)} {(2)}) ] spids: [776 777 795 -1] ) (case_arm pat_list: [{(--oom-kill-allocating-task)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:oom_kill_allocating_task) op: Equal rhs: {($ VSub_Number "$2")} spids: [802] ) ] spids: [802] ) (C {(shift)} {(2)}) ] spids: [798 799 811 -1] ) (case_arm pat_list: [{(--ignore-gfp-wait)}] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Number "$2")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/ignore-gfp-wait)} spids: [822] ) ] ) (C {(shift)} {(2)}) ] spids: [814 815 833 -1] ) (case_arm pat_list: [{(--cache-filter)}] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Number "$2")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/cache_filter)} spids: [844] ) ] ) (C {(shift)} {(2)}) ] spids: [836 837 855 -1] ) (case_arm pat_list: [{(--ignore-gfp-highmem)}] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Number "$2")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/ignore-gfp-highmem)} spids: [866] ) ] ) (C {(shift)} {(2)}) ] spids: [858 859 877 -1] ) (case_arm pat_list: [{(--min-order)}] action: [ (SimpleCommand words: [{(echo)} {($ VSub_Number "$2")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/min-order)} spids: [888] ) ] ) (C {(shift)} {(2)}) ] spids: [880 881 899 -1] ) (case_arm pat_list: [{(-h)} {(--help)}] action: [(C {(usage)}) (C {(exit)} {(0)}) (C {(shift)})] spids: [902 905 919 -1] ) (case_arm pat_list: [{(--)}] action: [(C {(shift)}) (ControlFlow token:<ControlFlow_Break break>)] spids: [922 923 932 -1] ) ] spids: [555 561 935] ) ] spids: [552 937] ) ) (AndOr children: [ (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Number "$1"))} {(Lit_Other "]")}) (C {(exit)} {(0)}) ] op_id: Op_DAmp ) (SimpleCommand words: [{(echo)} {($ VSub_Name "$oom_kill_allocating_task")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/proc/sys/vm/oom_kill_allocating_task)} spids: [961] ) ] ) (SimpleCommand words: [{(echo)} {($ VSub_Name "$task_filter")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/task-filter)} spids: [969] ) ] ) (SimpleCommand words: [{(echo)} {($ VSub_Name "$probability")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/probability)} spids: [978] ) ] ) (SimpleCommand words: [{(echo)} {($ VSub_Name "$times")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$FAULTATTR") (/times)} spids: [987] ) ] ) (C {(trap)} {(DQ (restore_values))} {(SIGINT)} {(SIGTERM)} {(EXIT)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cmd) op: Equal rhs: {(DQ ("echo 1 > /proc/self/make-it-fail && exec ") ($ VSub_At "$@"))} spids: [1006] ) ] spids: [1006] ) (C {(bash)} {(-c)} {(DQ ($ VSub_Name "$cmd"))}) ] )