ZFS test suite needs to control what utilities it can run
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`)
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 about 3 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed
commit 1d32ba663e202c24a5a1f2e5aef83fffb447cb7f Author: John Wren Kennedy <firstname.lastname@example.org> Date: 2016-11-12T18:02:35.000Z 7290 ZFS test suite needs to control what utilities it can run Reviewed by: Dan Kimmel <email@example.com> Reviewed by: Matthew Ahrens <firstname.lastname@example.org> Reviewed by: Dan McDonald <email@example.com> Approved by: Gordon Ross <firstname.lastname@example.org>