Files
linux/tools/testing/selftests/damon/_common.sh
T
Enze Li 511914506d selftests/damon: introduce _common.sh to host shared function
The current test scripts contain duplicated root permission checks in
multiple locations.  This patch consolidates these checks into _common.sh
to eliminate code redundancy.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Enze Li <[email protected]>
Reviewed-by: SeongJae Park <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
2025-07-26 15:08:21 -07:00

12 lines
142 B
Bash

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
check_dependencies()
{
if [ $EUID -ne 0 ]
then
echo "Run as root"
exit $ksft_skip
fi
}