On 05/18/2018 01:17 AM, Prashant Bhole wrote:
> This series fixes bugs in test_sockmap code. They weren't caught
> previously because failure in RX/TX thread was not notified to the
> main thread.
>
> Also fixed data verification logic and slightly improved test output
> such that parameters values (cork, apply, start, end) of failed test
> can be easily seen.
>
> Note: Even after fixing above problems there are issues with tests
> which set cork parameter. Tests fail (RX thread timeout) when cork
> value is non-zero and overall data sent by TX thread isn't multiples
> of cork value.
>
> Prashant Bhole (5):
> selftests/bpf: test_sockmap, check test failure
> selftests/bpf: test_sockmap, join cgroup in selftest mode
> selftests/bpf: test_sockmap, fix test timeout
> selftests/bpf: test_sockmap, fix data verification
> selftests/bpf: test_sockmap, print additional test options
>
> tools/testing/selftests/bpf/test_sockmap.c | 76 +++++++++++++++++++++++-------
> 1 file changed, 58 insertions(+), 18 deletions(-)
>
Please remember to cc linux-kselftest mailing list as well. I would like to see
all the test patches cc'ed to it. Linaro and other test users watch the kselftest
mailing list. I also have patchwork project now to manage the patch volume.
I am okay with patches going through net/bpf trees - there are always test
dependencies on net/bpf trees.
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
When running bpf's selftest test_xdp_meta.sh it fails:
./test_xdp_meta.sh
Error: Specified qdisc not found.
selftests: test_xdp_meta [FAILED]
Need to enable CONFIG_NET_SCH_INGRESS and CONFIG_NET_CLS_ACT to get the
test to pass.
Fixes: 22c8852624fc ("bpf: improve selftests and add tests for meta pointer")
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
tools/testing/selftests/bpf/config | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
index 983dd25d49f4..1eefe211a4a8 100644
--- a/tools/testing/selftests/bpf/config
+++ b/tools/testing/selftests/bpf/config
@@ -5,3 +5,5 @@ CONFIG_BPF_EVENTS=y
CONFIG_TEST_BPF=m
CONFIG_CGROUP_BPF=y
CONFIG_NETDEVSIM=m
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_SCH_INGRESS=y
--
2.17.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
SEGV_PKUERR and SEGV_BNDERR are defined since glibc-2.27
fix the following issue:
-------------------
root@vm-lkp-nex04-4G-5 /usr/src/linux-selftests-x86_64-rhel-7.2-75bc37fefc4471e718ba8e651aa74673d4e0a9eb/tools/testing/selftests/x86# make
gcc -m32 -o /usr/src/linux-selftests-x86_64-rhel-7.2-75bc37fefc4471e718ba8e651aa74673d4e0a9eb/tools/testing/selftests/x86/protection_keys_32 -O2 -g -std=gnu99 -pthread -Wall -no-pie -DCAN_BUILD_32 -DCAN_BUILD_64 protection_keys.c -lrt -ldl -lm
gcc -m64 -o /usr/src/linux-selftests-x86_64-rhel-7.2-75bc37fefc4471e718ba8e651aa74673d4e0a9eb/tools/testing/selftests/x86/protection_keys_64 -O2 -g -std=gnu99 -pthread -Wall -no-pie -DCAN_BUILD_32 -DCAN_BUILD_64 protection_keys.c -lrt -ldl
protection_keys.c:228:0: warning: "SEGV_BNDERR" redefined
#define SEGV_BNDERR 3 /* failed address bound checks */
^
In file included from /usr/include/signal.h:58:0,
from protection_keys.c:33:
/usr/include/bits/siginfo-consts.h:117:0: note: this is the location of the previous definition
# define SEGV_BNDERR SEGV_BNDERR
^
protection_keys.c:229:0: warning: "SEGV_PKUERR" redefined
#define SEGV_PKUERR 4
^
In file included from /usr/include/signal.h:58:0,
from protection_keys.c:33:
/usr/include/bits/siginfo-consts.h:119:0: note: this is the location of the previous definition
# define SEGV_PKUERR SEGV_PKUERR
^
protection_keys.c:228:0: warning: "SEGV_BNDERR" redefined
#define SEGV_BNDERR 3 /* failed address bound checks */
^
In file included from /usr/include/signal.h:58:0,
from protection_keys.c:33:
/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h:117:0: note: this is the location of the previous definition
# define SEGV_BNDERR SEGV_BNDERR
^
protection_keys.c:229:0: warning: "SEGV_PKUERR" redefined
#define SEGV_PKUERR 4
^
In file included from /usr/include/signal.h:58:0,
from protection_keys.c:33:
/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h:119:0: note: this is the location of the previous definition
# define SEGV_PKUERR SEGV_PKUERR
^
-------------------
Signed-off-by: Li Zhijian <lizhijian(a)cn.fujitsu.com>
---
tools/testing/selftests/x86/protection_keys.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/x86/protection_keys.c b/tools/testing/selftests/x86/protection_keys.c
index f15aa5a..757bb16 100644
--- a/tools/testing/selftests/x86/protection_keys.c
+++ b/tools/testing/selftests/x86/protection_keys.c
@@ -225,8 +225,12 @@ void dump_mem(void *dumpme, int len_bytes)
}
}
-#define SEGV_BNDERR 3 /* failed address bound checks */
-#define SEGV_PKUERR 4
+#ifndef SEGV_BNDERR
+# define SEGV_BNDERR 3 /* failed address bound checks */
+#endif
+#ifndef SEGV_PKUERR
+# define SEGV_PKUERR 4
+#endif
static char *si_code_str(int si_code)
{
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
kselftest net pmtu.sh skipped due to missing dependencies ?
This is an open issues on all devices running linux-mainline and linux-next.
[ 105.064609] test_bpf: test_skb_segment: success in skb_segment!
[ 105.648758] IPv6: ADDRCONF(NETDEV_UP): veth_a: link is not ready
[ 105.692738] IPv6: ADDRCONF(NETDEV_UP): veth_b: link is not ready
[ 105.698774] IPv6: ADDRCONF(NETDEV_CHANGE): veth_b: link becomes ready
[ 105.705256] IPv6: ADDRCONF(NETDEV_CHANGE): veth_a: link becomes ready
RTNETLINK answers: Operation not supported
vti6 not supported
TEST: vti6: PMTU exceptions [SKIP]
[ 106.248522] IPv6: ADDRCONF(NETDEV_UP): veth_a: link is not ready
[ 106.296914] IPv6: ADDRCONF(NETDEV_CHANGE): veth_a: link becomes ready
RTNETLINK answers: Operation not supported
vti4 not supported
TEST: vti4: PMTU exceptions [SKIP]
[ 106.812715] IPv6: ADDRCONF(NETDEV_UP): veth_a: link is not ready
[ 106.890709] IPv6: ADDRCONF(NETDEV_CHANGE): veth_a: link becomes ready
RTNETLINK answers: Operation not supported
vti4 not supported
TEST: vti4: default MTU assignment [SKIP]
[ 107.393724] IPv6: ADDRCONF(NETDEV_UP): veth_a: link is not ready
[ 107.453358] IPv6: ADDRCONF(NETDEV_UP): veth_b: link is not ready
[ 107.459380] IPv6: ADDRCONF(NETDEV_CHANGE): veth_b: link becomes ready
[ 107.465852] IPv6: ADDRCONF(NETDEV_CHANGE): veth_a: link becomes ready
RTNETLINK answers: Operation not supported
vti6 not supported
TEST: vti6: default MTU assignment [SKIP]
RTNETLINK answers: Operation not supported
TEST: vti4: MTU setting on link creation [SKIP]
vti not supported
RTNETLINK answers: Operation not supported
TEST: vti6: MTU setting on link creation [SKIP]
vti6 not supported
RTNETLINK answers: Operation not supported
TEST: vti6: MTU changes on link changes [SKIP]
dummy not supported
selftests: pmtu.sh [PASS]
The current config is,
http://snapshots.linaro.org/openembedded/lkft/morty/intel-core2-32/rpb/\
linux-mainline/852/config
For more details please refer this log,
https://lkft.validation.linaro.org/scheduler/job/212320#L3395
Best regards
Naresh Kamboju
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello Roman Gushchin,
The patch a62213fe9b77: "selftests: cgroup: add memory controller
self-tests" from May 11, 2018, leads to the following static checker
warning:
./tools/testing/selftests/cgroup/cgroup_util.c:62 cg_name()
warn: variable dereferenced before check 'name' (see line 59)
./tools/testing/selftests/cgroup/cgroup_util.c
57 char *cg_name(const char *root, const char *name)
58 {
59 size_t len = strlen(root) + strlen(name) + 2;
^^^^^^^^^^^^
60 char *ret = malloc(len);
61
62 if (name)
^^^^
63 snprintf(ret, len, "%s/%s", root, name);
64
65 return ret;
66 }
67
68 char *cg_name_indexed(const char *root, const char *name, int index)
69 {
70 size_t len = strlen(root) + strlen(name) + 10;
^^^^^^^^^^^^
71 char *ret = malloc(len);
72
73 if (name)
^^^^
74 snprintf(ret, len, "%s/%s_%d", root, name, index);
75
76 return ret;
77 }
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 05/14/2018 04:01 PM, Jeffrin Jose T wrote:
> Fix for aperf.c to produce the path of the file which is in mention
> during error report.CONFIG_X86_MSR=m support requirement is also mentioned.
>
> Signed-off-by: Jeffrin Jose T <jeffrin(a)rajagiritech.edu.in>
> ---
> tools/testing/selftests/intel_pstate/aperf.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/intel_pstate/aperf.c b/tools/testing/selftests/intel_pstate/aperf.c
> index d21edea9c560..da98c1673f08 100644
> --- a/tools/testing/selftests/intel_pstate/aperf.c
> +++ b/tools/testing/selftests/intel_pstate/aperf.c
> @@ -41,7 +41,9 @@ int main(int argc, char **argv) {
> fd = open(msr_file_name, O_RDONLY);
>
> if (fd == -1) {
> - perror("Failed to open")> + printf("Failed to open /dev/cpu/%d/msr:", cpu);
Why are you deleting perror() and add a printf() for the error message perror()
printf()?
Why not collapse these messages into one and use strerror() to include the
error string?
> + printf(" No such file or directory:")
Not necessarily. open(0 could fail due to insufficient permissions. That is why
using strerror() or perror() is the correct way so the real error message gets
printed.
> + printf(" Make sure CONFIG_X86_MSR=m support is Enabled\n");
Might not be the real reason why the opeN() failed.
> return 1;
> }
The return should be KSFT_SKIP instead of 1
>
>
thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
A new patchwork project is created to track kselftest patches. Update
the kselftest entry in the MAINTAINERS file adding Q: entry:
https://patchwork.kernel.org/project/linux-kselftest/list/
Signed-off-by: Shuah Khan (Samsung OSG) <shuah(a)kernel.org>
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 58b9861ccf99..ab577593d80a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7698,6 +7698,7 @@ KERNEL SELFTEST FRAMEWORK
M: Shuah Khan <shuah(a)kernel.org>
L: linux-kselftest(a)vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git
+Q: https://patchwork.kernel.org/project/linux-kselftest/list/
S: Maintained
F: tools/testing/selftests/
F: Documentation/dev-tools/kselftest*
--
2.14.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html