classification
Title: test_idle should not access or modify user config directory
Type: behavior Stage: resolved
Components: IDLE, Tests Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: koobs, miss-islington, terry.reedy, vstinner
Priority: normal Keywords: patch

Created on 2019-09-16 07:39 by vstinner, last changed 2019-09-17 14:39 by terry.reedy. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 16198 merged terry.reedy, 2019-09-16 19:07
PR 16207 merged miss-islington, 2019-09-16 23:04
PR 16208 merged miss-islington, 2019-09-16 23:04
Messages (16)
msg352523 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-09-16 07:39
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
msg352524 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-09-16 07:41
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
msg352535 - (view) Author: Kubilay Kocak (koobs) (Python triager) Date: 2019-09-16 10:16
This is related to issue 37400 and issue 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 #37400 and #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
msg352547 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-09-16 14:21
I suggest to fix the buildbot workers right now. I plan to leave this issue open until test_idle is fixed.
msg352559 - (view) Author: Kubilay Kocak (koobs) (Python triager) Date: 2019-09-16 17:28
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
msg352573 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-09-16 19:30
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:

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

1. 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.

2. 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.
msg352591 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-09-16 23:04
New changeset 0048afc16a7e7301d5c565237db271505e5fbed9 by Terry Jan Reedy in branch 'master':
bpo-38183: Test_idle ignores user config directory GH-16198)
https://github.com/python/cpython/commit/0048afc16a7e7301d5c565237db271505e5fbed9
msg352593 - (view) Author: miss-islington (miss-islington) Date: 2019-09-17 03:33
New changeset ad845becf29afe0507a46a4b885a9670b5d7639d by Miss Islington (bot) in branch '3.8':
bpo-38183: Test_idle ignores user config directory GH-16198)
https://github.com/python/cpython/commit/ad845becf29afe0507a46a4b885a9670b5d7639d
msg352594 - (view) Author: miss-islington (miss-islington) Date: 2019-09-17 03:33
New changeset 523497cbdc8292bfc12938aaaca0ad02a7708c25 by Miss Islington (bot) in branch '3.7':
bpo-38183: Test_idle ignores user config directory GH-16198)
https://github.com/python/cpython/commit/523497cbdc8292bfc12938aaaca0ad02a7708c25
msg352595 - (view) Author: Kubilay Kocak (koobs) (Python triager) Date: 2019-09-17 04:58
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
msg352605 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-09-17 06:23
Except for an unrelated gui test on AMD Alpine, the revised tests pass all buildbots.  So try with the reproducing condition whenever you want.
msg352608 - (view) Author: Kubilay Kocak (koobs) (Python triager) Date: 2019-09-17 06:25
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)
msg352623 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-09-17 09:43
> 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;
msg352624 - (view) Author: Kubilay Kocak (koobs) (Python triager) Date: 2019-09-17 09:46
@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
msg352625 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-09-17 09:51
> 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 :-)
msg352640 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-09-17 14:37
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.
History
Date User Action Args
2019-09-17 14:39:23terry.reedysettitle: test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError -> test_idle should not access or modify user config directory
2019-09-17 14:37:00terry.reedysetstatus: open -> closed
versions: - Python 2.7
messages: + msg352640

resolution: fixed
stage: commit review -> resolved
2019-09-17 09:51:25vstinnersetmessages: + msg352625
2019-09-17 09:46:28koobssetmessages: + msg352624
2019-09-17 09:43:32vstinnersetmessages: + msg352623
2019-09-17 06:25:44koobssetmessages: + msg352608
2019-09-17 06:23:10terry.reedysetmessages: + msg352605
stage: patch review -> commit review
2019-09-17 04:58:40koobssetmessages: + msg352595
2019-09-17 03:33:09miss-islingtonsetmessages: + msg352594
2019-09-17 03:33:07miss-islingtonsetnosy: + miss-islington
messages: + msg352593
2019-09-16 23:04:37miss-islingtonsetpull_requests: + pull_request15812
2019-09-16 23:04:32miss-islingtonsetstage: commit review -> patch review
pull_requests: + pull_request15811
2019-09-16 23:04:24terry.reedysetmessages: + msg352591
2019-09-16 19:30:58terry.reedysettype: behavior
stage: patch review -> commit review
messages: + msg352573
versions: + Python 2.7, Python 3.7, Python 3.8
2019-09-16 19:07:33terry.reedysetkeywords: + patch
stage: patch review
pull_requests: + pull_request15802
2019-09-16 17:28:52koobssetmessages: + msg352559
2019-09-16 14:21:32vstinnersetmessages: + msg352547
2019-09-16 10:16:14koobssetmessages: + msg352535
2019-09-16 07:41:20vstinnersetmessages: + msg352524
2019-09-16 07:39:19vstinnersetnosy: + koobs
2019-09-16 07:39:09vstinnercreate