Project

General

Profile

Actions

Bug #16435

closed

util-tests setup fixes

Added by Bill Sommerfeld 21 days ago. Updated 15 days ago.

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

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

While running the util-tests I found a few glitches that resulted in spurious test failures.

1) Four of the util-tests (allowed-ips, set-linkprop, date_test, and chown_test) fail if not run as root, but default.run doesn't mark them as requiring root.

2) /opt/util-tests/tests/awk/tests/T.misc sets LC_NUMERIC=ru_RU.ISO8859-5 which means that its package needs to depend on the locale/ru-extra package which is what ships usr/lib/locale/ru_RU.ISO8859-5/LC_NUMERIC/LCL_DATA.

In addition, I had to add Defaults rlimit_core=default to /etc/sudoers as the default OpenIndiana sudo config set the coresize hard limit to 0; without that fix, /opt/util-tests/tests/awk/system-status.awk failed because it couldn't set the "core dumped"
bit in an exit status.

Actions #1

Updated by Bill Sommerfeld 21 days ago

date_test fails as non-root accidentally: it expects TMPDIR to be set and wants to create $TMPDIR/test.$$

The others do have reason to require privileged access.

Actions #2

Updated by Electric Monk 21 days ago

  • Gerrit CR set to 3392
Actions #3

Updated by Bill Sommerfeld 20 days ago

An objection was raised during code review to the addition of locale/ru-extra as a package dependency.

The test assertion in question merely needs a locale which uses , as the decimal point/radix point character; the test package already depends on locale/de, so switching to one of the German locales made sense. But then when I pushed it for review, Gerrit asserted that usr/src/test/util-tests/tests/awk/tests/T.misc was a non-diffable binary file.

I've worked around that issue under #16437 which will have to go in first.

Actions #4

Updated by Bill Sommerfeld 19 days ago

Testing notes:

- ran nightly build with this change and #16437 included
- uninstalled locale/ru-extra prior to running tests (had been installed for an earlier version of the fix)
- onu'ed nightly-nd bits on to a VM; ran /opt/util-tests/bin/utiltest as non-root; got 100% pass (47/47)
- onu'ed nightly (DEBUG) bits onto a VM; ran /opt/util-tests/bin/utiltest as non-root; got 100% pass (47/47)

Actions #5

Updated by Bill Sommerfeld 18 days ago

  • Status changed from In Progress to Pending RTI
Actions #6

Updated by Electric Monk 15 days ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 0 to 100

git commit 8becd264f090383e754dfc0f1aa07109620465d0

commit  8becd264f090383e754dfc0f1aa07109620465d0
Author: Bill Sommerfeld <sommerfeld@hamachi.org>
Date:   2024-04-06T13:28:26.000Z

    16435 util-tests setup fixes
    16437 workaround gerrit misclassifying awk test T.misc as binary
    Reviewed by: Gordon Ross <Gordon.W.Ross@gmail.com>
    Reviewed by: Andy Fiddaman <illumos@fiddaman.net>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF