Files
mirror_zfs/cmd
Etienne Dechamps 9d81146b01 Use dynamic file descriptor numbers in ztest.
Currently, ztest expects to get 3 and 4 as the file descriptors for
data and random files, respectively. This is quite fragile and breaks
easily if ztest is run with these file descriptors already opened
(e.g. in a complex shell script).

This patch fixes the issue by removing the assumptions on the file
descriptor numbers that open() returns.

For the random file (/dev/urandom), the new code doesn't rely on a
shared file descriptor; instead, it reopens the file in the child.

For the data file, the new code writes the file descriptor number into
a "ZTEST_FD_DATA" environment variable so that it can be recovered
after the execv() call.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2012-10-04 13:19:09 -07:00
..
2012-08-27 11:47:44 -07:00
2012-08-27 11:47:44 -07:00
2012-08-27 11:47:44 -07:00
2012-08-27 11:47:44 -07:00
2012-08-27 11:47:44 -07:00
2012-09-06 14:23:11 -07:00
2012-08-27 11:47:44 -07:00