Avoid using /usr/bin/timeout unnecessarily if timeout is set to 0
(disabled) in the "settings" file for a specific test.
NOTE: without this change (and adding timeout=0 in the corresponding
settings file - tools/testing/selftests/seccomp/settings) the
seccomp_bpf selftest is always failing with a timeout event during the
syscall_restart step.
Signed-off-by: Andrea Righi <andrea.righi(a)canonical.com>
---
tools/testing/selftests/kselftest/runner.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh
index e84d901f8567..2cd3c8def0f6 100644
--- a/tools/testing/selftests/kselftest/runner.sh
+++ b/tools/testing/selftests/kselftest/runner.sh
@@ -32,7 +32,7 @@ tap_prefix()
tap_timeout()
{
# Make sure tests will time out if utility is available.
- if [ -x /usr/bin/timeout ] ; then
+ if [ -x /usr/bin/timeout ] && [ $kselftest_timeout -gt 0 ] ; then
/usr/bin/timeout "$kselftest_timeout" "$1"
else
"$1"
--
2.25.1
Fix several sphinx warnings at 'make htmldocs'
- privately declared members not correctly declared as such
- 'suits' actually is not a function parameter, change declaration to fix
warning but keep information in comment
Signed-off-by: Lothar Rubusch <l.rubusch(a)gmail.com>
---
include/kunit/test.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/kunit/test.h b/include/kunit/test.h
index 9b0c46a6ca1f..fe4ea388528b 100644
--- a/include/kunit/test.h
+++ b/include/kunit/test.h
@@ -175,7 +175,7 @@ struct kunit_suite {
void (*exit)(struct kunit *test);
struct kunit_case *test_cases;
- /* private - internal use only */
+ /* private: internal use only. */
struct dentry *debugfs;
char *log;
};
@@ -232,7 +232,7 @@ void __kunit_test_suites_exit(struct kunit_suite **suites);
* kunit_test_suites() - used to register one or more &struct kunit_suite
* with KUnit.
*
- * @suites: a statically allocated list of &struct kunit_suite.
+ * suites - a statically allocated list of &struct kunit_suite.
*
* Registers @suites with the test framework. See &struct kunit_suite for
* more information.
--
2.20.1
From: Tim Bird <tim.bird(a)sony.com>
It is useful for CI systems to be able to query the list
of targets provided by kselftest by default, so that they
can construct their own loop over the targets if desired.
Signed-off-by: Tim Bird <tim.bird(a)sony.com>
---
tools/testing/selftests/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 63430e2..9955e71 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -246,4 +246,7 @@ clean:
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean;\
done;
+show_targets:
+ @echo $(TARGETS)
+
.PHONY: khdr all run_tests hotplug run_hotplug clean_hotplug run_pstore_crash install clean
--
2.1.4
Hello,
I'm running kselftest on Ubuntu 16.04lts.
Details:
deepa@deepa-Inspiron-3576:/usr/src/linux-headers-4.15.0-88/Documentation$
uname -a
Linux deepa-Inspiron-3576 4.15.0-91-generic #92~16.04.1-Ubuntu SMP Fri
Feb 28 14:57:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Command:
deepa@deepa-Inspiron-3576:/usr/src/linux-headers-4.15.0-91-generic$
make -C tools/testing/selftests
Error:
make: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/android'
Makefile:7: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/android'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/bpf'
Makefile:25: ../lib.mk: No such file or directory
/bin/sh: 1: llc: not found
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/bpf'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/breakpoints'
Makefile:15: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/breakpoints'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/capabilities'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/capabilities'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/cpufreq'
Makefile:7: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/cpufreq'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/cpu-hotplug'
Makefile:6: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/cpu-hotplug'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/efivarfs'
Makefile:6: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/efivarfs'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/exec'
Makefile:11: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/exec'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/filesystems'
Makefile:7: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/filesystems'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/firmware'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/firmware'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/ftrace'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/ftrace'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/futex'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/futex'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/gpio'
Makefile:13: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/gpio'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/intel_pstate'
Makefile:11: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/intel_pstate'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/ipc'
Makefile:17: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/ipc'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/kcmp'
Makefile:7: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/kcmp'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/lib'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/lib'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/membarrier'
Makefile:5: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/membarrier'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/memfd'
Makefile:13: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/memfd'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/memory-hotplug'
Makefile:4: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/memory-hotplug'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/mount'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/mount'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/mqueue'
Makefile:6: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/mqueue'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/net'
Makefile:14: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/net'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/netfilter'
Makefile:6: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/netfilter'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/nsfs'
Makefile:5: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/nsfs'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/powerpc'
Makefile:40: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/powerpc'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/pstore'
Makefile:11: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/pstore'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/ptrace'
Makefile:5: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/ptrace'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/seccomp'
Makefile:4: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/seccomp'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/sigaltstack'
Makefile:4: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/sigaltstack'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/size'
Makefile:5: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/size'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/splice'
Makefile:5: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/splice'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/static_keys'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/static_keys'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/sync'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/sync'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/sysctl'
Makefile:9: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/sysctl'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/timers'
Makefile:17: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/timers'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/user'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/user'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/vm'
Makefile:28: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/vm'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/x86'
Makefile:4: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/x86'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/zram'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/zram'
Makefile:73: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests'
Can you please help us fix?
Is there an archive available for linux-kselftest? We could check it
once before posting it to this group.Just to avoid duplicates.
Thanks,
Deepa
On Tue, 7 Apr 2020 at 22:09, Greg Kroah-Hartman
<gregkh(a)linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 5.6.3 release.
> There are 30 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 09 Apr 2020 15:46:32 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.6.3-rc2.…
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.6.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
There are three kernel warnings on stable-rc 5.6 two of them are also
present in Linus's tree.
So these reported issues are not the release blockers.
The Source of these warnings are reported while running kselftests.
1) This warning reported on the mailing list and discussion is active.
Warning reported on x86_64, i386, arm and arm64.
[ 346.741358] kselftest: Running tests in lib
[ 346.872415] test_printf: loaded.
[ 346.876442] BUG: kernel NULL pointer dereference, address: 00000000
[ 346.882703] #PF: supervisor read access in kernel mode
[ 346.887844] #PF: error_code(0x0000) - not-present page
[ 346.892990] *pde = 00000000
[ 346.895877] Oops: 0000 [#1] SMP
[ 346.899025] CPU: 1 PID: 6060 Comm: modprobe Tainted: G W
5.6.3-rc2 #1
[ 346.906772] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS
2.0b 07/27/2017
[ 346.914261] EIP: ida_free+0x61/0x130
ref:
https://lore.kernel.org/linux-kselftest/CAFd5g46Bwd8HS9-xjHLh_rB59Nfw8iAnM6…
2) This warning is reported on the mailing list and waiting for response,
warning reported on i386 kernel image running x86_64 device.
[ 166.488084] ------------[ cut here ]------------
[ 166.492749] WARNING: CPU: 2 PID: 1456 at
/usr/src/kernel/kernel/locking/lockdep.c:1119
lockdep_register_key+0xb0/0xf0
[ 166.503357] Modules linked in: algif_hash af_alg
x86_pkg_temp_thermal fuse [last unloaded: test_bpf]
[ 166.512481] CPU: 2 PID: 1456 Comm: ip Not tainted 5.6.3-rc2 #1
[ 166.518306] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS
2.0b 07/27/2017
[ 166.525776] EIP: lockdep_register_key+0xb0/0xf0
ref:
https://lore.kernel.org/netdev/CA+G9fYt7-R-_fVDeiwj=sVvBQ-456Pm1oFFtM5Hm_94…
3) This warning is only noticed on stable rc 5.6 and 5.5 seen only on arm64.
This needs to be investigated.
[ 386.349099] kselftest: Running tests in ftrace
[ 393.984018]
[ 393.984290] =============================
[ 393.984781] WARNING: suspicious RCU usage
[ 393.988690] 5.6.3-rc2 #1 Not tainted
[ 393.992679] -----------------------------
[ 393.996327] /usr/src/kernel/include/trace/events/ipi.h:36
suspicious rcu_dereference_check() usage!
[ 394.000241]
[ 394.000241] other info that might help us debug this:
[ 394.000241]
[ 394.009094]
[ 394.009094] RCU used illegally from idle CPU!
[ 394.009094] rcu_scheduler_active = 2, debug_locks = 1
[ 394.017084] RCU used illegally from extended quiescent state!
[ 394.028187] 1 lock held by swapper/3/0:
[ 394.033826] #0: ffff80001237b6a8 (max_trace_lock){....}, at:
check_critical_timing+0x7c/0x1a8
ref:
https://lore.kernel.org/linux-kselftest/CA+G9fYtYRc_mKPDN-Gryw7fhjPNGBUP=Ke…
Summary
------------------------------------------------------------------------
kernel: 5.6.3-rc2
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-5.6.y
git commit: f106acd0db7c11e0208a2ecbeb0f7c52fc6c455a
git describe: v5.6.2-31-gf106acd0db7c
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-5.6-oe/build/v5.6.2-31-g…
No regressions (compared to build v5.6.2)
No fixes (compared to build v5.6.2)
Ran 22476 total tests in the following environments and test suites.
Environments
--------------
- dragonboard-410c
- hi6220-hikey
- i386
- juno-r2
- nxp-ls2088
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15
- x86
- x86-kasan
Test Suites
-----------
* build
* install-android-platform-tools-r2600
* install-android-platform-tools-r2800
* kselftest
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* perf
* v4l2-compliance
* ltp-containers-tests
* ltp-mm-tests
* ltp-open-posix-tests
* ltp-syscalls-tests
* network-basic-tests
* spectre-meltdown-checker-test
--
Linaro LKFT
https://lkft.linaro.org
This series introduces a new KVM selftest (mem_slot_test) that goal
is to verify memory slots can be added up to the maximum allowed. An
extra slot is attempted which should occur on error.
The patch 01 is needed so that the VM fd can be accessed from the
test code (for the ioctl call attempting to add an extra slot).
I ran the test successfully on x86_64, aarch64, and s390x. This
is why it is enabled to build on those arches.
- Changelog -
v2 -> v3:
- Keep alphabetical order of .gitignore and Makefile [drjones]
- Use memory region flags equals to zero [drjones]
- Changed mmap() assert from 'mem != NULL' to 'mem != MAP_FAILED' [drjones]
- kvm_region is declared along side other variables and malloc()'ed
later [drjones]
- Combined two asserts into a single 'ret == -1 && errno == EINVAL'
[drjones]
v1 -> v2:
- Rebased to queue
- vm_get_fd() returns int instead of unsigned int (patch 01) [drjones]
- Removed MEM_REG_FLAGS and GUEST_VM_MODE defines [drjones]
- Replaced DEBUG() with pr_info() [drjones]
- Calculate number of guest pages with vm_calc_num_guest_pages()
[drjones]
- Using memory region of 1 MB sized (matches mininum needed
for s390x)
- Removed the increment of guest_addr after the loop [drjones]
- Added assert for the errno when adding a slot beyond-the-limit [drjones]
- Prefer KVM_MEM_READONLY flag but on s390x it switch to KVM_MEM_LOG_DIRTY_PAGES,
so ensure the coverage of both flags. Also somewhat tests the KVM_CAP_READONLY_MEM capability check [drjones]
- Moved the test logic to test_add_max_slots(), this allows to more easily add new cases in the "suite".
v1: https://lore.kernel.org/kvm/20200330204310.21736-1-wainersm@redhat.com
Wainer dos Santos Moschetta (2):
selftests: kvm: Add vm_get_fd() in kvm_util
selftests: kvm: Add mem_slot_test test
tools/testing/selftests/kvm/.gitignore | 1 +
tools/testing/selftests/kvm/Makefile | 3 +
.../testing/selftests/kvm/include/kvm_util.h | 1 +
tools/testing/selftests/kvm/lib/kvm_util.c | 5 ++
tools/testing/selftests/kvm/mem_slot_test.c | 85 +++++++++++++++++++
5 files changed, 95 insertions(+)
create mode 100644 tools/testing/selftests/kvm/mem_slot_test.c
--
2.17.2