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

CTest fails on RHEL7 - 42 - python-unit-ssg-module #10004

Closed
marcusburghardt opened this issue Dec 21, 2022 · 0 comments · Fixed by #10038
Closed

CTest fails on RHEL7 - 42 - python-unit-ssg-module #10004

marcusburghardt opened this issue Dec 21, 2022 · 0 comments · Fixed by #10038
Assignees
Labels
productization-issue Issue found in upstream stabilization process. RHEL7 Red Hat Enterprise Linux 7 product related.

Comments

@marcusburghardt
Copy link
Member

Description of problem:

Following (CTest) tests fail on RHEL-7.9:

The following tests FAILED:
	 42 - python-unit-ssg-module (Failed)
Errors while running CTest
gmake[1]: *** [test] Error 8

SCAP Security Guide Version:

master as of 2022-12-17

Operating System Version:

RHEL-7.9

Steps to Reproduce:

  1. Run CTest

Actual Results:

42/95 Test #42: python-unit-ssg-module .............................................***Failed    4.03 sec
============================= test session starts ==============================
platform linux2 -- Python 2.7.5 -- py-1.4.32 -- pytest-2.7.0
rootdir: /root/rpmbuild/BUILD/scap-security-guide-0.1.66/tests/unit/ssg-module, inifile: 
collected 130 items

../../tests/unit/ssg-module/test_ansible.py .
../../tests/unit/ssg-module/test_boolean_expressions.py ........FFF
../../tests/unit/ssg-module/test_build_cpe.py ....
../../tests/unit/ssg-module/test_build_remediations.py ......
../../tests/unit/ssg-module/test_build_renumber.py ....................
../../tests/unit/ssg-module/test_build_yaml.py ....................ssss..s
../../tests/unit/ssg-module/test_cce.py ..
../../tests/unit/ssg-module/test_checks.py .
../../tests/unit/ssg-module/test_common.py ..
../../tests/unit/ssg-module/test_controls.py .........
../../tests/unit/ssg-module/test_id_translate.py ......s..
../../tests/unit/ssg-module/test_jinja.py ..
../../tests/unit/ssg-module/test_oval.py .
../../tests/unit/ssg-module/test_platform_expressions.py ...FF
../../tests/unit/ssg-module/test_playbook_builder.py .
../../tests/unit/ssg-module/test_products.py .
../../tests/unit/ssg-module/test_requirement_specs.py FF
../../tests/unit/ssg-module/test_rule_dir_stats.py ......
../../tests/unit/ssg-module/test_rule_yaml.py .
../../tests/unit/ssg-module/test_rules.py .....
../../tests/unit/ssg-module/test_templates.py ..
../../tests/unit/ssg-module/test_utils.py ...........
../../tests/unit/ssg-module/test_yaml.py .

=================================== FAILURES ===================================
____________________________ test_args_and_version _____________________________

algebra = <ssg.boolean_expression.Algebra object at 0x7ffb9977dfd0>

    def test_args_and_version(algebra):
>       exp = algebra.parse(u'oranges[aaa] & oranges[bbb]>=2')

../../tests/unit/ssg-module/test_boolean_expressions.py:63: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../ssg/ext/boolean/boolean.py:256: in parse
    ast.append(self.Symbol(token_string))
../../ssg/boolean_expression.py:56: in __init__
    self.requirement = requirement_specs.Requirement(obj)
../../ssg/requirement_specs.py:108: in __init__
    [_spec_to_version_specifier(spec) for spec in self._req.specs]
../../ssg/requirement_specs.py:100: in _spec_to_version_specifier
    evr = _parse_version_into_evr(ver)
../../ssg/requirement_specs.py:95: in _parse_version_into_evr
    return _get_evr(ver)
../../ssg/requirement_specs.py:47: in _evr_from_tuple
    return _evr_from_tuple_for_sure(version_tuple)
../../ssg/requirement_specs.py:34: in _evr_from_tuple_for_sure
    _add_version_elements_to_evr_component(evr, elements, component)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

evr = {'epoch': None, 'release': None, 'version': '2'}, elements = ['2']
component = 'version'

    def _add_version_elements_to_evr_component(evr, elements, component):
        evr[component] = '.'.join(elements if elements else ['0'])
>       elements.clear()
E       AttributeError: 'list' object has no attribute 'clear'

../../ssg/requirement_specs.py:17: AttributeError
_______________________ test_evaluate_simple_version_ops _______________________

algebra = <ssg.boolean_expression.Algebra object at 0x7ffb99445dd0>

    def test_evaluate_simple_version_ops(algebra):
>       exp = algebra.parse(u'oranges==2')

