Test case run file for Linux which is a copy of openindiana.run.
+ Since ZFS On Linux doesn't have the 'aclmode' property (yet), skip that when testing.
+ On Linux, the cli_user/zpool_{iostat,list} tests needs to run as root.
+ Disable the ACL test case. Doesn't work in Linux because we don't have ACLs.
+ Disable functional/grow_{pool,replicas} - This directory cannot be run on raw files.
+ Disable functional/zvol/zvol_misc - no dumpadm command
+ Disable functional/inuse/inuse_00[127]_pos - no dumpadm command
+ Disable functional/{interop,mdb} - Doesn't make sense in Linux (no metadb/metainit command).
+ Disable functional/privilege - no pfexec command or 'RBAC profile' (?)
+ Disable functional/rootpool - we're not running from ZFS on root.
+ Disable functional/xattr - no 'runat' command.
+ Disable functional/zvol/zvol_ENOSPC - no 'dumpadm' command.
+ Disable functional/mount/umount_001 - no umountall command on Linux.
+ Disable functional/slog/slog_013_pos - Linux doesn't have a 'lofiadm' command
+ Disable functional/delegate - ZoL does not have delegation
+ Disable utils_test_007_pos in functional/utils_test - no 'fstyp' command.
+ Disable zvol_swap_003_pos, zvol_swap_004_pos, zvol_swap_006_pos - no kstat or swapadd.
+ Disable zvol_swap_005_pos in functional/zvol/zvol_swap - swapon/swapoff is to simple (don't allow size etc).
+ Disable functional/threadsappend - no psrinfo command.
+ Note that there's something wrong with the 'largest_file' command - fails but succeeds (!?)
+ Note that file_write needs more work - hangs ZoL.
+ Note that functional/rsend test 008 and 010 get's killed
  Don't know if it's because of bug in ZFS or the test rig/setup
* Add a linux commands config file, rename the old and create a wrapper
  that loads either of these depending on system.
  + Export the env variable LINUX=1 if it's a Linux system.
* Move TEST_BASE_DIR to /var/tmp to not clutter the root directory.
* Special considerations for linux/bsd (tar options, /dev/zvol location etc).
* Set MNTTAB=/etc/mtab on Linux and /etc/mnttab on BSD
* Use getent instead of groupmod (which don't exist in Linux) in libtest.shlib:add_group().
* For missing commands in Linux, run 'scripts/missing_cmd'
  + include the command name missing
  + exit with errorcode to make sure test fails.
  + write to STDERR.
* lsof could be used in place of lockfs, but without the -f option.
* A script using truncate or dd that will emulate 'mkfile' for the tests.
  + Support creating sparse files (add -s as valid option to script)
  + Support giving value directly in bytes (divide by 1M before calling dd)
  + Support giving value in Giga bytes (multiply with 1k.
  + Disable creating sparse files in some tests - some of them need 'real' files to work.
  + If the dir to the file don't exist, create it.
* Script to generate logs for the FAIL only on stdout.
* Replace hardcoded /dev/zvol/{dsk,rdsk} with ZVOL_[R]DEVDIR.
* Some commands behave differently (tar, cpio, cp, ls, pax etc) on Linux.
* NEWFS (defined to be ext2fs on Linux) creates a ext2 filesystem by default.
  So use $NEWFS_DEFAULT_FS instead of hardcoded 'ufs'
* Use /dev/urandom (which is faster) instead of /dev/random.
* Use 'stat -c %[XYZ]' instead of 'ls ...' to get [amc]time.
  + Between the stats in check_atime_updated(), wait two seconds to make
    sure we see a change.
    !! MIGHT ONLY BE LINUX RELEVANT !!
* In Linux, we use a file in /var/tmp as our 'disk'. This means that
  creating a filesystem on it can't be done on '$DEV_RDSKDIR///var/tmp/file'.
  So if the disk path begins with a /, then use as-is.
  + Ditto for mounts.
In ismounted(), support finding ext2 mounts
In ismounted(), try to find zvols mounted.
* Replace hardcoded path to /etc/mnttab to MNTTAB from commands.cfg.
* Fix is_physical_device() to recognize devs on Linux.
* In add_group(), groupadd return 9 if group already exists - re-set it to 4
  to avoid to much clutter in the case.
  + On Linux, start adding groups at gid=1000, not 100.
* Use getent instead of groupmod to find if a group exists or not.
* Use LINUX instead of 'uname -a | grep' - faster.
* Add support for Linux
  + by using 'parted' in set_partition() and get_endslice().
  + by using 'exportfs' in setup_nfs_server().
  + by renaming find_disks() to find_disks_bsd() and write find_disks_linux(),
    using a 'wrapper function' to call one of the two.
* Since we're using exportfs to get shares, the share point is $1, not $2 as with the cmd 'share'.
* Translate 'psrinfo -p' to Linux 'grep ^processor /proc/cpuinfo | wc -l' in is_mp().
  + Substract one on the number of processors found in /proc/cpuinfo. 1 proc => 0 (not MP).
Don't use hardcoded paths and command, use the variables defined in commands.cfg.
* Remove exact path to kill, true and sudo.
* Add .{ksh,sh} to the command to allow to run without installing.
  + Ditto for verifying file name.
* Include default.cfg at the top instead of the bottom (to get command variable defines etc).
* Remove Don't use hardcoded paths and command, use the variables defined in commands.cfg.
* Some stuff isn't relevant on Linux.
* Don't force set STF_{SUITE,TOOLS}. Use value from env if availible.
* Rename find_disks() to find_disks_zfstest() to not clash with one from lib.
* Since we moved the basic test dir (from / to /var/tmp), make sure they exist.
Unpack the 'upgrade pool' images in /var/tmp/test_results instead of the
previously created pool. If that is using loop files, a kernel crash
will happen on Linux.
On Linux, we must use 'kpartx' after partitioning the raw disk file
to create a loop device with partitions (partitioning a raw disk file
does not create the parition files/devices).
+ In Linux, the 'disk part' is called a 'partition' and is labeled
  with a '<device>p<nr>' instead of '<device>s<nr>' (slice).
+ Overwrite some variables defined in the config file.
+  Cleanup (reorder/'prettify') the definition of the META_* variables.
+ In Linux we create a ext2 filesystem by default, not ufs.
* Some tests works on Linux but fail on BSD. Use log_{must,mustnot} appropriately.
* Replace a == with a != to verify a failure.
Since Linux don't have 'coreadm', we use the procedure used on Linux instead.
+ This means using the /proc filesystem and ulimit.
* In setup_snap_env(), support 'newfs' on Linux (really mke2fs) which behave a little different
* In cleanup_env(), look for any mounted zvols - !!!NEEDS BSD VERIFICATION!!!
The Linux equivalence of 'mount -F zfs' is 'mount -t zfs'.
+ The 'dev' ('devices') option never show up in a mount list
  Test this by trying to create a 'zero' device.
unshare doesn't exist on Linux, instead exportfs is used. But it have
quite different usage. And can't run as normal user...
Remove leading slash to disk images in TESTDIR (ended up with double
which made the test fail).
The expected return value from 'mmap_exec' on Linux is 22, not 13.
Change hardcoded '/dev/{dsk,rdsk' to variable 'DEV_{DSK,RDSK}DIR'.
Linux does not separate them and puts everything in '/dev'.
In Linux, we need to add the '-d $TEST_BASE_DIR' to 'zpool import' for it to find the raw disk files.
sleep 1 - On Linux, we need to add a 'sleep 1'
+ between creating a ZVOL and accessing it to make sure udevd have had time to create the device node.
+ just before destroying a pool in the loop.
  This so the system have time to keep up - othervise, we get a "device is busy" from umount2.
  (Because Linux doesn't honor the force - can't force unmount something that is in use).