]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lscpu: add s390 test case
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 6 Sep 2011 00:53:01 +0000 (02:53 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 9 Sep 2011 21:50:55 +0000 (23:50 +0200)
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
tests/expected/lscpu/lscpu-s390-lpar [new file with mode: 0644]
tests/expected/lscpu/lscpu-s390-zvm [new file with mode: 0644]
tests/ts/lscpu/bla.tar.gz [new file with mode: 0644]
tests/ts/lscpu/dumps/s390-lpar.tar.gz [new file with mode: 0644]
tests/ts/lscpu/dumps/s390-zvm.tar.gz [new file with mode: 0644]
tests/ts/lscpu/mk-input.sh

diff --git a/tests/expected/lscpu/lscpu-s390-lpar b/tests/expected/lscpu/lscpu-s390-lpar
new file mode 100644 (file)
index 0000000..600fd3f
--- /dev/null
@@ -0,0 +1,35 @@
+CPU op-mode(s):        32-bit, 64-bit
+CPU(s):                20
+On-line CPU(s) list:   1-5,8-19
+Off-line CPU(s) list:  0,6,7
+Thread(s) per core:    1
+Core(s) per socket:    4
+Socket(s) per book:    6
+Book(s):               4
+Vendor ID:             IBM/S390
+BogoMIPS:              14367.00
+Hypervisor vendor:     IBM
+Virtualization type:   full
+Dispatching mode:      vertical
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting from zero.
+# CPU,Core,Socket,Node
+1,0,0,
+2,1,0,
+3,2,1,
+4,3,1,
+5,4,1,
+8,5,2,
+9,6,2,
+10,7,2,
+11,8,3,
+12,9,3,
+13,10,3,
+14,11,3,
+15,12,4,
+16,13,5,
+17,14,5,
+18,15,5,
+19,16,6,
diff --git a/tests/expected/lscpu/lscpu-s390-zvm b/tests/expected/lscpu/lscpu-s390-zvm
new file mode 100644 (file)
index 0000000..9ce22d4
--- /dev/null
@@ -0,0 +1,21 @@
+CPU op-mode(s):        32-bit, 64-bit
+CPU(s):                4
+On-line CPU(s) list:   0-3
+Thread(s) per core:    1
+Core(s) per socket:    1
+Socket(s) per book:    1
+Book(s):               4
+Vendor ID:             IBM/S390
+BogoMIPS:              14367.00
+Hypervisor vendor:     IBM
+Virtualization type:   full
+Dispatching mode:      horizontal
+
+# The following is the parsable format, which can be fed to other
+# programs. Each different item in every column has an unique ID
+# starting from zero.
+# CPU,Core,Socket,Node
+0,0,0,
+1,1,1,
+2,2,2,
+3,3,3,
diff --git a/tests/ts/lscpu/bla.tar.gz b/tests/ts/lscpu/bla.tar.gz
new file mode 100644 (file)
index 0000000..9432cbd
Binary files /dev/null and b/tests/ts/lscpu/bla.tar.gz differ
diff --git a/tests/ts/lscpu/dumps/s390-lpar.tar.gz b/tests/ts/lscpu/dumps/s390-lpar.tar.gz
new file mode 100644 (file)
index 0000000..59aea6a
Binary files /dev/null and b/tests/ts/lscpu/dumps/s390-lpar.tar.gz differ
diff --git a/tests/ts/lscpu/dumps/s390-zvm.tar.gz b/tests/ts/lscpu/dumps/s390-zvm.tar.gz
new file mode 100644 (file)
index 0000000..b13594d
Binary files /dev/null and b/tests/ts/lscpu/dumps/s390-zvm.tar.gz differ
index ddf70ec1ff842331d345fa833c88650f811c903a..299ac08b7cd4b8dfcc70a2b8c8ee9c7684639779 100644 (file)
@@ -30,6 +30,10 @@ if [ -d "/proc/xen" ]; then
        fi
 fi
 
+if [ -e "/proc/sysinfo" ]; then
+       $CP /proc/sysinfo $TS_DUMP
+fi
+
 $CP /sys/devices/system/cpu/* $TS_DUMP
 $CP /sys/devices/system/node/*/cpumap $TS_DUMP