<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/unicode/utf8-selftest.c, branch master</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>unicode: kunit: change tests filename and path</title>
<updated>2025-02-12T22:00:11+00:00</updated>
<author>
<name>Gabriela Bittencourt</name>
<email>gbittencourt@lkcamp.dev</email>
</author>
<published>2024-12-02T07:55:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2be6ce9d9bd040780dda8d456fe8696a48d805be'/>
<id>2be6ce9d9bd040780dda8d456fe8696a48d805be</id>
<content type='text'>
Change utf8 kunit test filename and path to follow the style
convention on Documentation/dev-tools/kunit/style.rst

Co-developed-by: Pedro Orlando &lt;porlando@lkcamp.dev&gt;
Signed-off-by: Pedro Orlando &lt;porlando@lkcamp.dev&gt;
Co-developed-by: Danilo Pereira &lt;dpereira@lkcamp.dev&gt;
Signed-off-by: Danilo Pereira &lt;dpereira@lkcamp.dev&gt;
Signed-off-by: Gabriela Bittencourt &lt;gbittencourt@lkcamp.dev&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Gabriel Krisman Bertazi &lt;krisman@suse.de&gt;
Reviewed-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Reviewed-by: Rae Moar &lt;rmoar@google.com&gt;
Link: https://lore.kernel.org/r/20241202075545.3648096-7-davidgow@google.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change utf8 kunit test filename and path to follow the style
convention on Documentation/dev-tools/kunit/style.rst

Co-developed-by: Pedro Orlando &lt;porlando@lkcamp.dev&gt;
Signed-off-by: Pedro Orlando &lt;porlando@lkcamp.dev&gt;
Co-developed-by: Danilo Pereira &lt;dpereira@lkcamp.dev&gt;
Signed-off-by: Danilo Pereira &lt;dpereira@lkcamp.dev&gt;
Signed-off-by: Gabriela Bittencourt &lt;gbittencourt@lkcamp.dev&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Gabriel Krisman Bertazi &lt;krisman@suse.de&gt;
Reviewed-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Reviewed-by: Rae Moar &lt;rmoar@google.com&gt;
Link: https://lore.kernel.org/r/20241202075545.3648096-7-davidgow@google.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unicode: kunit: refactor selftest to kunit tests</title>
<updated>2025-02-11T02:25:39+00:00</updated>
<author>
<name>Gabriela Bittencourt</name>
<email>gbittencourt@lkcamp.dev</email>
</author>
<published>2024-12-02T07:55:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=62b9ef504e7f89d6ae3e9ab704cc4befab1d37f0'/>
<id>62b9ef504e7f89d6ae3e9ab704cc4befab1d37f0</id>
<content type='text'>
Refactoring 'test' functions into kunit tests, to test utf-8 support in
unicode subsystem.

This allows the utf8 tests to be run alongside the KUnit test suite
using kunit-tool, quickly compiling and running all desired tests as
part of the KUnit test suite, instead of compiling the selftest module
and loading it.

The refactoring kept the original testing logic intact, while adopting a
testing pattern across different kernel modules and leveraging KUnit's
benefits.

Co-developed-by: Pedro Orlando &lt;porlando@lkcamp.dev&gt;
Signed-off-by: Pedro Orlando &lt;porlando@lkcamp.dev&gt;
Co-developed-by: Danilo Pereira &lt;dpereira@lkcamp.dev&gt;
Signed-off-by: Danilo Pereira &lt;dpereira@lkcamp.dev&gt;
Signed-off-by: Gabriela Bittencourt &lt;gbittencourt@lkcamp.dev&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Gabriel Krisman Bertazi &lt;krisman@suse.de&gt;
Reviewed-by: Rae Moar &lt;rmoar@google.com&gt;
Link: https://lore.kernel.org/r/20241202075545.3648096-6-davidgow@google.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refactoring 'test' functions into kunit tests, to test utf-8 support in
unicode subsystem.

