Project

General

Profile

Bug #7290

ZFS test suite needs to control what utilities it can run

Added by John Kennedy over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tests
Start date:
2016-08-10
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

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.

History

#1

Updated by Electric Monk about 3 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

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>

Also available in: Atom PDF