News: 0001520513

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux's KUnit Will Now Default To Using Hardware Acceleration For Faster Testing

([Linux Kernel] 3 Hours Ago Kernel Unit Testing)


Surprisingly a change not made years ago, the Linux Kernel Unit Testing "KUnit" framework with the Linux 6.14 kernel is set to use hardware acceleration by default for faster testing where available.

KUnit is the Liunux kernel's common unit testing framework for carrying out various tests. Surprisingly up until now the KUnit testing script hasn't attempted to make use of hardware acceleration for virtualization by default. But for Linux 6.14 that's among the changes now present.

Tamir Duberstein who authored [1]the patch enabling KUnit hardware acceleration by default explained:

"Use KVM or HVF if supported by the QEMU binary and available on the system.

This produces a nice improvement on my Apple M3 Pro running macOS 14.7:

Before:

./tools/testing/kunit/kunit.py exec --arch arm64

[HH:MM:SS] Elapsed time: 10.145s

After:

./tools/testing/kunit/kunit.py exec --arch arm64

[HH:MM:SS] Elapsed time: 1.773s"

They are just simple unit tests so even without hardware acceleration not too time consuming, but for those frequently triggering KUnit or similar, the time savings from 10 seconds to just over one second can certainly add up for CI-type testing and other repetitive testing.

The patch is attempting to use KVM, HVF (macOS Hypervisor Framework), or otherwise the Tiny Code Generation (TCG) depending upon the platform / how QEMU was built. Should no hardware acceleration support be available, no worries, and KUnit will gracefully still run its tests.

This hardware acceleration when available is part of the [2]KUnit updates for Linux 6.14 along with introducing a new autorun option. The autorun option controls tests to run on boot or module load. The Kconfig KUNIT_AUTORUN_ENABLED option can be used for specifying the default kunit.autorun value for the unit tests to automatically run.



[1] https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=kunit&id=220374e70b0b9d44ab5ec1106bc16caf20f94d80

[2] https://lore.kernel.org/lkml/70eb3d1b-6f91-48da-8854-21f25bd3f289@linuxfoundation.org/



SteamPunker

The Movement Formerly Known As Open Source

The battle over the Open Source trademark is heating up. Software in the
Public Interest and the Open Source Initiative both hold competing claims to
the trademark. In order to put an end to the infighting, a group of free
software advocates have founded the Association for the Movement Formerly
Known as Open Source (AMFKOS)

One AMFKOS founder said, "I find it ironic that a trademark representing free
software is itself proprietary. This situation must change. We propose that
the free software movement adopt another name besides 'Open Source'.
Hopefully then we can all Get-Back-To-Coding(tm) instead of fighting over
Bruce Perens' and Eric Raymond's egos."

Rumor has it that Richard Stallman plans to mount a campaign to
promote the phrase "GNU/Free Software" in place of "Open Source".
In addition, the terms "Ajar Source", "Unlocked Source", "Nude Source",
"Unclosed Source", and "Just-Type-make Software" have all
been proposed by various Usenet or Slashdot posters.