Hello.
I'm just flushing the patches to make memcontrol selftests check the
events behavior we had consensus about (test_memcg_low fails).
(test_memcg_reclaim, test_memcg_swap_max fail for me now but it's present
even before the refactoring.)
The two bigger changes are:
- adjustment of the protected values to make tests succeed with the given
tolerance,
- both test_memcg_low and test_memcg_min check protection of memory in
populated cgroups (actually as per Documentation/admin-guide/cgroup-v2.rst
memory.min should not apply to empty cgroups, which is not the case
currently. Therefore I unified tests with the populated case in order to to
bring more broken tests).
Thanks,
Michal
Changes from v2 (https://lore.kernel.org/r/20220518161859.21565-2-mkoutny@suse.com/)
- rebased on mm-stable 02e34fff195d3a5f67cbb553795dc109a37d1dcf
- collected acked-bys
- proper Fixes: tag
Changes from v1 (https://lore.kernel.org/r/20220513171811.730-1-mkoutny@suse.com/)
- fixed mis-rebase in compilation fix patch,
- added review, ack tags from v1,
- applied feedback from v1 (Octave script in git tree),
- added one more patch extracting common parts,
- rebased on mm-stable bbe832b9db2e.
Michal Koutný (5):
selftests: memcg: Fix compilation
selftests: memcg: Expect no low events in unprotected sibling
selftests: memcg: Adjust expected reclaim values of protected cgroups
selftests: memcg: Remove protection from top level memcg
selftests: memcg: Factor out common parts of memory.{low,min} tests
MAINTAINERS | 1 +
.../selftests/cgroup/memcg_protection.m | 89 +++++++
.../selftests/cgroup/test_memcontrol.c | 247 +++++-------------
3 files changed, 152 insertions(+), 185 deletions(-)
create mode 100644 tools/testing/selftests/cgroup/memcg_protection.m
--
2.35.3
From: luyun <luyun(a)kylinos.cn>
The psock_snd test sends and recievs packets over loopback, but the
parameter lo.accept_local is disabled by default, this test will
fail with Resource temporarily unavailable:
sudo ./psock_snd.sh
dgram
tx: 128
rx: 142
./psock_snd: recv: Resource temporarily unavailable
So enable the parameter lo.accept_local in psock_snd test.
Signed-off-by: luyun <luyun(a)kylinos.cn>
Reviewed-by: Jackie Liu <liuyun01(a)kylinos.cn>
---
tools/testing/selftests/net/psock_snd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/net/psock_snd.c b/tools/testing/selftests/net/psock_snd.c
index 7d15e10a9fb6..edf1e6f80d41 100644
--- a/tools/testing/selftests/net/psock_snd.c
+++ b/tools/testing/selftests/net/psock_snd.c
@@ -389,6 +389,8 @@ int main(int argc, char **argv)
error(1, errno, "ip link set mtu");
if (system("ip addr add dev lo 172.17.0.1/24"))
error(1, errno, "ip addr add");
+ if (system("sysctl -w net.ipv4.conf.lo.accept_local=1"))
+ error(1, errno, "sysctl lo.accept_local");
run_test();
--
2.25.1
No virus found
Checked by Hillstone Network AntiVirus
Currently the damon selftests are not built with the rest of the
selftests. We add damon to the list of targets.
Fixes: b348eb7abd09 ("mm/damon: add user space selftests")
Reviewed-by: SeongJae Park <sj(a)kernel.org>
Signed-off-by: Yuanchu Xie <yuanchu(a)google.com>
---
tools/testing/selftests/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index d08fe4cfe811..ffe453760a12 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -9,6 +9,7 @@ TARGETS += clone3
TARGETS += core
TARGETS += cpufreq
TARGETS += cpu-hotplug
+TARGETS += damon
TARGETS += drivers/dma-buf
TARGETS += efivarfs
TARGETS += exec
--
2.35.1.265.g69c8d7142f-goog
Hi Linus,
Please pull these seccomp updates for v5.19-rc1.
Thanks!
-Kees
The following changes since commit 2bfed7d2ffa5d86c462d3e2067f2832eaf8c04c7:
selftests/seccomp: Don't call read() on TTY from background pgrp (2022-04-29 11:28:41 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/seccomp-v5.19-rc1
for you to fetch changes up to 5e91d2a4146946ea0abc984ca957f12b70632901:
selftests/seccomp: Fix spelling mistake "Coud" -> "Could" (2022-05-04 13:31:21 -0700)
----------------------------------------------------------------
seccomp updates for v5.19-rc1
- Rework USER_NOTIF notification ordering and kill logic (Sargun Dhillon)
- Improved PTRACE_O_SUSPEND_SECCOMP selftest (Jann Horn)
- Gracefully handle failed unshare() in selftests (Yang Guang)
- Spelling fix (Colin Ian King)
----------------------------------------------------------------
Colin Ian King (1):
selftests/seccomp: Fix spelling mistake "Coud" -> "Could"
Jann Horn (1):
selftests/seccomp: Test PTRACE_O_SUSPEND_SECCOMP without CAP_SYS_ADMIN
Sargun Dhillon (5):
seccomp: Use FIFO semantics to order notifications
selftests/seccomp: Ensure that notifications come in FIFO order
seccomp: Add wait_killable semantic to seccomp user notifier
selftests/seccomp: Refactor get_proc_stat to split out file reading code
selftests/seccomp: Add test for wait killable notifier
Yang Guang (1):
selftests/seccomp: Add SKIP for failed unshare()
Documentation/userspace-api/seccomp_filter.rst | 10 +
include/linux/seccomp.h | 3 +-
include/uapi/linux/seccomp.h | 2 +
kernel/seccomp.c | 44 ++-
tools/testing/selftests/seccomp/Makefile | 1 +
tools/testing/selftests/seccomp/seccomp_bpf.c | 427 ++++++++++++++++++++++++-
6 files changed, 482 insertions(+), 5 deletions(-)
--
Kees Cook
Hello,
This series add support for the renameat2 system call RENAME_EXCHANGE flag
(which allows to atomically replace two paths) to the vfat filesystem code.
There are many use cases for this, but we are particularly interested in
making possible for vfat filesystems to be part of OSTree [0] deployments.
Currently OSTree relies on symbolic links to make the deployment updates
an atomic transactional operation. But RENAME_EXCHANGE could be used [1]
to achieve a similar level of robustness when using a vfat filesystem.
Patch #1 is just a preparatory patch to introduce the RENAME_EXCHANGE
support in patch #2 and finally patch #3 adds some kselftests to test it.
This is a v2 that addresses issues pointed out in the first version that
was posted as an RFC:
https://lore.kernel.org/lkml/20220519092343.2776414-1-javierm@redhat.com/
[0]: https://github.com/ostreedev/ostree
[1]: https://github.com/ostreedev/ostree/issues/1649
Changes in v2:
- Only update the new_dir inode version and timestamps if != old_dir
(Alex Larsson).
- Add some helper functions to avoid duplicating code (OGAWA Hirofumi).
- Use braces for multi-lines blocks even if are one statement (OGAWA Hirofumi).
- Mention in commit message that the operation is as transactional as possible
but within the vfat limitations of not having a journal (Colin Walters).
- Call sync to flush the page cache before checking the file contents
(Alex Larsson).
- Drop RFC prefix since the patches already got some review.
Javier Martinez Canillas (3):
fat: add a vfat_rename2() and make existing .rename callback a helper
fat: add renameat2 RENAME_EXCHANGE flag support
selftests/filesystems: add a vfat RENAME_EXCHANGE test
MAINTAINERS | 1 +
fs/fat/namei_vfat.c | 193 +++++++++++++++++-
tools/testing/selftests/Makefile | 1 +
.../selftests/filesystems/fat/Makefile | 7 +
.../testing/selftests/filesystems/fat/config | 2 +
.../filesystems/fat/rename_exchange.c | 37 ++++
.../filesystems/fat/run_fat_tests.sh | 82 ++++++++
7 files changed, 316 insertions(+), 7 deletions(-)
create mode 100644 tools/testing/selftests/filesystems/fat/Makefile
create mode 100644 tools/testing/selftests/filesystems/fat/config
create mode 100644 tools/testing/selftests/filesystems/fat/rename_exchange.c
create mode 100755 tools/testing/selftests/filesystems/fat/run_fat_tests.sh
--
2.36.1
There are a few spelling mistakes in error messages. Fix them.
Signed-off-by: Colin Ian King <colin.i.king(a)gmail.com>
---
tools/testing/selftests/powerpc/security/spectre_v2.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/powerpc/security/spectre_v2.c b/tools/testing/selftests/powerpc/security/spectre_v2.c
index d42ca8c676c3..e832605442bb 100644
--- a/tools/testing/selftests/powerpc/security/spectre_v2.c
+++ b/tools/testing/selftests/powerpc/security/spectre_v2.c
@@ -183,7 +183,7 @@ int spectre_v2_test(void)
// These should all not affect userspace branch prediction
if (miss_percent > 15) {
printf("Branch misses > 15%% unexpected in this configuration!\n");
- printf("Possible mis-match between reported & actual mitigation\n");
+ printf("Possible mismatch between reported & actual mitigation\n");
/*
* Such a mismatch may be caused by a guest system
* reporting as vulnerable when the host is mitigated.
@@ -201,14 +201,14 @@ int spectre_v2_test(void)
// This seems to affect userspace branch prediction a bit?
if (miss_percent > 25) {
printf("Branch misses > 25%% unexpected in this configuration!\n");
- printf("Possible mis-match between reported & actual mitigation\n");
+ printf("Possible mismatch between reported & actual mitigation\n");
return 1;
}
break;
case COUNT_CACHE_DISABLED:
if (miss_percent < 95) {
printf("Branch misses < 20%% unexpected in this configuration!\n");
- printf("Possible mis-match between reported & actual mitigation\n");
+ printf("Possible mismatch between reported & actual mitigation\n");
return 1;
}
break;
--
2.35.1