This allows the utf8 tests to be run alongside the KUnit test suite
using kunit-tool, quickly compiling and running all desired tests as
part of the KUnit test suite, instead of compiling the selftest module
and loading it.

The refactoring kept the original testing logic intact, while adopting a
testing pattern across different kernel modules and leveraging KUnit's
benefits.

Co-developed-by: Pedro Orlando &lt;porlando@lkcamp.dev&gt;
Signed-off-by: Pedro Orlando &lt;porlando@lkcamp.dev&gt;
Co-developed-by: Danilo Pereira &lt;dpereira@lkcamp.dev&gt;
Signed-off-by: Danilo Pereira &lt;dpereira@lkcamp.dev&gt;
Signed-off-by: Gabriela Bittencourt &lt;gbittencourt@lkcamp.dev&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Gabriel Krisman Bertazi &lt;krisman@suse.de&gt;
Reviewed-by: Rae Moar &lt;rmoar@google.com&gt;
Link: https://lore.kernel.org/r/20241202075545.3648096-6-davidgow@google.com
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unicode: Export latest available UTF-8 version number</title>
<updated>2024-10-28T12:36:54+00:00</updated>
<author>
<name>André Almeida</name>
<email>andrealmeid@igalia.com</email>
</author>
<published>2024-10-21T16:37:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=04dad6c6d37d741bad9946a92171bfa637e989f0'/>
<id>04dad6c6d37d741bad9946a92171bfa637e989f0</id>
<content type='text'>
Export latest available UTF-8 version number so filesystems can easily
load the newest one.

Signed-off-by: André Almeida &lt;andrealmeid@igalia.com&gt;
Link: https://lore.kernel.org/r/20241021-tonyk-tmpfs-v8-3-f443d5814194@igalia.com
Acked-by: Gabriel Krisman Bertazi &lt;krisman@suse.de&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Export latest available UTF-8 version number so filesystems can easily
load the newest one.

Signed-off-by: André Almeida &lt;andrealmeid@igalia.com&gt;
Link: https://lore.kernel.org/r/20241021-tonyk-tmpfs-v8-3-f443d5814194@igalia.com
Acked-by: Gabriel Krisman Bertazi &lt;krisman@suse.de&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unicode: add MODULE_DESCRIPTION() macros</title>
<updated>2024-06-20T23:30:02+00:00</updated>
<author>
<name>Jeff Johnson</name>
<email>quic_jjohnson@quicinc.com</email>
</author>
<published>2024-05-24T18:48:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=68318904a7758e11f16fa9d202a6df60f896e71a'/>
<id>68318904a7758e11f16fa9d202a6df60f896e71a</id>
<content type='text'>
Currently 'make W=1' reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/unicode/utf8data.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/unicode/utf8-selftest.o

Add a MODULE_DESCRIPTION() to utf8-selftest.c and utf8data.c_shipped,
and update mkutf8data.c to add a MODULE_DESCRIPTION() to any future
generated utf8data file.

Signed-off-by: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
Link: https://lore.kernel.org/r/20240524-md-unicode-v1-1-e2727ce8574d@quicinc.com
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently 'make W=1' reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/unicode/utf8data.o
WARNING: modpost: missing MODULE_DESCRIPTION() in fs/unicode/utf8-selftest.o

Add a MODULE_DESCRIPTION() to utf8-selftest.c and utf8data.c_shipped,
and update mkutf8data.c to add a MODULE_DESCRIPTION() to any future
generated utf8data file.

Signed-off-by: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
Link: https://lore.kernel.org/r/20240524-md-unicode-v1-1-e2727ce8574d@quicinc.com
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unicode: make utf8 test count static</title>
<updated>2024-06-20T23:28:05+00:00</updated>
<author>
<name>Ben Dooks</name>
<email>ben.dooks@codethink.co.uk</email>
</author>
<published>2024-03-08T18:32:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7bd3d76a1f9fb38c8234cfadb7131e0b26deb919'/>
<id>7bd3d76a1f9fb38c8234cfadb7131e0b26deb919</id>
<content type='text'>
The variables failed_tests and total_tests are not used outside of the
utf8-selftest.c file so make them static to avoid the following warnings:

