1. 03 3月, 2017 1 次提交
    • S
      selftest/powerpc: Fix false failures for skipped tests · a6d8a215
      Sachin Sant 提交于
      Tests under alignment subdirectory are skipped when executed on previous
      generation hardware, but harness still marks them as failed.
      
        test: test_copy_unaligned
        tags: git_version:unknown
        [SKIP] Test skipped on line 26
        skip: test_copy_unaligned
        selftests: copy_unaligned [FAIL]
      
      The MAGIC_SKIP_RETURN_VALUE value assigned to rc variable is retained till
      the program exit which causes the test to be marked as failed.
      
      This patch resets the value before returning to the main() routine.
      With this patch the test o/p is as follows:
      
        test: test_copy_unaligned
        tags: git_version:unknown
        [SKIP] Test skipped on line 26
        skip: test_copy_unaligned
        selftests: copy_unaligned [PASS]
      Signed-off-by: NSachin Sant <sachinp@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      a6d8a215
  2. 02 3月, 2017 2 次提交
    • S
      selftests: lib.mk Fix individual test builds · e53aff45
      Shuah Khan 提交于
      In commit a8ba798b ("selftests: enable O and KBUILD_OUTPUT"), added
      support to generate compile targets in a user specified directory. OUTPUT
      variable controls the location which is undefined when tests are built in
      the test directory or with "make -C tools/testing/selftests/x86".
      
      make -C tools/testing/selftests/x86/
      make: Entering directory '/lkml/linux_4.11/tools/testing/selftests/x86'
      Makefile:44: warning: overriding recipe for target 'clean'
      ../lib.mk:51: warning: ignoring old recipe for target 'clean'
      gcc -m64 -o /single_step_syscall_64 -O2 -g -std=gnu99 -pthread -Wall  single_step_syscall.c -lrt -ldl
      /usr/bin/ld: cannot open output file /single_step_syscall_64: Permission denied
      collect2: error: ld returned 1 exit status
      Makefile:50: recipe for target '/single_step_syscall_64' failed
      make: *** [/single_step_syscall_64] Error 1
      make: Leaving directory '/lkml/linux_4.11/tools/testing/selftests/x86'
      
      Same failure with "cd tools/testing/selftests/x86/;make" run.
      
      Fix this with a change to lib.mk to define OUTPUT to be the pwd when
      MAKELEVEL is 0. This covers both cases mentioned above.
      Reported-by: NIngo Molnar <mingo@kernel.org>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      e53aff45
    • A
      selftests/x86: Add a basic selftest for ioperm · 0eb1d0fa
      Andy Lutomirski 提交于
      This doesn't fully exercise the interaction between KVM and ioperm(),
      but it does test basic functionality.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Signed-off-by: NRadim Krčmář <rkrcmar@redhat.com>
      0eb1d0fa
  3. 28 2月, 2017 1 次提交
  4. 25 2月, 2017 2 次提交
  5. 23 2月, 2017 7 次提交
  6. 19 2月, 2017 1 次提交
  7. 16 2月, 2017 1 次提交
  8. 14 2月, 2017 5 次提交
    • M
      selftests/powerpc: Fix remaining fallout from recent changes · 68bd42d9
      Michael Ellerman 提交于
      In benchmarks we need to use $(TEST_GEN_PROGS) after we include lib.mk,
      because lib.mk does the substitution to add $(OUTPUT).
      
      In math the vmx and fpu names were typoed so they no longer matched
      correctly, put back the 'v' and 'f'.
      
      In tm we need to substitute $(OUTPUT) into SIGNAL_CONTEXT_CHK_TESTS so
      that the rule matches.
      
      In pmu there is an extraneous ':' on the end of $$BUILD_TARGET for the
      clean and install rules, which breaks the logic in the child Makefiles.
      
      Fixes: a8ba798b ("selftests: enable O and KBUILD_OUTPUT")
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      68bd42d9
    • M
      selftests/powerpc: Fix the clean rule since recent changes · 2e8ec87d
      Michael Ellerman 提交于
      The clean rule is broken for the powerpc tests:
      
        make[1]: Entering directory 'tools/testing/selftests/powerpc'
        Makefile:63: warning: overriding recipe for target 'clean'
        ../lib.mk:51: warning: ignoring old recipe for target 'clean'
        /bin/sh: 3: Syntax error: end of file unexpected (expecting "done")
        Makefile:63: recipe for target 'clean' failed
      
      Fixes: a8ba798b ("selftests: enable O and KBUILD_OUTPUT")
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      2e8ec87d
    • M
      selftests: Fix the .S and .S -> .o rules · 634ce97c
      Michael Ellerman 提交于
      Both these rules incorrectly use $< (first prerequisite) rather than
      $^ (all prerequisites), meaning they don't work if we're using more than
      one .S file as input. Switch them to using $^.
      
      They also don't include $(CPPFLAGS) and other variables used in the
      default rules, which breaks targets that require those. Fix that by
      using the builtin $(COMPILE.S) and $(LINK.S) rules.
      
      Fixes: a8ba798b ("selftests: enable O and KBUILD_OUTPUT")
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Tested by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      634ce97c
    • M
      selftests: Fix the .c linking rule · 2047f1d8
      Michael Ellerman 提交于
      Currently we can't build some tests, for example:
      
        $ make -C tools/testing/selftests/ TARGETS=vm
        ...
        gcc -Wall -I ../../../../usr/include   -lrt -lpthread ../../../../usr/include/linux/kernel.h userfaultfd.c -o tools/testing/selftests/vm/userfaultfd
        /tmp/ccmOkQSM.o: In function `stress':
        userfaultfd.c:(.text+0xc60): undefined reference to `pthread_create'
        userfaultfd.c:(.text+0xca5): undefined reference to `pthread_create'
        userfaultfd.c:(.text+0xcee): undefined reference to `pthread_create'
        userfaultfd.c:(.text+0xd30): undefined reference to `pthread_create'
        userfaultfd.c:(.text+0xd77): undefined reference to `pthread_join'
        userfaultfd.c:(.text+0xe7d): undefined reference to `pthread_join'
        userfaultfd.c:(.text+0xe9f): undefined reference to `pthread_cancel'
        userfaultfd.c:(.text+0xec6): undefined reference to `pthread_join'
        userfaultfd.c:(.text+0xf14): undefined reference to `pthread_join'
        /tmp/ccmOkQSM.o: In function `userfaultfd_stress':
        userfaultfd.c:(.text+0x13e2): undefined reference to `pthread_attr_setstacksize'
        collect2: error: ld returned 1 exit status
      
      This is because the rule for linking .c files to binaries is incorrect.
      
      The first bug is that it uses $< (first prerequisite) instead of $^ (all
      preqrequisites), fix it by using ^$.
      
      Secondly the ordering of the prerequisites vs $(LDLIBS) is wrong,
      meaning on toolchains that use --as-needed we fail to link (as above).
      Fix that by placing $(LDLIBS) *after* ^$.
      
      Finally switch to using the default rule $(LINK.c), so that we get
      $(CPPFLAGS) etc. included.
      
      Fixes: a8ba798b ("selftests: enable O and KBUILD_OUTPUT")
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Tested by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      2047f1d8
    • M
      selftests: Fix selftests build to just build, not run tests · d83c3ba0
      Michael Ellerman 提交于
      In commit 88baa78d ("selftests: remove duplicated all and clean
      target"), the "all" target was removed from individual Makefiles and
      added to lib.mk.
      
      However the "all" target was added to lib.mk *after* the existing
      "runtests" target. This means "runtests" becomes the first (default)
      target for most of our Makefiles.
      
      This has the effect of causing a plain "make" to build *and run* the
      tests. Which is at best rude, but depending on which tests are run could
      oops someone's build machine.
      
        $ make -C tools/testing/selftests/
        ...
        make[1]: Entering directory 'tools/testing/selftests/bpf'
        gcc -Wall -O2 -I../../../../usr/include   test_verifier.c -o tools/testing/selftests/bpf/test_verifier
        gcc -Wall -O2 -I../../../../usr/include   test_maps.c -o tools/testing/selftests/bpf/test_maps
        gcc -Wall -O2 -I../../../../usr/include   test_lru_map.c -o tools/testing/selftests/bpf/test_lru_map
        #0 add+sub+mul FAIL
        Failed to load prog 'Function not implemented'!
        #1 unreachable FAIL
        Unexpected error message!
        #2 unreachable2 FAIL
        ...
      
      Fix it by moving the "all" target to the start of lib.mk, making it the
      default target.
      
      Fixes: 88baa78d ("selftests: remove duplicated all and clean target")
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Tested by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      d83c3ba0
  9. 11 2月, 2017 10 次提交
  10. 09 2月, 2017 2 次提交
  11. 07 2月, 2017 2 次提交
  12. 02 2月, 2017 1 次提交
  13. 26 1月, 2017 2 次提交
  14. 25 1月, 2017 3 次提交