From: shahuang@redhat.com
To: kvm@vger.kernel.org
Cc: Shaoqin Huang <shahuang@redhat.com>,
Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Oliver Upton <oliver.upton@linux.dev>,
Zenghui Yu <yuzenghui@huawei.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Shuah Khan <shuah@kernel.org>,
Sean Christopherson <seanjc@google.com>,
David Matlack <dmatlack@google.com>,
linux-arm-kernel@lists.infradead.org (moderated list:KERNEL
VIRTUAL MACHINE FOR ARM64 (KVM/arm64)),
kvmarm@lists.linux.dev (open list:KERNEL VIRTUAL MACHINE FOR
ARM64 (KVM/arm64)),
kvmarm@lists.cs.columbia.edu (moderated list:KERNEL VIRTUAL
MACHINE FOR ARM64 (KVM/arm64)),
linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST
FRAMEWORK), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] KVM: selftests: Remove redundant setbuf()
Date: Fri, 3 Feb 2023 14:10:36 +0800 [thread overview]
Message-ID: <20230203061038.277655-1-shahuang@redhat.com> (raw)
From: Shaoqin Huang <shahuang@redhat.com>
Since setbuf(stdout, NULL) has been called in kvm_util.c with
__attribute((constructor)). Selftests no need to setup it in their own
code.
Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
---
tools/testing/selftests/kvm/aarch64/page_fault_test.c | 2 --
.../selftests/kvm/x86_64/exit_on_emulation_failure_test.c | 3 ---
2 files changed, 5 deletions(-)
diff --git a/tools/testing/selftests/kvm/aarch64/page_fault_test.c b/tools/testing/selftests/kvm/aarch64/page_fault_test.c
index beb944fa6fd4..513b20bec3c2 100644
--- a/tools/testing/selftests/kvm/aarch64/page_fault_test.c
+++ b/tools/testing/selftests/kvm/aarch64/page_fault_test.c
@@ -1093,8 +1093,6 @@ int main(int argc, char *argv[])
enum vm_mem_backing_src_type src_type;
int opt;
- setbuf(stdout, NULL);
-
src_type = DEFAULT_VM_MEM_SRC;
while ((opt = getopt(argc, argv, "hm:s:")) != -1) {
diff --git a/tools/testing/selftests/kvm/x86_64/exit_on_emulation_failure_test.c b/tools/testing/selftests/kvm/x86_64/exit_on_emulation_failure_test.c
index 37c61f712fd5..e334844d6e1d 100644
--- a/tools/testing/selftests/kvm/x86_64/exit_on_emulation_failure_test.c
+++ b/tools/testing/selftests/kvm/x86_64/exit_on_emulation_failure_test.c
@@ -26,9 +26,6 @@ int main(int argc, char *argv[])
struct kvm_vcpu *vcpu;
struct kvm_vm *vm;
- /* Tell stdout not to buffer its content */
- setbuf(stdout, NULL);
-
TEST_REQUIRE(kvm_has_cap(KVM_CAP_EXIT_ON_EMULATION_FAILURE));
vm = vm_create_with_one_vcpu(&vcpu, guest_code);
--
2.39.0
next reply other threads:[~2023-02-03 6:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 6:10 shahuang [this message]
2023-02-03 18:41 ` [PATCH] KVM: selftests: Remove redundant setbuf() Sean Christopherson
2023-02-03 18:49 ` Oliver Upton
2023-02-03 21:30 ` Oliver Upton
2023-02-06 17:12 ` Oliver Upton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230203061038.277655-1-shahuang@redhat.com \
--to=shahuang@redhat.com \
--cc=dmatlack@google.com \
--cc=james.morse@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=shuah@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=yuzenghui@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).