summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2016-07-19 22:18:49 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2016-07-19 22:18:49 +0000
commit1b989864babedc13028d67e6c9aaeb7d6cf33843 (patch)
treeb4f6d0a3537680d0a4a8708c5ef883b5f4b11621
parent1288dcc696c13b8f20bc65f1aa13c0a6211a2a89 (diff)
downloadillumos-joyent-1b989864babedc13028d67e6c9aaeb7d6cf33843.tar.gz
OS-5525 changes to allow the tests to work on SmartOS
Reviewed by: Robert Mustacchi <rm@joyent.com>
-rw-r--r--manifest15
-rw-r--r--usr/src/pkg/manifests/system-test-ostest.mf5
-rw-r--r--usr/src/test/Readme.smartos80
-rw-r--r--usr/src/test/os-tests/cmd/ostest.ksh9
-rw-r--r--usr/src/test/os-tests/runfiles/Makefile5
-rw-r--r--usr/src/test/os-tests/runfiles/default.run (renamed from usr/src/test/os-tests/runfiles/delphix.run)0
-rw-r--r--usr/src/test/os-tests/runfiles/omnios.run28
-rw-r--r--usr/src/test/os-tests/runfiles/openindiana.run28
8 files changed, 102 insertions, 68 deletions
diff --git a/manifest b/manifest
index 421d0132e2..ab2534cf02 100644
--- a/manifest
+++ b/manifest
@@ -9466,6 +9466,21 @@ d usr/lib/locale/zh_TW.UTF-8/LC_NUMERIC 0755 root bin
f usr/lib/locale/zh_TW.UTF-8/LC_NUMERIC/LCL_DATA 0755 root bin
d usr/lib/locale/zh_TW.UTF-8/LC_TIME 0755 root bin
f usr/lib/locale/zh_TW.UTF-8/LC_TIME/LCL_DATA 0755 root bin
+d usr/lib/locale/zz_AA.UTF-8 0755 root bin
+d usr/lib/locale/zz_AA.UTF-8/LC_COLLATE 0755 root bin
+f usr/lib/locale/zz_AA.UTF-8/LC_COLLATE/LCL_DATA 0755 root bin
+d usr/lib/locale/zz_AA.UTF-8/LC_CTYPE 0755 root bin
+f usr/lib/locale/zz_AA.UTF-8/LC_CTYPE/LCL_DATA 0755 root bin
+d usr/lib/locale/zz_AA.UTF-8/LC_MESSAGES 0755 root bin
+f usr/lib/locale/zz_AA.UTF-8/LC_MESSAGES/LCL_DATA 0755 root bin
+f usr/lib/locale/zz_AA.UTF-8/LC_MESSAGES/priv_names 0755 root bin
+f usr/lib/locale/zz_AA.UTF-8/LC_MESSAGES/SUNW_OST_OSLIB.mo 0755 root bin
+d usr/lib/locale/zz_AA.UTF-8/LC_MONETARY 0755 root bin
+f usr/lib/locale/zz_AA.UTF-8/LC_MONETARY/LCL_DATA 0755 root bin
+d usr/lib/locale/zz_AA.UTF-8/LC_NUMERIC 0755 root bin
+f usr/lib/locale/zz_AA.UTF-8/LC_NUMERIC/LCL_DATA 0755 root bin
+d usr/lib/locale/zz_AA.UTF-8/LC_TIME 0755 root bin
+f usr/lib/locale/zz_AA.UTF-8/LC_TIME/LCL_DATA 0755 root bin
d usr/lib/localedef 0755 root bin
d usr/lib/localedef/src 0755 root bin
f usr/lib/lslabels 0555 root bin
diff --git a/usr/src/pkg/manifests/system-test-ostest.mf b/usr/src/pkg/manifests/system-test-ostest.mf
index fde9d5bb0a..7635421a19 100644
--- a/usr/src/pkg/manifests/system-test-ostest.mf
+++ b/usr/src/pkg/manifests/system-test-ostest.mf
@@ -12,6 +12,7 @@
#
# Copyright (c) 2012 by Delphix. All rights reserved.
# Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
+# Copyright 2016, Joyent, Inc.
#
set name=pkg.fmri value=pkg:/system/test/ostest@$(PKGVERS)
@@ -27,9 +28,7 @@ dir path=opt/os-tests/tests
dir path=opt/os-tests/tests/sigqueue
file path=opt/os-tests/README mode=0444
file path=opt/os-tests/bin/ostest mode=0555
-file path=opt/os-tests/runfiles/delphix.run mode=0444
-file path=opt/os-tests/runfiles/omnios.run mode=0444
-file path=opt/os-tests/runfiles/openindiana.run mode=0444
+file path=opt/os-tests/runfiles/default.run mode=0444
file path=opt/os-tests/tests/poll_test mode=0555
file path=opt/os-tests/tests/sigqueue/sigqueue_queue_size mode=0555
file path=opt/os-tests/tests/spoof-ras mode=0555
diff --git a/usr/src/test/Readme.smartos b/usr/src/test/Readme.smartos
new file mode 100644
index 0000000000..12a430c4d5
--- /dev/null
+++ b/usr/src/test/Readme.smartos
@@ -0,0 +1,80 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2016, Joyent, Inc.
+#
+
+I) Introduction
+
+The procedure to run the illumos tests under SmartOS is unlike that for
+other distributions because of the zone-centric nature of the distribution,
+and because there is no built-in package management for the global zone.
+
+This Readme assumes you will run the tests in the global zone, as root.
+Although it is possible to run some of the tests within a non-global zone, as a
+user configured within that zone, that approach is not described here.
+
+Some test suites, such as the ZFS tests, assume there are available disks to
+use for the test run. This configuration is not currently available on a
+standard SmartOS installation, where all of the disks are already setup in the
+"zones" zpool, so these tests are not runnable at this time. The ZFS tests
+also are required to run as a non-root user, and that is non-standard for a
+SmartOS global zone, where any user created is lost on reboot.
+
+II) Setup to Run the Tests
+
+1) The tests currently require python26 to run, so you need to install this in
+ the global zone. The easiest way to do this is with pkgsrc using the
+ following procedure:
+
+ a) Get a copy of the following bootstrap tarball onto the test machine:
+ https://pkgsrc.joyent.com/packages/SmartOS/bootstrap/bootstrap-2014Q4-multiarch.tar.gz
+
+ b) Install the bootstrap tarball:
+ # gzcat bootstrap-2014Q4-multiarch.tar.gz | (cd /; tar -xpf -)
+
+ c) Install python26:
+ pkgin in python26
+
+2) You need to get the tests from your build machine onto the test machine's
+ global zone. This can be done in whatever way is easiest for you. Here is
+ one simple way:
+
+ a) On your build machine, in your fully built smartos-live proto area,
+ create a tarball of the test directory:
+ % cd proto/opt
+ % tar czf ../opt.tgz *
+
+
+ b) Copy the tarball from the build machine to the test machine running
+ SmartOS (the next step assumes you placed the tarball into the /zones
+ directory).
+
+3) In the global zone on your test machine, install the tests.
+
+ # cd /opt
+ # tar xf /zones/opt.tgz
+
+III) Run the Tests
+
+Now that setup is complete, you can run the tests using the normal procedure.
+For example:
+
+ # /opt/util-tests/bin/utiltest
+or
+ # /opt/os-tests/bin/ostest
+
+IV) Running New Tests
+
+During development, if you are creating or updating new tests, you can repeat
+steps 2 and 3 as often as necessary to make the new tests available on the test
+machine.
diff --git a/usr/src/test/os-tests/cmd/ostest.ksh b/usr/src/test/os-tests/cmd/ostest.ksh
index afa944b613..d30e7fe6eb 100644
--- a/usr/src/test/os-tests/cmd/ostest.ksh
+++ b/usr/src/test/os-tests/cmd/ostest.ksh
@@ -14,6 +14,7 @@
#
# Copyright (c) 2012 by Delphix. All rights reserved.
# Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
+# Copyright 2016, Joyent, Inc.
#
export OS_TESTS="/opt/os-tests"
@@ -28,12 +29,8 @@ function fail
function find_runfile
{
typeset distro=
- if [[ -d /opt/delphix && -h /etc/delphix/version ]]; then
- distro=delphix
- elif [[ 0 -ne $(grep -c OpenIndiana /etc/release 2>/dev/null) ]]; then
- distro=openindiana
- elif [[ 0 -ne $(grep -c OmniOS /etc/release 2>/dev/null) ]]; then
- distro=omnios
+ if [[ -f $OS_TESTS/runfiles/default.run ]]; then
+ distro=default
fi
[[ -n $distro ]] && echo $OS_TESTS/runfiles/$distro.run
diff --git a/usr/src/test/os-tests/runfiles/Makefile b/usr/src/test/os-tests/runfiles/Makefile
index 619c9b812a..a4346ca2c9 100644
--- a/usr/src/test/os-tests/runfiles/Makefile
+++ b/usr/src/test/os-tests/runfiles/Makefile
@@ -12,13 +12,12 @@
#
# Copyright (c) 2012 by Delphix. All rights reserved.
# Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
+# Copyright 2016, Joyent, Inc.
#
include $(SRC)/Makefile.master
-SRCS = delphix.run \
- omnios.run \
- openindiana.run
+SRCS = default.run
ROOTOPTPKG = $(ROOT)/opt/os-tests
RUNFILES = $(ROOTOPTPKG)/runfiles
diff --git a/usr/src/test/os-tests/runfiles/delphix.run b/usr/src/test/os-tests/runfiles/default.run
index 4e73ebc8b3..4e73ebc8b3 100644
--- a/usr/src/test/os-tests/runfiles/delphix.run
+++ b/usr/src/test/os-tests/runfiles/default.run
diff --git a/usr/src/test/os-tests/runfiles/omnios.run b/usr/src/test/os-tests/runfiles/omnios.run
deleted file mode 100644
index 4e73ebc8b3..0000000000
--- a/usr/src/test/os-tests/runfiles/omnios.run
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# This file and its contents are supplied under the terms of the
-# Common Development and Distribution License ("CDDL"), version 1.0.
-# You may only use this file in accordance with the terms of version
-# 1.0 of the CDDL.
-#
-# A full copy of the text of the CDDL should have accompanied this
-# source. A copy of the CDDL is also available via the Internet at
-# http://www.illumos.org/license/CDDL.
-#
-
-#
-# Copyright (c) 2012 by Delphix. All rights reserved.
-#
-
-[DEFAULT]
-pre =
-verbose = False
-quiet = False
-timeout = 60
-post =
-outputdir = /var/tmp/test_results
-
-[/opt/os-tests/tests/poll_test]
-user = root
-
-[/opt/os-tests/tests/sigqueue]
-tests = ['sigqueue_queue_size']
diff --git a/usr/src/test/os-tests/runfiles/openindiana.run b/usr/src/test/os-tests/runfiles/openindiana.run
deleted file mode 100644
index 4e73ebc8b3..0000000000
--- a/usr/src/test/os-tests/runfiles/openindiana.run
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# This file and its contents are supplied under the terms of the
-# Common Development and Distribution License ("CDDL"), version 1.0.
-# You may only use this file in accordance with the terms of version
-# 1.0 of the CDDL.
-#
-# A full copy of the text of the CDDL should have accompanied this
-# source. A copy of the CDDL is also available via the Internet at
-# http://www.illumos.org/license/CDDL.
-#
-
-#
-# Copyright (c) 2012 by Delphix. All rights reserved.
-#
-
-[DEFAULT]
-pre =
-verbose = False
-quiet = False
-timeout = 60
-post =
-outputdir = /var/tmp/test_results
-
-[/opt/os-tests/tests/poll_test]
-user = root
-
-[/opt/os-tests/tests/sigqueue]
-tests = ['sigqueue_queue_size']