../../tests/unit/ssg-module/test_boolean_expressions.py:72: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../ssg/ext/boolean/boolean.py:256: in parse
    ast.append(self.Symbol(token_string))
../../ssg/boolean_expression.py:56: in __init__
    self.requirement = requirement_specs.Requirement(obj)
../../ssg/requirement_specs.py:108: in __init__
    [_spec_to_version_specifier(spec) for spec in self._req.specs]
../../ssg/requirement_specs.py:100: in _spec_to_version_specifier
    evr = _parse_version_into_evr(ver)
../../ssg/requirement_specs.py:95: in _parse_version_into_evr
    return _get_evr(ver)
../../ssg/requirement_specs.py:47: in _evr_from_tuple
    return _evr_from_tuple_for_sure(version_tuple)
../../ssg/requirement_specs.py:34: in _evr_from_tuple_for_sure
    _add_version_elements_to_evr_component(evr, elements, component)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

evr = {'epoch': None, 'release': None, 'version': '2'}, elements = ['2']
component = 'version'

    def _add_version_elements_to_evr_component(evr, elements, component):
        evr[component] = '.'.join(elements if elements else ['0'])
>       elements.clear()
E       AttributeError: 'list' object has no attribute 'clear'

../../ssg/requirement_specs.py:17: AttributeError
______________________ test_evaluate_advanced_version_ops ______________________

algebra = <ssg.boolean_expression.Algebra object at 0x7ffb9916abd0>

    def test_evaluate_advanced_version_ops(algebra):
>       exp = algebra.parse(u'oranges>=1.0,<3.0 and oranges!=2.6')

../../tests/unit/ssg-module/test_boolean_expressions.py:84: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../ssg/ext/boolean/boolean.py:256: in parse
    ast.append(self.Symbol(token_string))
../../ssg/boolean_expression.py:56: in __init__
    self.requirement = requirement_specs.Requirement(obj)
../../ssg/requirement_specs.py:108: in __init__
    [_spec_to_version_specifier(spec) for spec in self._req.specs]
../../ssg/requirement_specs.py:100: in _spec_to_version_specifier
    evr = _parse_version_into_evr(ver)
../../ssg/requirement_specs.py:95: in _parse_version_into_evr
    return _get_evr(ver)
../../ssg/requirement_specs.py:47: in _evr_from_tuple
    return _evr_from_tuple_for_sure(version_tuple)
../../ssg/requirement_specs.py:34: in _evr_from_tuple_for_sure
    _add_version_elements_to_evr_component(evr, elements, component)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

evr = {'epoch': None, 'release': None, 'version': '1'}, elements = ['1']
component = 'version'

    def _add_version_elements_to_evr_component(evr, elements, component):
        evr[component] = '.'.join(elements if elements else ['0'])
>       elements.clear()
E       AttributeError: 'list' object has no attribute 'clear'

../../ssg/requirement_specs.py:17: AttributeError
__________________________________ test_as_id __________________________________

algebra = <test_platform_expressions.PlatformAlgebra object at 0x7ffb99015350>

    def test_as_id(algebra):
        exp1 = algebra.parse(u'package')
        assert exp1.as_id() == "package"
        exp2 = algebra.parse(u'package[test]')
        assert exp2.as_id() == "package_test"
>       exp3 = algebra.parse(u'package[test]>=1.0,<1.2.0-3')

../../tests/unit/ssg-module/test_platform_expressions.py:75: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../ssg/ext/boolean/boolean.py:256: in parse
    ast.append(self.Symbol(token_string))
../../ssg/boolean_expression.py:56: in __init__
    self.requirement = requirement_specs.Requirement(obj)
../../ssg/requirement_specs.py:108: in __init__
    [_spec_to_version_specifier(spec) for spec in self._req.specs]
../../ssg/requirement_specs.py:100: in _spec_to_version_specifier
    evr = _parse_version_into_evr(ver)
../../ssg/requirement_specs.py:95: in _parse_version_into_evr
    return _get_evr(ver)
../../ssg/requirement_specs.py:47: in _evr_from_tuple
    return _evr_from_tuple_for_sure(version_tuple)
../../ssg/requirement_specs.py:34: in _evr_from_tuple_for_sure
    _add_version_elements_to_evr_component(evr, elements, component)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

evr = {'epoch': None, 'release': None, 'version': '1'}, elements = ['1']
component = 'version'

    def _add_version_elements_to_evr_component(evr, elements, component):
        evr[component] = '.'.join(elements if elements else ['0'])
>       elements.clear()
E       AttributeError: 'list' object has no attribute 'clear'

../../ssg/requirement_specs.py:17: AttributeError
_________________________________ test_as_dict _________________________________

