[RFC] selftests: Add dependencies information for kselftest

From: Juntong Deng
Date: Mon Sep 25 2023 - 06:25:51 EST


Most of the tests in kselftest rely on external tools and libraries
to run, which means that in order to run the tests effectively we need
to have all the dependencies installed first.

But unfortunately, there is currently no way to know in advance what
tools and libraries the tests in kselftest depend on, and can only be
known when a test run fails.

For example after running the alsa subsystem test I realized I needed
to install the libasound-dev package.

This is inefficient for the test of subsystems that require a long
time to run.

For example, the net subsystem test, which takes more than an hour to
run a complete test.

I can only know that I need to install numactl, libnuma-dev, ethtool,
mausezahn, netsniff-ng, ndisc6, netperf, and other tools after carefully
reviewing the results of the tests.

I think we should add dependencies information to the Makefile for
each subsystem test, either as a comment or as an output target of
the Makefile, it would save a lot of time for the people running
the tests.

I can do this part of the work.

Welcome to discuss!

Juntong Deng