Re: [RFC v2 21/37] lkl tools: "boot" test

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

 



Hello Brendan,

On Fri, 24 Jan 2020 04:33:15 +0900,
Brendan Higgins wrote:

> > +int lkl_test_read(void)
> > +{
> > +	char buf[10] = { 0, };
> > +	long ret;
> > +
> > +	ret = lkl_sys_read(0, buf, sizeof(buf));
> > +
> > +	lkl_test_logf("lkl_sys_read=%ld buf=%s\n", ret, buf);
> > +
> > +	if (ret == sizeof(wrbuf) && !strcmp(wrbuf, buf))
> > +		return TEST_SUCCESS;
> > +
> > +	return TEST_FAILURE;
> > +}
> 
> These tests make me think that LKL could be very useful for KUnit and
> testing syscalls.
> 
> Luis and I had been talking about writing KUnit tests for syscalls to
> validate that syscalls conform to the expected behavior; however,
> calling syscalls from the kernel obviously has issues.
> 
> On the other hand, testing syscalls from a userspace on a booted kernel
> is something that we do and something that needs to be done; however,
> this too has some issues. Writing and running tests in userspace on a
> booted kernel is not as easy as being able to write and run tests in the
> kernel. Also, even though some syscall end-to-end tests are necessary,
> not all syscall tests must be end-to-end tests, especially those which
> are only trying to exercise the entire syscall contract.
> 
> I think it looks like LKL might be able to help us square that circle.

That's good to know :)

> Hajime (and other LKL people):
> 
> What is the current status of this patchset? I have not seen any
> activity for a couple months.

I've been a bit busy over the year-end term but recently restarted to
work for the patchset to address the comments received from the
discussion.

> Luis,
> 
> Does this kind of match what you were thinking with the syscall testing?
> I think this looks pretty close. You should be able to fully test the
> contract here using KUnit. Is there anyone else you think would be
> interested in this?
> 
> In any case, I am excited about this. Please keep me posted in the
> future!

I hope I can send v3 patches soon.
Thanks for the interest !

-- Hajime



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux