<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/ublk/test_common.sh, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-02-05T03:46:44Z</updated>
<entry>
<title>selftests: ublk: organize test directories by test ID</title>
<updated>2026-02-05T03:46:44Z</updated>
<author>
<name>Ming Lei</name>
</author>
<published>2026-02-01T03:10:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d3ae80b4dc43d1c49f5ab6e9835ae5fc9ac5d37'/>
<id>urn:sha1:5d3ae80b4dc43d1c49f5ab6e9835ae5fc9ac5d37</id>
<content type='text'>
Set UBLK_TEST_DIR to ${TMPDIR:-./ublktest-dir}/${TID}.XXXXXX to create
per-test subdirectories organized by test ID. This makes it easier to
identify and debug specific test runs.

Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>selftests: ublk: increase timeouts for parallel test execution</title>
<updated>2026-01-31T21:56:28Z</updated>
<author>
<name>Ming Lei</name>
</author>
<published>2026-01-31T16:23:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=56a08b87f9f2a763cb5546f83b78ebe1e96260af'/>
<id>urn:sha1:56a08b87f9f2a763cb5546f83b78ebe1e96260af</id>
<content type='text'>
When running tests in parallel with high JOBS count (e.g., JOBS=64),
the existing timeouts can be insufficient due to system load:

- Increase state wait loops from 20/50 to 100 iterations in
  _recover_ublk_dev(), __ublk_quiesce_dev(), and __ublk_kill_daemon()
  to handle slower state transitions under heavy load

- Add --timeout=20 to udevadm settle calls to prevent indefinite
  hangs when udev event queue is overwhelmed by rapid device
  creation/deletion

Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>selftests: ublk: add _ublk_sleep helper for parallel execution</title>
<updated>2026-01-31T21:56:28Z</updated>
<author>
<name>Ming Lei</name>
</author>
<published>2026-01-31T16:23:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64406dd2f69fe27921c7bf06088871c002cf6186'/>
<id>urn:sha1:64406dd2f69fe27921c7bf06088871c002cf6186</id>
<content type='text'>
Add _ublk_sleep() helper function that uses different sleep times
depending on whether tests run in parallel or sequential mode.

Usage: _ublk_sleep &lt;normal_secs&gt; &lt;parallel_secs&gt;

Export JOBS variable from Makefile so test scripts can detect parallel
execution, and use _ublk_sleep in test_part_02.sh to handle the
partition scan delay (1s normal, 5s parallel).

Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>selftests: ublk: track created devices for per-test cleanup</title>
<updated>2026-01-31T21:56:28Z</updated>
<author>
<name>Ming Lei</name>
</author>
<published>2026-01-31T16:23:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2021e6109de3e97adfce262c40a657ff206ef495'/>
<id>urn:sha1:2021e6109de3e97adfce262c40a657ff206ef495</id>
<content type='text'>
Track device IDs in UBLK_DEVS array when created. Update
_cleanup_test() to only delete devices created by this test
instead of using 'del -a' which removes all devices.

This prepares for running tests concurrently where each test
should only clean up its own devices.

Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>selftests: ublk: add _ublk_del_dev helper function</title>
<updated>2026-01-31T21:56:28Z</updated>
<author>
<name>Ming Lei</name>
</author>
<published>2026-01-31T16:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=92734a4f3a7a5449b0c7d0160ba658a2b665c31b'/>
<id>urn:sha1:92734a4f3a7a5449b0c7d0160ba658a2b665c31b</id>
<content type='text'>
Add _ublk_del_dev() to delete a specific ublk device by ID and
use it in all test scripts instead of calling UBLK_PROG directly.

Also remove unused _remove_ublk_devices() function.

Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>selftests: ublk: simplify UBLK_TEST_DIR handling</title>
<updated>2026-01-31T21:56:28Z</updated>
<author>
<name>Ming Lei</name>
</author>
<published>2026-01-31T16:23:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5af302a15a1d628a025a78892001fe8afea90c60'/>
<id>urn:sha1:5af302a15a1d628a025a78892001fe8afea90c60</id>
<content type='text'>
Remove intermediate TDIR variable and set UBLK_TEST_DIR directly
in _prep_test(). Remove default initialization since the directory
is created dynamically when tests run.

Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>selftests: ublk: move test temp files into a sub directory</title>
<updated>2026-01-31T13:36:41Z</updated>
<author>
<name>Alexander Atanasov</name>
</author>
<published>2026-01-29T16:19:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2feca79ef8df5505b87c00812b9ba263b92c64ed'/>
<id>urn:sha1:2feca79ef8df5505b87c00812b9ba263b92c64ed</id>
<content type='text'>
Create and use a temporary directory for the files created during
test runs. If TMPDIR environment variable is set use it as a base
for the temporary directory path.
TMPDIR=/mnt/scratch make run_tests
and
TMPDIR=/mnt/scratch ./test_generic_01.sh
will place test directory under /mnt/scratch

Signed-off-by: Alexander Atanasov &lt;alex@zazolabs.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>selftests: ublk: mark each test start and end time in dmesg</title>
<updated>2026-01-31T13:36:41Z</updated>
<author>
<name>Alexander Atanasov</name>
</author>
<published>2026-01-29T16:19:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e0d293af9e37c735aec574c1e69ed71f81f94b2'/>
<id>urn:sha1:4e0d293af9e37c735aec574c1e69ed71f81f94b2</id>
<content type='text'>
Log test start and end time in dmesg, so generated log messages
during the test run can be linked to specific test from the test
suite.

(switch to `date +%F %T`)

Signed-off-by: Alexander Atanasov &lt;alex@zazolabs.com&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>selftests: ublk: derive TID automatically from script name</title>
<updated>2026-01-31T13:36:41Z</updated>
<author>
<name>Ming Lei</name>
</author>
<published>2026-01-29T16:19:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a4d8bed0b47543b2dfce0b1d714b40d68ff2f7e'/>
<id>urn:sha1:3a4d8bed0b47543b2dfce0b1d714b40d68ff2f7e</id>
<content type='text'>
Add automatic TID derivation in test_common.sh based on the script
filename. The TID is extracted by stripping the "test_" prefix and
".sh" suffix from the script name (e.g., test_loop_01.sh -&gt; loop_01).

This removes the need for each test script to manually define TID,
reducing boilerplate and preventing potential mismatches between
the script name and TID. Scripts can still override TID after
sourcing test_common.sh if needed.

Reviewed-by: Caleb Sander Mateos &lt;csander@purestorage.com&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>selftests: ublk: add integrity params test</title>
<updated>2026-01-12T16:16:38Z</updated>
<author>
<name>Caleb Sander Mateos</name>
</author>
<published>2026-01-08T09:19:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e9f635525b12f055558a7cfe2e54d109839d030'/>
<id>urn:sha1:9e9f635525b12f055558a7cfe2e54d109839d030</id>
<content type='text'>
Add test case null_04 to exercise all the different integrity params. It
creates 4 different ublk devices with different combinations of
integrity arguments and verifies their integrity limits via sysfs and
the metadata_size utility.

Signed-off-by: Caleb Sander Mateos &lt;csander@purestorage.com&gt;
Reviewed-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
