20 lines · bash
1#!/bin/sh2# SPDX-License-Identifier: GPL-2.03 4# Kselftest framework requirement - SKIP code is 4.5ksft_skip=46 7# Runs API tests for struct ww_mutex (Wait/Wound mutexes)8if ! /sbin/modprobe -q -n test-ww_mutex; then9 echo "ww_mutex: module test-ww_mutex is not found [SKIP]"10 exit $ksft_skip11fi12 13if /sbin/modprobe -q test-ww_mutex; then14 /sbin/modprobe -q -r test-ww_mutex15 echo "locking/ww_mutex: ok"16else17 echo "locking/ww_mutex: [FAIL]"18 exit 119fi20