Commit 781c6d4b authored by Daniel P. Berrange's avatar Daniel P. Berrange

Fix various printf format mistakes

Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
parent 4e670784
......@@ -724,7 +724,7 @@ func getDomainPinTempFieldInfo(numvcpu int, numiothread int, params *domainEvent
}
}
for i := 0; i < numiothread; i++ {
ret[fmt.Sprintf("cputune.iothreadpin%u", i)] = typedParamsFieldInfo{
ret[fmt.Sprintf("cputune.iothreadpin%d", i)] = typedParamsFieldInfo{
s: &params.IOThreadPin[i],
}
}
......
......@@ -112,7 +112,7 @@ func TestDomainEventRegister(t *testing.T) {
// Deregister the event
if err := conn.DomainEventDeregister(callbackId); err != nil {
t.Fatal("Event deregistration failed with: %v", err)
t.Fatalf("Event deregistration failed with: %v", err)
}
callbackId = -1 // Don't deregister twice
......
......@@ -802,14 +802,14 @@ func TestParserCPUString(t *testing.T) {
}
if len(actual) != len(testData.cpumap) {
t.Errorf("Expected %s got %s",
t.Errorf("Expected %v got %v",
actual, testData.cpumap)
return
}
for idx, val := range actual {
if val != testData.cpumap[idx] {
t.Errorf("Expected %s got %s",
t.Errorf("Expected %v got %v",
actual, testData.cpumap)
return
}
......
......@@ -1461,8 +1461,8 @@ func TestStorageVolUploadDownloadCallbacks(t *testing.T) {
}
if sent != len(input) {
t.Fatal("Wanted %d but only sent %d bytes",
len(input), sent)
t.Fatalf("Wanted %d but only sent %d bytes",
len(input), sent)
}
// 4. finish!
......
......@@ -111,7 +111,7 @@ func TestNetworkEventRegister(t *testing.T) {
// Deregister the event
if err := conn.NetworkEventDeregister(callbackId); err != nil {
t.Fatal("Event deregistration failed with: %v", err)
t.Fatalf("Event deregistration failed with: %v", err)
}
callbackId = -1 // Don't deregister twice
......
......@@ -111,7 +111,7 @@ func TestNodeDeviceEventRegister(t *testing.T) {
// Deregister the event
if err := conn.NodeDeviceEventDeregister(callbackId); err != nil {
t.Fatal("Event deregistration failed with: %v", err)
t.Fatalf("Event deregistration failed with: %v", err)
}
callbackId = -1 // Don't deregister twice
......
......@@ -111,7 +111,7 @@ func TestStoragePoolEventRegister(t *testing.T) {
// Deregister the event
if err := conn.StoragePoolEventDeregister(callbackId); err != nil {
t.Fatal("Event deregistration failed with: %v", err)
t.Fatalf("Event deregistration failed with: %v", err)
}
callbackId = -1 // Don't deregister twice
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment