summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/devices/s390/processor.c3
-rw-r--r--test/data/s390_hurcules_cpuinfo5
-rw-r--r--test/test.sh3
3 files changed, 8 insertions, 3 deletions
diff --git a/modules/devices/s390/processor.c b/modules/devices/s390/processor.c
index 0e8cafb6..8d9cbe05 100644
--- a/modules/devices/s390/processor.c
+++ b/modules/devices/s390/processor.c
@@ -57,14 +57,13 @@ processor_scan(void)
}
g_strfreev(tmp);
}
+ fclose(cpuinfo);
processor->cpu_mhz = 0.0f;
processor->model_name = g_strconcat("S390 ", processor->vendor_id, NULL);
g_free(processor->vendor_id);
- fclose(cpuinfo);
-
return g_slist_append(NULL, processor);
}
diff --git a/test/data/s390_hurcules_cpuinfo b/test/data/s390_hurcules_cpuinfo
new file mode 100644
index 00000000..5ac5b5fc
--- /dev/null
+++ b/test/data/s390_hurcules_cpuinfo
@@ -0,0 +1,5 @@
+vendor_id : IBM/S390
+# processors : 2
+bogomips per cpu: 411.23
+processor 0: version = FF, identification = 111000, machine = 7060
+processor 1: version = FF, identification = 111111, machine = 7060
diff --git a/test/test.sh b/test/test.sh
index 9462ad63..51b5360b 100644
--- a/test/test.sh
+++ b/test/test.sh
@@ -22,4 +22,5 @@ do_test() {
#do_test m68k data/m68k_sun3_cpuinfo
#do_test sh data/sh_dreamcast_cpuinfo
#do_test sh data/sh_sh3_cpuinfo
-do_test sh data/sh_sh64_cpuinfo
+#do_test sh data/sh_sh64_cpuinfo
+do_test s390 data/s390_hurcules_cpuinfo