From 164bd8cd22d30ea07be6d480cc57d03bc0c44dce Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Tue, 13 Aug 2019 23:36:07 -0700 Subject: [PATCH] test/fmt: drop extra newlines They are unneeded. Signed-off-by: Peng Tao --- qemu/qemu_test.go | 2 +- qemu/qmp_test.go | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/qemu/qemu_test.go b/qemu/qemu_test.go index bc527ab6bc..7caba015e9 100644 --- a/qemu/qemu_test.go +++ b/qemu/qemu_test.go @@ -64,7 +64,7 @@ func testConfigAppend(config *Config, structure interface{}, expected string, t case SMP: config.SMP = s if err := config.appendCPUs(); err != nil { - t.Fatalf("Unexpected error: %v\n", err) + t.Fatalf("Unexpected error: %v", err) } case QMPSocket: diff --git a/qemu/qmp_test.go b/qemu/qmp_test.go index bfad9d0dd6..c5722765ab 100644 --- a/qemu/qmp_test.go +++ b/qemu/qmp_test.go @@ -1110,13 +1110,13 @@ func TestQMPExecuteQueryHotpluggableCPUs(t *testing.T) { checkVersion(t, connectedCh) hotCPUs, err := q.ExecuteQueryHotpluggableCPUs(context.Background()) if err != nil { - t.Fatalf("Unexpected error: %v\n", err) + t.Fatalf("Unexpected error: %v", err) } if len(hotCPUs) != 1 { t.Fatalf("Expected hot CPUs length equals to 1\n") } if reflect.DeepEqual(hotCPUs[0], hotCPU) == false { - t.Fatalf("Expected %v equals to %v\n", hotCPUs[0], hotCPU) + t.Fatalf("Expected %v equals to %v", hotCPUs[0], hotCPU) } q.Shutdown() <-disconnectedCh @@ -1146,13 +1146,13 @@ func TestQMPExecuteQueryMemoryDevices(t *testing.T) { checkVersion(t, connectedCh) memDevices, err := q.ExecQueryMemoryDevices(context.Background()) if err != nil { - t.Fatalf("Unexpected error: %v\n", err) + t.Fatalf("Unexpected error: %v", err) } if len(memDevices) != 1 { t.Fatalf("Expected memory devices length equals to 1\n") } if reflect.DeepEqual(memDevices[0], memoryDevices) == false { - t.Fatalf("Expected %v equals to %v\n", memDevices[0], memoryDevices) + t.Fatalf("Expected %v equals to %v", memDevices[0], memoryDevices) } q.Shutdown() <-disconnectedCh @@ -1184,13 +1184,13 @@ func TestQMPExecuteQueryCpus(t *testing.T) { checkVersion(t, connectedCh) cpus, err := q.ExecQueryCpus(context.Background()) if err != nil { - t.Fatalf("Unexpected error: %v\n", err) + t.Fatalf("Unexpected error: %v", err) } if len(cpus) != 1 { t.Fatalf("Expected memory devices length equals to 1\n") } if reflect.DeepEqual(cpus[0], cpuInfo) == false { - t.Fatalf("Expected %v equals to %v\n", cpus[0], cpuInfo) + t.Fatalf("Expected %v equals to %v", cpus[0], cpuInfo) } q.Shutdown() <-disconnectedCh @@ -1220,13 +1220,13 @@ func TestQMPExecuteQueryCpusFast(t *testing.T) { checkVersion(t, connectedCh) cpus, err := q.ExecQueryCpusFast(context.Background()) if err != nil { - t.Fatalf("Unexpected error: %v\n", err) + t.Fatalf("Unexpected error: %v", err) } if len(cpus) != 1 { t.Fatalf("Expected memory devices length equals to 1\n") } if reflect.DeepEqual(cpus[0], cpuInfoFast) == false { - t.Fatalf("Expected %v equals to %v\n", cpus[0], cpuInfoFast) + t.Fatalf("Expected %v equals to %v", cpus[0], cpuInfoFast) } q.Shutdown() <-disconnectedCh @@ -1249,7 +1249,7 @@ func TestExecSetMigrationCaps(t *testing.T) { } err := q.ExecSetMigrationCaps(context.Background(), caps) if err != nil { - t.Fatalf("Unexpected error: %v\n", err) + t.Fatalf("Unexpected error: %v", err) } q.Shutdown() <-disconnectedCh @@ -1266,7 +1266,7 @@ func TestExecSetMigrateArguments(t *testing.T) { checkVersion(t, connectedCh) err := q.ExecSetMigrateArguments(context.Background(), "exec:foobar") if err != nil { - t.Fatalf("Unexpected error: %v\n", err) + t.Fatalf("Unexpected error: %v", err) } q.Shutdown() <-disconnectedCh @@ -1284,7 +1284,7 @@ func TestExecHotplugMemory(t *testing.T) { checkVersion(t, connectedCh) err := q.ExecHotplugMemory(context.Background(), "memory-backend-ram", "mem0", "", 128, true) if err != nil { - t.Fatalf("Unexpected error: %v\n", err) + t.Fatalf("Unexpected error: %v", err) } q.Shutdown() <-disconnectedCh @@ -1419,7 +1419,7 @@ func TestExecuteQueryMigration(t *testing.T) { t.Fatalf("Unexpected error %v", err) } if !reflect.DeepEqual(s, status) { - t.Fatalf("expected %v\n got %v", status, s) + t.Fatalf("expected %v got %v", status, s) } q.Shutdown() <-disconnectedCh @@ -1538,7 +1538,7 @@ func TestExecuteNVDIMMDeviceAdd(t *testing.T) { checkVersion(t, connectedCh) err := q.ExecuteNVDIMMDeviceAdd(context.Background(), "nvdimm0", "/dev/rbd0", 1024) if err != nil { - t.Fatalf("Unexpected error: %v\n", err) + t.Fatalf("Unexpected error: %v", err) } q.Shutdown() <-disconnectedCh @@ -1612,13 +1612,13 @@ func TestQMPExecQueryQmpSchema(t *testing.T) { checkVersion(t, connectedCh) info, err := q.ExecQueryQmpSchema(context.Background()) if err != nil { - t.Fatalf("Unexpected error: %v\n", err) + t.Fatalf("Unexpected error: %v", err) } if len(schemaInfo) != 2 { t.Fatalf("Expected schema infos length equals to 2\n") } if reflect.DeepEqual(info, schemaInfo) == false { - t.Fatalf("Expected %v equals to %v\n", info, schemaInfo) + t.Fatalf("Expected %v equals to %v", info, schemaInfo) } q.Shutdown() <-disconnectedCh @@ -1642,10 +1642,10 @@ func TestQMPExecQueryQmpStatus(t *testing.T) { checkVersion(t, connectedCh) info, err := q.ExecuteQueryStatus(context.Background()) if err != nil { - t.Fatalf("Unexpected error: %v\n", err) + t.Fatalf("Unexpected error: %v", err) } if reflect.DeepEqual(info, statusInfo) == false { - t.Fatalf("Expected %v equals to %v\n", info, statusInfo) + t.Fatalf("Expected %v equals to %v", info, statusInfo) } q.Shutdown() <-disconnectedCh