]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - tests/ts/lsmem/lsmem
3 # This file is part of util-linux.
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This file is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 TS_TOPDIR
="${0%/*}/../.."
19 .
$TS_TOPDIR/functions.sh
23 ts_check_test_command
"$TS_CMD_LSMEM"
27 LSCOLUMNS
="RANGE,SIZE,STATE,REMOVABLE,BLOCK,NODE"
33 echo -e "\n---\n" >>${TS_OUTPUT}
34 echo "\$ lsmem $opts" >>${TS_OUTPUT}
35 ${TS_CMD_LSMEM} $opts --sysroot "${dumpdir}/${name}" >> $TS_OUTPUT 2>> $TS_ERRLOG
39 for dump in $(ls $TS_SELF/dumps/*.tar.bz2 | sort); do
40 name=$(basename $dump .tar.bz2)
41 dumpdir="$TS_OUTDIR/dumps
"
46 tar -C $dumpdir -jxf $dump
48 do_lsmem --split=STATE,REMOVABLE
49 do_lsmem --output RANGE,SIZE --split none
50 do_lsmem --output RANGE,SIZE,STATE --split STATE
51 do_lsmem --all --output $LSCOLUMNS
52 do_lsmem --raw --output $LSCOLUMNS --split $LSCOLUMNS
53 do_lsmem --json --output $LSCOLUMNS --split $LSCOLUMNS