Re: [PATCH v8 4/4] selftests: KVM: testing the local IRQs resets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 30 Jan 2020 12:18:31 +0100
Janosch Frank <frankja@xxxxxxxxxxxxx> wrote:

> On 1/30/20 11:55 AM, Cornelia Huck wrote:
> > On Wed, 29 Jan 2020 15:03:12 -0500
> > Janosch Frank <frankja@xxxxxxxxxxxxx> wrote:

> >> +	irq_state.len = sizeof(buf);
> >> +	irq_state.buf = (unsigned long)buf;
> >> +	irqs = _vcpu_ioctl(vm, VCPU_ID, KVM_S390_GET_IRQ_STATE, &irq_state);
> >> +	/*
> >> +	 * irqs contains the number of retrieved interrupts, apart from the
> >> +	 * emergency call that should be cleared by the resets, there should be
> >> +	 * none.  
> > 
> > Even if there were any, they should have been cleared by the reset,
> > right?  
> 
> Yes, that's what "there should be none" should actually express.
> I added the comment before sending out.

So what about

/*
 * irqs contains the number of retrieved interrupts. Any interrupt
 * (notably, the emergency call interrupt we have injected) should
 * be cleared by the resets, so this should be 0.
 */

?

> 
> >   
> >> +	 */
> >> +	if (irqs < 0)
> >> +		printf("Error by getting IRQ: errno %d\n", errno);  
> > 
> > "Error getting pending IRQs" ?  
> 
> "Could not fetch IRQs: errno %d\n" ?

Sounds good.

> 
> >   
> >> +
> >> +	TEST_ASSERT(!irqs, "IRQ pending");
> >> +}

Attachment: pgpzcpQkUHwy8.pgp
Description: OpenPGP digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux