Hi Linus,
Please pull the following Kselftest update for Linux 5.11-rc1.
This kselftest update for Linux 5.11-rc1 consists of:
- Much needed gpio test Makefile cleanup to various problems with
test dependencies and build errors from Michael Ellerman
- Enabling vDSO test on non x86 platforms from Vincenzo Frascino
- Fix intel_pstate to replace deprecated ftime() usages with
clock_gettime() from Tommi Rantala
- cgroup test build fix on older releases from Sachin Sant
- A couple of spelling mistake fixes
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 3650b228f83adda7e5ee532e2b90429c03f7b9ec:
Linux 5.10-rc1 (2020-10-25 15:14:11 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
tags/linux-kselftest-next-5.11-rc1
for you to fetch changes up to c2e46f6b3e3551558d44c4dc518b9667cb0d5f8b:
selftests/cgroup: Fix build on older distros (2020-11-10 15:13:25 -0700)
----------------------------------------------------------------
linux-kselftest-next-5.11-rc1
This kselftest update for Linux 5.11-rc1 consists of:
- Much needed gpio test Makefile cleanup to various problems with
test dependencies and build errors from Michael Ellerman
- Enabling vDSO test on non x86 platforms from Vincenzo Frascino
- Fix intel_pstate to replace deprecated ftime() usages with
clock_gettime() from Tommi Rantala
- cgroup test build fix on older releases from Sachin Sant
- A couple of spelling mistake fixes
----------------------------------------------------------------
Hangbin Liu (1):
selftests/run_kselftest.sh: fix dry-run typo
Michael Ellerman (5):
selftests/gpio: Use TEST_GEN_PROGS_EXTENDED
selftests/gpio: Move include of lib.mk up
selftests/gpio: Fix build when source tree is read only
selftests/gpio: Add to CLEAN rule rather than overriding
selftests/memfd: Fix implicit declaration warnings
Sachin Sant (1):
selftests/cgroup: Fix build on older distros
Tommi Rantala (1):
selftests: intel_pstate: ftime() is deprecated
Vincenzo Frascino (5):
kselftest: Enable vDSO test on non x86 platforms
kselftest: Extend vDSO selftest
kselftest: Extend vDSO selftest to clock_getres
kselftest: Move test_vdso to the vDSO test suite
kselftest: Extend vdso correctness test to clock_gettime64
Wang Qing (1):
tool: selftests: fix spelling typo of 'writting'
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/cgroup/cgroup_util.c | 4 +-
tools/testing/selftests/gpio/Makefile | 25 +--
tools/testing/selftests/intel_pstate/aperf.c | 22 +-
tools/testing/selftests/memfd/fuse_test.c | 2 +-
tools/testing/selftests/memfd/memfd_test.c | 2 +-
tools/testing/selftests/run_kselftest.sh | 2 +-
tools/testing/selftests/vDSO/Makefile | 16 +-
tools/testing/selftests/vDSO/vdso_config.h | 92 ++++++++
tools/testing/selftests/vDSO/vdso_test_abi.c | 244
+++++++++++++++++++++
.../selftests/vDSO/vdso_test_clock_getres.c | 124 +++++++++++
.../test_vdso.c => vDSO/vdso_test_correctness.c} | 115 +++++++++-
tools/testing/selftests/vm/userfaultfd.c | 4 +-
tools/testing/selftests/x86/Makefile | 2 +-
14 files changed, 621 insertions(+), 34 deletions(-)
create mode 100644 tools/testing/selftests/vDSO/vdso_config.h
create mode 100644 tools/testing/selftests/vDSO/vdso_test_abi.c
create mode 100644 tools/testing/selftests/vDSO/vdso_test_clock_getres.c
rename tools/testing/selftests/{x86/test_vdso.c =>
vDSO/vdso_test_correctness.c} (73%)
----------------------------------------------------------------
Hi Linus,
Please pull this Kselftest fixes update for Linux 5.11-rc1.
This Kselftest fixes update for Linux 5.11-rc1 consists of build error
fixes for clone3 and rseq tests.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 0477e92881850d44910a7e94fc2c46f96faa131f:
Linux 5.10-rc7 (2020-12-06 14:25:12 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
tags/linux-kselftest-fixes-5.11-rc1
for you to fetch changes up to 88f4ede44c585b24674dd99841040b2a1a856a76:
selftests/clone3: Fix build error (2020-12-07 14:34:55 -0700)
----------------------------------------------------------------
linux-kselftest-fixes-5.11-rc1
This Kselftest fixes update for Linux 5.11-rc1 consists of build error
fixes for clone3 and rseq tests.
----------------------------------------------------------------
Xingxing Su (2):
rseq/selftests: Fix MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ build
error under other arch.
selftests/clone3: Fix build error
tools/testing/selftests/clone3/Makefile | 2 +-
tools/testing/selftests/rseq/param_test.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------
hello,
i have worked on to fix depreciated api issue from
tools/testing/selftests/intel_pstate/aerf.c
i met with the following error related...
--------------x------------------x----------------->
$pwd
/home/jeffrin/UP/linux-kselftest/tools/testing/selftests/intel_pstate
$make
gcc -Wall -D_GNU_SOURCE aperf.c /home/jeffrin/UP/linux-
kselftest/tools/testing/selftests/kselftest_harness.h
/home/jeffrin/UP/linux-kselftest/tools/testing/selftests/kselftest.h -
lm -o /home/jeffrin/UP/linux-
kselftest/tools/testing/selftests/intel_pstate/aperf
aperf.c: In function ‘main’:
aperf.c:58:2: warning: ‘ftime’ is deprecated [-Wdeprecated-
declarations]
58 | ftime(&before);
| ^~~~~
In file included from aperf.c:9:
/usr/include/x86_64-linux-gnu/sys/timeb.h:39:12: note: declared here
39 | extern int ftime (struct timeb *__timebuf)
| ^~~~~
aperf.c:67:2: warning: ‘ftime’ is deprecated [-Wdeprecated-
declarations]
67 | ftime(&after);
| ^~~~~
In file included from aperf.c:9:
/usr/include/x86_64-linux-gnu/sys/timeb.h:39:12: note: declared here
39 | extern int ftime (struct timeb *__timebuf)
| ^~~~~
$
----------------x---------------x---------------------->
from ftime manual i found that it is depreciated...
This function is deprecated, and will be removed in a future version
of the GNU C library. Use clock_gettime(2) instead.
now clock_gettime gives new data structure.
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
};
i worked on with the new data structure and some errors that came
along.
typical final output looks good but values of runtime and typical
frequency
does not look normal during "sudo bash run.sh".
output of "git diff" and a portion of output of "sudo bash run.sh".
is attached.
--
software engineer
rajagiri school of engineering and technology - autonomous
Hi!
This is the second version of the work to make TSC migration more accurate,
as was defined by Paulo at:
https://www.spinics.net/lists/kvm/msg225525.html
I omitted most of the semi-offtopic points I raised related to TSC
in the previous RFC where we can continue the discussion.
I do want to raise another thing that I almost forgot.
On AMD systems, the Linux kernel will mark the guest tsc as
unstable unless invtsc is set which is set on recent AMD
hardware.
Take a look at 'unsynchronized_tsc()' to verify this.
This is another thing that IMHO should be fixed at least when
running under KVM.
Note that I forgot to mention that
X86_FEATURE_TSC_RELIABLE also short-circuits this code,
thus giving another reason to enable it under KVM.
Changes from V1:
- added KVM_TSC_STATE_TIMESTAMP_VALID instead of testing ns == 0
- allow diff < 0, because it is still better that capping it to 0
- updated tsc_msr_test unit test to cover this feature
- refactoring
Patches to enable this feature in qemu are in the process of
being sent to qemu-devel mailing list.
Best regards,
Maxim Levitsky
Maxim Levitsky (3):
KVM: x86: implement KVM_{GET|SET}_TSC_STATE
KVM: x86: introduce KVM_X86_QUIRK_TSC_HOST_ACCESS
kvm/selftests: update tsc_msrs_test to cover
KVM_X86_QUIRK_TSC_HOST_ACCESS
Documentation/virt/kvm/api.rst | 65 +++++++++++++
arch/x86/include/uapi/asm/kvm.h | 1 +
arch/x86/kvm/x86.c | 92 ++++++++++++++++++-
include/uapi/linux/kvm.h | 15 +++
.../selftests/kvm/x86_64/tsc_msrs_test.c | 79 ++++++++++++++--
5 files changed, 237 insertions(+), 15 deletions(-)
--
2.26.2
The cleanup function in this script that tries to delete hv-1 / hv-2
vm-1 / vm-2 netns will generate some uncessary error messages:
Cannot remove namespace file "/run/netns/hv-2": No such file or directory
Cannot remove namespace file "/run/netns/vm-1": No such file or directory
Cannot remove namespace file "/run/netns/vm-2": No such file or directory
Redirect it to /dev/null like other commands in the cleanup function
to reduce confusion.
Signed-off-by: Po-Hsu Lin <po-hsu.lin(a)canonical.com>
---
tools/testing/selftests/net/test_vxlan_under_vrf.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/test_vxlan_under_vrf.sh b/tools/testing/selftests/net/test_vxlan_under_vrf.sh
index 09f9ed9..534c8b7 100755
--- a/tools/testing/selftests/net/test_vxlan_under_vrf.sh
+++ b/tools/testing/selftests/net/test_vxlan_under_vrf.sh
@@ -50,7 +50,7 @@ cleanup() {
ip link del veth-tap 2>/dev/null || true
for ns in hv-1 hv-2 vm-1 vm-2; do
- ip netns del $ns || true
+ ip netns del $ns 2>/dev/null || true
done
}
--
2.7.4
lib.mk defaults to gcc when CC is not set. When building selftests
as part of a kernel compilation, MAKEFLAGS is cleared to allow implicit
build rules to be used. This has the side-effect of clearing the CC
variable, which will cause selftests to be built with gcc regardless of
if we are using gcc or clang. To remedy this, propagate the CC variable
when clearing makeflags to ensure the correct compiler is used.
Signed-off-by: Andrew Delgadillo <adelg(a)google.com>
---
tools/testing/selftests/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index d9c283503159..a4dd6d7e8276 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -90,10 +90,12 @@ FORCE_TARGETS ?=
# Clear LDFLAGS and MAKEFLAGS when implicit rules are missing. This provides
# implicit rules to sub-test Makefiles which avoids build failures in test
-# Makefile that don't have explicit build rules.
+# Makefile that don't have explicit build rules. Since lib.mk defaults to
+# using gcc for compilation when the CC variable is not set, we propagate the
+# CC variable so if clang is being used, selftests will build with clang.
ifeq (,$(LINK.c))
override LDFLAGS =
-override MAKEFLAGS =
+override MAKEFLAGS = CC=$(CC)
endif
# Append kselftest to KBUILD_OUTPUT and O to avoid cluttering
--
2.29.2.576.ga3fc446d84-goog
The cleanup function in this script that tries to delete hv-1 / hv-2
vm-1 / vm-2 netns will generate some uncessary error messages:
Cannot remove namespace file "/run/netns/hv-2": No such file or directory
Cannot remove namespace file "/run/netns/vm-1": No such file or directory
Cannot remove namespace file "/run/netns/vm-2": No such file or directory
Redirect it to /dev/null like other commands in the cleanup function
to reduce confusion.
Signed-off-by: Po-Hsu Lin <po-hsu.lin(a)canonical.com>
---
tools/testing/selftests/net/test_vxlan_under_vrf.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/test_vxlan_under_vrf.sh b/tools/testing/selftests/net/test_vxlan_under_vrf.sh
index 09f9ed9..534c8b7 100755
--- a/tools/testing/selftests/net/test_vxlan_under_vrf.sh
+++ b/tools/testing/selftests/net/test_vxlan_under_vrf.sh
@@ -50,7 +50,7 @@ cleanup() {
ip link del veth-tap 2>/dev/null || true
for ns in hv-1 hv-2 vm-1 vm-2; do
- ip netns del $ns || true
+ ip netns del $ns 2>/dev/null || true
done
}
--
2.7.4