File Index
Files and directories
Sign in
FILE

rootPlugin.py

File preview with syntax highlighting.

linux-6.19.14/tools/testing/selftests/tc-testing/plugin-lib/rootPlugin.py PYTHON
 1import os
 2import sys
 3from TdcPlugin import TdcPlugin
 4
 5from tdc_config import *
 6
 7
 8class SubPlugin(TdcPlugin):
 9    def __init__(self):
10        self.sub_class = 'root/SubPlugin'
11        super().__init__()
12
13    def pre_suite(self, testcount, testlist):
14        # run commands before test_runner goes into a test loop
15        super().pre_suite(testcount, testlist)
16
17        if os.geteuid():
18            print('This script must be run with root privileges', file=sys.stderr)
19            exit(1)
~/ Read-only file preview.