Staging
v0.8.1
https://github.com/torvalds/linux
Raw File
Tip revision: f0c4d9fc9cc9462659728d168387191387e903cc authored by Linus Torvalds on 06 November 2022, 23:07:11 UTC
Linux 6.1-rc4
Tip revision: f0c4d9f
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, testidlist):
        # run commands before test_runner goes into a test loop
        super().pre_suite(testcount, testidlist)

        if os.geteuid():
            print('This script must be run with root privileges', file=sys.stderr)
            exit(1)
back to top