1
0
Fork 0
linux/tools/testing/selftests/tc-testing/plugin-lib/rootPlugin.py
Daniel Baumann 79d69e5050
Adding upstream version 6.12.33.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-22 12:14:28 +02:00

19 lines
489 B
Python

import os
import sys
from TdcPlugin import TdcPlugin
from tdc_config import *
class SubPlugin(TdcPlugin):
def __init__(self):
self.sub_class = 'root/SubPlugin'
super().__init__()
def pre_suite(self, testcount, testlist):
# run commands before test_runner goes into a test loop
super().pre_suite(testcount, testlist)
if os.geteuid():
print('This script must be run with root privileges', file=sys.stderr)
exit(1)