Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_idle should not access or modify user config directory #82364

Closed
vstinner opened this issue Sep 16, 2019 · 16 comments
Closed

test_idle should not access or modify user config directory #82364

vstinner opened this issue Sep 16, 2019 · 16 comments
Assignees
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes tests Tests in the Lib/test dir topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@vstinner
Copy link
Member

BPO 38183
Nosy @terryjreedy, @vstinner, @koobs, @miss-islington
PRs
  • bpo-38183: Test_idle ignores user config directory. #16198
  • [3.8] bpo-38183: Test_idle ignores user config directory GH-16198) #16207
  • [3.7] bpo-38183: Test_idle ignores user config directory GH-16198) #16208
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/terryjreedy'
    closed_at = <Date 2019-09-17.14:37:00.547>
    created_at = <Date 2019-09-16.07:39:09.108>
    labels = ['type-bug', '3.8', '3.9', 'expert-IDLE', '3.7', 'tests']
    title = 'test_idle should not access or modify user config directory'
    updated_at = <Date 2019-09-17.14:39:23.989>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-09-17.14:39:23.989>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2019-09-17.14:37:00.547>
    closer = 'terry.reedy'
    components = ['IDLE', 'Tests']
    creation = <Date 2019-09-16.07:39:09.108>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38183
    keywords = ['patch']
    message_count = 16.0
    messages = ['352523', '352524', '352535', '352547', '352559', '352573', '352591', '352593', '352594', '352595', '352605', '352608', '352623', '352624', '352625', '352640']
    nosy_count = 4.0
    nosy_names = ['terry.reedy', 'vstinner', 'koobs', 'miss-islington']
    pr_nums = ['16198', '16207', '16208']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue38183'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @vstinner
    Copy link
    Member Author

    I see two problems:

    • (1) test_idle fails very badly when the user configuration directory cannot be created: GetUserCfgDir() raises SystemExit when mkdir() fails with "PermissionError: [Errno 13] Permission denied: '/root/.idlerc'".

    • (2) HOME environment variable of the AMD64 FreeBSD CURRENT Shared 3.x buildbot worker is set to /root, whereas the "koobs" user directory is: /home/buildbot

    The best would be to fix both issues, not only the buildbot.

    test_idle should not write into $HOME: it should mock this part, for example use a temporary user directory.

    --

    https://buildbot.python.org/all/#/builders/168/builds/1457

    pythoninfo:

    os.getgid: 1002
    os.getgrouplist: 1002
    os.getgroups: 1002
    os.getuid: 1002
    os.login: koobs

    os.environ[HOME]: /root

    pwd.getpwuid(1002): pwd.struct_passwd(pw_name='buildbot', pw_passwd='*', pw_uid=1002, pw_gid=1002, pw_gecos='FreeBSD BuildBot', pw_dir='/home/buildbot', pw_shell='/bin/sh')

    The HOME environment variable override password pw_dir='/home/buildbot' directory.

    0:10:59 load avg: 4.72 [226/419/1] test_idle failed -- running: test_multiprocessing_spawn (4 min 32 sec), test_tools (3 min 57 sec)
    Failed to import test module: idlelib.idle_test.test_autocomplete
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_autocomplete.py", line 10, in <module>
        import idlelib.autocomplete as ac
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/autocomplete.py", line 14, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_browser
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_browser.py", line 3, in <module>
        from idlelib import browser
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/browser.py", line 16, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_codecontext
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_codecontext.py", line 3, in <module>
        from idlelib import codecontext
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/codecontext.py", line 18, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_colorizer
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_colorizer.py", line 3, in <module>
        from idlelib import colorizer
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/colorizer.py", line 6, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_config
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_config.py", line 6, in <module>
        from idlelib import config
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_configdialog
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_configdialog.py", line 5, in <module>
        from idlelib import configdialog
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/configdialog.py", line 25, in <module>
        from idlelib.config import idleConf, ConfigChanges
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_debugobj
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_debugobj.py", line 3, in <module>
        from idlelib import debugobj
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/debugobj.py", line 13, in <module>
        from idlelib.tree import TreeItem, TreeNode, ScrolledCanvas
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/tree.py", line 22, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_editor
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_editor.py", line 3, in <module>
        from idlelib import editor
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/editor.py", line 18, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_filelist
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_filelist.py", line 3, in <module>
        from idlelib import filelist
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/filelist.py", line 7, in <module>
        class FileList:
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/filelist.py", line 10, in FileList
        from idlelib.editor import EditorWindow
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/editor.py", line 18, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_format
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_format.py", line 3, in <module>
        from idlelib import format as ft
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/format.py", line 11, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_help
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_help.py", line 3, in <module>
        from idlelib import help
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/help.py", line 35, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_help_about
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_help_about.py", line 6, in <module>
        from idlelib import help_about
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/help_about.py", line 11, in <module>
        from idlelib import textview
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/textview.py", line 10, in <module>
        from idlelib.colorizer import color_config
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/colorizer.py", line 6, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_history
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_history.py", line 3, in <module>
        from idlelib.history import History
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/history.py", line 3, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_hyperparser
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_hyperparser.py", line 7, in <module>
        from idlelib.editor import EditorWindow
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/editor.py", line 18, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_iomenu
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_iomenu.py", line 3, in <module>
        from idlelib import iomenu
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/iomenu.py", line 14, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_macosx
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_macosx.py", line 8, in <module>
        from idlelib.filelist import FileList
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/filelist.py", line 7, in <module>
        class FileList:
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/filelist.py", line 10, in FileList
        from idlelib.editor import EditorWindow
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/editor.py", line 18, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_mainmenu
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_mainmenu.py", line 4, in <module>
        from idlelib import mainmenu
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/mainmenu.py", line 13, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_outwin
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_outwin.py", line 3, in <module>
        from idlelib import outwin
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/outwin.py", line 8, in <module>
        from idlelib.editor import EditorWindow
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/editor.py", line 18, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_parenmatch
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_parenmatch.py", line 6, in <module>
        from idlelib.parenmatch import ParenMatch
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/parenmatch.py", line 8, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_pathbrowser
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_pathbrowser.py", line 3, in <module>
        from idlelib import pathbrowser
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/pathbrowser.py", line 5, in <module>
        from idlelib.browser import ModuleBrowser, ModuleBrowserTreeItem
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/browser.py", line 16, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_pyshell
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_pyshell.py", line 4, in <module>
        from idlelib import pyshell
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/pyshell.py", line 49, in <module>
        from idlelib.colorizer import ColorDelegator
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/colorizer.py", line 6, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_run
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_run.py", line 3, in <module>
        from idlelib import run
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/run.py", line 19, in <module>
        from idlelib import autocomplete  # AutoComplete, fetch_encodings
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/autocomplete.py", line 14, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_runscript
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_runscript.py", line 3, in <module>
        from idlelib import runscript
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/runscript.py", line 18, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_sidebar
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_sidebar.py", line 2, in <module>
        import idlelib.sidebar
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/sidebar.py", line 8, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_squeezer
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_squeezer.py", line 10, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_stackviewer
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_stackviewer.py", line 3, in <module>
        from idlelib import stackviewer
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/stackviewer.py", line 7, in <module>
        from idlelib.debugobj import ObjectTreeItem, make_objecttreeitem
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/debugobj.py", line 13, in <module>
        from idlelib.tree import TreeItem, TreeNode, ScrolledCanvas
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/tree.py", line 22, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_textview
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_textview.py", line 8, in <module>
        from idlelib import textview as tv
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/textview.py", line 10, in <module>
        from idlelib.colorizer import color_config
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/colorizer.py", line 6, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_tree
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_tree.py", line 3, in <module>
        from idlelib import tree
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/tree.py", line 22, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_warning
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_warning.py", line 8, in <module>
        from idlelib import run
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/run.py", line 19, in <module>
        from idlelib import autocomplete  # AutoComplete, fetch_encodings
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/autocomplete.py", line 14, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    Failed to import test module: idlelib.idle_test.test_zoomheight
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 198, in GetUserCfgDir
        os.mkdir(userDir)
    PermissionError: [Errno 13] Permission denied: '/root/.idlerc'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 436, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/unittest/loader.py", line 377, in _get_module_from_name
        __import__(name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/idle_test/test_zoomheight.py", line 8, in <module>
        from idlelib.editor import EditorWindow
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/editor.py", line 18, in <module>
        from idlelib.config import idleConf
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 760, in <module>
        idleConf = IdleConf()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 163, in __init__
        self.CreateConfigHandlers()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 169, in CreateConfigHandlers
        self.userdir = userdir = self.GetUserCfgDir()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/idlelib/config.py", line 204, in GetUserCfgDir
        raise SystemExit
    SystemExit
    
    test test_idle crashed -- Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 270, in _runtest_inner
        refleak = _runtest_inner2(ns, test_name)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 234, in _runtest_inner2
        test_runner()
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/libregrtest/runtest.py", line 208, in _test_module
        raise Exception("errors while loading tests")
    Exception: errors while loading tests

    @vstinner vstinner added the 3.9 only security fixes label Sep 16, 2019
    @vstinner vstinner added topic-IDLE tests Tests in the Lib/test dir labels Sep 16, 2019
    @vstinner
    Copy link
    Member Author

    Python 2.7, 3.7 and 3.8 buildbot workers are also affected.

    Python 2.7 fails differently:

    https://buildbot.python.org/all/#/builders/169/builds/166

    0:04:53 load avg: 3.40 [217/404/1] test_idle failed -- running: test_decimal (31 sec 780 ms)

    Warning: unable to create user config directory
    /root/.idlerc
    Check path and permissions.
    Exiting!

    Warning: unable to create user config directory
    /root/.idlerc
    Check path and permissions.
    Exiting!

    Warning: unable to create user config directory
    /root/.idlerc
    Check path and permissions.
    Exiting!

    Warning: unable to create user config directory
    /root/.idlerc
    Check path and permissions.
    Exiting!

    Warning: unable to create user config directory
    /root/.idlerc
    Check path and permissions.
    Exiting!

    Warning: unable to create user config directory
    /root/.idlerc
    Check path and permissions.
    Exiting!

    Warning: unable to create user config directory
    /root/.idlerc
    Check path and permissions.
    Exiting!

    Warning: unable to create user config directory
    /root/.idlerc
    Check path and permissions.
    Exiting!

    Warning: unable to create user config directory
    /root/.idlerc
    Check path and permissions.
    Exiting!

    Warning: unable to create user config directory
    /root/.idlerc
    Check path and permissions.
    Exiting!

    test test_idle failed -- multiple errors occurred; run in verbose mode for details

    @koobs
    Copy link

    koobs commented Sep 16, 2019

    This is related to bpo-37400 and bpo-27838 in that specific invocations of the buildbot service (like via sudo) cause the environment to be setup differently.

    In this case, I had just started the buildbot worker via sudo prior to the build starting and failing.

    In the bpo-37400 and bpo-27838 cases (see msg295486), sudo was also used, where HOME ends up being /root, which is not writeable by the user the worker is run under (buildbot).

    The test should either mock, or should write to a known temp directory (possibly one it creates), either in the build dir, or /tmp or similar, though I'd lean towards keeping all test writes within the scope of the temporary build location

    I can either

    1. if the issue cannot be resolved in short order, restart the worker now to clear the problem, until this issue has a changeset against it to resolve it

    2. if it can be resolved in short order, leave the worker in this state until fixed

    @vstinner
    Copy link
    Member Author

    I suggest to fix the buildbot workers right now. I plan to leave this issue open until test_idle is fixed.

    @koobs
    Copy link

    koobs commented Sep 16, 2019

    I've restarted the worker via sudo service(8), which shouldn't have the same (environment) issue as starting the rc script directly under sudo

    https://buildbot.python.org/all/#/builders/168/builds/1462 is running now

    Let me know if you need any further information from my end to assist resolution of test_idle under reproduction conditions

    @terryjreedy
    Copy link
    Member

    From IDLE's viewpoint, the 2.7 failures are the same. In current 3.x, GetUserCfgDir has

        warn = ('\n Warning: unable to create user config directory\n' +
                userDir + '\n Check path and permissions.\n Exiting!\n')
        if not idlelib.testing:
            print(warn, file=sys.stderr)
        raise SystemExit

    In 2.7. the conditional clause is not there because idlelib.testing does not exist. It was added to avoid 3.x regrtest resource-changed checks that either were not backported to 2.7 or are not triggered by the smaller 2.7 set of IDLE tests.

    The irony of the failures is that the tests are carefully written to pass regardless of user config values, if any, and never alter them. Only test_config and test_configdialog actually *need* to access the config machinery. Other tests could mock idleConf.

    PR 16198 has a minimal fix that works on my Windows machine. A 2.7 backport, which must be manual, will require the addition of idlelib.testing and its setting it test_idle. I will wait for passes from buildbots, not just the CI.

    Followup issues:

    1. For 'other tests', mock idleConf and run a bit faster.

    2. If ignoring .idlerc this way works, simplify some of the tests by setting idlelib.testing to True instead of duplicating what IdleConf will now do.

    3. Minimally implement "# TODO continue without userDIr instead of exit". Replace "raise SystemExit" with "return ''" and add warnings that configuration changes will disappear when exiting IDLE.

    @terryjreedy terryjreedy added 3.7 (EOL) end of life 3.8 (EOL) end of life type-bug An unexpected behavior, bug, or error labels Sep 16, 2019
    @terryjreedy
    Copy link
    Member

    New changeset 0048afc by Terry Jan Reedy in branch 'master':
    bpo-38183: Test_idle ignores user config directory #60402)
    0048afc

    @miss-islington
    Copy link
    Contributor

    New changeset ad845be by Miss Islington (bot) in branch '3.8':
    bpo-38183: Test_idle ignores user config directory #60402)
    ad845be

    @miss-islington
    Copy link
    Contributor

    New changeset 523497c by Miss Islington (bot) in branch '3.7':
    bpo-38183: Test_idle ignores user config directory #60402)
    523497c

    @koobs
    Copy link

    koobs commented Sep 17, 2019

    I can restart the worker to create the environment that reproduces the issue at any time to confirm the test passes, just let me know

    @terryjreedy
    Copy link
    Member

    Except for an unrelated gui test on AMD Alpine, the revised tests pass all buildbots. So try with the reproducing condition whenever you want.

    @koobs
    Copy link

    koobs commented Sep 17, 2019

    Thanks Terry, I've restarted the worker under sudo

    The following builds are underway:

    https://buildbot.python.org/all/#/builders/168/builds/1467 (default)
    https://buildbot.python.org/all/#/builders/212/builds/218 (3.8)
    https://buildbot.python.org/all/#/builders/173/builds/589 (3.7)

    @vstinner
    Copy link
    Member Author

    I can restart the worker to create the environment that reproduces the issue at any time to confirm the test passes, just let me know

    Running test_idle as an user different than root and with HOME=/root env var (or HOME=/) should be enough to reproduce the issue, no?

    I understand that test_idle has been fixed in 3.7, 3.8 and master. The buildbot worker configuration has also been fixed, so can we close the issue? Or does someone want to attempt to fix Python 2.7 as well? I don't think that it's worth it to invest too much time in 2.7 which will be unsupported in 3 months;

    @koobs
    Copy link

    koobs commented Sep 17, 2019

    @victor Yes. I restarted the worker to re-create reproduction conditions. It looks like default, 3.8 and 3.7 are OK now after Terry;s commits, with 2.7 failing (expected):

    https://buildbot.python.org/all/#/builders/169/builds/170

    It would be nice to fix the bug in all supported branches until they are EoL

    @vstinner
    Copy link
    Member Author

    It would be nice to fix the bug in all supported branches until they are EoL

    Or just fix the buildbot which means less work to do :-)

    @terryjreedy
    Copy link
    Member

    When I thought a simple change to one file was enough, I thought to backport to 2.7. But given that I will not backport the followup changes that will affect users, I am not going to backport the more complicated changes.

    @terryjreedy terryjreedy changed the title test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError test_idle should not access or modify user config directory Sep 17, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes tests Tests in the Lib/test dir topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants