Skip to content

Commit 3cf677a

Browse files
kola: small fixes for iso.* tests
1 parent 331f16d commit 3cf677a

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

mantle/kola/tests/iso/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func forwardJournal(outdir string, builder *platform.QemuBuilder, config *conf.C
129129
go func() {
130130
_, err := io.Copy(journalOut, journalPipe)
131131
if err != nil && err != io.EOF {
132-
panic(err)
132+
fmt.Printf("error copying journal: %v\n", err)
133133
}
134134
}()
135135

mantle/kola/tests/iso/live-iscsi.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package iso
22

33
import (
44
_ "embed"
5+
"fmt"
56
"io"
67
"os"
78
"path/filepath"
@@ -143,15 +144,15 @@ func isoInstalliScsi(c cluster.TestCluster, opts IsoTestOpts) {
143144
return err
144145
}
145146
// Create a file to write the contents of the serial channel into
146-
path := strings.Replace(builder.ConsoleFile, "/console.txt", "/nested_vm_console.txt", 1)
147+
path := filepath.Join(filepath.Dir(builder.ConsoleFile), "nested_vm_console.txt")
147148
nestedVMConsole, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE, 0644)
148149
if err != nil {
149150
return err
150151
}
151152
go func() {
152153
_, err := io.Copy(nestedVMConsole, nestedVmLogsChannel)
153154
if err != nil && err != io.EOF {
154-
panic(err)
155+
fmt.Printf("error copying nested VM logs: %v\n", err)
155156
}
156157
}()
157158

mantle/platform/machine/qemu/metal.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,7 @@ import (
3535
"github.com/coreos/coreos-assembler/mantle/util"
3636
)
3737

38-
const (
39-
// defaultQemuHostIPv4 is documented in `man qemu-kvm`, under the `-netdev` option
40-
defaultQemuHostIPv4 = "10.0.2.2"
41-
42-
bootStartedSignal = "boot-started-OK"
43-
)
38+
const bootStartedSignal = "boot-started-OK"
4439

4540
// TODO derive this from docs, or perhaps include kargs in cosa metadata?
4641
var baseKargs = []string{"rd.neednet=1", "ip=dhcp", "ignition.firstboot", "ignition.platform.id=metal"}

0 commit comments

Comments
 (0)