fs/unicode/utf8-selftest.c:17:14: warning: symbol 'failed_tests' was not declared. Should it be static?
fs/unicode/utf8-selftest.c:18:14: warning: symbol 'total_tests' was not declared. Should it be static?

Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
Link: https://lore.kernel.org/r/20240308183215.1924331-1-ben.dooks@codethink.co.uk
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The variables failed_tests and total_tests are not used outside of the
utf8-selftest.c file so make them static to avoid the following warnings:

fs/unicode/utf8-selftest.c:17:14: warning: symbol 'failed_tests' was not declared. Should it be static?
fs/unicode/utf8-selftest.c:18:14: warning: symbol 'total_tests' was not declared. Should it be static?

Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
Link: https://lore.kernel.org/r/20240308183215.1924331-1-ben.dooks@codethink.co.uk
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unicode: Add utf8-data module</title>
<updated>2021-10-12T14:41:39+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-09-15T07:00:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2b3d047870120bcd46d7cc257d19ff49328fd585'/>
<id>2b3d047870120bcd46d7cc257d19ff49328fd585</id>
<content type='text'>
utf8data.h contains a large database table which is an auto-generated
decodification trie for the unicode normalization functions.

Allow building it into a separate module.

Based on a patch from Shreeya Patel &lt;shreeya.patel@collabora.com&gt;.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
utf8data.h contains a large database table which is an auto-generated
decodification trie for the unicode normalization functions.

Allow building it into a separate module.

Based on a patch from Shreeya Patel &lt;shreeya.patel@collabora.com&gt;.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unicode: cache the normalization tables in struct unicode_map</title>
<updated>2021-10-11T20:02:02+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-09-15T07:00:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6ca99ce756c27852d1ea1e555045de1c920f30ed'/>
<id>6ca99ce756c27852d1ea1e555045de1c920f30ed</id>
<content type='text'>
Instead of repeatedly looking up the version add pointers to the
NFD and NFD+CF tables to struct unicode_map, and pass a
unicode_map plus index to the functions using the normalization
tables.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of repeatedly looking up the version add pointers to the
NFD and NFD+CF tables to struct unicode_map, and pass a
unicode_map plus index to the functions using the normalization
tables.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unicode: move utf8cursor to utf8-selftest.c</title>
<updated>2021-10-11T20:01:58+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-09-15T07:00:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fbc59d65059ecfea8b746715e920c325cc16cede'/>
<id>fbc59d65059ecfea8b746715e920c325cc16cede</id>
<content type='text'>
Only used by the tests, so no need to keep it in the core.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only used by the tests, so no need to keep it in the core.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unicode: simplify utf8len</title>
<updated>2021-10-11T20:01:54+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-09-15T07:00:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9012d79cf0c760eb69d54163ee5152c1b504f7aa'/>
<id>9012d79cf0c760eb69d54163ee5152c1b504f7aa</id>
<content type='text'>
Just use the utf8nlen implementation with a (size_t)-1 len argument,
similar to utf8_lookup.  Also move the function to utf8-selftest.c, as
it isn't used anywhere else.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just use the utf8nlen implementation with a (size_t)-1 len argument,
similar to utf8_lookup.  Also move the function to utf8-selftest.c, as
it isn't used anywhere else.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>unicode: pass a UNICODE_AGE() tripple to utf8_load</title>
<updated>2021-10-11T20:01:46+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-09-15T07:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=49bd03cc7e95cb78420305ca2f5ef67497b6fa80'/>
<id>49bd03cc7e95cb78420305ca2f5ef67497b6fa80</id>
<content type='text'>
Don't bother with pointless string parsing when the caller can just pass
the version in the format that the core expects.  Also remove the
fallback to the latest version that none of the callers actually uses.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't bother with pointless string parsing when the caller can just pass
the version in the format that the core expects.  Also remove the
fallback to the latest version that none of the callers actually uses.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@collabora.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
