mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
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]>
12 lines
142 B
Bash
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
|
|
}
|