Skip to content

test_crypt fails on OpenBSD #69474

Closed
Closed

Description

@vstinner
BPO 25287
Nosy @vstinner, @cedk, @serhiy-storchaka, @applio
PRs
  • bpo-25287: Backport new tests for crypt and skip test_crypt on OpenBSD. #4111
  • [2.7] bpo-25287: Improve test_crypt and skip it on OpenBSD. (GH-4111). #4112
  • Files
  • crypt_openbsd.patch
  • 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 = None
    closed_at = <Date 2017-10-24.20:36:06.526>
    created_at = <Date 2015-10-01.06:49:50.962>
    labels = ['3.7', 'type-bug', 'library']
    title = 'test_crypt fails on OpenBSD'
    updated_at = <Date 2017-10-24.20:36:06.525>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-10-24.20:36:06.525>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-10-24.20:36:06.526>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2015-10-01.06:49:50.962>
    creator = 'vstinner'
    dependencies = []
    files = ['40639']
    hgrepos = []
    issue_num = 25287
    keywords = ['patch']
    message_count = 8.0
    messages = ['251998', '252158', '252592', '299193', '303316', '304929', '304938', '304940']
    nosy_count = 7.0
    nosy_names = ['jafo', 'vstinner', 'ced', 'python-dev', 'rpointel', 'serhiy.storchaka', 'davin']
    pr_nums = ['4111', '4112']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue25287'
    versions = ['Python 3.6', 'Python 3.7']

    Activity

    1. vstinner commented on Oct 1, 2015

      @vstinner
      MemberAuthor

      It looks like crypt.crypt('', crypt.METHOD_CRYPT) returns None. This method must be excluded from crypt.methods. Attached patch should fix the issue, but I didn't try it on OpenBSD.

      Python 3.4-3.6 is affect, Python 2.7 is not affect (crypt.methods was introduced in Python 3).

      http://buildbot.python.org/all/builders/x86%20OpenBSD%203.5/builds/186/steps/test/logs/stdio

      test_saltedcrypt (test.test_crypt.CryptTestCase) ... ERROR

      ======================================================================
      ERROR: test_saltedcrypt (test.test_crypt.CryptTestCase)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/home/python-builds/3.5.borja-openbsd-x86/build/Lib/test/test_crypt.py", line 23, in test_saltedcrypt
          self.assertEqual(len(pw), method.total_size)
      TypeError: object of type 'NoneType' has no len()

    2. python-dev commented on Oct 2, 2015

      python-devmannequin
      Mannequin

      New changeset 4da7edbf78d4 by Victor Stinner in branch 'default':
      Issue bpo-25287: Don't add crypt.METHOD_CRYPT to crypt.methods if it's not
      https://hg.python.org/cpython/rev/4da7edbf78d4

    3. vstinner commented on Oct 9, 2015

      @vstinner
      MemberAuthor

      Hum, the test now fails differently :-(

      ======================================================================
      FAIL: test_methods (test.test_crypt.CryptTestCase)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/home/python-builds/3.x.borja-openbsd-x86/build/Lib/test/test_crypt.py", line 29, in test_methods
          self.assertTrue(len(crypt.methods) >= 1)
      AssertionError: False is not true
    4. vstinner commented on Jul 26, 2017

      @vstinner
      MemberAuthor

      There is no more OpenBSD buildbot. I have no OpenBSD VM. I just close this old issue.

    5. serhiy-storchaka commented on Sep 29, 2017

      @serhiy-storchaka
      Member

      I have an OpenBSD VM.

    6. serhiy-storchaka commented on Oct 24, 2017

      @serhiy-storchaka
      Member

      bpo-31664 fixes test_crypt in 3.7. In other versions the test should be just skipped on OpenBSD. Blowfish is the only method supported on OpenBSD, but it was not supported by the Python's crypt module.

    7. serhiy-storchaka commented on Oct 24, 2017

      @serhiy-storchaka
      Member

      New changeset f52dff6 by Serhiy Storchaka in branch '3.6':
      bpo-25287: Backport new tests for crypt and skip test_crypt on OpenBSD. (bpo-4111)
      f52dff6

    8. serhiy-storchaka commented on Oct 24, 2017

      @serhiy-storchaka
      Member

      New changeset 04c0a40 by Serhiy Storchaka in branch '2.7':
      [2.7] bpo-25287: Backport new tests for crypt and skip test_crypt on OpenBSD. (GH-4111). (bpo-4112)
      04c0a40

    9. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions