summaryrefslogtreecommitdiff
path: root/tests/drm_lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/drm_lib.sh')
-rwxr-xr-xtests/drm_lib.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/drm_lib.sh b/tests/drm_lib.sh
index 97f6f925..38befa88 100755
--- a/tests/drm_lib.sh
+++ b/tests/drm_lib.sh
@@ -34,6 +34,8 @@ if [ `cat $i915_dfs_path/clients | wc -l` -gt "2" ] ; then
die "ERROR: other drm clients running"
fi
+whoami | grep -q root || ( echo ERROR: not running as root; exit 1 )
+
i915_sfs_path=
if [ -d /sys/class/drm ] ; then
sysfs_path=/sys/class/drm