Staging
v0.8.1
https://github.com/torvalds/linux
Raw File
Tip revision: 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab authored by Linus Torvalds on 27 November 2023, 03:59:33 UTC
Linux 6.7-rc3
Tip revision: 2cc14f5
rootPlugin.py
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)
back to top