Skip to content

Commit a38125f

Browse files
jones-drewsean-jc
authored andcommitted
KVM: selftests: s390x: Remove redundant newlines
TEST_* functions append their own newline. Remove newlines from TEST_* callsites to avoid extra newlines in output. Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Acked-by: Janosch Frank <frankja@linux.ibm.com> Acked-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Link: https://lore.kernel.org/r/20231206170241.82801-11-ajones@ventanamicro.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 93e43e5 commit a38125f

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

tools/testing/selftests/kvm/lib/s390x/processor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ void vcpu_args_set(struct kvm_vcpu *vcpu, unsigned int num, ...)
198198
int i;
199199

200200
TEST_ASSERT(num >= 1 && num <= 5, "Unsupported number of args,\n"
201-
" num: %u\n",
201+
" num: %u",
202202
num);
203203

204204
va_start(ap, num);

tools/testing/selftests/kvm/s390x/resets.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static void assert_noirq(struct kvm_vcpu *vcpu)
7878
* (notably, the emergency call interrupt we have injected) should
7979
* be cleared by the resets, so this should be 0.
8080
*/
81-
TEST_ASSERT(irqs >= 0, "Could not fetch IRQs: errno %d\n", errno);
81+
TEST_ASSERT(irqs >= 0, "Could not fetch IRQs: errno %d", errno);
8282
TEST_ASSERT(!irqs, "IRQ pending");
8383
}
8484

@@ -199,7 +199,7 @@ static void inject_irq(struct kvm_vcpu *vcpu)
199199
irq->type = KVM_S390_INT_EMERGENCY;
200200
irq->u.emerg.code = vcpu->id;
201201
irqs = __vcpu_ioctl(vcpu, KVM_S390_SET_IRQ_STATE, &irq_state);
202-
TEST_ASSERT(irqs >= 0, "Error injecting EMERGENCY IRQ errno %d\n", errno);
202+
TEST_ASSERT(irqs >= 0, "Error injecting EMERGENCY IRQ errno %d", errno);
203203
}
204204

205205
static struct kvm_vm *create_vm(struct kvm_vcpu **vcpu)

tools/testing/selftests/kvm/s390x/sync_regs_test.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ static void guest_code(void)
3939
#define REG_COMPARE(reg) \
4040
TEST_ASSERT(left->reg == right->reg, \
4141
"Register " #reg \
42-
" values did not match: 0x%llx, 0x%llx\n", \
42+
" values did not match: 0x%llx, 0x%llx", \
4343
left->reg, right->reg)
4444

4545
#define REG_COMPARE32(reg) \
4646
TEST_ASSERT(left->reg == right->reg, \
4747
"Register " #reg \
48-
" values did not match: 0x%x, 0x%x\n", \
48+
" values did not match: 0x%x, 0x%x", \
4949
left->reg, right->reg)
5050

5151

@@ -82,14 +82,14 @@ void test_read_invalid(struct kvm_vcpu *vcpu)
8282
run->kvm_valid_regs = INVALID_SYNC_FIELD;
8383
rv = _vcpu_run(vcpu);
8484
TEST_ASSERT(rv < 0 && errno == EINVAL,
85-
"Invalid kvm_valid_regs did not cause expected KVM_RUN error: %d\n",
85+
"Invalid kvm_valid_regs did not cause expected KVM_RUN error: %d",
8686
rv);
8787
run->kvm_valid_regs = 0;
8888

8989
run->kvm_valid_regs = INVALID_SYNC_FIELD | TEST_SYNC_FIELDS;
9090
rv = _vcpu_run(vcpu);
9191
TEST_ASSERT(rv < 0 && errno == EINVAL,
92-
"Invalid kvm_valid_regs did not cause expected KVM_RUN error: %d\n",
92+
"Invalid kvm_valid_regs did not cause expected KVM_RUN error: %d",
9393
rv);
9494
run->kvm_valid_regs = 0;
9595
}
@@ -103,14 +103,14 @@ void test_set_invalid(struct kvm_vcpu *vcpu)
103103
run->kvm_dirty_regs = INVALID_SYNC_FIELD;
104104
rv = _vcpu_run(vcpu);
105105
TEST_ASSERT(rv < 0 && errno == EINVAL,
106-
"Invalid kvm_dirty_regs did not cause expected KVM_RUN error: %d\n",
106+
"Invalid kvm_dirty_regs did not cause expected KVM_RUN error: %d",
107107
rv);
108108
run->kvm_dirty_regs = 0;
109109

110110
run->kvm_dirty_regs = INVALID_SYNC_FIELD | TEST_SYNC_FIELDS;
111111
rv = _vcpu_run(vcpu);
112112
TEST_ASSERT(rv < 0 && errno == EINVAL,
113-
"Invalid kvm_dirty_regs did not cause expected KVM_RUN error: %d\n",
113+
"Invalid kvm_dirty_regs did not cause expected KVM_RUN error: %d",
114114
rv);
115115
run->kvm_dirty_regs = 0;
116116
}
@@ -125,12 +125,12 @@ void test_req_and_verify_all_valid_regs(struct kvm_vcpu *vcpu)
125125
/* Request and verify all valid register sets. */
126126
run->kvm_valid_regs = TEST_SYNC_FIELDS;
127127
rv = _vcpu_run(vcpu);
128-
TEST_ASSERT(rv == 0, "vcpu_run failed: %d\n", rv);
128+
TEST_ASSERT(rv == 0, "vcpu_run failed: %d", rv);
129129
TEST_ASSERT_KVM_EXIT_REASON(vcpu, KVM_EXIT_S390_SIEIC);
130130
TEST_ASSERT(run->s390_sieic.icptcode == 4 &&
131131
(run->s390_sieic.ipa >> 8) == 0x83 &&
132132
(run->s390_sieic.ipb >> 16) == 0x501,
133-
"Unexpected interception code: ic=%u, ipa=0x%x, ipb=0x%x\n",
133+
"Unexpected interception code: ic=%u, ipa=0x%x, ipb=0x%x",
134134
run->s390_sieic.icptcode, run->s390_sieic.ipa,
135135
run->s390_sieic.ipb);
136136

@@ -161,7 +161,7 @@ void test_set_and_verify_various_reg_values(struct kvm_vcpu *vcpu)
161161
}
162162

163163
rv = _vcpu_run(vcpu);
164-
TEST_ASSERT(rv == 0, "vcpu_run failed: %d\n", rv);
164+
TEST_ASSERT(rv == 0, "vcpu_run failed: %d", rv);
165165
TEST_ASSERT_KVM_EXIT_REASON(vcpu, KVM_EXIT_S390_SIEIC);
166166
TEST_ASSERT(run->s.regs.gprs[11] == 0xBAD1DEA + 1,
167167
"r11 sync regs value incorrect 0x%llx.",
@@ -193,7 +193,7 @@ void test_clear_kvm_dirty_regs_bits(struct kvm_vcpu *vcpu)
193193
run->s.regs.gprs[11] = 0xDEADBEEF;
194194
run->s.regs.diag318 = 0x4B1D;
195195
rv = _vcpu_run(vcpu);
196-
TEST_ASSERT(rv == 0, "vcpu_run failed: %d\n", rv);
196+
TEST_ASSERT(rv == 0, "vcpu_run failed: %d", rv);
197197
TEST_ASSERT_KVM_EXIT_REASON(vcpu, KVM_EXIT_S390_SIEIC);
198198
TEST_ASSERT(run->s.regs.gprs[11] != 0xDEADBEEF,
199199
"r11 sync regs value incorrect 0x%llx.",

0 commit comments

Comments
 (0)