1. 06 10月, 2022 1 次提交
  2. 16 9月, 2022 1 次提交
  3. 23 8月, 2022 1 次提交
  4. 12 7月, 2022 2 次提交
  5. 28 6月, 2022 1 次提交
  6. 17 6月, 2022 1 次提交
  7. 20 5月, 2022 1 次提交
    • S
      selftests: drivers/s390x: Add uvdevice tests · cbac9242
      Steffen Eiden 提交于
      Adds some selftests to test ioctl error paths of the uv-uapi.
      The Kconfig S390_UV_UAPI must be selected and the Ultravisor facility
      must be available. The test can be executed by non-root, however, the
      uvdevice special file /dev/uv must be accessible for reading and
      writing which may imply root privileges.
      
        ./test-uv-device
        TAP version 13
        1..6
        # Starting 6 tests from 3 test cases.
        #  RUN           uvio_fixture.att.fault_ioctl_arg ...
        #            OK  uvio_fixture.att.fault_ioctl_arg
        ok 1 uvio_fixture.att.fault_ioctl_arg
        #  RUN           uvio_fixture.att.fault_uvio_arg ...
        #            OK  uvio_fixture.att.fault_uvio_arg
        ok 2 uvio_fixture.att.fault_uvio_arg
        #  RUN           uvio_fixture.att.inval_ioctl_cb ...
        #            OK  uvio_fixture.att.inval_ioctl_cb
        ok 3 uvio_fixture.att.inval_ioctl_cb
        #  RUN           uvio_fixture.att.inval_ioctl_cmd ...
        #            OK  uvio_fixture.att.inval_ioctl_cmd
        ok 4 uvio_fixture.att.inval_ioctl_cmd
        #  RUN           attest_fixture.att_inval_request ...
        #            OK  attest_fixture.att_inval_request
        ok 5 attest_fixture.att_inval_request
        #  RUN           attest_fixture.att_inval_addr ...
        #            OK  attest_fixture.att_inval_addr
        ok 6 attest_fixture.att_inval_addr
        # PASSED: 6 / 6 tests passed.
        # Totals: pass:6 fail:0 xfail:0 xpass:0 skip:0 error:0
      Signed-off-by: NSteffen Eiden <seiden@linux.ibm.com>
      Acked-by: NJanosch Frank <frankja@linux.ibm.com>
      Message-Id: <20220510144724.3321985-3-seiden@linux.ibm.com>
      Link: https://lore.kernel.org/kvm/20220510144724.3321985-3-seiden@linux.ibm.com/Signed-off-by: NJanosch Frank <frankja@linux.ibm.com>
      cbac9242
  8. 26 4月, 2022 2 次提交
  9. 04 3月, 2022 1 次提交
    • M
      selftests: Fix build when $(O) points to a relative path · f6d344cd
      Muhammad Usama Anjum 提交于
      Build of bpf and tc-testing selftests fails when the relative path of
      the build directory is specified.
      
      make -C tools/testing/selftests O=build0
      make[1]: Entering directory '/linux_mainline/tools/testing/selftests/bpf'
      ../../../scripts/Makefile.include:4: *** O=build0 does not exist.  Stop.
      make[1]: Entering directory '/linux_mainline/tools/testing/selftests/tc-testing'
      ../../../scripts/Makefile.include:4: *** O=build0 does not exist.  Stop.
      
      Makefiles of bpf and tc-testing include scripts/Makefile.include file.
      This file has sanity checking inside it which checks the output path.
      The output path is not relative to the bpf or tc-testing. The sanity
      check fails. Expand the output path to get rid of this error. The fix is
      the same as mentioned in commit 150a2732 ("bpf, preload: Fix build
      when $(O) points to a relative path").
      Signed-off-by: NMuhammad Usama Anjum <usama.anjum@collabora.com>
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      f6d344cd
  10. 24 2月, 2022 4 次提交
  11. 12 12月, 2021 1 次提交
    • M
      kselftest: alsa: Add simplistic test for ALSA mixer controls kselftest · 5aaf9eff
      Mark Brown 提交于
      Add a basic test for the mixer control interface. For every control on
      every sound card in the system it checks that it can read and write the
      default value where the control supports that and for writeable controls
      attempts to write all valid values, restoring the default values after
      each test to minimise disruption for users.
      
      There are quite a few areas for improvement - currently no coverage of the
      generation of notifications, several of the control types don't have any
      coverage for the values and we don't have any testing of error handling
      when we attempt to write out of range values - but this provides some basic
      coverage.
      
      This is added as a kselftest since unlike other ALSA test programs it does
      not require either physical setup of the device or interactive monitoring
      by users and kselftest is one of the test suites that is frequently run by
      people doing general automated testing so should increase coverage. It is
      written in terms of alsa-lib since tinyalsa is not generally packaged for
      distributions which makes things harder for general users interested in
      kselftest as a whole but it will be a barrier to people with Android.
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Reviewed-by: NShuah Khan <skhan@linuxfoundation.org>
      Link: https://lore.kernel.org/r/20211210185410.740009-2-broonie@kernel.orgSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      5aaf9eff
  12. 04 8月, 2021 1 次提交
  13. 26 7月, 2021 1 次提交
    • P
      tests: add move_mount(MOVE_MOUNT_SET_GROUP) selftest · 8374f431
      Pavel Tikhomirov 提交于
      Add a simple selftest for a move_mount(MOVE_MOUNT_SET_GROUP). This tests
      that one can copy sharing from one mount from nested mntns with nested
      userns owner to another mount from other nested mntns with other nested
      userns owner while in their parent userns.
      
        TAP version 13
        1..1
        # Starting 1 tests from 2 test cases.
        #  RUN           move_mount_set_group.complex_sharing_copying ...
        #            OK  move_mount_set_group.complex_sharing_copying
        ok 1 move_mount_set_group.complex_sharing_copying
        # PASSED: 1 / 1 tests passed.
        # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0
      
      Link: https://lore.kernel.org/r/20210715100714.120228-2-ptikhomirov@virtuozzo.com
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Christian Brauner <christian.brauner@ubuntu.com>
      Cc: Mattias Nissler <mnissler@chromium.org>
      Cc: Aleksa Sarai <cyphar@cyphar.com>
      Cc: Andrei Vagin <avagin@gmail.com>
      Cc: linux-fsdevel@vger.kernel.org
      Cc: linux-kselftest@vger.kernel.org
      Cc: lkml <linux-kernel@vger.kernel.org>
      Signed-off-by: NPavel Tikhomirov <ptikhomirov@virtuozzo.com>
      Signed-off-by: NChristian Brauner <christian.brauner@ubuntu.com>
      8374f431
  14. 01 5月, 2021 1 次提交
  15. 23 4月, 2021 1 次提交
  16. 15 2月, 2021 1 次提交
  17. 30 1月, 2021 1 次提交
  18. 24 1月, 2021 1 次提交
    • C
      tests: add mount_setattr() selftests · 01eadc8d
      Christian Brauner 提交于
      Add a range of selftests for the new mount_setattr() syscall to verify
      that it works as expected. This tests that:
      - no invalid flags can be specified
      - changing properties of a single mount works and leaves other mounts in
        the mount tree unchanged
      - changing a mount tre to read-only when one of the mounts has writers
        fails and leaves the whole mount tree unchanged
      - changing mount properties from multiple threads works
      - changing atime settings works
      - changing mount propagation works
      - changing the mount options of a mount tree where the individual mounts
        in the tree have different mount options only changes the flags that
        were requested to change
      - changing mount options from another mount namespace fails
      - changing mount options from another user namespace fails
      - idmapped mounts
      
      Note, the main test-suite for idmapped mounts is part of xfstests and is
      pretty huge. These tests here just make sure that the syscalls bits work
      correctly.
      
       TAP version 13
       1..20
       # Starting 20 tests from 3 test cases.
       #  RUN           mount_setattr.invalid_attributes ...
       #            OK  mount_setattr.invalid_attributes
       ok 1 mount_setattr.invalid_attributes
       #  RUN           mount_setattr.extensibility ...
       #            OK  mount_setattr.extensibility
       ok 2 mount_setattr.extensibility
       #  RUN           mount_setattr.basic ...
       #            OK  mount_setattr.basic
       ok 3 mount_setattr.basic
       #  RUN           mount_setattr.basic_recursive ...
       #            OK  mount_setattr.basic_recursive
       ok 4 mount_setattr.basic_recursive
       #  RUN           mount_setattr.mount_has_writers ...
       #            OK  mount_setattr.mount_has_writers
       ok 5 mount_setattr.mount_has_writers
       #  RUN           mount_setattr.mixed_mount_options ...
       #            OK  mount_setattr.mixed_mount_options
       ok 6 mount_setattr.mixed_mount_options
       #  RUN           mount_setattr.time_changes ...
       #            OK  mount_setattr.time_changes
       ok 7 mount_setattr.time_changes
       #  RUN           mount_setattr.multi_threaded ...
       #            OK  mount_setattr.multi_threaded
       ok 8 mount_setattr.multi_threaded
       #  RUN           mount_setattr.wrong_user_namespace ...
       #            OK  mount_setattr.wrong_user_namespace
       ok 9 mount_setattr.wrong_user_namespace
       #  RUN           mount_setattr.wrong_mount_namespace ...
       #            OK  mount_setattr.wrong_mount_namespace
       ok 10 mount_setattr.wrong_mount_namespace
       #  RUN           mount_setattr_idmapped.invalid_fd_negative ...
       #            OK  mount_setattr_idmapped.invalid_fd_negative
       ok 11 mount_setattr_idmapped.invalid_fd_negative
       #  RUN           mount_setattr_idmapped.invalid_fd_large ...
       #            OK  mount_setattr_idmapped.invalid_fd_large
       ok 12 mount_setattr_idmapped.invalid_fd_large
       #  RUN           mount_setattr_idmapped.invalid_fd_closed ...
       #            OK  mount_setattr_idmapped.invalid_fd_closed
       ok 13 mount_setattr_idmapped.invalid_fd_closed
       #  RUN           mount_setattr_idmapped.invalid_fd_initial_userns ...
       #            OK  mount_setattr_idmapped.invalid_fd_initial_userns
       ok 14 mount_setattr_idmapped.invalid_fd_initial_userns
       #  RUN           mount_setattr_idmapped.attached_mount_inside_current_mount_namespace ...
       #            OK  mount_setattr_idmapped.attached_mount_inside_current_mount_namespace
       ok 15 mount_setattr_idmapped.attached_mount_inside_current_mount_namespace
       #  RUN           mount_setattr_idmapped.attached_mount_outside_current_mount_namespace ...
       #            OK  mount_setattr_idmapped.attached_mount_outside_current_mount_namespace
       ok 16 mount_setattr_idmapped.attached_mount_outside_current_mount_namespace
       #  RUN           mount_setattr_idmapped.detached_mount_inside_current_mount_namespace ...
       #            OK  mount_setattr_idmapped.detached_mount_inside_current_mount_namespace
       ok 17 mount_setattr_idmapped.detached_mount_inside_current_mount_namespace
       #  RUN           mount_setattr_idmapped.detached_mount_outside_current_mount_namespace ...
       #            OK  mount_setattr_idmapped.detached_mount_outside_current_mount_namespace
       ok 18 mount_setattr_idmapped.detached_mount_outside_current_mount_namespace
       #  RUN           mount_setattr_idmapped.change_idmapping ...
       #            OK  mount_setattr_idmapped.change_idmapping
       ok 19 mount_setattr_idmapped.change_idmapping
       #  RUN           mount_setattr_idmapped.idmap_mount_tree_invalid ...
       #            OK  mount_setattr_idmapped.idmap_mount_tree_invalid
       ok 20 mount_setattr_idmapped.idmap_mount_tree_invalid
       # PASSED: 20 / 20 tests passed.
       # Totals: pass:20 fail:0 xfail:0 xpass:0 skip:0 error:0
      
      Link: https://lore.kernel.org/r/20210121131959.646623-37-christian.brauner@ubuntu.com
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: linux-fsdevel@vger.kernel.org
      Signed-off-by: NChristian Brauner <christian.brauner@ubuntu.com>
      01eadc8d
  19. 05 1月, 2021 1 次提交
    • M
      selftests: Skip BPF seftests by default · 7a6eb7c3
      Mark Brown 提交于
      The BPF selftests have build time dependencies on cutting edge versions
      of tools in the BPF ecosystem including LLVM which are more involved
      to satisfy than more typical requirements like installing a package from
      your distribution.  This causes issues for users looking at kselftest in
      as a whole who find that a default build of kselftest fails and that
      resolving this is time consuming and adds administrative overhead.  The
      fast pace of BPF development and the need for a full BPF stack to do
      substantial development or validation work on the code mean that people
      working directly on it don't see a reasonable way to keep supporting
      older environments without causing problems with the usability of the
      BPF tests in BPF development so these requirements are unlikely to be
      relaxed in the immediate future.
      
      There is already support for skipping targets so in order to reduce the
      barrier to entry for people interested in kselftest as a whole let's use
      that to skip the BPF tests by default when people work with the top
      level kselftest build system.  Users can still build the BPF selftests
      as part of the wider kselftest build by specifying SKIP_TARGETS,
      including setting an empty SKIP_TARGETS to build everything.  They can
      also continue to build the BPF selftests individually in cases where
      they are specifically focused on BPF.
      
      This isn't ideal since it means people will need to take special steps
      to build the BPF tests but the dependencies mean that realistically this
      is already the case to some extent and it makes it easier for people to
      pick up and work with the other selftests which is hopefully a net win.
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      7a6eb7c3
  20. 02 12月, 2020 1 次提交
  21. 19 11月, 2020 1 次提交
  22. 28 10月, 2020 1 次提交
  23. 26 10月, 2020 1 次提交
    • G
      staging: ion: remove from the tree · e722a295
      Greg Kroah-Hartman 提交于
      The ION android code has long been marked to be removed, now that we
      dma-buf support merged into the real part of the kernel.
      
      It was thought that we could wait to remove the ion kernel at a later
      time, but as the out-of-tree Android fork of the ion code has diverged
      quite a bit, and any Android device using the ion interface uses that
      forked version and not this in-tree version, the in-tree copy of the
      code is abandonded and not used by anyone.
      
      Combine this abandoned codebase with the need to make changes to it in
      order to keep the kernel building properly, which then causes merge
      issues when merging those changes into the out-of-tree Android code, and
      you end up with two different groups of people (the in-kernel-tree
      developers, and the Android kernel developers) who are both annoyed at
      the current situation.  Because of this problem, just drop the in-kernel
      copy of the ion code now, as it's not used, and is only causing problems
      for everyone involved.
      
      Cc: "Arve Hjønnevåg" <arve@android.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: Christian Brauner <christian@brauner.io>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Hridya Valsaraju <hridya@google.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Laura Abbott <laura@labbott.name>
      Cc: Martijn Coenen <maco@android.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Suren Baghdasaryan <surenb@google.com>
      Cc: Todd Kjos <tkjos@android.com>
      Acked-by: NShuah Khan <skhan@linuxfoundation.org>
      Link: https://lore.kernel.org/r/20200827123627.538189-1-gregkh@linuxfoundation.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e722a295
  24. 07 10月, 2020 1 次提交
  25. 01 9月, 2020 1 次提交
    • G
      selftests: more general make nesting support · f69237e1
      Greg Thelen 提交于
      selftests can be built from the toplevel kernel makefile (e.g. make
      kselftest-all) or directly (make -C tools/testing/selftests all).
      
      The toplevel kernel makefile explicitly disables implicit rules with
      "MAKEFLAGS += -rR", which is passed to tools/testing/selftests.  Some
      selftest makefiles require implicit make rules, which is why
      commit 67d8712d ("selftests: Fix build failures when invoked from
      kselftest target") reenables implicit rules by clearing MAKEFLAGS if
      MAKELEVEL=1.
      
      So far so good.  However, if the toplevel makefile is called from an
      outer makefile then MAKELEVEL will be elevated, which breaks the
      MAKELEVEL equality test.
      Example wrapped makefile error:
        $ cat ~/Makefile
        all:
        	$(MAKE) defconfig
        	$(MAKE) kselftest-all
        $ make -sf ~/Makefile
          futex_wait_timeout.c /src/tools/testing/selftests/kselftest_harness.h   /src/tools/testing/selftests/kselftest.h ../include/futextest.h ../include/atomic.h ../include/logging.h -lpthread -lrt -o /src/tools/testing/selftests/futex/functional/futex_wait_timeout
        make[4]: futex_wait_timeout.c: Command not found
      
      Rather than checking $(MAKELEVEL), check for $(LINK.c), which is a more
      direct side effect of "make -R".  This enables arbitrary makefile
      nesting.
      Signed-off-by: NGreg Thelen <gthelen@google.com>
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      f69237e1
  26. 08 8月, 2020 1 次提交
  27. 21 7月, 2020 1 次提交
    • B
      tc-testing: Add tdc to kselftests · 2b9843fb
      Briana Oursler 提交于
      Add tdc to existing kselftest infrastructure so that it can be run with
      existing kselftests. TDC now generates objects in objdir/kselftest
      without cluttering main objdir, leaves source directory clean, and
      installs correctly in kselftest_install, properly adding itself to
      run_kselftest.sh script.
      
      Add tc-testing as a target of selftests/Makefile. Create tdc.sh to run
      tdc.py targets with correct arguments. To support single target from
      selftest/Makefile, combine tc-testing/bpf/Makefile and
      tc-testing/Makefile. Move action.c up a directory to tc-testing/.
      
      Tested with:
       make O=/tmp/{objdir} TARGETS="tc-testing" kselftest
       cd /tmp/{objdir}
       cd kselftest
       cd tc-testing
       ./tdc.sh
      
       make -C tools/testing/selftests/ TARGETS=tc-testing run_tests
      
       make TARGETS="tc-testing" kselftest
       cd tools/testing/selftests
       ./kselftest_install.sh /tmp/exampledir
       My VM doesn't run all the kselftests so I commented out all except my
       target and net/pmtu.sh then:
       cd /tmp/exampledir && ./run_kselftest.sh
      Co-developed-by: NDavide Caratti <dcaratti@redhat.com>
      Signed-off-by: NDavide Caratti <dcaratti@redhat.com>
      Signed-off-by: NBriana Oursler <briana.oursler@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b9843fb
  28. 29 6月, 2020 1 次提交
    • P
      selftests/fpu: Add an FPU selftest · 4185b3b9
      Petteri Aimonen 提交于
      Add a selftest for the usage of FPU code in kernel mode.
      
      Currently only implemented for x86. In the future, kernel FPU testing
      could be unified between the different architectures supporting it.
      
       [ bp:
      
        - Split out from a conglomerate patch, put comments over statements.
        - run the test only on debugfs write.
        - Add bare-minimum run_test_fpu.sh, run 1000 iterations on all CPUs
          by default.
        - Add conditionally -msse2 so that clang doesn't generate library
          calls.
        - Use cc-option to detect gcc 7.1 not supporting -mpreferred-stack-boundary=3 (amluto).
        - Document stuff so that we don't forget.
        - Fix:
           ld: lib/test_fpu.o: in function `test_fpu_get':
           >> test_fpu.c:(.text+0x16e): undefined reference to `__sanitizer_cov_trace_cmpd'
           >> ld: test_fpu.c:(.text+0x1a7): undefined reference to `__sanitizer_cov_trace_cmpd'
           ld: test_fpu.c:(.text+0x1e0): undefined reference to `__sanitizer_cov_trace_cmpd'
        ]
      Reported-by: Nkernel test robot <lkp@intel.com>
      Signed-off-by: NPetteri Aimonen <jpa@git.mail.kapsi.fi>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Reviewed-by: NNick Desaulniers <ndesaulniers@google.com>
      Link: https://lkml.kernel.org/r/20200624114646.28953-3-bp@alien8.de
      4185b3b9
  29. 17 6月, 2020 1 次提交
    • C
      tests: add close_range() tests · 2c5db60e
      Christian Brauner 提交于
      This adds basic tests for the new close_range() syscall.
      - test that no invalid flags can be passed
      - test that a range of file descriptors is correctly closed
      - test that a range of file descriptors is correctly closed if there there
        are already closed file descriptors in the range
      - test that max_fd is correctly capped to the current fdtable maximum
      Signed-off-by: NChristian Brauner <christian.brauner@ubuntu.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Jann Horn <jannh@google.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Dmitry V. Levin <ldv@altlinux.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Florian Weimer <fweimer@redhat.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: linux-api@vger.kernel.org
      Cc: linux-kselftest@vger.kernel.org
      2c5db60e
  30. 20 5月, 2020 1 次提交
    • V
      selftests: introduce gen_tar Makefile target · a5f30467
      Veronika Kabatova 提交于
      The gen_kselftest_tar.sh always packages *all* selftests and doesn't
      pass along any variables to `make install` to influence what should be
      built. This can result in an early error on the command line ("Unknown
      tarball format TARGETS=XXX"), or unexpected test failures as the
      tarball contains tests people wanted to skip on purpose.
      
      Since the makefile already contains all the logic, we can add a target
      for packaging. Keep the default .gz target the script uses, and actually
      extend the supported formats by using tar's autodetection.
      
      To not break current workflows, keep the gen_kselftest_tar.sh script as
      it is, with an added suggestion to use the makefile target instead.
      Signed-off-by: NVeronika Kabatova <vkabatov@redhat.com>
      Reviewed-by: NStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      a5f30467
  31. 30 3月, 2020 1 次提交
  32. 25 3月, 2020 1 次提交
    • C
      selftests: add pid namespace ENOMEM regression test · 6952a4f6
      Christian Brauner 提交于
      We recently regressed (cf. [1] and its corresponding fix in [2]) returning
      ENOMEM when trying to create a process in a pid namespace whose init
      process/child subreaper has already died. This has caused confusion at
      least once before that (cf. [3]). Let's add a simple regression test to
      catch this in the future.
      
      [1]: 49cb2fc4 ("fork: extend clone3() to support setting a PID")
      [2]: b26ebfe1 ("pid: Fix error return value in some cases")
      [3]: 35f71bc0 ("fork: report pid reservation failure properly")
      Cc: Corey Minyard <cminyard@mvista.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Adrian Reber <areber@redhat.com>
      Cc: Dmitry Safonov <0x7f454c46@gmail.com>
      Cc: Andrei Vagin <avagin@gmail.com>
      Signed-off-by: NChristian Brauner <christian.brauner@ubuntu.com>
      6952a4f6
  33. 24 3月, 2020 1 次提交
  34. 14 3月, 2020 1 次提交
  35. 11 2月, 2020 1 次提交