12b0b2111SChris Wilson#!/bin/sh 2b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 3*f9fedb27SShuah Khan (Samsung OSG) 4*f9fedb27SShuah Khan (Samsung OSG)# Kselftest framework requirement - SKIP code is 4. 5*f9fedb27SShuah Khan (Samsung OSG)ksft_skip=4 6*f9fedb27SShuah Khan (Samsung OSG) 72b0b2111SChris Wilson# Runs API tests for struct ww_mutex (Wait/Wound mutexes) 8*f9fedb27SShuah Khan (Samsung OSG)if ! /sbin/modprobe -q -n test-ww_mutex; then 9*f9fedb27SShuah Khan (Samsung OSG) echo "ww_mutex: module test-ww_mutex is not found [SKIP]" 10*f9fedb27SShuah Khan (Samsung OSG) exit $ksft_skip 11*f9fedb27SShuah Khan (Samsung OSG)fi 122b0b2111SChris Wilson 132b0b2111SChris Wilsonif /sbin/modprobe -q test-ww_mutex; then 142b0b2111SChris Wilson /sbin/modprobe -q -r test-ww_mutex 152b0b2111SChris Wilson echo "locking/ww_mutex: ok" 162b0b2111SChris Wilsonelse 172b0b2111SChris Wilson echo "locking/ww_mutex: [FAIL]" 182b0b2111SChris Wilson exit 1 192b0b2111SChris Wilsonfi 20