summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2019-08-26 12:16:47 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2019-08-26 12:16:47 +0000
commit679f546c5aa97e75a655a2b0f0cd0cddf2ccdafb (patch)
tree7f836d090967d614dcf616e63763b829e9e9a772
parentf0e88e824573addb114d76d4bb019113c7c2d445 (diff)
parent3ee4fc2aa6b5136515cc3eed32d3c6ef33e37471 (diff)
downloadillumos-joyent-679f546c5aa97e75a655a2b0f0cd0cddf2ccdafb.tar.gz
[illumos-gate merge]
commit 3ee4fc2aa6b5136515cc3eed32d3c6ef33e37471 11552 Want a more modern nawk(1) commit ac05f74f7be0e256003b8dd2492cf96ac4ecda1d 11551 Clean up nawk(1) usage in illumos-gate commit e6d6c189fa3a95d7aa27bbe0aeacf7c1a6b57c8c 11550 Want tests for nawk(1) commit 72737c91abd19e2597bf00bb225ad2dec71c8d06 3635 kstat_queue(9F) should not mention kstat_create() commit d49945110829673d27d215f4db010ac1d22a68de 11554 Want TCP_CONGESTION socket option commit 45a4b79d042e642c2ed7090ec290469ccf8fc563 11553 Want pluggable TCP congestion control algorithms commit 867a2ce85cd3f659cb7bc187ba93a095fe1df597 10857 nanf.3m and nanl.3m should be linked to nan.3m Conflicts: usr/src/uts/common/inet/tcp/tcp.c usr/src/uts/Makefile.uts usr/src/test/util-tests/tests/awk/tests/T.lilly usr/src/test/util-tests/tests/awk/tests/T.gawk usr/src/test/util-tests/tests/awk/tests/T.clv usr/src/test/util-tests/tests/awk/tests/T.chem usr/src/test/util-tests/tests/awk/bugs-fixed/system-status.awk usr/src/test/util-tests/tests/awk/Makefile usr/src/test/util-tests/tests/Makefile usr/src/pkg/manifests/system-test-utiltest.mf usr/src/cmd/awk/lib.c exception_lists/cstyle
-rw-r--r--exception_lists/packaging1
-rw-r--r--manifest2
-rw-r--r--usr/src/cmd/awk/lib.c5
-rw-r--r--usr/src/cmd/awk/main.c2
-rw-r--r--usr/src/cmd/truss/print.c1
-rw-r--r--usr/src/lib/brand/solaris10/zone/p2v.ksh2
-rw-r--r--usr/src/man/man3m/Makefile13
-rw-r--r--usr/src/man/man7p/tcp.7p16
-rw-r--r--usr/src/man/man9f/kstat_queue.9f11
-rw-r--r--usr/src/pkg/manifests/system-kernel.mf1
-rw-r--r--usr/src/pkg/manifests/system-library-math.man3m.inc8
-rw-r--r--usr/src/pkg/manifests/system-test-utiltest.mf40
-rw-r--r--usr/src/test/util-tests/tests/awk/Makefile15
-rw-r--r--usr/src/test/util-tests/tests/awk/bugs-fixed/system-status.awk2
-rwxr-xr-xusr/src/test/util-tests/tests/awk/tests/T.chem5
-rwxr-xr-xusr/src/test/util-tests/tests/awk/tests/T.clv2
-rwxr-xr-xusr/src/test/util-tests/tests/awk/tests/T.gawk20
-rwxr-xr-xusr/src/test/util-tests/tests/awk/tests/T.lilly21
-rw-r--r--usr/src/test/util-tests/tests/awk/tests/lilly.ok974
-rw-r--r--usr/src/test/util-tests/tests/awk/tests/lsd1.ok128
-rw-r--r--usr/src/test/util-tests/tests/awk/tests/penicil.ok134
-rw-r--r--usr/src/test/util-tests/tests/awk/tests/res.ok201
-rw-r--r--usr/src/uts/common/inet/tcp/tcp_opt_data.c48
-rw-r--r--usr/src/uts/common/netinet/tcp.h1
24 files changed, 1591 insertions, 62 deletions
diff --git a/exception_lists/packaging b/exception_lists/packaging
index c6cb2ccf99..e5ffa391be 100644
--- a/exception_lists/packaging
+++ b/exception_lists/packaging
@@ -137,6 +137,7 @@ usr/lib/llib-like.ln
usr/lib/amd64/llib-like.ln i386
usr/lib/sparcv9/llib-like.ln sparc
#
+usr/include/inet/cc.h
usr/include/inet/ip_impl.h
usr/include/inet/ip_ndp.h
usr/include/inet/ip2mac_impl.h
diff --git a/manifest b/manifest
index 7e8474a2f1..b08a8aaf12 100644
--- a/manifest
+++ b/manifest
@@ -16456,6 +16456,8 @@ f usr/share/man/man3m/lround.3m 0444 root bin
f usr/share/man/man3m/matherr.3m 0444 root bin
f usr/share/man/man3m/modf.3m 0444 root bin
f usr/share/man/man3m/nan.3m 0444 root bin
+s usr/share/man/man3m/nanf.3m=nan.3m
+s usr/share/man/man3m/nanl.3m=nan.3m
f usr/share/man/man3m/nearbyint.3m 0444 root bin
f usr/share/man/man3m/nextafter.3m 0444 root bin
f usr/share/man/man3m/pow.3m 0444 root bin
diff --git a/usr/src/cmd/awk/lib.c b/usr/src/cmd/awk/lib.c
index bde265e273..fedd5d5137 100644
--- a/usr/src/cmd/awk/lib.c
+++ b/usr/src/cmd/awk/lib.c
@@ -254,8 +254,11 @@ nextfile(void)
argno++;
}
+/*
+ * read one record into buf
+ */
int
-readrec(char **pbuf, size_t *pbufsize, FILE *inf) /* read one record into buf */
+readrec(char **pbuf, size_t *pbufsize, FILE *inf)
{
int sep, c;
char *rr, *rt, *buf = *pbuf;
diff --git a/usr/src/cmd/awk/main.c b/usr/src/cmd/awk/main.c
index cb87917311..ff004daf65 100644
--- a/usr/src/cmd/awk/main.c
+++ b/usr/src/cmd/awk/main.c
@@ -63,7 +63,7 @@
#include "awk.h"
#include "y.tab.h"
-char *version = "version Oct 11, 1989";
+char *version = "version Aug 27, 2018";
int dbg = 0;
Awkfloat srand_seed = 1;
diff --git a/usr/src/cmd/truss/print.c b/usr/src/cmd/truss/print.c
index e2eb59c9fd..06a6202e24 100644
--- a/usr/src/cmd/truss/print.c
+++ b/usr/src/cmd/truss/print.c
@@ -2044,6 +2044,7 @@ tcp_optname(private_t *pri, long val)
case TCP_KEEPIDLE: return ("TCP_KEEPIDLE");
case TCP_KEEPCNT: return ("TCP_KEEPCNT");
case TCP_KEEPINTVL: return ("TCP_KEEPINTVL");
+ case TCP_CONGESTION: return ("TCP_CONGESTION");
default: (void) snprintf(pri->code_buf,
sizeof (pri->code_buf),
diff --git a/usr/src/lib/brand/solaris10/zone/p2v.ksh b/usr/src/lib/brand/solaris10/zone/p2v.ksh
index f1d8711073..19fc23190b 100644
--- a/usr/src/lib/brand/solaris10/zone/p2v.ksh
+++ b/usr/src/lib/brand/solaris10/zone/p2v.ksh
@@ -458,7 +458,7 @@ warn_zones()
NGZ=$(/usr/bin/nawk -F: '{
if (substr($1, 0, 1) == "#" || $1 == "global")
- continue
+ next
if ($2 == "installed")
printf("%s ", $1)
diff --git a/usr/src/man/man3m/Makefile b/usr/src/man/man3m/Makefile
index f245da0479..e1eae9138d 100644
--- a/usr/src/man/man3m/Makefile
+++ b/usr/src/man/man3m/Makefile
@@ -14,7 +14,7 @@
include ../../Makefile.master
-MANSECT = 3m
+MANSECT = 3m
MANFILES = acos.3m \
acosh.3m \
@@ -124,9 +124,11 @@ MANFILES = acos.3m \
trunc.3m \
y0.3m
-MANLINKS= fesetenv.3m \
- fesetexceptflag.3m \
- fesetround.3m
+MANLINKS= fesetenv.3m \
+ fesetexceptflag.3m \
+ fesetround.3m \
+ nanf.3m \
+ nanl.3m
fesetenv.3m := LINKSRC = fegetenv.3m
@@ -134,6 +136,9 @@ fesetexceptflag.3m := LINKSRC = fegetexceptflag.3m
fesetround.3m := LINKSRC = fegetround.3m
+nanf.3m := LINKSRC = nan.3m
+nanl.3m := LINKSRC = nan.3m
+
.KEEP_STATE:
include ../Makefile.man
diff --git a/usr/src/man/man7p/tcp.7p b/usr/src/man/man7p/tcp.7p
index 752133bec2..0b51d15b07 100644
--- a/usr/src/man/man7p/tcp.7p
+++ b/usr/src/man/man7p/tcp.7p
@@ -263,6 +263,22 @@ The process must have the
.Dv PRIV_SYS_NET_CONFIG
privilege if it wants to specify a number greater than that
calculated by RFC 3390.
+.Pp
+The operating system also provides alternative algorithms that may be more
+appropriate for your application, including the CUBIC congestion control
+algorithm described in RFC 8312.
+These can be configured system-wide using
+.Xr ipadm 1M ,
+or on a per-connection basis with the TCP-level socket option
+.Dv TCP_CONGESTION ,
+whose argument is the name of the algorithm to use
+.Pq for example Dq cubic .
+If the requested algorithm does not exist, then
+.Fn setsockopt
+will fail, and
+.Va errno
+will be set to
+.Er ENOENT .
.Ss "TCP Keep-Alive"
Since TCP determines whether a remote peer is no longer reachable by timing out
waiting for acknowledgements, a host that never sends any new data may never
diff --git a/usr/src/man/man9f/kstat_queue.9f b/usr/src/man/man9f/kstat_queue.9f
index 34e78fe522..e1a215b524 100644
--- a/usr/src/man/man9f/kstat_queue.9f
+++ b/usr/src/man/man9f/kstat_queue.9f
@@ -3,7 +3,7 @@
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH KSTAT_QUEUE 9F "Apr 4, 1994"
+.TH KSTAT_QUEUE 9F "Aug 18, 2019"
.SH NAME
kstat_queue, kstat_waitq_enter, kstat_waitq_exit, kstat_runq_enter,
kstat_runq_exit, kstat_waitq_to_runq, kstat_runq_back_to_waitq \- update I/O
@@ -45,11 +45,9 @@ kstat statistics
.fi
.SH INTERFACE LEVEL
-.sp
.LP
Solaris DDI specific (Solaris DDI)
.SH PARAMETERS
-.sp
.ne 2
.na
\fB\fIkiop\fR \fR
@@ -59,7 +57,6 @@ Pointer to a \fBkstat_io\fR(9S) structure.
.RE
.SH DESCRIPTION
-.sp
.LP
A large number of \fBI/O\fR subsystems have at least two basic "lists" (or
queues) of transactions they manage: one for transactions that have been
@@ -136,21 +133,17 @@ example).
.RE
.SH RETURN VALUES
-.sp
.LP
None.
.SH CONTEXT
-.sp
.LP
-\fBkstat_create()\fR can be called from user or kernel context.
+The \fBkstat_queue()\fR family of functions can be called from user or kernel context.
.SH WARNINGS
-.sp
.LP
These transitions must be protected by holding the \fBkstat\fR's \fBks_lock\fR,
and must be completely accurate (all transitions are recorded). Forgetting a
transition may, for example, make an idle disk appear 100% busy.
.SH SEE ALSO
-.sp
.LP
\fBbiodone\fR(9F), \fBdisksort\fR(9F), \fBkstat_create\fR(9F),
\fBkstat_delete\fR(9F), \fBkstat_named_init\fR(9F), \fBkstat\fR(9S),
diff --git a/usr/src/pkg/manifests/system-kernel.mf b/usr/src/pkg/manifests/system-kernel.mf
index 859b26269d..02186d11de 100644
--- a/usr/src/pkg/manifests/system-kernel.mf
+++ b/usr/src/pkg/manifests/system-kernel.mf
@@ -539,6 +539,7 @@ file path=kernel/misc/$(ARCH64)/bignum group=sys mode=0755
$(i386_ONLY)file path=kernel/misc/$(ARCH64)/bootdev group=sys mode=0755
file path=kernel/misc/$(ARCH64)/busra group=sys mode=0755
file path=kernel/misc/$(ARCH64)/cardbus group=sys mode=0755
+file path=kernel/misc/$(ARCH64)/cc group=sys mode=0755
file path=kernel/misc/$(ARCH64)/cmlb group=sys mode=0755
file path=kernel/misc/$(ARCH64)/consconfig group=sys mode=0755
file path=kernel/misc/$(ARCH64)/ctf group=sys mode=0755
diff --git a/usr/src/pkg/manifests/system-library-math.man3m.inc b/usr/src/pkg/manifests/system-library-math.man3m.inc
index 3187e5f6fc..243966e4f6 100644
--- a/usr/src/pkg/manifests/system-library-math.man3m.inc
+++ b/usr/src/pkg/manifests/system-library-math.man3m.inc
@@ -55,11 +55,8 @@ file path=usr/share/man/man3m/fabs.3m
file path=usr/share/man/man3m/fdim.3m
file path=usr/share/man/man3m/feclearexcept.3m
file path=usr/share/man/man3m/fegetenv.3m
-link path=usr/share/man/man3m/fesetenv.3m target=fegetenv.3m
file path=usr/share/man/man3m/fegetexceptflag.3m
-link path=usr/share/man/man3m/fesetexceptflag.3m target=fegetexceptflag.3m
file path=usr/share/man/man3m/fegetround.3m
-link path=usr/share/man/man3m/fesetround.3m target=fegetround.3m
file path=usr/share/man/man3m/feholdexcept.3m
file path=usr/share/man/man3m/feraiseexcept.3m
file path=usr/share/man/man3m/fesetprec.3m
@@ -122,3 +119,8 @@ file path=usr/share/man/man3m/tanh.3m
file path=usr/share/man/man3m/tgamma.3m
file path=usr/share/man/man3m/trunc.3m
file path=usr/share/man/man3m/y0.3m
+link path=usr/share/man/man3m/fesetenv.3m target=fegetenv.3m
+link path=usr/share/man/man3m/fesetexceptflag.3m target=fegetexceptflag.3m
+link path=usr/share/man/man3m/fesetround.3m target=fegetround.3m
+link path=usr/share/man/man3m/nanf.3m target=nan.3m
+link path=usr/share/man/man3m/nanl.3m target=nan.3m
diff --git a/usr/src/pkg/manifests/system-test-utiltest.mf b/usr/src/pkg/manifests/system-test-utiltest.mf
index efe46c45fd..d5ec587910 100644
--- a/usr/src/pkg/manifests/system-test-utiltest.mf
+++ b/usr/src/pkg/manifests/system-test-utiltest.mf
@@ -28,6 +28,15 @@ dir path=opt/util-tests
dir path=opt/util-tests/bin
dir path=opt/util-tests/runfiles
dir path=opt/util-tests/tests
+dir path=opt/util-tests/tests/awk
+dir path=opt/util-tests/tests/awk/bugs-fixed
+dir path=opt/util-tests/tests/awk/data
+dir path=opt/util-tests/tests/awk/examples
+dir path=opt/util-tests/tests/awk/examples/awk
+dir path=opt/util-tests/tests/awk/examples/out
+dir path=opt/util-tests/tests/awk/gnu
+dir path=opt/util-tests/tests/awk/syn
+dir path=opt/util-tests/tests/awk/tests
dir path=opt/util-tests/tests/ctf
dir path=opt/util-tests/tests/ctf/test-merge-dedup
dir path=opt/util-tests/tests/ctf/test-merge-forward
@@ -57,7 +66,6 @@ file path=opt/util-tests/bin/print_json mode=0555
file path=opt/util-tests/bin/utiltest mode=0555
file path=opt/util-tests/runfiles/default.run mode=0444
file path=opt/util-tests/tests/allowed-ips mode=0555
-file path=opt/util-tests/tests/awk/runtests.sh mode=0555
file path=opt/util-tests/tests/awk/bugs-fixed/a-format.awk mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/a-format.ok mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/concat-assign-same.awk mode=0444
@@ -73,6 +81,8 @@ file path=opt/util-tests/tests/awk/bugs-fixed/nf-self-assign.ok mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/numeric-fs.awk mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/numeric-fs.ok mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/numeric-output-seps.awk mode=0444
+file path=opt/util-tests/tests/awk/bugs-fixed/numeric-output-seps.awk \
+ mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/numeric-output-seps.ok mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/numeric-rs.awk mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/numeric-rs.ok mode=0444
@@ -82,7 +92,8 @@ file path=opt/util-tests/tests/awk/bugs-fixed/ofs-rebuild.awk mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/ofs-rebuild.ok mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/space.awk mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/space.ok mode=0444
-file path=opt/util-tests/tests/awk/bugs-fixed/split-fs-from-array.awk mode=0444
+file path=opt/util-tests/tests/awk/bugs-fixed/split-fs-from-array.awk \
+ mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/split-fs-from-array.ok mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/string-conv.awk mode=0444
file path=opt/util-tests/tests/awk/bugs-fixed/string-conv.ok mode=0444
@@ -169,6 +180,7 @@ file path=opt/util-tests/tests/awk/examples/awk/t.6a mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.6b mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.8.x mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.8.y mode=0444
+file path=opt/util-tests/tests/awk/examples/awk/t.NF mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.addops mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.aeiou mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.aeiouy mode=0444
@@ -259,7 +271,6 @@ file path=opt/util-tests/tests/awk/examples/awk/t.mod mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.monotone mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.nameval mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.next mode=0444
-file path=opt/util-tests/tests/awk/examples/awk/t.NF mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.not mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.null0 mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.ofmt mode=0444
@@ -281,9 +292,9 @@ file path=opt/util-tests/tests/awk/examples/awk/t.re3 mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.re4 mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.re5 mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.re7 mode=0444
+file path=opt/util-tests/tests/awk/examples/awk/t.reFS mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.rec mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.redir1 mode=0444
-file path=opt/util-tests/tests/awk/examples/awk/t.reFS mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.reg mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.roff mode=0444
file path=opt/util-tests/tests/awk/examples/awk/t.sep mode=0444
@@ -393,6 +404,7 @@ file path=opt/util-tests/tests/awk/examples/out/t.6a mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.6b mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.8.x mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.8.y mode=0444
+file path=opt/util-tests/tests/awk/examples/out/t.NF mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.addops mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.aeiou mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.aeiouy mode=0444
@@ -483,7 +495,6 @@ file path=opt/util-tests/tests/awk/examples/out/t.mod mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.monotone mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.nameval mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.next mode=0444
-file path=opt/util-tests/tests/awk/examples/out/t.NF mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.not mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.null0 mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.ofmt mode=0444
@@ -505,9 +516,9 @@ file path=opt/util-tests/tests/awk/examples/out/t.re3 mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.re4 mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.re5 mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.re7 mode=0444
+file path=opt/util-tests/tests/awk/examples/out/t.reFS mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.rec mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.redir1 mode=0444
-file path=opt/util-tests/tests/awk/examples/out/t.reFS mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.reg mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.roff mode=0444
file path=opt/util-tests/tests/awk/examples/out/t.sep mode=0444
@@ -561,6 +572,7 @@ file path=opt/util-tests/tests/awk/gnu/arrymem1.ok mode=0444
file path=opt/util-tests/tests/awk/gnu/arynasty.awk mode=0444
file path=opt/util-tests/tests/awk/gnu/arynasty.ok mode=0444
file path=opt/util-tests/tests/awk/gnu/arynocls.awk mode=0444
+file path=opt/util-tests/tests/awk/gnu/arynocls.data mode=0444
file path=opt/util-tests/tests/awk/gnu/arynocls.ok mode=0444
file path=opt/util-tests/tests/awk/gnu/aryprm9.awk mode=0444
file path=opt/util-tests/tests/awk/gnu/aryprm9.ok mode=0444
@@ -1037,12 +1049,6 @@ file path=opt/util-tests/tests/awk/syn/tradanch1.awk mode=0444
file path=opt/util-tests/tests/awk/syn/tradanch1.ok mode=0444
file path=opt/util-tests/tests/awk/syn/unterm.awk mode=0444
file path=opt/util-tests/tests/awk/syn/unterm.ok mode=0444
-file path=opt/util-tests/tests/awk/tests/chem.awk mode=0444
-file path=opt/util-tests/tests/awk/tests/latin1 mode=0444
-file path=opt/util-tests/tests/awk/tests/lilly.progs mode=0444
-file path=opt/util-tests/tests/awk/tests/lsd1.p mode=0444
-file path=opt/util-tests/tests/awk/tests/penicil.p mode=0444
-file path=opt/util-tests/tests/awk/tests/res.p mode=0444
file path=opt/util-tests/tests/awk/tests/T.-f-f mode=0555
file path=opt/util-tests/tests/awk/tests/T.argv mode=0555
file path=opt/util-tests/tests/awk/tests/T.builtin mode=0555
@@ -1070,6 +1076,16 @@ file path=opt/util-tests/tests/awk/tests/T.rt mode=0555
file path=opt/util-tests/tests/awk/tests/T.split mode=0555
file path=opt/util-tests/tests/awk/tests/T.sub mode=0555
file path=opt/util-tests/tests/awk/tests/T.system mode=0555
+file path=opt/util-tests/tests/awk/tests/chem.awk mode=0444
+file path=opt/util-tests/tests/awk/tests/latin1 mode=0444
+file path=opt/util-tests/tests/awk/tests/lilly.ok mode=0444
+file path=opt/util-tests/tests/awk/tests/lilly.progs mode=0444
+file path=opt/util-tests/tests/awk/tests/lsd1.ok mode=0444
+file path=opt/util-tests/tests/awk/tests/lsd1.p mode=0444
+file path=opt/util-tests/tests/awk/tests/penicil.ok mode=0444
+file path=opt/util-tests/tests/awk/tests/penicil.p mode=0444
+file path=opt/util-tests/tests/awk/tests/res.ok mode=0444
+file path=opt/util-tests/tests/awk/tests/res.p mode=0444
file path=opt/util-tests/tests/chown_test mode=0555
file path=opt/util-tests/tests/ctf/Makefile.ctftest.com mode=0555
file path=opt/util-tests/tests/ctf/check-array mode=0555
diff --git a/usr/src/test/util-tests/tests/awk/Makefile b/usr/src/test/util-tests/tests/awk/Makefile
index 4dc03bd9d1..cea57235c7 100644
--- a/usr/src/test/util-tests/tests/awk/Makefile
+++ b/usr/src/test/util-tests/tests/awk/Makefile
@@ -25,7 +25,7 @@ BUGS_FILES = $(BUGS_AWK) $(BUGS_AWK:%.awk=%.ok)
EXAMPLES_FILES :sh= (cd examples/awk; print p.* t.*)
-TESTS_FILES :sh= (cd tests; print T.* chem.awk latin1 lilly.progs lsd1.p penicil.p res.p)
+TESTS_FILES :sh= (cd tests; print T.* *.p *.ok chem.awk latin1 lilly.progs)
GNU_AWK :sh= (cd gnu; print *.awk)
GNU_KSH :sh= (cd gnu; print *.sh)
@@ -70,6 +70,19 @@ all lint clean clobber:
install: all $(ROOTFILES)
+$(TESTDIR)/examples/% := FILEMODE=0444
+$(TESTDIR)/data/% := FILEMODE=0444
+$(TESTDIR)/%.data := FILEMODE=0444
+$(TESTDIR)/%.awk := FILEMODE=0444
+$(TESTDIR)/%.in := FILEMODE=0444
+$(TESTDIR)/%.ok := FILEMODE=0444
+$(TESTDIR)/%.sh := FILEMODE=0555
+
+$(TESTDIR)/tests/lilly.progs := FILEMODE=0444
+$(TESTDIR)/tests/latin1 := FILEMODE=0444
+$(TESTDIR)/tests/T.% := FILEMODE=0555
+$(TESTDIR)/tests/%.p := FILEMODE=0444
+
$(TESTDIR):
$(INS.dir)
diff --git a/usr/src/test/util-tests/tests/awk/bugs-fixed/system-status.awk b/usr/src/test/util-tests/tests/awk/bugs-fixed/system-status.awk
index 8daf563e6f..25b92c0492 100644
--- a/usr/src/test/util-tests/tests/awk/bugs-fixed/system-status.awk
+++ b/usr/src/test/util-tests/tests/awk/bugs-fixed/system-status.awk
@@ -12,7 +12,7 @@ BEGIN {
status = system("kill -HUP $$")
print "death by signal status", status
- status = system("kill -ABRT $$")
+ status = system("cd $WORKDIR && kill -ABRT $$")
print "death by signal with core dump status", status
system("rm -f core*")
diff --git a/usr/src/test/util-tests/tests/awk/tests/T.chem b/usr/src/test/util-tests/tests/awk/tests/T.chem
index 48e04d40de..3c942da0d9 100755
--- a/usr/src/test/util-tests/tests/awk/tests/T.chem
+++ b/usr/src/test/util-tests/tests/awk/tests/T.chem
@@ -5,6 +5,8 @@ if [[ -z "$AWK" || -z "$WORKDIR" ]]; then
exit 1
fi
+set -x
+
TEMP1=$WORKDIR/test.temp.1
TEMP2=$WORKDIR/test.temp.2
@@ -20,8 +22,7 @@ echo T.chem: test chem.awk
for i in lsd1.p penicil.p res.p
do
$AWK -f chem.awk $i > $TEMP1
- awk -f chem.awk $i > $TEMP2
- diff $TEMP1 $TEMP2 || fail "BAD: T.chem on $i"
+ diff $TEMP1 ${i/.p/.ok} || fail "BAD: T.chem on $i"
done
exit $RESULT
diff --git a/usr/src/test/util-tests/tests/awk/tests/T.clv b/usr/src/test/util-tests/tests/awk/tests/T.clv
index ea77ded982..71f4e9cd7c 100755
--- a/usr/src/test/util-tests/tests/awk/tests/T.clv
+++ b/usr/src/test/util-tests/tests/awk/tests/T.clv
@@ -170,7 +170,7 @@ diff $TEMP1 $TEMP2 || fail 'BAD: T.clv (x=16a)'
# special chars in commandline assigned value;
# have to use local echo to avoid quoting problems.
-echo 'a\\b\z' > $TEMP1
+cat <<< 'a\\b\z' > $TEMP1
echo 'hello' | $AWK '{print x}' x='\141\\\\\142\\z' > $TEMP2
diff $TEMP1 $TEMP2 || fail 'BAD: T.clv (x=17)'
diff --git a/usr/src/test/util-tests/tests/awk/tests/T.gawk b/usr/src/test/util-tests/tests/awk/tests/T.gawk
index 8174bfc3f0..a1c778b145 100755
--- a/usr/src/test/util-tests/tests/awk/tests/T.gawk
+++ b/usr/src/test/util-tests/tests/awk/tests/T.gawk
@@ -46,9 +46,9 @@ $AWK '{ print $3; $4 = "a"; print }' $TEMP0 > $TEMP2
diff $TEMP1 $TEMP2 || fail 'BAD: T.gawk asgext'
# backgsub:
-echo 'x\y
+cat <<< 'x\y
x\\y' > $TEMP0
-echo 'x\y
+cat <<< 'x\y
xAy
xAy
xAAy' > $TEMP1
@@ -60,10 +60,10 @@ diff $TEMP1 $TEMP2 || fail 'BAD: T.gawk backgsub'
# backgsub2:
-echo 'x\y
+cat <<< 'x\y
x\\y
x\\\y' > $TEMP0
-echo ' x\y
+cat <<< ' x\y
x\y
x\y
x\y
@@ -82,9 +82,9 @@ diff $TEMP1 $TEMP2 || fail 'BAD: T.gawk backgsub2'
# backgsub3:
-echo 'xax
+cat <<< 'xax
xaax' > $TEMP0
-echo ' xax
+cat <<< ' xax
x&x
x&x
x\ax
@@ -109,9 +109,9 @@ diff $TEMP1 $TEMP2 || fail 'BAD: T.gawk backgsub3'
# backsub3:
-echo 'xax
+cat <<< 'xax
xaax' > $TEMP0
-echo ' xax
+cat <<< ' xax
x&x
x&x
x\ax
@@ -136,9 +136,9 @@ diff $TEMP1 $TEMP2 || fail 'BAD: T.gawk backsub3'
# backsub:
-echo 'x\y
+cat <<< 'x\y
x\\y' > $TEMP0
-echo 'x\y
+cat <<< 'x\y
x\\y
x\\y
x\\\y' > $TEMP1
diff --git a/usr/src/test/util-tests/tests/awk/tests/T.lilly b/usr/src/test/util-tests/tests/awk/tests/T.lilly
index 193b138607..eb7373433e 100755
--- a/usr/src/test/util-tests/tests/awk/tests/T.lilly
+++ b/usr/src/test/util-tests/tests/awk/tests/T.lilly
@@ -38,26 +38,17 @@ foo=bar=fribble
=foo=bar
EOF
-rm -f $TEMP3
-awk '
-/./ {
- print $0 >"'$TEMP3'"
- print "###", NR, $0
- system(ENVIRON["AWK"] " -f '$TEMP3' <\"'$TEMP0'\" ")
- close "test.temp"
-}' < lilly.progs > $TEMP1 2>&1
-
-rm -f $TEMP3
+rm -f $TEMP2
$AWK '
/./ {
- print $0 >"'$TEMP3'"
+ print $0 >"'$TEMP2'"
print "###", NR, $0
- system(ENVIRON["AWK"] " -f '$TEMP3' <\"'$TEMP0'\" ")
- close "test.temp"
-}' < lilly.progs > $TEMP2 2>&1
+ system(ENVIRON["AWK"] " -f '$TEMP2' <\"'$TEMP0'\" ")
+ close "'$TEMP2'"
+}' < lilly.progs > $TEMP1 2>&1
echo `wc -l lilly.progs` tests
-diff $TEMP1 $TEMP2 > $WORKDIR/lilly.diff || fail 'bad: T.lilly is different'
+diff $TEMP1 lilly.ok > $WORKDIR/lilly.diff || fail 'bad: T.lilly is different'
exit $RESULT
diff --git a/usr/src/test/util-tests/tests/awk/tests/lilly.ok b/usr/src/test/util-tests/tests/awk/tests/lilly.ok
new file mode 100644
index 0000000000..7583e9bba4
--- /dev/null
+++ b/usr/src/test/util-tests/tests/awk/tests/lilly.ok
@@ -0,0 +1,974 @@
+### 1 BEGIN{foo=6;print foo/2}
+3
+### 2 BEGIN{foo=10;foo/=2;print foo}
+5
+### 3 /=/ {print $0}
+foo=bar
+foo==bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo=bar=fribble
+=foo=bar
+### 4 /==/ {print $0}
+foo==bar
+### 5 /\+=/ {print $0}
+foo+=bar
+### 6 /\*=/ {print $0}
+foo*=bar
+### 7 /-=/ {print $0}
+foo-=bar
+### 8 /\/=/ {print $0}
+foo/=bar
+### 9 /%=/ {print $0}
+foo%=bar
+### 10 /^=/ {print $0}
+=foo=bar
+### 11 /!=/ {print $0}
+foo!=bar
+### 12 /<=/ {print $0}
+foo<=bar
+### 13 />=/ {print $0}
+foo>=bar
+### 14 !/=/ {print $0}
+foo+bar
+foo bar
+foo/bar
+### 15 !/==/ {print $0}
+foo=bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 16 !/\+=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 17 !/\*=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 18 !/-=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 19 !/\/=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 20 !/%=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 21 !/^=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+### 22 !/!=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 23 !/<=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 24 !/>=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 25 $0~/=/ {print $0}
+foo=bar
+foo==bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo=bar=fribble
+=foo=bar
+### 26 $0~/==/ {print $0}
+foo==bar
+### 27 $0~/\+=/ {print $0}
+foo+=bar
+### 28 $0~/\*=/ {print $0}
+foo*=bar
+### 29 $0~/-=/ {print $0}
+foo-=bar
+### 30 $0~/\/=/ {print $0}
+foo/=bar
+### 31 $0~/%=/ {print $0}
+foo%=bar
+### 32 $0~/^=/ {print $0}
+=foo=bar
+### 33 $0~/!=/ {print $0}
+foo!=bar
+### 34 $0~/<=/ {print $0}
+foo<=bar
+### 35 $0~/>=/ {print $0}
+foo>=bar
+### 36 $0!~/=/ {print $0}
+foo+bar
+foo bar
+foo/bar
+### 37 $0!~/==/ {print $0}
+foo=bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 38 $0!~/\+=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 39 $0!~/\*=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 40 $0!~/-=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 41 $0!~/%=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 42 $0!~/^=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+### 43 $0!~/!=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 44 $0!~/<=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 45 $0!~/>=/ {print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 46 {if(match($0,/=/))print $0}
+foo=bar
+foo==bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo=bar=fribble
+=foo=bar
+### 47 {if(match($0,/\=/))print $0}
+foo=bar
+foo==bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo=bar=fribble
+=foo=bar
+### 48 {if(match($0,/==/))print $0}
+foo==bar
+### 49 {if(match($0,/\+=/))print $0}
+foo+=bar
+### 50 {if(match($0,/\*=/))print $0}
+foo*=bar
+### 51 {if(match($0,/-=/))print $0}
+foo-=bar
+### 52 {if(match($0,/%=/))print $0}
+foo%=bar
+### 53 {if(match($0,/^=/))print $0}
+=foo=bar
+### 54 {if(match($0,/!=/))print $0}
+foo!=bar
+### 55 {if(match($0,/<=/))print $0}
+foo<=bar
+### 56 {if(match($0,/>=/))print $0}
+foo>=bar
+### 57 {if(!match($0,/=/))print $0}
+foo+bar
+foo bar
+foo/bar
+### 58 {if(!match($0,/==/))print $0}
+foo=bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 59 {if(!match($0,/\+=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 60 {if(!match($0,/\*=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 61 {if(!match($0,/-=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 62 {if(!match($0,/%=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 63 {if(!match($0,/^=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+### 64 {if(!match($0,/!=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 65 {if(!match($0,/<=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 66 {if(!match($0,/>=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 67 {if(split($0,foo,/=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 68 {if(split($0,foo,/\=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 69 {if(split($0,foo,/==/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 70 {if(split($0,foo,/\+=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 71 {if(split($0,foo,/\*=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 72 {if(split($0,foo,/-=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 73 {if(split($0,foo,/\/=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 74 {if(split($0,foo,/%=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 75 {if(split($0,foo,/^=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 76 {if(split($0,foo,/!=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 77 {if(split($0,foo,/<=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 78 {if(split($0,foo,/>=/))print $0}
+foo=bar
+foo==bar
+foo+bar
+foo+=bar
+foo-=bar
+foo*=bar
+foo/=bar
+foo^=bar
+foo%=bar
+foo!=bar
+foo<=bar
+foo>=bar
+foo bar
+foo/bar
+foo=bar=fribble
+=foo=bar
+### 79 {if(sub(/=/,"#"))print $0}
+foo#bar
+foo#=bar
+foo+#bar
+foo-#bar
+foo*#bar
+foo/#bar
+foo^#bar
+foo%#bar
+foo!#bar
+foo<#bar
+foo>#bar
+foo#bar=fribble
+#foo=bar
+### 80 {if(sub(/\=/,"#"))print $0}
+foo#bar
+foo#=bar
+foo+#bar
+foo-#bar
+foo*#bar
+foo/#bar
+foo^#bar
+foo%#bar
+foo!#bar
+foo<#bar
+foo>#bar
+foo#bar=fribble
+#foo=bar
+### 81 {if(sub(/==/,"#"))print $0}
+foo#bar
+### 82 {if(sub(/\+=/,"#"))print $0}
+foo#bar
+### 83 {if(sub(/\*=/,"#"))print $0}
+foo#bar
+### 84 {if(sub(/-=/,"#"))print $0}
+foo#bar
+### 85 {if(sub(/\/=/,"#"))print $0}
+foo#bar
+### 86 {if(sub(/%=/,"#"))print $0}
+foo#bar
+### 87 {if(sub(/^=/,"#"))print $0}
+#foo=bar
+### 88 {if(sub(/!=/,"#"))print $0}
+foo#bar
+### 89 {if(sub(/<=/,"#"))print $0}
+foo#bar
+### 90 {if(sub(/>=/,"#"))print $0}
+foo#bar
+### 91 {if(gsub(/=/,"#"))print $0}
+foo#bar
+foo##bar
+foo+#bar
+foo-#bar
+foo*#bar
+foo/#bar
+foo^#bar
+foo%#bar
+foo!#bar
+foo<#bar
+foo>#bar
+foo#bar#fribble
+#foo#bar
+### 92 {if(gsub(/\=/,"#"))print $0}
+foo#bar
+foo##bar
+foo+#bar
+foo-#bar
+foo*#bar
+foo/#bar
+foo^#bar
+foo%#bar
+foo!#bar
+foo<#bar
+foo>#bar
+foo#bar#fribble
+#foo#bar
+### 93 {if(gsub(/==/,"#"))print $0}
+foo#bar
+### 94 {if(gsub(/\+=/,"#"))print $0}
+foo#bar
+### 95 {if(gsub(/\*=/,"#"))print $0}
+foo#bar
+### 96 {if(gsub(/-=/,"#"))print $0}
+foo#bar
+### 97 {if(gsub(/\/=/,"#"))print $0}
+foo#bar
+### 98 {if(gsub(/%=/,"#"))print $0}
+foo#bar
+### 99 {if(gsub(/^=/,"#"))print $0}
+#foo=bar
+### 100 {if(gsub(/!=/,"#"))print $0}
+foo#bar
+### 101 {if(gsub(/<=/,"#"))print $0}
+foo#bar
+### 102 {if(gsub(/>=/,"#"))print $0}
+foo#bar
+### 103 {if(sub(/=/,"#",$0))print $0}
+foo#bar
+foo#=bar
+foo+#bar
+foo-#bar
+foo*#bar
+foo/#bar
+foo^#bar
+foo%#bar
+foo!#bar
+foo<#bar
+foo>#bar
+foo#bar=fribble
+#foo=bar
+### 104 {if(sub(/\=/,"#",$0))print $0}
+foo#bar
+foo#=bar
+foo+#bar
+foo-#bar
+foo*#bar
+foo/#bar
+foo^#bar
+foo%#bar
+foo!#bar
+foo<#bar
+foo>#bar
+foo#bar=fribble
+#foo=bar
+### 105 {if(sub(/==/,"#",$0))print $0}
+foo#bar
+### 106 {if(sub(/\+=/,"#",$0))print $0}
+foo#bar
+### 107 {if(sub(/\*=/,"#",$0))print $0}
+foo#bar
+### 108 {if(sub(/-=/,"#",$0))print $0}
+foo#bar
+### 109 {if(sub(/\/=/,"#",$0))print $0}
+foo#bar
+### 110 {if(sub(/%=/,"#",$0))print $0}
+foo#bar
+### 111 {if(sub(/^=/,"#",$0))print $0}
+#foo=bar
+### 112 {if(sub(/!=/,"#",$0))print $0}
+foo#bar
+### 113 {if(sub(/<=/,"#",$0))print $0}
+foo#bar
+### 114 {if(sub(/>=/,"#",$0))print $0}
+foo#bar
+### 115 {if(sub(/=/,"#",$0))print $0}
+foo#bar
+foo#=bar
+foo+#bar
+foo-#bar
+foo*#bar
+foo/#bar
+foo^#bar
+foo%#bar
+foo!#bar
+foo<#bar
+foo>#bar
+foo#bar=fribble
+#foo=bar
+### 116 {if(gsub(/\=/,"#",$0))print $0}
+foo#bar
+foo##bar
+foo+#bar
+foo-#bar
+foo*#bar
+foo/#bar
+foo^#bar
+foo%#bar
+foo!#bar
+foo<#bar
+foo>#bar
+foo#bar#fribble
+#foo#bar
+### 117 {if(gsub(/==/,"#",$0))print $0}
+foo#bar
+### 118 {if(gsub(/\+=/,"#",$0))print $0}
+foo#bar
+### 119 {if(gsub(/\*=/,"#",$0))print $0}
+foo#bar
+### 120 {if(gsub(/-=/,"#",$0))print $0}
+foo#bar
+### 121 {if(gsub(/\/=/,"#",$0))print $0}
+foo#bar
+### 122 {if(gsub(/%=/,"#",$0))print $0}
+foo#bar
+### 123 {if(gsub(/^=/,"#",$0))print $0}
+#foo=bar
+### 124 {if(gsub(/!=/,"#",$0))print $0}
+foo#bar
+### 125 {if(gsub(/<=/,"#",$0))print $0}
+foo#bar
+### 126 {if(gsub(/>=/,"#",$0))print $0}
+foo#bar
diff --git a/usr/src/test/util-tests/tests/awk/tests/lsd1.ok b/usr/src/test/util-tests/tests/awk/tests/lsd1.ok
new file mode 100644
index 0000000000..962cda7bca
--- /dev/null
+++ b/usr/src/test/util-tests/tests/awk/tests/lsd1.ok
@@ -0,0 +1,128 @@
+.PS
+copy "/dev/null"
+ textht = 0.16; textwid = .1; cwid = 0.12
+ lineht = 0.2; linewid = 0.2
+Last: 0,0
+
+# B: benzene pointing right
+B:
+Last: [
+ C: 0,0
+ V0: (0.15,0.259808)
+ V1: (0.3,4.00474e-09)
+ V2: (0.15,-0.259808)
+ V3: (-0.15,-0.259808)
+ V4: (-0.3,-1.20142e-08)
+ V5: (-0.15,0.259808)
+ V6: (0.15,0.259808)
+ V7: (0.3,2.00237e-08)
+ line from V1 to V2
+ line from V2 to V3
+ line from V3 to V4
+ line from V4 to V5
+ line from V5 to V6
+ line from V6 to V1
+ circle rad 0.15 at 0,0
+] with .V4.w at Last.e
+
+# F: flatring pointing left put N at 5 double 3,4 with .V1 at B.V2
+F:
+Last: [
+ C: 0,0
+ V0: (-0.15,-0.259808)
+ V1: (-0.3,-1.20142e-08)
+ V2: (-0.15,0.259808)
+ V3: (0.15,0.259808)
+ V4: (0.3,2.00237e-08)
+ V5: (0.15,-0.259808)
+ V6: (-0.15,-0.259808)
+ V7: (-0.3,-2.80332e-08)
+ V4: V5; V5: V6
+ line from V1 to V2 chop 0 chop 0
+ line from V2 to V3 chop 0 chop 0
+ line from V3 to V4 chop 0 chop 0
+ line from 0.75<C,V3> to 0.75<C,V4> chop 0 chop 0
+ line from V4 to V5 chop 0 chop 0.08
+ V5: ellipse invis ht 0.16 wid 0.12 at V5
+ N:atom("N", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) at V5
+ line from V5 to V1 chop 0.08 chop 0
+] with .V1 at B.V2
+
+# H below F.N
+Last: H: atom("H", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .n at F.N.s
+
+# R: ring pointing right with .V4 at B.V6
+R:
+Last: [
+ C: 0,0
+ V0: (0.15,0.259808)
+ V1: (0.3,4.00474e-09)
+ V2: (0.15,-0.259808)
+ V3: (-0.15,-0.259808)
+ V4: (-0.3,-1.20142e-08)
+ V5: (-0.15,0.259808)
+ V6: (0.15,0.259808)
+ V7: (0.3,2.00237e-08)
+ line from V1 to V2
+ line from V2 to V3
+ line from V3 to V4
+ line from V4 to V5
+ line from V5 to V6
+ line from V6 to V1
+] with .V4 at B.V6
+
+# front bond right from R.V6 ; H
+Last: frontbond(0.2, 90, from R.V6.e)
+Last: H: atom("H", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .L.w at Last.end
+
+# W: ring pointing right with .V2 at R.V6 put N at 1 double 3,4
+W:
+Last: [
+ C: 0,0
+ V0: (0.15,0.259808)
+ V1: (0.3,4.00474e-09)
+ V2: (0.15,-0.259808)
+ V3: (-0.15,-0.259808)
+ V4: (-0.3,-1.20142e-08)
+ V5: (-0.15,0.259808)
+ V6: (0.15,0.259808)
+ V7: (0.3,2.00237e-08)
+ V1: ellipse invis ht 0.16 wid 0.12 at V1
+ N:atom("N", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) at V1
+ line from V1 to V2 chop 0.08 chop 0
+ line from V2 to V3 chop 0 chop 0
+ line from V3 to V4 chop 0 chop 0
+ line from 0.85<C,V3> to 0.85<C,V4> chop 0 chop 0
+ line from V4 to V5 chop 0 chop 0
+ line from V5 to V6 chop 0 chop 0
+ line from V6 to V1 chop 0 chop 0.08
+] with .V2 at R.V6
+
+# bond right from W.N ; CH3
+Last: bond(0.2, 90, from W.N.e)
+Last: CH3: atom("CH\s-3\d3\u\s+3", 0.3, 0.16, 0.06, 0.16, 0.12, 0.015) with .L.w at Last.end
+
+# back bond -60 from W.V5 ; H
+Last: backbond(0.2, 300, from W.V5.nw)
+Last: H: atom("H", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .R.se at Last.end
+
+# bond up from W.V5 ; C
+Last: bond(0.2, 0, from W.V5.n)
+Last: C: atom("C", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .C.s at Last.end
+
+# doublebond up from C ; O
+Last: doublebond(0.2, 0, from C.C.n)
+Last: O: atom("O", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .C.s at Last.end
+
+# bond right from C ; N
+Last: bond(0.2, 90, from C.R.e)
+Last: N: atom("N", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .L.w at Last.end
+
+# bond 45 from N ; C2H5
+Last: bond(0.2, 45, from N.R.ne)
+Last: C2H5: atom("C\s-3\d2\u\s+3H\s-3\d5\u\s+3", 0.36, 0.16, 0.06, 0.16, 0.12, 0.015) with .L.sw at Last.end
+
+# bond 135 from N ; C2H5
+Last: bond(0.2, 135, from N.R.se)
+Last: C2H5: atom("C\s-3\d2\u\s+3H\s-3\d5\u\s+3", 0.36, 0.16, 0.06, 0.16, 0.12, 0.015) with .L.nw at Last.end
+.PE
diff --git a/usr/src/test/util-tests/tests/awk/tests/penicil.ok b/usr/src/test/util-tests/tests/awk/tests/penicil.ok
new file mode 100644
index 0000000000..dbf2318ca7
--- /dev/null
+++ b/usr/src/test/util-tests/tests/awk/tests/penicil.ok
@@ -0,0 +1,134 @@
+.so /usr/bwk/talks/vg.mac
+.vg
+.ft R
+.PS
+copy "/dev/null"
+ textht = 0.16; textwid = .1; cwid = 0.12
+ lineht = 0.2; linewid = 0.2
+Last: 0,0
+
+# R1: ring4 pointing 45 put N at 2
+R1:
+Last: [
+ C: 0,0
+ V0: (-0.21,0.21)
+ V1: (0.21,0.21)
+ V2: (0.21,-0.21)
+ V3: (-0.21,-0.21)
+ V4: (-0.21,0.21)
+ V5: (0.21,0.21)
+ line from V1 to V2 chop 0 chop 0.112
+ V2: ellipse invis ht 0.224 wid 0.168 at V2
+ N:atom("N", 0.168, 0.224, 0.084, 0.224, 0.168, 0.021) at V2
+ line from V2 to V3 chop 0.112 chop 0
+ line from V3 to V4 chop 0 chop 0
+ line from V4 to V1 chop 0 chop 0
+] with .V3.w at Last.e
+
+# doublebond -135 from R1.V3 ; O
+Last: doublebond(0.28, 225, from R1.V3.sw)
+Last: O: atom("O", 0.168, 0.224, 0.084, 0.224, 0.168, 0.021) with .R.ne at Last.end
+
+# backbond up from R1.V1 ; H
+Last: backbond(0.28, 0, from R1.V1.n)
+Last: H: atom("H", 0.168, 0.224, 0.084, 0.224, 0.168, 0.021) with .C.s at Last.end
+
+# frontbond -45 from R1.V4 ; N
+Last: frontbond(0.28, 315, from R1.V4.nw)
+Last: N: atom("N", 0.168, 0.224, 0.084, 0.224, 0.168, 0.021) with .R.se at Last.end
+
+# H above N
+Last: H: atom("H", 0.168, 0.224, 0.084, 0.224, 0.168, 0.021) with .s at N.n
+
+# bond left from N ; C
+Last: bond(0.28, 270, from N.L.w)
+Last: C: atom("C", 0.168, 0.224, 0.084, 0.224, 0.168, 0.021) with .R.e at Last.end
+
+# doublebond up ; O
+Last: doublebond(0.28, 0, from Last.C.n )
+Last: O: atom("O", 0.168, 0.224, 0.084, 0.224, 0.168, 0.021) with .C.s at Last.end
+
+# bond length .1 left from C ; CH2
+Last: bond(0.1, 270, from C.L.w)
+Last: CH2: atom("CH\s-3\d2\u\s+3", 0.42, 0.224, 0.084, 0.224, 0.168, 0.021) with .R.e at Last.end
+
+# bond length .1 left
+Last: bond(0.1, 270, from Last.L.w )
+
+# benzene pointing left
+Last: [
+ C: 0,0
+ V0: (-0.21,-0.363731)
+ V1: (-0.42,-1.68199e-08)
+ V2: (-0.21,0.363731)
+ V3: (0.21,0.363731)
+ V4: (0.42,2.80332e-08)
+ V5: (0.21,-0.363731)
+ V6: (-0.21,-0.363731)
+ V7: (-0.42,-3.92464e-08)
+ line from V1 to V2
+ line from V2 to V3
+ line from V3 to V4
+ line from V4 to V5
+ line from V5 to V6
+ line from V6 to V1
+ circle rad 0.21 at 0,0
+] with .V4.e at Last.end
+
+# R2: flatring5 put S at 1 put N at 4 with .V5 at R1.V1
+R2:
+Last: [
+ C: 0,0
+ V0: (-0.363731,0.21)
+ V1: (0,0.42)
+ V2: (0.363731,0.21)
+ V3: (0.363731,-0.21)
+ V4: (1.12133e-08,-0.42)
+ V5: (-0.363731,-0.21)
+ V6: (-0.363731,0.21)
+ V7: (-2.24265e-08,0.42)
+ V4: V5; V5: V6
+ V1: ellipse invis ht 0.224 wid 0.168 at V1
+ S:atom("S", 0.168, 0.224, 0.084, 0.224, 0.168, 0.021) at V1
+ line from V1 to V2 chop 0.112 chop 0
+ line from V2 to V3 chop 0 chop 0
+ line from V3 to V4 chop 0 chop 0.112
+ V4: ellipse invis ht 0.224 wid 0.168 at V4
+ N:atom("N", 0.168, 0.224, 0.084, 0.224, 0.168, 0.021) at V4
+ line from V4 to V5 chop 0.112 chop 0
+ line from V5 to V1 chop 0 chop 0.112
+] with .V5 at R1.V1
+
+# bond 20 from R2.V2 ; CH3
+Last: bond(0.28, 20, from R2.V2.n)
+Last: CH3: atom("CH\s-3\d3\u\s+3", 0.42, 0.224, 0.084, 0.224, 0.168, 0.021) with .L.s at Last.end
+
+# bond 90 from R2.V2 ; CH3
+Last: bond(0.28, 90, from R2.V2.e)
+Last: CH3: atom("CH\s-3\d3\u\s+3", 0.42, 0.224, 0.084, 0.224, 0.168, 0.021) with .L.w at Last.end
+
+# bond 90 from R2.V3 ; H
+Last: bond(0.28, 90, from R2.V3.e)
+Last: H: atom("H", 0.168, 0.224, 0.084, 0.224, 0.168, 0.021) with .L.w at Last.end
+
+# backbond 170 from R2.V3 ; COOH
+Last: backbond(0.28, 170, from R2.V3.s)
+Last: COOH: atom("COOH", 0.672, 0.224, 0.084, 0.224, 0.168, 0.021) with .L.n at Last.end
+.PE
+.CW
+ # this is the structure of penicillin G, an antibiotic
+R1: ring4 pointing 45 put N at 2
+ doublebond -135 from R1.V3 ; O
+ backbond up from R1.V1 ; H
+ frontbond -45 from R1.V4 ; N
+ H above N
+ bond left from N ; C
+ doublebond up ; O
+ bond length .1 left from C ; CH2
+ bond length .1 left
+ benzene pointing left
+R2: flatring5 put S at 1 put N at 4 with .V5 at R1.V1
+ bond 20 from R2.V2 ; CH3
+ bond 90 from R2.V2 ; CH3
+ bond 90 from R2.V3 ; H
+ backbond 170 from R2.V3 ; COOH
diff --git a/usr/src/test/util-tests/tests/awk/tests/res.ok b/usr/src/test/util-tests/tests/awk/tests/res.ok
new file mode 100644
index 0000000000..9a04d514b7
--- /dev/null
+++ b/usr/src/test/util-tests/tests/awk/tests/res.ok
@@ -0,0 +1,201 @@
+.PS
+copy "/dev/null"
+ textht = 0.16; textwid = .1; cwid = 0.12
+ lineht = 0.2; linewid = 0.2
+Last: 0,0
+
+# CH3O
+Last: CH3O: atom("CH\s-3\d3\u\s+3O", 0.42, 0.16, 0.06, 0.16, 0.12, 0.015) with .L.w at Last.e
+
+# bond 60
+Last: bond(0.2, 60, from Last.R.ne )
+
+# R1: benzene
+R1:
+Last: [
+ C: 0,0
+ V0: (-0.259808,0.15)
+ V1: (0,0.3)
+ V2: (0.259808,0.15)
+ V3: (0.259808,-0.15)
+ V4: (8.00947e-09,-0.3)
+ V5: (-0.259808,-0.15)
+ V6: (-0.259808,0.15)
+ V7: (-1.60189e-08,0.3)
+ line from V1 to V2
+ line from V2 to V3
+ line from V3 to V4
+ line from V4 to V5
+ line from V5 to V6
+ line from V6 to V1
+ circle rad 0.15 at 0,0
+] with .V5.sw at Last.end
+
+# R2: aromatic flatring5 pointing down put N at 1 with .V3 at R1.V2
+R2:
+Last: [
+ C: 0,0
+ V0: (0.259808,-0.15)
+ V1: (8.00947e-09,-0.3)
+ V2: (-0.259808,-0.15)
+ V3: (-0.259808,0.15)
+ V4: (-1.60189e-08,0.3)
+ V5: (0.259808,0.15)
+ V6: (0.259808,-0.15)
+ V7: (2.40284e-08,-0.3)
+ V4: V5; V5: V6
+ V1: ellipse invis ht 0.16 wid 0.12 at V1
+ N:atom("N", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) at V1
+ line from V1 to V2 chop 0.08 chop 0
+ line from V2 to V3 chop 0 chop 0
+ line from V3 to V4 chop 0 chop 0
+ line from V4 to V5 chop 0 chop 0
+ line from V5 to V1 chop 0 chop 0.08
+ circle rad 0.12 at 0,0
+] with .V3 at R1.V2
+
+# H below R2.V1
+Last: H: atom("H", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .n at R2.V1.s
+
+# R3: ring put N at 3 with .V5 at R2.V5
+R3:
+Last: [
+ C: 0,0
+ V0: (-0.259808,0.15)
+ V1: (0,0.3)
+ V2: (0.259808,0.15)
+ V3: (0.259808,-0.15)
+ V4: (8.00947e-09,-0.3)
+ V5: (-0.259808,-0.15)
+ V6: (-0.259808,0.15)
+ V7: (-1.60189e-08,0.3)
+ line from V1 to V2 chop 0 chop 0
+ line from V2 to V3 chop 0 chop 0.08
+ V3: ellipse invis ht 0.16 wid 0.12 at V3
+ N:atom("N", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) at V3
+ line from V3 to V4 chop 0.08 chop 0
+ line from V4 to V5 chop 0 chop 0
+ line from V5 to V6 chop 0 chop 0
+ line from V6 to V1 chop 0 chop 0
+] with .V5 at R2.V5
+
+# R4: ring put N at 1 with .V1 at R3.V3
+R4:
+Last: [
+ C: 0,0
+ V0: (-0.259808,0.15)
+ V1: (0,0.3)
+ V2: (0.259808,0.15)
+ V3: (0.259808,-0.15)
+ V4: (8.00947e-09,-0.3)
+ V5: (-0.259808,-0.15)
+ V6: (-0.259808,0.15)
+ V7: (-1.60189e-08,0.3)
+ V1: ellipse invis ht 0.16 wid 0.12 at V1
+ N:atom("N", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) at V1
+ line from V1 to V2 chop 0.08 chop 0
+ line from V2 to V3 chop 0 chop 0
+ line from V3 to V4 chop 0 chop 0
+ line from V4 to V5 chop 0 chop 0
+ line from V5 to V6 chop 0 chop 0
+ line from V6 to V1 chop 0 chop 0.08
+] with .V1 at R3.V3
+
+# back bond -120 from R4.V4 ; H
+Last: backbond(0.2, 240, from R4.V4.sw)
+Last: H: atom("H", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .R.ne at Last.end
+
+# back bond 60 from R4.V3 ; H
+Last: backbond(0.2, 60, from R4.V3.ne)
+Last: H: atom("H", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .L.sw at Last.end
+
+# R5: ring with .V1 at R4.V3
+R5:
+Last: [
+ C: 0,0
+ V0: (-0.259808,0.15)
+ V1: (0,0.3)
+ V2: (0.259808,0.15)
+ V3: (0.259808,-0.15)
+ V4: (8.00947e-09,-0.3)
+ V5: (-0.259808,-0.15)
+ V6: (-0.259808,0.15)
+ V7: (-1.60189e-08,0.3)
+ line from V1 to V2
+ line from V2 to V3
+ line from V3 to V4
+ line from V4 to V5
+ line from V5 to V6
+ line from V6 to V1
+] with .V1 at R4.V3
+
+# bond -120 ; C
+Last: bond(0.2, 240, from Last.V5.sw )
+Last: C: atom("C", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .R.ne at Last.end
+
+# doublebond down from C ; O
+Last: doublebond(0.2, 180, from C.C.s)
+Last: O: atom("O", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .C.n at Last.end
+
+# CH3O left of C
+Last: CH3O: atom("CH\s-3\d3\u\s+3O", 0.42, 0.16, 0.06, 0.16, 0.12, 0.015) with .e at C.w+(0.02,0)
+
+# back bond 60 from R5.V3 ; H
+Last: backbond(0.2, 60, from R5.V3.ne)
+Last: H: atom("H", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .L.sw at Last.end
+
+# back bond down from R5.V4 ; O
+Last: backbond(0.2, 180, from R5.V4.s)
+Last: O: atom("O", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .C.n at Last.end
+
+# CH3 right of O
+Last: CH3: atom("CH\s-3\d3\u\s+3", 0.3, 0.16, 0.06, 0.16, 0.12, 0.015) with .w at O.e-(0.02,0)
+
+# bond 120 from R5.V3 ; O
+Last: bond(0.2, 120, from R5.V3.se)
+Last: O: atom("O", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .L.nw at Last.end
+
+# bond right lenght .1 from O ; C
+Last: bond(0.1, 90, from O.R.e)
+Last: C: atom("C", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .L.w at Last.end
+
+# double bond down ; O
+Last: doublebond(0.2, 180, from Last.C.s )
+Last: O: atom("O", 0.12, 0.16, 0.06, 0.16, 0.12, 0.015) with .C.n at Last.end
+
+# bond right length .1 from C
+Last: bond(0.1, 90, from C.R.e)
+
+# B: benzene pointing right
+B:
+Last: [
+ C: 0,0
+ V0: (0.15,0.259808)
+ V1: (0.3,4.00474e-09)
+ V2: (0.15,-0.259808)
+ V3: (-0.15,-0.259808)
+ V4: (-0.3,-1.20142e-08)
+ V5: (-0.15,0.259808)
+ V6: (0.15,0.259808)
+ V7: (0.3,2.00237e-08)
+ line from V1 to V2
+ line from V2 to V3
+ line from V3 to V4
+ line from V4 to V5
+ line from V5 to V6
+ line from V6 to V1
+ circle rad 0.15 at 0,0
+] with .V4.w at Last.end
+
+# bond 30 from B ; OCH3
+Last: bond(0.2, 30, from B.V6.ne)
+Last: OCH3: atom("OCH\s-3\d3\u\s+3", 0.42, 0.16, 0.18, 0.16, 0.12, 0.015) with .L.sw at Last.end
+
+# bond right from B ; OCH3
+Last: bond(0.2, 90, from B.V1.e)
+Last: OCH3: atom("OCH\s-3\d3\u\s+3", 0.42, 0.16, 0.18, 0.16, 0.12, 0.015) with .L.w at Last.end
+
+# bond 150 from B ; OCH3
+Last: bond(0.2, 150, from B.V2.se)
+Last: OCH3: atom("OCH\s-3\d3\u\s+3", 0.42, 0.16, 0.18, 0.16, 0.12, 0.015) with .L.nw at Last.end
+.PE
diff --git a/usr/src/uts/common/inet/tcp/tcp_opt_data.c b/usr/src/uts/common/inet/tcp/tcp_opt_data.c
index 4774412992..ea4760e6bb 100644
--- a/usr/src/uts/common/inet/tcp/tcp_opt_data.c
+++ b/usr/src/uts/common/inet/tcp/tcp_opt_data.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved.
- * Copyright 2016 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
* Copyright (c) 2016 by Delphix. All rights reserved.
*/
@@ -34,6 +34,7 @@
#include <sys/xti_inet.h>
#include <sys/policy.h>
+#include <inet/cc.h>
#include <inet/common.h>
#include <netinet/ip6.h>
#include <inet/ip.h>
@@ -142,6 +143,9 @@ opdes_t tcp_opt_arr[] = {
{ TCP_LINGER2, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
+{ TCP_CONGESTION, IPPROTO_TCP, OA_RW, OA_RW, OP_NP,
+ OP_VARLEN, CC_ALGO_NAME_MAX, 0 },
+
{ IP_OPTIONS, IPPROTO_IP, OA_RW, OA_RW, OP_NP,
(OP_VARLEN|OP_NODEFAULT),
IP_MAX_OPT_LENGTH + IP_ADDR_LEN, -1 /* not initialized */ },
@@ -434,6 +438,13 @@ tcp_opt_get(conn_t *connp, int level, int name, uchar_t *ptr)
case TCP_KEEPALIVE_ABORT_THRESHOLD:
*i1 = tcp->tcp_ka_abort_thres;
return (sizeof (int));
+ case TCP_CONGESTION: {
+ size_t len = strlcpy((char *)ptr, CC_ALGO(tcp)->name,
+ CC_ALGO_NAME_MAX);
+ if (len >= CC_ALGO_NAME_MAX)
+ return (-1);
+ return (len + 1);
+ }
case TCP_CORK:
*i1 = tcp->tcp_cork;
return (sizeof (int));
@@ -958,6 +969,41 @@ tcp_opt_set(conn_t *connp, uint_t optset_context, int level, int name,
tcp->tcp_ka_rinterval = 0;
}
break;
+ case TCP_CONGESTION: {
+ struct cc_algo *algo;
+
+ if (checkonly) {
+ break;
+ }
+
+ /*
+ * Make sure the string is NUL-terminated. Some
+ * consumers pass only the number of characters
+ * in the string, and don't include the NUL
+ * terminator, so we set it for them.
+ */
+ if (inlen < CC_ALGO_NAME_MAX) {
+ invalp[inlen] = '\0';
+ }
+ invalp[CC_ALGO_NAME_MAX - 1] = '\0';
+
+ if ((algo = cc_load_algo((char *)invalp)) == NULL) {
+ return (ENOENT);
+ }
+
+ if (CC_ALGO(tcp)->cb_destroy != NULL) {
+ CC_ALGO(tcp)->cb_destroy(&tcp->tcp_ccv);
+ }
+
+ CC_DATA(tcp) = NULL;
+ CC_ALGO(tcp) = algo;
+
+ if (CC_ALGO(tcp)->cb_init != NULL) {
+ VERIFY0(CC_ALGO(tcp)->cb_init(&tcp->tcp_ccv));
+ }
+
+ break;
+ }
case TCP_CORK:
if (!checkonly) {
/*
diff --git a/usr/src/uts/common/netinet/tcp.h b/usr/src/uts/common/netinet/tcp.h
index f6c2fc160b..e79c1a571d 100644
--- a/usr/src/uts/common/netinet/tcp.h
+++ b/usr/src/uts/common/netinet/tcp.h
@@ -129,6 +129,7 @@ struct tcphdr {
#define TCP_KEEPIDLE 0x22
#define TCP_KEEPCNT 0x23
#define TCP_KEEPINTVL 0x24
+#define TCP_CONGESTION 0x25
#ifdef __cplusplus
}