]> Git Repo - linux.git/blob - tools/memory-model/scripts/simpletest.sh
Merge tag 'kvmarm-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm...
[linux.git] / tools / memory-model / scripts / simpletest.sh
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0+
3 #
4 # Give zero status if this is a simple test and non-zero otherwise.
5 # Simple tests do not contain locking, RCU, or SRCU.
6 #
7 # Usage:
8 #       simpletest.sh file.litmus
9 #
10 # Copyright IBM Corporation, 2019
11 #
12 # Author: Paul E. McKenney <[email protected]>
13
14
15 litmus=$1
16
17 if test -f "$litmus" -a -r "$litmus"
18 then
19         :
20 else
21         echo ' --- ' error: \"$litmus\" is not a readable file
22         exit 255
23 fi
24 exclude="^[[:space:]]*\("
25 exclude="${exclude}spin_lock(\|spin_unlock(\|spin_trylock(\|spin_is_locked("
26 exclude="${exclude}\|rcu_read_lock(\|rcu_read_unlock("
27 exclude="${exclude}\|synchronize_rcu(\|synchronize_rcu_expedited("
28 exclude="${exclude}\|srcu_read_lock(\|srcu_read_unlock("
29 exclude="${exclude}\|synchronize_srcu(\|synchronize_srcu_expedited("
30 exclude="${exclude}\)"
31 if grep -q $exclude $litmus
32 then
33         exit 255
34 fi
35 exit 0
This page took 0.036699 seconds and 4 git commands to generate.