Re: [PATCH v4 6/9] KVM: selftests: Add various print flags to KVM selftest runner

Vipin Sharma <[email protected]>
Newsgroups org.infradead.lists.kvm-riscv,dev.linux.lists.kvmarm,org.kernel.vger.kvm
Message-ID <[email protected]>
On Wed, Jul 29, 2026 at 12:14:24PM -0700, Sean Christopherson wrote:
> On Tue, Mar 31, 2026, Vipin Sharma wrote:
> > @@ -27,10 +34,14 @@ class TestRunner:
> >          return test
> >  
> >      def _log_result(self, test_result):
> > -        logger.info("*** stdout ***\n" + test_result.stdout)
> > -        logger.info("*** stderr ***\n" + test_result.stderr)
> > -        logger.log(test_result.status,
> > -                   f"[{test_result.status.name}] {test_result.test_path}")
> > +        print_level = self.print_stds.get(test_result.status, "full")
> > +
> > +        if (print_level == "full" or print_level == "stdout"):
> > +            logger.info("*** stdout ***\n" + test_result.stdout)
> 
> IMO, when the print_level is exactly stdout or stderr, the runner shouldn't spit
> out the "*** std{out,err} ***" line, as it's pure noise.  E.g.
> 
>         print("\033[2K", end="\r", flush=True)
>         if (print_level == "full"):
>             logger.info("*** stdout ***\n" + test_result.stdout)
>             logger.info("*** stderr ***\n" + test_result.stderr)
>         elif (print_level == "stdout"):
>             logger.info(test_result.stdout)
>         elif (print_level == "stderr"):
>             logger.info(test_result.stderr)
> 

I agree.


-- 
kvm-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kvm-riscv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.