Skip to content

Commit

Permalink
testiso: Do not add disk as primary disk for s390x pXE test
Browse files Browse the repository at this point in the history
For s390x in pXE mode, the network device has the bootindex 1. Add a disk
without specifying it as a primary disk with bootindex.
  • Loading branch information
Prashanth684 authored and openshift-merge-robot committed Apr 15, 2020
1 parent bef53e9 commit 2a8ca39
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions mantle/cmd/kola/testiso.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,28 @@ func newBaseQemuBuilder() *platform.QemuBuilder {
return builder
}

func newQemuBuilder() *platform.QemuBuilder {
func newQemuBuilder(isPXE bool) *platform.QemuBuilder {
builder := newBaseQemuBuilder()
sectorSize := 0
if kola.QEMUOptions.Native4k {
sectorSize = 4096
}
builder.AddPrimaryDisk(&platform.Disk{
Size: "12G", // Arbitrary

SectorSize: sectorSize,
})
if system.RpmArch() == "s390x" && isPXE {
// For s390x PXE installs the network device has the bootindex of 1.
// Do not use a primary disk in case of net-booting for this test
builder.AddDisk(&platform.Disk{
Size: "12G", // Arbitrary

SectorSize: sectorSize,
})
} else {
builder.AddPrimaryDisk(&platform.Disk{
Size: "12G", // Arbitrary

SectorSize: sectorSize,
})
}

return builder
}
Expand Down Expand Up @@ -319,7 +330,7 @@ func testPXE(inst platform.Install) error {
configStr = string(buf)
}

inst.Builder = newQemuBuilder()
inst.Builder = newQemuBuilder(true)
completionChannel, err := inst.Builder.VirtioChannelRead("testisocompletion")
if err != nil {
return err
Expand All @@ -335,7 +346,7 @@ func testPXE(inst platform.Install) error {
}

func testLiveIso(inst platform.Install, completionfile string) error {
inst.Builder = newQemuBuilder()
inst.Builder = newQemuBuilder(false)
completionChannel, err := inst.Builder.VirtioChannelRead("testisocompletion")
if err != nil {
return err
Expand Down

0 comments on commit 2a8ca39

Please sign in to comment.