File tree Expand file tree Collapse file tree 5 files changed +22
-24
lines changed
tools/testing/selftests/damon Expand file tree Collapse file tree 5 files changed +22
-24
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # SPDX-License-Identifier: GPL-2.0
3
+
4
+ check_dependencies ()
5
+ {
6
+ if [ $EUID -ne 0 ]
7
+ then
8
+ echo " Run as root"
9
+ exit $ksft_skip
10
+ fi
11
+ }
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# SPDX-License-Identifier: GPL-2.0
3
3
4
+ source _common.sh
5
+
4
6
# Kselftest framework requirement - SKIP code is 4.
5
7
ksft_skip=4
6
8
7
- if [ $EUID -ne 0 ]
8
- then
9
- echo " Run as root"
10
- exit $ksft_skip
11
- fi
9
+ check_dependencies
12
10
13
11
damon_lru_sort_enabled=" /sys/module/damon_lru_sort/parameters/enabled"
14
12
if [ ! -f " $damon_lru_sort_enabled " ]
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# SPDX-License-Identifier: GPL-2.0
3
3
4
+ source _common.sh
5
+
4
6
# Kselftest framework requirement - SKIP code is 4.
5
7
ksft_skip=4
6
8
7
- if [ $EUID -ne 0 ]
8
- then
9
- echo " Run as root"
10
- exit $ksft_skip
11
- fi
9
+ check_dependencies
12
10
13
11
damon_reclaim_enabled=" /sys/module/damon_reclaim/parameters/enabled"
14
12
if [ ! -f " $damon_reclaim_enabled " ]
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# SPDX-License-Identifier: GPL-2.0
3
3
4
+ source _common.sh
5
+
4
6
# Kselftest frmework requirement - SKIP code is 4.
5
7
ksft_skip=4
6
8
@@ -364,14 +366,5 @@ test_damon_sysfs()
364
366
test_kdamonds " $damon_sysfs /kdamonds"
365
367
}
366
368
367
- check_dependencies ()
368
- {
369
- if [ $EUID -ne 0 ]
370
- then
371
- echo " Run as root"
372
- exit $ksft_skip
373
- fi
374
- }
375
-
376
369
check_dependencies
377
370
test_damon_sysfs " /sys/kernel/mm/damon/admin"
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# SPDX-License-Identifier: GPL-2.0
3
3
4
+ source _common.sh
5
+
4
6
# Kselftest framework requirement - SKIP code is 4.
5
7
ksft_skip=4
6
8
7
- if [ $EUID -ne 0 ]
8
- then
9
- echo " Run as root"
10
- exit $ksft_skip
11
- fi
9
+ check_dependencies
12
10
13
11
damon_sysfs=" /sys/kernel/mm/damon/admin"
14
12
if [ ! -d " $damon_sysfs " ]
You can’t perform that action at this time.
0 commit comments