Skip to content

Commit

Permalink
tests/lsmem: update lsmem test with ZONES column
Browse files Browse the repository at this point in the history
The existing s390 and x86_64 dumps already contain the valid_zones sysfs
attribute, so just add a new "lsmem -o +ZONES" test command and update
the expected results.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
  • Loading branch information
gerald-schaefer authored and karelzak committed Oct 20, 2017
1 parent 60a7e9e commit 0a4320f
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/expected/lsmem/lsmem-s390-zvm-6g
Expand Up @@ -106,3 +106,24 @@ $ lsmem --json --output RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE
{"range": "0x0000000140000000-0x000000017fffffff", "size": "1G", "state": "offline", "removable": "-", "block": "20-23", "node": "0"}
]
}

---

$ lsmem -o +ZONES
RANGE SIZE STATE REMOVABLE BLOCK ZONES
0x0000000000000000-0x000000006fffffff 1.8G online yes 0-6 DMA
0x0000000070000000-0x000000007fffffff 256M online no 7 DMA/Normal
0x0000000080000000-0x000000009fffffff 512M online yes 8-9 Normal
0x00000000a0000000-0x00000000bfffffff 512M online no 10-11 Normal
0x00000000c0000000-0x00000000dfffffff 512M online yes 12-13 Normal
0x00000000e0000000-0x00000000efffffff 256M offline - 14 Normal
0x00000000f0000000-0x00000000ffffffff 256M online yes 15 Normal
0x0000000100000000-0x000000010fffffff 256M online no 16 Normal
0x0000000110000000-0x000000011fffffff 256M online no 17 Normal/Movable
0x0000000120000000-0x000000012fffffff 256M online yes 18 Movable/Normal
0x0000000130000000-0x000000013fffffff 256M online yes 19 Movable
0x0000000140000000-0x000000017fffffff 1G offline - 20-23 Movable

Memory block size: 256M
Total online memory: 4.8G
Total offline memory: 1.3G
39 changes: 39 additions & 0 deletions tests/expected/lsmem/lsmem-x86_64-16g
Expand Up @@ -269,3 +269,42 @@ $ lsmem --json --output RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE
{"range": "0x0000000438000000-0x000000043fffffff", "size": "128M", "state": "online", "removable": "no", "block": "135", "node": "0"}
]
}

---

$ lsmem -o +ZONES
RANGE SIZE STATE REMOVABLE BLOCK ZONES
0x0000000000000000-0x0000000007ffffff 128M online no 0 None
0x0000000008000000-0x0000000037ffffff 768M online yes 1-6 DMA32
0x0000000038000000-0x000000003fffffff 128M online no 7 DMA32
0x0000000040000000-0x0000000077ffffff 896M online yes 8-14 DMA32
0x0000000078000000-0x000000007fffffff 128M online no 15 DMA32
0x0000000080000000-0x00000000afffffff 768M online yes 16-21 DMA32
0x00000000b0000000-0x00000000bfffffff 256M online no 22-23 DMA32
0x0000000100000000-0x00000001a7ffffff 2.6G online no 32-52 Normal
0x00000001a8000000-0x00000001afffffff 128M online yes 53 Normal
0x00000001b0000000-0x00000001bfffffff 256M online no 54-55 Normal
0x00000001c0000000-0x00000001ffffffff 1G online yes 56-63 Normal
0x0000000200000000-0x0000000207ffffff 128M online no 64 Normal
0x0000000208000000-0x000000021fffffff 384M online yes 65-67 Normal
0x0000000220000000-0x0000000237ffffff 384M online no 68-70 Normal
0x0000000238000000-0x0000000277ffffff 1G online yes 71-78 Normal
0x0000000278000000-0x000000028fffffff 384M online no 79-81 Normal
0x0000000290000000-0x0000000297ffffff 128M online yes 82 Normal
0x0000000298000000-0x00000002a7ffffff 256M online no 83-84 Normal
0x00000002a8000000-0x00000002c7ffffff 512M online yes 85-88 Normal
0x00000002c8000000-0x00000002dfffffff 384M online no 89-91 Normal
0x00000002e0000000-0x00000002efffffff 256M online yes 92-93 Normal
0x00000002f0000000-0x000000034fffffff 1.5G online no 94-105 Normal
0x0000000350000000-0x0000000357ffffff 128M online yes 106 Normal
0x0000000358000000-0x000000036fffffff 384M online no 107-109 Normal
0x0000000370000000-0x0000000377ffffff 128M online yes 110 Normal
0x0000000378000000-0x00000003c7ffffff 1.3G online no 111-120 Normal
0x00000003c8000000-0x00000003e7ffffff 512M online yes 121-124 Normal
0x00000003e8000000-0x000000042fffffff 1.1G online no 125-133 Normal
0x0000000430000000-0x0000000437ffffff 128M online yes 134 Normal
0x0000000438000000-0x000000043fffffff 128M online no 135 None

Memory block size: 128M
Total online memory: 16G
Total offline memory: 0B
1 change: 1 addition & 0 deletions tests/ts/lsmem/lsmem
Expand Up @@ -49,6 +49,7 @@ for dump in $(ls $TS_SELF/dumps/*.tar.bz2 | sort); do
do_lsmem --all --output $LSCOLUMNS
do_lsmem --raw --output $LSCOLUMNS
do_lsmem --json --output $LSCOLUMNS
do_lsmem -o +ZONES

ts_finalize_subtest
done
Expand Down

0 comments on commit 0a4320f

Please sign in to comment.