Hi!
On 01/06/2015 01:18 PM, Cyril Hrubis wrote:
> Hi!
>> + /*
>> + * Wait until udev creates the device node.
>> + * If the node is not created, we will create it manually,
>> + * see below.
>> + */
>> + sleep(5);
>
> As usually I do not like adding long sleep() into testcases. What is the
> danger of creating it maualy anyway? Will that be overridden by udev,
> will the test fail because of that? If so, can we at least wait more
> actively? (check if the file exists a few times per second and proceed
> with manual creation after a timeout)
Thank you for review.
If valid /dev/tbio file exists before ltp_tbio.ko is loaded, then udev
will recreate it after ltp_tbio.ko is loaded, anyway.
If we create /dev/tbio manually, then the only danger I see is that the
test may fail at:
tbio_fd = open(DEVICE_NAME, O_RDWR);
if (tbio_fd < 0) {
tst_brkm(TBROK | TERRNO, cleanup, "open of %s failed",
DEVICE_NAME);
}
when old /dev/tbio is removed by udev, but a new one is not created yet.
I will modify my patch to include a more active waiting and send a new
version today.
Thanks.
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list