Currently the nolibc testsuite embeds the test executable into a kernel
image with CONFIG_INITRAMFS_SOURCE.
This forces a full kernel relink everytime the test executable is
updated.
This relinking step dominates the test cycle.
It is slower than building and running the test in qemu together.
With a bit of Makefile-shuffling the relinking can be avoided.
Signed-off-by: Thomas Weißschuh <linux(a)weissschuh.net>
---
Thomas Weißschuh (3):
kbuild: add toplevel target for usr/gen_init_cpio
selftests/nolibc: don't embed initramfs into kernel image
selftests/nolibc: drop target "rerun"
Makefile | 4 +++
tools/testing/selftests/nolibc/Makefile | 50 +++++++++++++++------------------
2 files changed, 27 insertions(+), 27 deletions(-)
---
base-commit: 3f79a57865b33f49fdae6655510bd27c8e6610e0
change-id: 20230916-nolibc-initramfs-4fd00eac3256
Best regards,
--
Thomas Weißschuh <linux(a)weissschuh.net>
Defining the 'len' variable inside the 'patten_buf' as unsigned
makes it more consistent with its actual meaning and the rest of the
size variables in the test. Moreover, this removes an implicit
conversion in the fscanf function call.
Additionally, remove the unused variable 'it' from the reset_ioctl test.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
---
Defining the 'len' variable inside the 'patten_buf' as unsigned
makes it more consistent with its actual meaning and the rest of the
size variables in the test. Moreover, this removes an implicit
conversion in the fscanf function call.
Additionally, remove the unused variable 'it' from the reset_ioctl test.
---
tools/testing/selftests/alsa/test-pcmtest-driver.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/testing/selftests/alsa/test-pcmtest-driver.c b/tools/testing/selftests/alsa/test-pcmtest-driver.c
index 357adc722cba..f0dae651e495 100644
--- a/tools/testing/selftests/alsa/test-pcmtest-driver.c
+++ b/tools/testing/selftests/alsa/test-pcmtest-driver.c
@@ -13,7 +13,7 @@
struct pattern_buf {
char buf[1024];
- int len;
+ unsigned int len;
};
struct pattern_buf patterns[CH_NUM];
@@ -313,7 +313,6 @@ TEST_F(pcmtest, ni_playback) {
*/
TEST_F(pcmtest, reset_ioctl) {
snd_pcm_t *handle;
- unsigned char *it;
int test_res;
struct pcmtest_test_params *params = &self->params;
---
base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
change-id: 20230916-topic-pcmtest_warnings-ed074edee338
Best regards,
--
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
Hi Linus,
Please pull the following second Kselftest fixes update for Linux 6.6-rc2.
This kselftest fixes update for Linux 6.6-rc2 consists of important
fixes to user_events test and ftrace test.
user_events test has been enabled for default run in Linux 6.6-rc1. The
following fixes are for bugs found since then:
- adds checks for dependencies and skips the test. user_events test
requires root access, and tracefs and user_events enabled. It leaves
tracefs mounted and a fix is in progress for that missing piece.
- creates user_events test-specific Kconfig fragments.
ftrace test fixes:
- unmounts tracefs for recovering environment. Fix identified during the
above mentioned user_events dependencies fix.
- adds softlink to latest log directory improving usage.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 0bb80ecc33a8fb5a682236443c1e740d5c917d1d:
Linux 6.6-rc1 (2023-09-10 16:28:41 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-fixes-6.6-rc2
for you to fetch changes up to 7e021da80f48582171029714f8a487347f29dddb:
selftests: tracing: Fix to unmount tracefs for recovering environment (2023-09-12 09:34:20 -0600)
----------------------------------------------------------------
linux-kselftest-fixes-6.6-rc2
This kselftest fixes update for Linux 6.6-rc2 consists of important
fixes to user_events test and ftrace test.
user_events test has been enabled for default run in Linux 6.6-rc1. The
following fixes are for bugs found since then:
- adds checks for dependencies and skips the test. user_events test
requires root access, and tracefs and user_events enabled. It leaves
tracefs mounted and a fix is in progress for that missing piece.
- creates user_events test-specific Kconfig fragments.
ftrace test fixes:
- unmounts tracefs for recovering environment. Fix identified during the
above mentioned user_events dependencies fix.
- adds softlink to latest log directory improving usage.
----------------------------------------------------------------
Beau Belgrave (1):
selftests/user_events: Fix failures when user_events is not installed
Masami Hiramatsu (Google) (1):
selftests: tracing: Fix to unmount tracefs for recovering environment
Naresh Kamboju (1):
selftests: user_events: create test-specific Kconfig fragments
Steven Rostedt (Google) (1):
ftrace/selftests: Add softlink to latest log directory
tools/testing/selftests/ftrace/ftracetest | 18 +++-
tools/testing/selftests/user_events/abi_test.c | 3 +
tools/testing/selftests/user_events/config | 1 +
tools/testing/selftests/user_events/dyn_test.c | 2 +
tools/testing/selftests/user_events/ftrace_test.c | 3 +
tools/testing/selftests/user_events/perf_test.c | 3 +
.../selftests/user_events/user_events_selftests.h | 100 +++++++++++++++++++++
7 files changed, 129 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/user_events/config
create mode 100644 tools/testing/selftests/user_events/user_events_selftests.h
----------------------------------------------------------------
Changes from RFC
(https://lore.kernel.org/damon/20230910034048.59191-1-sj@kernel.org/)
- Add kselftest for damos_apply_interval_us sysfs file
- Rebase on latest mm-unstable
DAMON-based operation schemes are applied for every aggregation
interval. That is mainly because schemes are using nr_accesses, which
be complete to be used for every aggregation interval.
This makes some DAMOS use cases be tricky. Quota setting under long
aggregation interval is one such example. Suppose the aggregation
interval is ten seconds, and there is a scheme having CPU quota 100ms
per 1s. The scheme will actually uses 100ms per ten seconds, since it
cannobe be applied before next aggregation interval. The feature is
working as intended, but the results might not that intuitive for some
users. This could be fixed by updating the quota to 1s per 10s. But,
in the case, the CPU usage of DAMOS could look like spikes, and actually
make a bad effect to other CPU-sensitive workloads.
Also, with such huge aggregation interval, users may want schemes to be
applied more frequently.
DAMON provides nr_accesses_bp, which is updated for each sampling
interval in a way that reasonable to be used. By using that instead of
nr_accesses, DAMOS can have its own time interval and mitigate abovely
mentioned issues.
This patchset makes DAMOS schemes to use nr_accesses_bp instead of
nr_accesses, and have their own timing intervals. Also update DAMOS
tried regions sysfs files and DAMOS before_apply tracepoint to use the
new data as their source. Note that the interval is zero by default,
and it is interpreted to use the aggregation interval instead. This
avoids making user-visible behavioral changes.
Patches Seuqeunce
-----------------
The first patch (patch 1/9) makes DAMOS uses nr_accesses_bp instead of
nr_accesses, and following two patches (patches 2/9 and 3/9) updates
DAMON sysfs interface for DAMOS tried regions and the DAMOS before_apply
tracespoint to use nr_accesses_bp instead of nr_accesses, respectively.
The following two patches (patches 4/9 and 5/9) implements the
scheme-specific apply interval for DAMON kernel API users and update the
design document for the new feature.
Finally, the following four patches (patches 6/9, 7/9, 8/9 and 9/9) add
support of the feature in DAMON sysfs interface, add a simple selftest
test case, and document the new file on the usage and the ABI documents,
repsectively.
SeongJae Park (9):
mm/damon/core: make DAMOS uses nr_accesses_bp instead of nr_accesses
mm/damon/sysfs-schemes: use nr_accesses_bp as the source of
tried_regions/<N>/nr_accesses
mm/damon/core: use nr_accesses_bp as a source of damos_before_apply
tracepoint
mm/damon/core: implement scheme-specific apply interval
Docs/mm/damon/design: document DAMOS apply intervals
mm/damon/sysfs-schemes: support DAMOS apply interval
selftests/damon/sysfs: test DAMOS apply intervals
Docs/admin-guide/mm/damon/usage: update for DAMOS apply intervals
Docs/ABI/damon: update for DAMOS apply intervals
.../ABI/testing/sysfs-kernel-mm-damon | 7 ++
Documentation/admin-guide/mm/damon/usage.rst | 9 ++-
Documentation/mm/damon/design.rst | 3 +-
include/linux/damon.h | 17 +++-
include/trace/events/damon.h | 2 +-
mm/damon/core.c | 77 ++++++++++++++++---
mm/damon/dbgfs.c | 3 +-
mm/damon/lru_sort.c | 2 +
mm/damon/reclaim.c | 2 +
mm/damon/sysfs-schemes.c | 40 ++++++++--
tools/testing/selftests/damon/sysfs.sh | 1 +
11 files changed, 141 insertions(+), 22 deletions(-)
base-commit: abf99d088da21843246382c7a95f21e886193c31
--
2.25.1
Hi Al, Linus,
These patches make some changes to the kunit tests previously added for
iov_iter testing, in particular adding support for testing UBUF/IOVEC
iterators:
(1) Clean up a couple of checkpatch style complaints.
(2) Consolidate some repeated bits of code into helper functions and use
the same struct to represent straight offset/address ranges and
partial page lists.
(3) Add a function to set up a userspace VM, attach the VM to the kunit
testing thread, create an anonymous file, stuff some pages into the
file and map the file into the VM to act as a buffer that can be used
with UBUF/IOVEC iterators.
I map an anonymous file with pages attached rather than using MAP_ANON
so that I can check the pages obtained from iov_iter_extract_pages()
without worrying about them changing due to swap, migrate, etc..
[?] Is this the best way to do things? Mirroring execve, it requires
a number of extra core symbols to be exported. Should this be done in
the core code?
(4) Add tests for copying into and out of UBUF and IOVEC iterators.
(5) Add tests for extracting pages from UBUF and IOVEC iterators.
(6) Add tests to benchmark copying 256MiB to UBUF, IOVEC, KVEC, BVEC and
XARRAY iterators.
[!] Note that this requires 256MiB of memory for UBUF and IOVEC; the
KVEC, BVEC and XARRAY benchmarking maps a single page multiple times.
I might be able to shrink that if I can add the same page multiple
times to the anon file's pagecache. I'm sure this is not recommended,
but I might be able to get away with it for this particular
application.
(7) Add a test to benchmark copying 256MiB through dynamically allocated
256-page bvecs to simulate bio construction.
Example benchmarks output:
iov_kunit_benchmark_ubuf: avg 26899 uS, stddev 142 uS
iov_kunit_benchmark_iovec: avg 26897 uS, stddev 74 uS
iov_kunit_benchmark_kvec: avg 2688 uS, stddev 35 uS
iov_kunit_benchmark_bvec: avg 3139 uS, stddev 21 uS
iov_kunit_benchmark_bvec_split: avg 3379 uS, stddev 15 uS
iov_kunit_benchmark_xarray: avg 3582 uS, stddev 13 uS
I've pushed the patches here also:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?…
David
David Howells (9):
iov_iter: Fix some checkpatch complaints in kunit tests
iov_iter: Consolidate some of the repeated code into helpers
iov_iter: Consolidate the test vector struct in the kunit tests
iov_iter: Consolidate bvec pattern checking
iov_iter: Create a function to prepare userspace VM for UBUF/IOVEC
tests
iov_iter: Add copy kunit tests for ITER_UBUF and ITER_IOVEC
iov_iter: Add extract kunit tests for ITER_UBUF and ITER_IOVEC
iov_iter: Add benchmarking kunit tests
iov_iter: Add benchmarking kunit tests for UBUF/IOVEC
fs/anon_inodes.c | 1 +
kernel/fork.c | 2 +
lib/kunit_iov_iter.c | 1211 +++++++++++++++++++++++++++++++++++-------
mm/mmap.c | 1 +
mm/util.c | 1 +
5 files changed, 1024 insertions(+), 192 deletions(-)