* [PATCH] KVM: selftests: Remove redundant setbuf()
@ 2023-02-03 6:10 shahuang
2023-02-03 18:41 ` Sean Christopherson
2023-02-06 17:12 ` Oliver Upton
0 siblings, 2 replies; 5+ messages in thread
From: shahuang @ 2023-02-03 6:10 UTC (permalink / raw)
To: kvm
Cc: Shaoqin Huang, Marc Zyngier, James Morse, Suzuki K Poulose,
Oliver Upton, Zenghui Yu, Paolo Bonzini, Shuah Khan,
Sean Christopherson, David Matlack,
moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64),
open list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64),
moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64),
open list:KERNEL SELFTEST FRAMEWORK, open list
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: selftests: Remove redundant setbuf()
2023-02-03 6:10 [PATCH] KVM: selftests: Remove redundant setbuf() shahuang
@ 2023-02-03 18:41 ` Sean Christopherson
2023-02-03 18:49 ` Oliver Upton
2023-02-06 17:12 ` Oliver Upton
1 sibling, 1 reply; 5+ messages in thread
From: Sean Christopherson @ 2023-02-03 18:41 UTC (permalink / raw)
To: shahuang
Cc: kvm, Marc Zyngier, James Morse, Suzuki K Poulose, Oliver Upton,
Zenghui Yu, Paolo Bonzini, Shuah Khan, David Matlack,
moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64),
open list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64),
moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64),
open list:KERNEL SELFTEST FRAMEWORK, open list
On Fri, Feb 03, 2023, shahuang@redhat.com wrote:
> 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>
> ---
Reviewed-by: Sean Christopherson <seanjc@google.com>
Oliver/Marc, want to grab this one? I doubt there will be conflicts, but IIRC
there are a handful of in-flight changes for aarch64/page_fault_test.c.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: selftests: Remove redundant setbuf()
2023-02-03 18:41 ` Sean Christopherson
@ 2023-02-03 18:49 ` Oliver Upton
2023-02-03 21:30 ` Oliver Upton
0 siblings, 1 reply; 5+ messages in thread
From: Oliver Upton @ 2023-02-03 18:49 UTC (permalink / raw)
To: Sean Christopherson
Cc: shahuang, kvm, Marc Zyngier, James Morse, Suzuki K Poulose,
Zenghui Yu, Paolo Bonzini, Shuah Khan, David Matlack,
moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64),
open list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64),
moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64),
open list:KERNEL SELFTEST FRAMEWORK, open list
On Fri, Feb 03, 2023 at 06:41:27PM +0000, Sean Christopherson wrote:
> On Fri, Feb 03, 2023, shahuang@redhat.com wrote:
> > 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>
> > ---
>
> Reviewed-by: Sean Christopherson <seanjc@google.com>
Thanks!
> Oliver/Marc, want to grab this one? I doubt there will be conflicts, but IIRC
> there are a handful of in-flight changes for aarch64/page_fault_test.c.
That is indeed the plan.
Applying patches for arm64 has taken a bit longer because I don't
yet have push access to kvmarm so I need Marc to pull from me. The net
effect is emailed thankyous are delayed by a few days, but that wont be
an issue going forward.
--
Thanks,
Oliver
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: selftests: Remove redundant setbuf()
2023-02-03 18:49 ` Oliver Upton
@ 2023-02-03 21:30 ` Oliver Upton
0 siblings, 0 replies; 5+ messages in thread
From: Oliver Upton @ 2023-02-03 21:30 UTC (permalink / raw)
To: Sean Christopherson
Cc: shahuang, kvm, Marc Zyngier, James Morse, Suzuki K Poulose,
Zenghui Yu, Paolo Bonzini, Shuah Khan, David Matlack,
moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64),
open list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64),
moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64),
open list:KERNEL SELFTEST FRAMEWORK, open list
On Fri, Feb 03, 2023 at 06:49:45PM +0000, Oliver Upton wrote:
> On Fri, Feb 03, 2023 at 06:41:27PM +0000, Sean Christopherson wrote:
> > On Fri, Feb 03, 2023, shahuang@redhat.com wrote:
> > > 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>
> > > ---
> >
> > Reviewed-by: Sean Christopherson <seanjc@google.com>
>
> Thanks!
>
> > Oliver/Marc, want to grab this one? I doubt there will be conflicts, but IIRC
> > there are a handful of in-flight changes for aarch64/page_fault_test.c.
>
> That is indeed the plan.
Now fully caffeinated I see that this was poking at an x86 selftest too.
Thanks for reviewing it, I'll grab the patch today.
--
Thanks,
Oliver
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: selftests: Remove redundant setbuf()
2023-02-03 6:10 [PATCH] KVM: selftests: Remove redundant setbuf() shahuang
2023-02-03 18:41 ` Sean Christopherson
@ 2023-02-06 17:12 ` Oliver Upton
1 sibling, 0 replies; 5+ messages in thread
From: Oliver Upton @ 2023-02-06 17:12 UTC (permalink / raw)
To: shahuang, kvm
Cc: Oliver Upton, Zenghui Yu,
moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 KVM/arm64,
moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 KVM/arm64,
Suzuki K Poulose, David Matlack, Shuah Khan, open list,
Marc Zyngier, Paolo Bonzini, James Morse, Sean Christopherson,
open list:KERNEL VIRTUAL MACHINE FOR ARM64 KVM/arm64,
open list:KERNEL SELFTEST FRAMEWORK
On Fri, 3 Feb 2023 14:10:36 +0800, shahuang@redhat.com wrote:
> 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.
>
>
> [...]
Applied to kvmarm/next, thanks!
[1/1] KVM: selftests: Remove redundant setbuf()
https://git.kernel.org/kvmarm/kvmarm/c/6043829fdb71
--
Best,
Oliver
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-06 17:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 6:10 [PATCH] KVM: selftests: Remove redundant setbuf() shahuang
2023-02-03 18:41 ` Sean Christopherson
2023-02-03 18:49 ` Oliver Upton
2023-02-03 21:30 ` Oliver Upton
2023-02-06 17:12 ` Oliver Upton
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).