(CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:TCID) op:Equal rhs:{(DQ (zram01))} spids:[55])] spids: [55] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ERR_CODE) op:Equal rhs:{(0)} spids:[60])] spids: [60] ) (C {(.)} {(./zram_lib.sh)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:dev_num) op:Equal rhs:{(1)} spids:[72])] spids: [72] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:zram_max_streams) op:Equal rhs:{(DQ (2))} spids:[81])] spids: [81] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:zram_sizes) op:Equal rhs:{(DQ (2097152))} spids:[108])] spids: [108] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:zram_mem_limits) op:Equal rhs:{(DQ (2M))} spids:[116])] spids: [116] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:zram_filesystems) op: Equal rhs: {(DQ (ext4))} spids: [121] ) ] spids: [121] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:zram_algs) op:Equal rhs:{(DQ (lzo))} spids:[126])] spids: [126] ) (FuncDef name: zram_fill_fs body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:mem_free0) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(free)} {(-m)}) (C {(awk)} {(SQ <"NR==2 {print $4}">)})] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [142 154] ) } spids: [141] ) ] spids: [139] ) (ForEach iter_name: i iter_words: [ { (CommandSubPart command_list: (CommandList children: [ (C {(seq)} {(0)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name "$dev_num")}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [169 176] ) } ) ] ) left_token: <Left_CommandSub "$("> spids: [164 177] ) } ] do_arg_iter: False body: (DoGroup children: [ (C {(echo)} {(DQ ("fill zram") ($ VSub_Name "$i") (...))}) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:b) op:Equal rhs:{(0)} spids:[194])] spids: [192] ) (While cond: [ (Sentence child: (C {(Lit_Other "[")} {(true)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] body: (DoGroup children: [ (AndOr children: [ (SimpleCommand words: [ {(dd)} {(Lit_VarLike "conv=") (notrunc)} {(Lit_VarLike "if=") (/dev/zero)} {(Lit_VarLike "of=") (zram) (${ VSub_Name i) (/file)} {(Lit_VarLike "oflag=") (append)} {(Lit_VarLike "count=") (1)} {(Lit_VarLike "bs=") (1024)} {(Lit_VarLike "status=") (none)} ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/null)} spids: [241] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [245] ) ] ) (ControlFlow token: <ControlFlow_Break break> ) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:b) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{($ VSub_Name "$b")}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [254 261] ) } spids: [253] ) ] spids: [253] ) ] spids: [207 264] ) ) (C {(echo)} { (DQ (zram) ($ VSub_Name "$i") (" can be filled with '") ($ VSub_Name "$b") ("' KB") ) } ) ] spids: [180 278] ) spids: [163 178] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:mem_free1) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(free)} {(-m)}) (C {(awk)} {(SQ <"NR==2 {print $4}">)})] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [285 297] ) } spids: [284] ) ] spids: [282] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:used_mem) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name "$mem_free0")}) right: (ArithWord w:{($ VSub_Name "$mem_free1")}) ) spids: [303 310] ) } spids: [302] ) ] spids: [300] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:total_size) op:Equal rhs:{(0)} spids:[316])] spids: [314] ) (ForEach iter_name: sm iter_words: [{($ VSub_Name "$zram_sizes")}] do_arg_iter: False body: (DoGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:s) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name "$sm")}) (C {(sed)} {(SQ <s/M//>)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [335 347] ) } spids: [334] ) ] spids: [332] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:total_size) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{($ VSub_Name "$total_size")}) right: (ArithWord w:{($ VSub_Name "$s")}) ) spids: [351 358] ) } spids: [350] ) ] spids: [350] ) ] spids: [329 361] ) spids: [325 327] ) (C {(echo)} { (DQ ("zram used ") (${ VSub_Name used_mem) ("M, zram disk sizes ") (${ VSub_Name total_size) (M) ) } ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:v) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Slash left: (ArithBinary op_id: Arith_Star left: (ArithWord w:{(Lit_Digits 100)}) right: (ArithWord w:{($ VSub_Name "$total_size")}) ) right: (ArithWord w:{($ VSub_Name "$used_mem")}) ) spids: [384 395] ) } spids: [383] ) ] spids: [381] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$v"))} {(-lt)} {(100)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (C {(echo)} {(DQ ("FAIL compression ratio: 0.") ($ VSub_Name "$v") (":1"))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ERR_CODE) op: Equal rhs: {(-1)} spids: [426] ) ] spids: [426] ) (C {(zram_cleanup)}) (ControlFlow token:<ControlFlow_Return return>) ] spids: [-1 414] ) ] spids: [-1 436] ) (C {(echo)} { (DQ ("zram compression ratio: ") (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ("scale=2; ") ($ VSub_Name "$v") (" / 100 "))}) (C {(bc)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [444 456] ) (":1: OK") ) } ) ] spids: [136] ) spids: [132 135] ) (C {(check_prereqs)}) (C {(zram_load)}) (C {(zram_max_streams)}) (C {(zram_compress_alg)}) (C {(zram_set_disksizes)}) (C {(zram_set_memlimit)}) (C {(zram_makefs)}) (C {(zram_mount)}) (C {(zram_fill_fs)}) (C {(zram_cleanup)}) (C {(zram_unload)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$ERR_CODE")} {(-ne)} {(0)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [(C {(echo)} {(DQ ($ VSub_Name "$TCID") (" : [FAIL]"))})] spids: [-1 500] ) ] else_action: [(C {(echo)} {(DQ ($ VSub_Name "$TCID") (" : [PASS]"))})] spids: [510 520] ) ] )