<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/util-linux.git/tests/ts/col, branch master</title>
<subtitle>git.kernel.org: pub/scm/utils/util-linux/util-linux.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/util-linux.git/'/>
<entry>
<title>tests: wrap $TS_{TOPDIR,SELF} in "." cmdline with double quote chars</title>
<updated>2022-11-23T07:09:48+00:00</updated>
<author>
<name>Masatake YAMATO</name>
<email>yamato@redhat.com</email>
</author>
<published>2022-11-23T07:03:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/util-linux.git/commit/?id=7155e836defb336536d39dd9aed57770c55b1aa9'/>
<id>7155e836defb336536d39dd9aed57770c55b1aa9</id>
<content type='text'>
The command lines used for this change:

  $ cd tests/ts
  $ sed  -i -e 's|. $TS_SELF/|. "$TS_SELF"/|'  $(grep --exclude='*~' -lr -e '^\. \$TS_SELF/')
  $ sed -i -e 's|. $TS_TOPDIR/functions.sh|. "$TS_TOPDIR"/functions.sh|'  $(grep --exclude='*~' -lr -e '^\. \$TS_TOPDIR/functions.sh')

Signed-off-by: Masatake YAMATO &lt;yamato@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The command lines used for this change:

  $ cd tests/ts
  $ sed  -i -e 's|. $TS_SELF/|. "$TS_SELF"/|'  $(grep --exclude='*~' -lr -e '^\. \$TS_SELF/')
  $ sed -i -e 's|. $TS_TOPDIR/functions.sh|. "$TS_TOPDIR"/functions.sh|'  $(grep --exclude='*~' -lr -e '^\. \$TS_TOPDIR/functions.sh')

Signed-off-by: Masatake YAMATO &lt;yamato@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: split several tests into subtests</title>
<updated>2021-10-14T10:33:45+00:00</updated>
<author>
<name>Vojtěch Eichler</name>
<email>vojta.eich@gmail.com</email>
</author>
<published>2021-10-14T10:33:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/util-linux.git/commit/?id=d4daa330b0baca5e7e55fc3d0b1dd993c12c68b0'/>
<id>d4daa330b0baca5e7e55fc3d0b1dd993c12c68b0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: split test into subtest</title>
<updated>2021-10-04T14:46:22+00:00</updated>
<author>
<name>Vojtěch Eichler</name>
<email>vojta.eich@gmail.com</email>
</author>
<published>2021-10-04T14:46:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/util-linux.git/commit/?id=298a9eaf659bdddff7145e9f800b3a0b712fc0a2'/>
<id>298a9eaf659bdddff7145e9f800b3a0b712fc0a2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>col: make input to tolerate invalid wide characters</title>
<updated>2020-12-02T22:12:32+00:00</updated>
<author>
<name>Sami Kerola</name>
<email>kerolasa@iki.fi</email>
</author>
<published>2020-11-26T22:01:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/util-linux.git/commit/?id=14a36f96ee671c2d3a20fa15437844a711e0b29c'/>
<id>14a36f96ee671c2d3a20fa15437844a711e0b29c</id>
<content type='text'>
The getwchar(3) will choke and exit if invalid character is encountered.
This change will make col(1) to print broken multibyte characters as
\x{hex} string.

Reported-by: Vitaly Lipatov &lt;lav@etersoft.ru&gt;
Addresses: https://github.com/karelzak/util-linux/issues/1198
Signed-off-by: Sami Kerola &lt;kerolasa@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The getwchar(3) will choke and exit if invalid character is encountered.
This change will make col(1) to print broken multibyte characters as
\x{hex} string.

Reported-by: Vitaly Lipatov &lt;lav@etersoft.ru&gt;
Addresses: https://github.com/karelzak/util-linux/issues/1198
Signed-off-by: Sami Kerola &lt;kerolasa@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>col: add more tests</title>
<updated>2020-09-11T19:55:01+00:00</updated>
<author>
<name>Sami Kerola</name>
<email>kerolasa@iki.fi</email>
</author>
<published>2020-06-26T21:24:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/util-linux.git/commit/?id=b97981a7075e551bb5c3badf73e73241882e8207'/>
<id>b97981a7075e551bb5c3badf73e73241882e8207</id>
<content type='text'>
With these tests coverage is about 89%.

The ts_run is added to ensure ASAN_OPTIONS and UBSAN_OPTIONS are set
correctly when the tests run.

Reference: https://github.com/karelzak/util-linux/pull/1115#issuecomment-670140224
Signed-off-by: Sami Kerola &lt;kerolasa@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With these tests coverage is about 89%.

The ts_run is added to ensure ASAN_OPTIONS and UBSAN_OPTIONS are set
correctly when the tests run.

Reference: https://github.com/karelzak/util-linux/pull/1115#issuecomment-670140224
Signed-off-by: Sami Kerola &lt;kerolasa@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>col: fix output when first line does not have newline character</title>
<updated>2020-06-20T21:17:30+00:00</updated>
<author>
<name>Sami Kerola</name>
<email>kerolasa@iki.fi</email>
</author>
<published>2020-06-20T08:22:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/util-linux.git/commit/?id=d8bfcb4cc5d65239e7c21b1067b82a0b24ae386b'/>
<id>d8bfcb4cc5d65239e7c21b1067b82a0b24ae386b</id>
<content type='text'>
Commit I made while back and has been part of util-linux v2.30 to v2.35 made
col(1) not to output anything when first line did not have newline character.

    printf "gone from output" | col

