s390x: dimm not supported

Dimm is not supported on s390x

Fixes: #106
Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
This commit is contained in:
Alice Frosi 2019-08-26 16:05:17 +02:00
parent e6644f4a25
commit 9463486d58
4 changed files with 31 additions and 1 deletions

View File

@ -1761,7 +1761,9 @@ func (config *Config) appendMemoryKnobs() {
if config.Memory.Size == "" { if config.Memory.Size == "" {
return return
} }
if !isDimmSupported() {
return
}
var objMemParam, numaMemParam string var objMemParam, numaMemParam string
dimmName := "dimm1" dimmName := "dimm1"
if config.Knobs.HugePages { if config.Knobs.HugePages {

View File

@ -105,3 +105,7 @@ func (n NetDeviceType) QemuDeviceParam() DeviceDriver {
} }
} }
func isDimmSupported() bool {
return true
}

View File

@ -521,6 +521,10 @@ func TestAppendKnobsAllFalse(t *testing.T) {
} }
func TestAppendMemoryHugePages(t *testing.T) { func TestAppendMemoryHugePages(t *testing.T) {
if !isDimmSupported() {
t.Skip("Dimm not supported")
}
conf := &Config{ conf := &Config{
Memory: Memory{ Memory: Memory{
Size: "1G", Size: "1G",
@ -545,6 +549,10 @@ func TestAppendMemoryHugePages(t *testing.T) {
} }
func TestAppendMemoryMemPrealloc(t *testing.T) { func TestAppendMemoryMemPrealloc(t *testing.T) {
if !isDimmSupported() {
t.Skip("Dimm not supported")
}
conf := &Config{ conf := &Config{
Memory: Memory{ Memory: Memory{
Size: "1G", Size: "1G",
@ -567,6 +575,10 @@ func TestAppendMemoryMemPrealloc(t *testing.T) {
} }
func TestAppendMemoryMemShared(t *testing.T) { func TestAppendMemoryMemShared(t *testing.T) {
if !isDimmSupported() {
t.Skip("Dimm not supported")
}
conf := &Config{ conf := &Config{
Memory: Memory{ Memory: Memory{
Size: "1G", Size: "1G",
@ -589,6 +601,10 @@ func TestAppendMemoryMemShared(t *testing.T) {
} }
func TestAppendMemoryFileBackedMem(t *testing.T) { func TestAppendMemoryFileBackedMem(t *testing.T) {
if !isDimmSupported() {
t.Skip("Dimm not supported")
}
conf := &Config{ conf := &Config{
Memory: Memory{ Memory: Memory{
Size: "1G", Size: "1G",
@ -611,6 +627,10 @@ func TestAppendMemoryFileBackedMem(t *testing.T) {
} }
func TestAppendMemoryFileBackedMemPrealloc(t *testing.T) { func TestAppendMemoryFileBackedMemPrealloc(t *testing.T) {
if !isDimmSupported() {
t.Skip("Dimm not supported")
}
conf := &Config{ conf := &Config{
Memory: Memory{ Memory: Memory{
Size: "1G", Size: "1G",

View File

@ -134,3 +134,7 @@ func (n NetDeviceType) QemuNetdevParam() string {
} }
} }
func isDimmSupported() bool {
return false
}