Bug #7290
closedZFS test suite needs to control what utilities it can run
100%
Description
The suite currently maintains a list of variables set to absolute paths of commands used in the suite. There are several difficulties with this setup.
1. It doesn't constrain the set of allowable commands. New tests can alway introduce a utility directly, bypassing the current mechanism.
2. It leads to errors where $COMMAND is used, but not defined.
3. A variable referring to a command can be overriden (think `export FILE=/tmp/foo`)
Solution:
=========
During test initialization, create a directory and add symlinks to wanted commands inside. Before test execution, set $PATH to be only that directory. Users can still bypass this mechanism by specifying an absolute path, but it's no longer easy to do it accidentally.
Updated by Electric Monk over 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 1d32ba663e202c24a5a1f2e5aef83fffb447cb7f
commit 1d32ba663e202c24a5a1f2e5aef83fffb447cb7f Author: John Wren Kennedy <john.kennedy@delphix.com> Date: 2016-11-12T18:02:35.000Z 7290 ZFS test suite needs to control what utilities it can run Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Dan McDonald <danmcd@omniti.com> Approved by: Gordon Ross <gordon.w.ross@gmail.com>