This commit fixes the issue.  Admittedly the col source code is unnecessarily
hard to work with.  It could be a good idea to refactor the col(1) as low
priority task, Assuming refactoring is done the first commit to get that done
should add tests that exhaust all possible input handling including all command
line option directives.

Addresses: https://github.com/karelzak/util-linux/issues/422
Fixes: b6b5272b03ea9d3fa15601801d4d0f76ea4440f1
Signed-off-by: Sami Kerola &lt;kerolasa@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit I made while back and has been part of util-linux v2.30 to v2.35 made
col(1) not to output anything when first line did not have newline character.

    printf "gone from output" | col

This commit fixes the issue.  Admittedly the col source code is unnecessarily
hard to work with.  It could be a good idea to refactor the col(1) as low
priority task, Assuming refactoring is done the first commit to get that done
should add tests that exhaust all possible input handling including all command
line option directives.

Addresses: https://github.com/karelzak/util-linux/issues/422
Fixes: b6b5272b03ea9d3fa15601801d4d0f76ea4440f1
Signed-off-by: Sami Kerola &lt;kerolasa@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: (col) avoid hardcoding of errno string</title>
<updated>2019-08-27T07:37:01+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-08-23T13:32:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/util-linux.git/commit/?id=eebc9e4dc2d3c0de174511823eca74a4cd645bff'/>
<id>eebc9e4dc2d3c0de174511823eca74a4cd645bff</id>
<content type='text'>
The col/multibyte test has a hardcoded error string as part of its
expected output that is returned by glibc's strerror(3P) function. Even
though many of these strings are the same across libc implementations,
they are not standardiced and some are certainly different. One example
is the string for EILSEQ on musl libc.

To fix this, we introduce a new test helper "test_strerror". The helper
can be invoked with an error code like "EILSEQ", which will cause it to
print out the the respective error message for that code. Note that
"test_strerror" cannot act on the error's value (e.g. 84 for EILSEQ), as
these aren't standardized either. Instead, we thus need to have an array
of the error's string representation ("EILSEQ") to its respective error
code (the define EILSEQ). The array can trivially be extended as
required, thus it is only sparsely populated with EILSEQ right now.

To fix the col/multibyte test, we introduce a call to sed(1) to replace
the strerror(3P) message from EILSEQ with "EILSEQ". Furthermore, as
we're running tests with the POSIX locale by default which treats all
bytes as valid multibyte sequences, we have to change to the C.UTF-8
locale instead to actually get an error.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The col/multibyte test has a hardcoded error string as part of its
expected output that is returned by glibc's strerror(3P) function. Even
though many of these strings are the same across libc implementations,
they are not standardiced and some are certainly different. One example
is the string for EILSEQ on musl libc.

To fix this, we introduce a new test helper "test_strerror". The helper
can be invoked with an error code like "EILSEQ", which will cause it to
print out the the respective error message for that code. Note that
"test_strerror" cannot act on the error's value (e.g. 84 for EILSEQ), as
these aren't standardized either. Instead, we thus need to have an array
of the error's string representation ("EILSEQ") to its respective error
code (the define EILSEQ). The array can trivially be extended as
required, thus it is only sparsely populated with EILSEQ right now.

To fix the col/multibyte test, we introduce a call to sed(1) to replace
the strerror(3P) message from EILSEQ with "EILSEQ". Furthermore, as
we're running tests with the POSIX locale by default which treats all
bytes as valid multibyte sequences, we have to change to the C.UTF-8
locale instead to actually get an error.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: check commands needed for running a test exist</title>
<updated>2014-03-07T10:52:57+00:00</updated>
<author>
<name>Sami Kerola</name>
<email>kerolasa@iki.fi</email>
</author>
<published>2014-02-16T15:22:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/util-linux.git/commit/?id=2f791546395cb43f3f93de6c095c812c7cd5237f'/>
<id>2f791546395cb43f3f93de6c095c812c7cd5237f</id>
<content type='text'>
Signed-off-by: Sami Kerola &lt;kerolasa@iki.fi&gt;
Signed-off-by: Karel Zak &lt;kzak@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Sami Kerola &lt;kerolasa@iki.fi&gt;
Signed-off-by: Karel Zak &lt;kzak@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: avoid executing dirname(1) command</title>
<updated>2014-02-17T12:55:41+00:00</updated>
<author>
<name>Sami Kerola</name>
<email>kerolasa@iki.fi</email>
</author>
<published>2014-02-16T23:54:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/util-linux.git/commit/?id=e130ce53ce87f39f4bee3288d106c681e82dbb86'/>
<id>e130ce53ce87f39f4bee3288d106c681e82dbb86</id>
<content type='text'>
Bash parameter expansion does the same thing.

Signed-off-by: Sami Kerola &lt;kerolasa@iki.fi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bash parameter expansion does the same thing.

Signed-off-by: Sami Kerola &lt;kerolasa@iki.fi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rename util-linux-ng back to util-linux</title>
<updated>2010-11-30T10:41:59+00:00</updated>
<author>
<name>Karel Zak</name>
<email>kzak@redhat.com</email>
</author>
<published>2010-11-30T10:41:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/util-linux.git/commit/?id=601d12fb103702276e01ed891fd3a09a6045f209'/>
<id>601d12fb103702276e01ed891fd3a09a6045f209</id>
<content type='text'>
Signed-off-by: Karel Zak &lt;kzak@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Karel Zak &lt;kzak@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
