Commit 160c826b4dd0 ("selftest: hid: add missing run-hid-tools-tests.sh")
has added the run-hid-tools-tests.sh script for it to be installed, but
I forgot to add the tests directory together.
In fact, the run-hid-tools-tests.sh script uses the scripts in the tests
directory to run tests. The tests directory also needs to be added to be
installed.
Fixes: ffb85d5c9e80 ("selftests: hid: import hid-tools hid-core tests")
Cc: stable(a)vger.kernel.org
Signed-off-by: Yun Lu <luyun(a)kylinos.cn>
---
tools/testing/selftests/hid/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/hid/Makefile b/tools/testing/selftests/hid/Makefile
index 38ae31bb07b5..662209f5fabc 100644
--- a/tools/testing/selftests/hid/Makefile
+++ b/tools/testing/selftests/hid/Makefile
@@ -18,6 +18,7 @@ TEST_PROGS += hid-usb_crash.sh
TEST_PROGS += hid-wacom.sh
TEST_FILES := run-hid-tools-tests.sh
+TEST_FILES += tests
CXX ?= $(CROSS_COMPILE)g++
--
2.27.0
The previous commit introduced the use of CLONE_NEWTIME without including
<sched.h> which contains its definition.
Add an explicit include of <sched.h> to ensure that CLONE_NEWTIME
is correctly defined before it is used.
Fixes: 2aec90036dcd ("selftests: vDSO: ensure vgetrandom works in a time namespace")
Signed-off-by: Yu Liao <liaoyu15(a)huawei.com>
---
Changes in v2:
- Include <sched.h> instead of <linux/sched.h>
v1: https://lore.kernel.org/all/20240919111841.20226-1-liaoyu15@huawei.com/
tools/testing/selftests/vDSO/vdso_test_getrandom.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
index 72a1d9b43a84..ddf37e3ab18b 100644
--- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
+++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
@@ -11,6 +11,7 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
+#include <sched.h>
#include <signal.h>
#include <sys/auxv.h>
#include <sys/mman.h>
--
2.33.0
Hi Shuah,
I've now read your email several times trying to figure out what you
meant and what your objections are. This series is my best attempt at
trying to satisfy that. But my understanding still has a lot of question
marks, so I may have missed your point here. Nonetheless, maybe this
moves things forward a bit.
Jason
Cc: Shuah Khan <skhan(a)linuxfoundation.org>
Cc: Greg KH <greg(a)kroah.com>
Jason A. Donenfeld (3):
selftests: vDSO: condition chacha build on chacha implementation
selftests: vDSO: unconditionally build getrandom test
selftests: vDSO: improve getrandom and chacha error messages
tools/testing/selftests/vDSO/Makefile | 4 +-
.../testing/selftests/vDSO/vdso_test_chacha.c | 27 ++++---
.../selftests/vDSO/vdso_test_getrandom.c | 75 ++++++++-----------
3 files changed, 52 insertions(+), 54 deletions(-)
--
2.46.0
Changes in v4
- Removed unnecessary forking from selftest.
- Style changes in rstat.c (fallthrough & indents)
- Fixed a selftest bug that raised false negatives, caused by
cputime_adjust sometimes adjusting utime below ntime.
- Reworded cover letter for clarity & motivation
Changes in v3
- Signed-off-by & renamed subject for clarity.
Changes in v2
- Edited commit messages for clarity.
Niced CPU usage is a metric reported in host-level /proc/stat, but is
not currently reported in cgroup-level statistics. Thus, even if one
can observe that a fracion of the host's CPU time is spent on (non-)nice
tasks, the distribution of the CPU usage across cgroups is not readily
available to the user.
This patch introduces cgroup-level niced CPU utilization to cpu.stat.
Exposing this metric will allow users to accurately probe the niced CPU
metric for each workload, and make more informed decisions when
directing higher priority tasks. For instance, service routers will be
able to probe cgroups in the host to determine CPU time spent on niced
processes in each cgroup, and direct more traffic to cgroups with lower
non-nice CPU utilization.
Signed-off-by Joshua Hahn <joshua.hahnjy(a)gmail.com>
Joshua Hahn (2):
Tracking cgroup-level niced CPU time
Selftests for niced CPU statistics
include/linux/cgroup-defs.h | 1 +
kernel/cgroup/rstat.c | 19 ++++--
tools/testing/selftests/cgroup/test_cpu.c | 75 +++++++++++++++++++++++
3 files changed, 90 insertions(+), 5 deletions(-)
--
2.43.5
Including the network_helpers.h header in tests can lead to the following
build error:
./network_helpers.h: In function ‘csum_tcpudp_magic’:
./network_helpers.h:116:14: error: implicit declaration of function \
‘htons’ [-Werror=implicit-function-declaration]
116 | s += htons(proto + len);
The error is avoided in many cases thanks to some other headers included
earlier and bringing in arpa/inet.h (ie: test_progs.h).
Make sure that test_progs build success does not depend on header ordering
by adding the missing header include in network_helpers.h
Fixes: f6642de0c3e9 ("selftests/bpf: Add csum helpers")
Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore(a)bootlin.com>
---
tools/testing/selftests/bpf/network_helpers.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/bpf/network_helpers.h b/tools/testing/selftests/bpf/network_helpers.h
index c72c16e1aff825439896b38e59962ffafe92dc71..5764155b6d25188ed38e828e1e4a8a08f8a83934 100644
--- a/tools/testing/selftests/bpf/network_helpers.h
+++ b/tools/testing/selftests/bpf/network_helpers.h
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __NETWORK_HELPERS_H
#define __NETWORK_HELPERS_H
+#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <linux/types.h>
---
base-commit: 67a7c7b656cfc10a7280f71641fb9e88726e8a5d
change-id: 20241008-network_helpers_fix-bbb7d1589930
Best regards,
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com