Update .gitignore with new test.
Signed-off-by: Shuah Khan <shuahkh(a)osg.samsung.com>
---
tools/testing/selftests/vm/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/vm/.gitignore b/tools/testing/selftests/vm/.gitignore
index 63c94d776e89..342c7bc9dc8c 100644
--- a/tools/testing/selftests/vm/.gitignore
+++ b/tools/testing/selftests/vm/.gitignore
@@ -11,3 +11,4 @@ mlock-intersect-test
mlock-random-test
virtual_address_range
gup_benchmark
+va_128TBswitch
--
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
The 5lvl.c test file was incorporated into another one in
selftests/vm (va_128TBswitch.c) in commit 235266b8.
Signed-off-by: Daniel Díaz <daniel.diaz(a)linaro.org>
---
tools/testing/selftests/x86/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
index 10ca46d..ce2615a 100644
--- a/tools/testing/selftests/x86/Makefile
+++ b/tools/testing/selftests/x86/Makefile
@@ -11,7 +11,7 @@ TARGETS_C_BOTHBITS := single_step_syscall sysret_ss_attrs syscall_nt ptrace_sysc
TARGETS_C_32BIT_ONLY := entry_from_vm86 syscall_arg_fault test_syscall_vdso unwind_vdso \
test_FCMOV test_FCOMI test_FISTTP \
vdso_restorer
-TARGETS_C_64BIT_ONLY := fsgsbase sysret_rip 5lvl
+TARGETS_C_64BIT_ONLY := fsgsbase sysret_rip
TARGETS_C_32BIT_ALL := $(TARGETS_C_BOTHBITS) $(TARGETS_C_32BIT_ONLY)
TARGETS_C_64BIT_ALL := $(TARGETS_C_BOTHBITS) $(TARGETS_C_64BIT_ONLY)
--
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
The Makefile lacks a couple of line continuation backslashes
in an `if' clause, which can make the subsequent rsync
command go awry over the whole filesystem (`rsync -a / /`).
/bin/sh: -c: line 5: syntax error: unexpected end of file
make[1]: [all] Error 1 (ignored)
TEST=$DIR"_test.sh"; \
if [ -e $DIR/$TEST ]; then
/bin/sh: -c: line 2: syntax error: unexpected end of file
make[1]: [all] Error 1 (ignored)
rsync -a $DIR/$TEST $BUILD_TARGET/;
[...a myriad of:]
[ rsync: readlink_stat("...") failed: Permission denied (13)]
[ skipping non-regular file "..."]
[ rsync: opendir "..." failed: Permission denied (13)]
[and many other errors...]
fi
make[1]: fi: Command not found
make[1]: [all] Error 127 (ignored)
done
make[1]: done: Command not found
make[1]: [all] Error 127 (ignored)
Signed-off-by: Daniel Díaz <daniel.diaz(a)linaro.org>
---
tools/testing/selftests/android/Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/android/Makefile b/tools/testing/selftests/android/Makefile
index 1a74922..f6304d2 100644
--- a/tools/testing/selftests/android/Makefile
+++ b/tools/testing/selftests/android/Makefile
@@ -11,11 +11,11 @@ all:
BUILD_TARGET=$(OUTPUT)/$$DIR; \
mkdir $$BUILD_TARGET -p; \
make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
- #SUBDIR test prog name should be in the form: SUBDIR_test.sh
+ #SUBDIR test prog name should be in the form: SUBDIR_test.sh \
TEST=$$DIR"_test.sh"; \
- if [ -e $$DIR/$$TEST ]; then
- rsync -a $$DIR/$$TEST $$BUILD_TARGET/;
- fi
+ if [ -e $$DIR/$$TEST ]; then \
+ rsync -a $$DIR/$$TEST $$BUILD_TARGET/; \
+ fi \
done
override define RUN_TESTS
--
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
From: Anders Roxell <anders.roxell(a)linaro.org>
Based on patch: https://patchwork.kernel.org/patch/10042045/
arch64-linux-gnu-gcc -c sync.c -o sync/sync.o
sync.c:42:29: fatal error: linux/sync_file.h: No such file or directory
#include <linux/sync_file.h>
^
CFLAGS is not used during the compile step, so the system instead of
kernel headers are used. Fix this by adding CFLAGS to the OBJS compile
rule.
Reported-by: Lei Yang <Lei.Yang(a)windriver.com>
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
Signed-off-by: Daniel Díaz <daniel.diaz(a)linaro.org>
---
tools/testing/selftests/sync/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/sync/Makefile b/tools/testing/selftests/sync/Makefile
index b3c8ba3..d0121a8 100644
--- a/tools/testing/selftests/sync/Makefile
+++ b/tools/testing/selftests/sync/Makefile
@@ -30,7 +30,7 @@ $(TEST_CUSTOM_PROGS): $(TESTS) $(OBJS)
$(CC) -o $(TEST_CUSTOM_PROGS) $(OBJS) $(TESTS) $(CFLAGS) $(LDFLAGS)
$(OBJS): $(OUTPUT)/%.o: %.c
- $(CC) -c $^ -o $@
+ $(CC) -c $^ -o $@ $(CFLAGS)
$(TESTS): $(OUTPUT)/%.o: %.c
$(CC) -c $^ -o $@
--
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
From: Anders Roxell <anders.roxell(a)linaro.org>
While testing memfd tests, there is a missing script, as reported by
kselftest:
./run_tests.sh: line 7: ./run_fuse_test.sh: No such file or directory
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
Signed-off-by: Daniel Díaz <daniel.diaz(a)linaro.org>
---
tools/testing/selftests/memfd/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile
index a5276a9..0862e6f 100644
--- a/tools/testing/selftests/memfd/Makefile
+++ b/tools/testing/selftests/memfd/Makefile
@@ -5,6 +5,7 @@ CFLAGS += -I../../../../include/
CFLAGS += -I../../../../usr/include/
TEST_PROGS := run_tests.sh
+TEST_FILES := run_fuse_test.sh
TEST_GEN_FILES := memfd_test fuse_mnt fuse_test
fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags)
--
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
From: Anders Roxell <anders.roxell(a)linaro.org>
The memfd test requires to insert the fuse module (CONFIG_FUSE_FS).
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
Signed-off-by: Daniel Díaz <daniel.diaz(a)linaro.org>
---
tools/testing/selftests/memfd/config | 1 +
1 file changed, 1 insertion(+)
create mode 100644 tools/testing/selftests/memfd/config
diff --git a/tools/testing/selftests/memfd/config b/tools/testing/selftests/memfd/config
new file mode 100644
index 0000000..835c7f4
--- /dev/null
+++ b/tools/testing/selftests/memfd/config
@@ -0,0 +1 @@
+CONFIG_FUSE_FS=m
--
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
On systems with CONFIG_IA32_EMULATION disabled and vsyscall disabled, a
couple of selftests fail spectacularly.
Also throw in a fix for the Makefile, which still wants to build the moved
5lvl test.
Dominik Brodowski (5):
selftests/x86: 5lvl test has been moved
selftests/x86: fix vDSO selftest segfault for vsyscall=none
selftests/x86: do not rely on int $0x80 in test_mremap_vdso.c
selftests/x86: do not rely on int $0x80 in single_step_syscall.c
selftests/x86: disable tests requiring 32bit support on pure 64bit
systems
tools/testing/selftests/x86/Makefile | 24 +++++++----
tools/testing/selftests/x86/single_step_syscall.c | 5 ++-
tools/testing/selftests/x86/test_mremap_vdso.c | 4 ++
tools/testing/selftests/x86/test_vdso.c | 50 +++++++++++++++++++----
4 files changed, 67 insertions(+), 16 deletions(-)
--
2.16.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
Hi
kselftests is integrated Intel 0Day project.
Sometimes we found compaction_test is blocked for more than 1 hours until i kill it.
Try to figure out where it is running, i added some log to this case.
the test log is like:
-------------------
[ 111.750543] main: 248
[ 111.750544]-
[ 111.750821] check_compaction: 98
[ 111.750822]-
[ 111.751102] check_compaction: 105
[ 111.751103]-
[ 111.751362] check_compaction: 111
[ 111.751363]-
[ 111.751621] check_compaction: 118
[ 111.751622]-
[ 111.751879] check_compaction: 123
[ 111.751880]-
-------------------
118 fprintf(stderr, "%s: %d\n", __func__, __LINE__);
119 lseek(fd, 0, SEEK_SET);
120
121 /* Request a large number of huge pages. The Kernel will allocate
122 as much as it can */
123 fprintf(stderr, "%s: %d\n", __func__, __LINE__); <<<======== the last line we can catch.
124 if (write(fd, "100000", (6*sizeof(char))) != (6*sizeof(char))) { <<<<============ blocking position
125 perror("Failed to write 100000 to /proc/sys/vm/nr_hugepages\n");
126 goto close_fd;
127 }
128
129 lseek(fd, 0, SEEK_SET);
130
131 fprintf(stderr, "%s: %d\n", __func__, __LINE__);
132 if (read(fd, nr_hugepages, sizeof(nr_hugepages)) <= 0) {
133 perror("Failed to re-read from /proc/sys/vm/nr_hugepages\n");
134 goto close_fd;
135 }
-------------------
According to above log and code, it most likely it is blocking at the writing operation.
my environment is like:
OS: debian
kernel: v4.15
model: Ivytown Ivy Bridge-EP
nr_cpu: 48
memory: 64G
NOTE: 0Day can reproduce this issue in 20% on 0Day.
Anybody can help have a look?
Thanks
Zhjian
--
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 02/09/2018 06:14 AM, Li Zhijian wrote:
> Hi
>
> INTEL 0-Day noticed that bpf/test_maps has different results at different platforms.
> when it fails, the details are like
Sorry for the late reply and thanks for reporting! More below:
> ------------------
> 880 Failed to create hashmap key=16 value=131072 'Cannot allocate memory'
> 881 Failed to create hashmap key=8 value=32768 'Cannot allocate memory'
> 882 Failed to create hashmap key=8 value=131072 'Cannot allocate memory'
> 883 Failed to create hashmap key=16 value=32768 'Cannot allocate memory'
> 884 Failed to create hashmap key=8 value=16384 'Cannot allocate memory'
> 885 Failed to create hashmap key=16 value=16384 'Cannot allocate memory'
> 886 Failed to create hashmap key=8 value=65536 'Cannot allocate memory'
> 887 Failed to create hashmap key=16 value=131072 'Cannot allocate memory'
> 888 Failed to create hashmap key=16 value=32768 'Cannot allocate memory'
> 889 Failed to create hashmap key=16 value=65536 'Cannot allocate memory'
> 890 Failed to create hashmap key=8 value=65536 'Cannot allocate memory'
> 891 Failed to create hashmap key=8 value=131072 'Cannot allocate memory'
> 892 Failed to create hashmap key=8 value=131072 'Cannot allocate memory'
> 893 Failed to create hashmap key=16 value=32768 'Cannot allocate memory'
> 894 Failed to create hashmap key=8 value=16384 'Cannot allocate memory'
> 895 Failed to create hashmap key=8 value=131072 'Cannot allocate memory'
> 896 Failed to create hashmap key=16 value=8192 'Cannot allocate memory'
> 897 Failed to create hashmap key=8 value=32768 'Cannot allocate memory'
> 898 Failed to create hashmap key=16 value=8192 'Cannot allocate memory'
> 899 Failed to create hashmap key=8 value=262144 'Cannot allocate memory'
> 900 Failed to create hashmap key=8 value=262144 'Cannot allocate memory'
> 901 Failed to create hashmap key=8 value=262144 'Cannot allocate memory'
> 902 Failed to create hashmap key=16 value=262144 'Cannot allocate memory'
> 903 Failed to create hashmap key=8 value=262144 'Cannot allocate memory'
> 904 Failed to create hashmap key=8 value=262144 'Cannot allocate memory'
> 905 test_maps: test_maps.c:955: run_parallel: Assertion `status == 0' failed.
> 906 Aborted
> 907 not ok 1..3 selftests: test_maps [FAIL]
> ------------------
>
> After a simply looking at the code, looks it's related to the cpu number and system memory.
>
> below are the result under different platform
> 1. Good
> model: Sandy Bridge
> nr_node: 1
> nr_cpu: 4
> memory: 6G
>
> 2. Good
> model: qemu-system-x86_64 -enable-kvm
> nr_cpu: 2
> memory: 4G
>
> 3. Bad
> model: Ivytown Ivy Bridge-EP
> nr_cpu: 48
> memory: 64G
>
> 4. Bad
> model: Skylake
> nr_cpu: 104
> memory: 64G
>
> I try to change the process number to 10 from 100, so it can pass at above Skylake(4) machine.
> ------------
> lizhijian@haswell-OptiPlex-9020:~/lkp/linux/tools/testing/selftests/bpf$ git diff
> diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c
> index 040356e..b788ca1 100644
> --- a/tools/testing/selftests/bpf/test_maps.c
> +++ b/tools/testing/selftests/bpf/test_maps.c
> @@ -960,7 +960,7 @@ static void test_map_stress(void)
> {
> run_parallel(100, test_hashmap, NULL);
> run_parallel(100, test_hashmap_percpu, NULL);
> - run_parallel(100, test_hashmap_sizes, NULL);
> + run_parallel(10, test_hashmap_sizes, NULL);
> run_parallel(100, test_hashmap_walk, NULL);
>
> run_parallel(100, test_arraymap, NULL);
Unless Alexei has some better idea, I think if the bpf_create_map() error in
the stress test is about ENOMEM, then we shouldn't fail hard via exit(), for
all other cases we should however. So probably makes sense to just check for
errno == ENOMEM in case of fd < 0 in test_hashmap_sizes() and then continue
to keep trying under stress. Feel free to send a patch, Li.
Thanks again,
Daniel
--
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