Re: [LTP] [PATCH 0/3] Add tst_iterate_fd()

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

 



Hello,

Cyril Hrubis <chrubis@xxxxxxx> writes:

> Hi!
>> >  - adds tst_iterate_fd() functionality
>> >  - make use of tst_iterate_fd() in readahead01
>> >  - add accept03 test which uses tst_iterate_fd()
>> >
>> > This is a prototype for how the functionality to iterate over different
>> > file descriptors should look like it converts one tests and adds
>> > another. There is plenty of other syscalls that can use this kind of
>> > testing, e.g. all fooat() syscalls where we can pass invalid dir_fd, the
>> > plan is to add these if/once we agree on the API.
>> 
>> I imagine the results of using this with splice could be very interesting.
>
> Good idea, I guess that we need to figure out how to do carthesian
> multiplication on the different file descriptors though. Maybe we need
> to treat the tst_interate_fd() as an iterator so that we can advance to
> the next fd with each call, so that we can do:
>
> 	struct tst_fd fd_in = {}, fd_out = {};
>
> 	while (tst_iterate_fd(&fd_in)) {
> 		while (tst_iterate_fd(&fd_out)) {
> 			...
> 			TST_TEST(splice(fd_in.fd, 0, fd_out.fd, 0, ...));
> 			...
> 		}
> 	}

This looks promising. I think it would be good to try this sooner rather
than later.

-- 
Thank you,
Richard.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux