ww_mutex.sh 474 B

12345678910111213141516171819
  1. #!/bin/sh
  2. # SPDX-License-Identifier: GPL-2.0
  3. # Kselftest framework requirement - SKIP code is 4.
  4. ksft_skip=4
  5. # Runs API tests for struct ww_mutex (Wait/Wound mutexes)
  6. if ! /sbin/modprobe -q -n test-ww_mutex; then
  7. echo "ww_mutex: module test-ww_mutex is not found [SKIP]"
  8. exit $ksft_skip
  9. fi
  10. if /sbin/modprobe -q test-ww_mutex; then
  11. /sbin/modprobe -q -r test-ww_mutex
  12. echo "locking/ww_mutex: ok"
  13. else
  14. echo "locking/ww_mutex: [FAIL]"
  15. exit 1
  16. fi