algebra = <test_platform_expressions.PlatformAlgebra object at 0x7ffb99118b90>

    def test_as_dict(algebra):
        exp1 = algebra.parse(u'package')
        exp1_dict = {
            "arg": "",
            "id": "package",
            "name": "package",
            'ver_specs': [],
            'ver_specs_cpe': '',
            'ver_specs_id': '',
            'ver_specs_title': ''
        }
        assert exp1.as_dict() == exp1_dict
        exp2 = algebra.parse(u'package[test]')
        exp2_dict = {
            "arg": "test",
            "id": "package_test",
            "name": "package",
            'ver_specs': [],
            'ver_specs_cpe': '',
            'ver_specs_id': '',
            'ver_specs_title': '',
        }
        assert exp2.as_dict() == exp2_dict
>       exp3 = algebra.parse(u'package[test]>1.0')

../../tests/unit/ssg-module/test_platform_expressions.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../ssg/ext/boolean/boolean.py:256: in parse
    ast.append(self.Symbol(token_string))
../../ssg/boolean_expression.py:56: in __init__
    self.requirement = requirement_specs.Requirement(obj)
../../ssg/requirement_specs.py:108: in __init__
    [_spec_to_version_specifier(spec) for spec in self._req.specs]
../../ssg/requirement_specs.py:100: in _spec_to_version_specifier
    evr = _parse_version_into_evr(ver)
../../ssg/requirement_specs.py:95: in _parse_version_into_evr
    return _get_evr(ver)
../../ssg/requirement_specs.py:47: in _evr_from_tuple
    return _evr_from_tuple_for_sure(version_tuple)
../../ssg/requirement_specs.py:34: in _evr_from_tuple_for_sure
    _add_version_elements_to_evr_component(evr, elements, component)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

evr = {'epoch': None, 'release': None, 'version': '1'}, elements = ['1']
component = 'version'

    def _add_version_elements_to_evr_component(evr, elements, component):
        evr[component] = '.'.join(elements if elements else ['0'])
>       elements.clear()
E       AttributeError: 'list' object has no attribute 'clear'

../../ssg/requirement_specs.py:17: AttributeError
_____________________________ test_evr_from_tuple ______________________________

    def test_evr_from_tuple():
        v = requirement_specs._evr_from_tuple(
>           ('00000001', '00000022', '00000333', '*final-', '00004444', '*final'))

../../tests/unit/ssg-module/test_requirement_specs.py:8: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../ssg/requirement_specs.py:47: in _evr_from_tuple
    return _evr_from_tuple_for_sure(version_tuple)
../../ssg/requirement_specs.py:34: in _evr_from_tuple_for_sure
    _add_version_elements_to_evr_component(evr, elements, component)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

evr = {'epoch': None, 'release': None, 'version': '1.22.333'}
elements = ['1', '22', '333'], component = 'version'

    def _add_version_elements_to_evr_component(evr, elements, component):
        evr[component] = '.'.join(elements if elements else ['0'])
>       elements.clear()
E       AttributeError: 'list' object has no attribute 'clear'

../../ssg/requirement_specs.py:17: AttributeError
_________________________ test_parse_version_into_evr __________________________

    def test_parse_version_into_evr():
>       v = requirement_specs._parse_version_into_evr('1.22.333-4444')

../../tests/unit/ssg-module/test_requirement_specs.py:21: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../ssg/requirement_specs.py:95: in _parse_version_into_evr
    return _get_evr(ver)
../../ssg/requirement_specs.py:47: in _evr_from_tuple
    return _evr_from_tuple_for_sure(version_tuple)
../../ssg/requirement_specs.py:34: in _evr_from_tuple_for_sure
    _add_version_elements_to_evr_component(evr, elements, component)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

evr = {'epoch': None, 'release': None, 'version': '1.22.333'}
elements = ['1', '22', '333'], component = 'version'

    def _add_version_elements_to_evr_component(evr, elements, component):
        evr[component] = '.'.join(elements if elements else ['0'])
>       elements.clear()
E       AttributeError: 'list' object has no attribute 'clear'

../../ssg/requirement_specs.py:17: AttributeError
=============== 7 failed, 117 passed, 6 skipped in 3.86 seconds ================

Expected Results:

no failing tests

Additional Information/Debugging Steps:

@marcusburghardt marcusburghardt added productization-issue Issue found in upstream stabilization process. RHEL7 Red Hat Enterprise Linux 7 product related. labels Dec 21, 2022
@vojtapolasek vojtapolasek self-assigned this Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
productization-issue Issue found in upstream stabilization process. RHEL7 Red Hat Enterprise Linux 7 product related.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants