Project

General

Profile

Actions

Bug #14177

closed

test suite pkg manifests need DTrace dependencies

Added by Robert Mustacchi about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
packaging
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

The util-tests use the DTrace command line utility. Recently I had a fresh system where I installed the utiltest package; however, the sleep tests failed with this:

rm@iliad:~$ /opt/util-tests/tests/sleep/sleeptest
dtrace: failed to initialize dtrace: DTrace device not available on system
TEST FAILED: sleeptest: sleep 1: 1 secs 0 ns
dtrace: failed to initialize dtrace: DTrace device not available on system
TEST FAILED: sleeptest: sleep 23: 23 secs 0 ns
dtrace: failed to initialize dtrace: DTrace device not available on system
TEST FAILED: sleeptest: sleep 0xff: 0xff secs 0 ns
dtrace: failed to initialize dtrace: DTrace device not available on system
TEST FAILED: sleeptest: sleep 123456789: 123456789 secs 0 ns
...

While developer/dtrace was installed system/kernel/dtrace/providers was not. Since none of these are libraries, the default pkgdepend stuff does not pick it up. The solution is to make sure we actually declare that we need DTrace here in the manifests. The same is true of the os-tests and libc-tests.

Actions #1

Updated by Robert Mustacchi about 1 month ago

The os-tests spoof-ras fails without this. e.g.:

rm@iliad:~$ pfexec /opt/os-tests/tests/spoof-ras 
dtrace: failed to initialize dtrace: DTrace device not available on system
Executing test case #1... Done.
Executing test case #2... Done.
Executing test case #3... Done.
Executing test case #4... Done.
Executing test case #5... Done.
One or more tests of bad behaviour failed!

Similarly the libc arc4random tests:

rm@iliad:~$ pfexec /opt/libc-tests/tests/random/arc4key.ksh 
dtrace: failed to initialize dtrace: DTrace device not available on system
Actions #2

Updated by Electric Monk about 1 month ago

  • Gerrit CR set to 1767
Actions #3

Updated by Robert Mustacchi about 1 month ago

To test this I started on a system without any test packages installed. e.g.:

rm@iliad:~$ pfexec pkg list | grep -i test
rm@iliad:~$ pfexec pkg list | grep -i dtrace
developer/dtrace                                  0.5.11-1.0.20741           i--
rm@iliad:~$ pfexec pkg install system/test/utiltest
           Packages to install:  5
            Services to change:  1
       Create boot environment: No
Create backup boot environment: No

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                5/5     1787/1787      2.6/2.6      --

PHASE                                          ITEMS
Installing new actions                     1938/1938
Updating package state database                 Done 
Updating package cache                           0/0 
Updating image state                            Done 
Creating fast lookup database                   Done 
Reading search index                            Done 
Updating search index                            5/5 
Updating package cache                           2/2 
rm@iliad:~$ pfexec pkg list | grep -i test
system/test/testrunner                            0.5.11-1.0.20741           i--
system/test/utiltest                              0.5.11-1.0.20741           im-
rm@iliad:~$ pfexec pkg list | grep -i dtrace
developer/dtrace                                  0.5.11-1.0.20741           i--
system/kernel/dtrace/providers                    0.5.11-1.0.20741           i--

And now the expected dependencies are installed.

Actions #4

Updated by Electric Monk about 1 month ago

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

git commit 2741f6215001631bb7a8dd7d985e1d692eefb084

commit  2741f6215001631bb7a8dd7d985e1d692eefb084
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2021-10-27T16:02:55.000Z

    14177 test suite pkg manifests need DTrace dependencies
    Reviewed by: Yuri Pankov <ypankov@tintri.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF