Commit 250e138d authored by Andrew Jones's avatar Andrew Jones Committed by Sean Christopherson
Browse files

KVM: selftests: Remove redundant newlines



TEST_* functions append their own newline. Remove newlines from
TEST_* callsites to avoid extra newlines in output.

Signed-off-by: default avatarAndrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20231206170241.82801-8-ajones@ventanamicro.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 02add85a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -45,10 +45,10 @@ static void vcpu_worker(struct memstress_vcpu_args *vcpu_args)

	/* Let the guest access its memory */
	ret = _vcpu_run(vcpu);
	TEST_ASSERT(ret == 0, "vcpu_run failed: %d\n", ret);
	TEST_ASSERT(ret == 0, "vcpu_run failed: %d", ret);
	if (get_ucall(vcpu, NULL) != UCALL_SYNC) {
		TEST_ASSERT(false,
			    "Invalid guest sync status: exit_reason=%s\n",
			    "Invalid guest sync status: exit_reason=%s",
			    exit_reason_str(run->exit_reason));
	}

+2 −2
Original line number Diff line number Diff line
@@ -88,9 +88,9 @@ static void vcpu_worker(struct memstress_vcpu_args *vcpu_args)
		ret = _vcpu_run(vcpu);
		ts_diff = timespec_elapsed(start);

		TEST_ASSERT(ret == 0, "vcpu_run failed: %d\n", ret);
		TEST_ASSERT(ret == 0, "vcpu_run failed: %d", ret);
		TEST_ASSERT(get_ucall(vcpu, NULL) == UCALL_SYNC,
			    "Invalid guest sync status: exit_reason=%s\n",
			    "Invalid guest sync status: exit_reason=%s",
			    exit_reason_str(run->exit_reason));

		pr_debug("Got sync event from vCPU %d\n", vcpu_idx);
+2 −2
Original line number Diff line number Diff line
@@ -262,7 +262,7 @@ static void default_after_vcpu_run(struct kvm_vcpu *vcpu, int ret, int err)
		    "vcpu run failed: errno=%d", err);

	TEST_ASSERT(get_ucall(vcpu, NULL) == UCALL_SYNC,
		    "Invalid guest sync status: exit_reason=%s\n",
		    "Invalid guest sync status: exit_reason=%s",
		    exit_reason_str(run->exit_reason));

	vcpu_handle_sync_stop();
@@ -410,7 +410,7 @@ static void dirty_ring_after_vcpu_run(struct kvm_vcpu *vcpu, int ret, int err)
		pr_info("vcpu continues now.\n");
	} else {
		TEST_ASSERT(false, "Invalid guest sync status: "
			    "exit_reason=%s\n",
			    "exit_reason=%s",
			    exit_reason_str(run->exit_reason));
	}
}
+1 −1
Original line number Diff line number Diff line
@@ -152,7 +152,7 @@ static void check_supported(struct vcpu_reg_list *c)
			continue;

		__TEST_REQUIRE(kvm_has_cap(s->capability),
			       "%s: %s not available, skipping tests\n",
			       "%s: %s not available, skipping tests",
			       config_name(c), s->name);
	}
}
+4 −4
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ static void ucall_abort(const char *assert_msg, const char *expected_assert_msg)
	int offset = len_str - len_substr;

	TEST_ASSERT(len_substr <= len_str,
		    "Expected '%s' to be a substring of '%s'\n",
		    "Expected '%s' to be a substring of '%s'",
		    assert_msg, expected_assert_msg);

	TEST_ASSERT(strcmp(&assert_msg[offset], expected_assert_msg) == 0,
@@ -116,7 +116,7 @@ static void run_test(struct kvm_vcpu *vcpu, const char *expected_printf,
		vcpu_run(vcpu);

		TEST_ASSERT(run->exit_reason == UCALL_EXIT_REASON,
			    "Unexpected exit reason: %u (%s),\n",
			    "Unexpected exit reason: %u (%s),",
			    run->exit_reason, exit_reason_str(run->exit_reason));

		switch (get_ucall(vcpu, &uc)) {
@@ -161,11 +161,11 @@ static void test_limits(void)
	vcpu_run(vcpu);

	TEST_ASSERT(run->exit_reason == UCALL_EXIT_REASON,
		    "Unexpected exit reason: %u (%s),\n",
		    "Unexpected exit reason: %u (%s),",
		    run->exit_reason, exit_reason_str(run->exit_reason));

	TEST_ASSERT(get_ucall(vcpu, &uc) == UCALL_ABORT,
		    "Unexpected ucall command: %lu,  Expected: %u (UCALL_ABORT)\n",
		    "Unexpected ucall command: %lu,  Expected: %u (UCALL_ABORT)",
		    uc.cmd, UCALL_ABORT);

	kvm_vm_free(vm);
Loading