<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/bin/test/test.c, branch releng/12.2</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Use NULL for pointers instead of 0.</title>
<updated>2016-04-19T00:38:07+00:00</updated>
<author>
<name>Marcelo Araujo</name>
<email>araujo@FreeBSD.org</email>
</author>
<published>2016-04-19T00:38:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=172c3b0b5f610e0b342aa70922a355e511a67f3a'/>
<id>172c3b0b5f610e0b342aa70922a355e511a67f3a</id>
<content type='text'>
MFC after:	2 weeks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after:	2 weeks.
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Optimize operator lookup.</title>
<updated>2016-01-30T19:59:58+00:00</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2016-01-30T19:59:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f1602fa51152d9aed042b6b742216e33975bcf33'/>
<id>f1602fa51152d9aed042b6b742216e33975bcf33</id>
<content type='text'>
The linear search using strcmp() shows up in pmcstat for several percent.

Split the operators into lengths and whether they start with '-' and compare
bytes using == instead of strcmp().

A simple test

sh -c 'i=0; w=$(printf %0100d 7); while [ "$i" -lt 1000000 ]; do
    v=$(printf %sx%s "$w" "$w"); i=$((i+1)); done'

is over 4% faster on an amd64 bhyve VM.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The linear search using strcmp() shows up in pmcstat for several percent.

Split the operators into lengths and whether they start with '-' and compare
bytes using == instead of strcmp().

A simple test

sh -c 'i=0; w=$(printf %0100d 7); while [ "$i" -lt 1000000 ]; do
    v=$(printf %sx%s "$w" "$w"); i=$((i+1)); done'

is over 4% faster on an amd64 bhyve VM.
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Avoid looking up again the type of a known binary operator.</title>
<updated>2013-12-05T22:53:32+00:00</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2013-12-05T22:53:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c80ad859e1a0f062dad42dd71efd40f1b6ef9184'/>
<id>c80ad859e1a0f062dad42dd71efd40f1b6ef9184</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Simplify the code by unifying op_num and op_type.</title>
<updated>2013-12-01T17:00:57+00:00</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2013-12-01T17:00:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=577ad9b2d303a89c3944a6c8a705d51dd4011dd6'/>
<id>577ad9b2d303a89c3944a6c8a705d51dd4011dd6</id>
<content type='text'>
The global variable t_wp_op is no longer needed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The global variable t_wp_op is no longer needed.
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Remove -ntXY and -otXY primaries.</title>
<updated>2013-05-31T22:54:20+00:00</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2013-05-31T22:54:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f19825af72b3ab9e4a6faa1a6f09002aae9f48bd'/>
<id>f19825af72b3ab9e4a6faa1a6f09002aae9f48bd</id>
<content type='text'>
This reverts commit r247274.

As maintainer of sh, I disapprove of this feature addition.

It is too specific and can be done without easily using find(1) or stat(1).
I will add some hints to the test(1) man page shortly.

In general, FreeBSD sh is not the place to invent new shell language
features. This is how it has been maintained and adding features randomly
does not work with that.

The new syntax (e.g. [ FILE1 -ntca FILE2 ]) looks cryptic to me.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit r247274.

As maintainer of sh, I disapprove of this feature addition.

It is too specific and can be done without easily using find(1) or stat(1).
I will add some hints to the test(1) man page shortly.

In general, FreeBSD sh is not the place to invent new shell language
features. This is how it has been maintained and adding features randomly
does not work with that.

The new syntax (e.g. [ FILE1 -ntca FILE2 ]) looks cryptic to me.
</pre>
</div>
</content>
</entry>
<entry>
<title>Enhance test(1) by adding provision to compare any combination of the</title>
<updated>2013-02-25T19:05:40+00:00</updated>
<author>
<name>Peter Jeremy</name>
<email>peterj@FreeBSD.org</email>
</author>
<published>2013-02-25T19:05:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=293beebc463697485b14136f4b2a5b1d154a3da9'/>
<id>293beebc463697485b14136f4b2a5b1d154a3da9</id>
<content type='text'>
access, birth, change and modify times of two files, instead of only
being able to compare modify times.  The builtin test in sh(1) will
automagically acquire the same expansion.

Approved by:	grog
MFC after:	2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
access, birth, change and modify times of two files, instead of only
being able to compare modify times.  The builtin test in sh(1) will
automagically acquire the same expansion.

Approved by:	grog
MFC after:	2 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Reduce code size of ops table.</title>
<updated>2011-11-25T23:45:29+00:00</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2011-11-25T23:45:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ba22f6c6936b5b11eea306ec1f0ca51c120cd44c'/>
<id>ba22f6c6936b5b11eea306ec1f0ca51c120cd44c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Put some static keywords in the source code.</title>
<updated>2011-10-31T08:59:17+00:00</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2011-10-31T08:59:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f9d4afb439cc2c97183694169663cf6ae10c628e'/>
<id>f9d4afb439cc2c97183694169663cf6ae10c628e</id>
<content type='text'>
For these simple utilities, it doesn't harm to make all global variables
static. In fact, this allows the compiler to perform better forms of
optimisation and analysis.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For these simple utilities, it doesn't harm to make all global variables
static. In fact, this allows the compiler to perform better forms of
optimisation and analysis.
</pre>
</div>
</content>
</entry>
<entry>
<title>bin: Prefer strrchr() to rindex().</title>
<updated>2011-03-15T22:22:11+00:00</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2011-03-15T22:22:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0cf90cd1d37e29407d1fc74e39da6a1625b7cede'/>
<id>0cf90cd1d37e29407d1fc74e39da6a1625b7cede</id>
<content type='text'>
This removes the last index/rindex usage from /bin.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes the last index/rindex usage from /bin.
</pre>
</div>
</content>
</entry>
<entry>
<title>Accept == as an alias of = which is a popular GNU extension.</title>
<updated>2011-02-27T12:28:06+00:00</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2011-02-27T12:28:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=eaea8924cee06b90451536e4b5ead2749e2eac7d'/>
<id>eaea8924cee06b90451536e4b5ead2749e2eac7d</id>
<content type='text'>
This is intentionally undocumented for now since it's not part
of any standard.

MFC after:	1 month
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is intentionally undocumented for now since it's not part
of any standard.

MFC after:	1 month
</pre>
</div>
</content>
</entry>
</feed>
