Author terry.reedy
Recipients ned.deily, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware
Date 2017-06-20.17:14:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497978867.14.0.417332837919.issue30715@psf.upfronthosting.co.za>
In-reply-to
Content
On my Win10-64 machine, test_winreg hangs, impervious to ^C.  I have to close Command Prompt.  (With IDLE I can run just test_winreg and then Restart Shell.)  This happened with repository builds last Friday and today, and with installed 3.6.2rc1.  But I believe I ran the entire test suite (to successful completion) not too many days before.

The culprit is

    def test_dynamic_key(self):
        # Issue2810, when the value is dynamically generated, these
        # raise "WindowsError: More data is available" in 2.6 and 3.1
        try:
            EnumValue(HKEY_PERFORMANCE_DATA, 0)
        except OSError as e:
            if e.errno in (errno.EPERM, errno.EACCES):
                self.skipTest("access denied to registry key "
                              "(are you running in a non-interactive session?)")
            raise
        QueryValueEx(HKEY_PERFORMANCE_DATA, "")

Commenting out the whole function or both the EnumValue and QueryValueEx calls (replacing the former with pass) is required to allow the test to run (and pass).

I have no idea why behavior on my machine is different from buildbots.  If the problem is with my registry, could the test be more robust?  Having to kill my console session, and lose history, after running the test suite, is unpleasant.
History
Date User Action Args
2017-06-20 17:14:27terry.reedysetrecipients: + terry.reedy, paul.moore, tim.golden, ned.deily, zach.ware, steve.dower
2017-06-20 17:14:27terry.reedysetmessageid: <1497978867.14.0.417332837919.issue30715@psf.upfronthosting.co.za>
2017-06-20 17:14:27terry.reedylinkissue30715 messages
2017-06-20 17:14:26terry.reedycreate