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

tests: Test to make sure partition and disk names match libparted #93

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bcl
Copy link
Contributor

@bcl bcl commented Aug 4, 2022

In the past there have been problems with pyparted not including all of
the partition flags from libparted due to it's use of enums in the
_LAST macros. These were not caught by the tests because they skipped
flags that had no attribute (a valid case when building against an older
parted).

This adds tests that include all known parted flags, and uses libparted
to decide which ones must be included. The test will return errors for
all flags that libparted reports that are not attributes of _ped

If libparted reports a flag that pyparted does not support it is not
a failure and will be reported as a skipped test:

skipped 'Unknown flag: linux-home'

In the past there have been problems with pyparted not including all of
the partition flags from libparted due to it's use of enums in the
_LAST macros. These were not caught by the tests because they skipped
flags that had no attribute (a valid case when building against an older
parted).

This adds tests that include all known parted flags, and uses libparted
to decide which ones must be included. The test will return errors for
all flags that libparted reports that are not attributes of _ped

If libparted reports a flag that pyparted does not support it is not
a failure and will be reported as a skipped test:

    skipped 'Unknown flag: linux-home'
@bcl
Copy link
Contributor Author

bcl commented Aug 5, 2022

Cool, the new test is working. It's running against F36 where the new parted hasn't gone stable yet, so it is reporting that it is missing the known flags.

@dcantrell
Copy link
Owner

I like this change, but the unit tests have failed.

@dcantrell dcantrell self-requested a review October 13, 2022 19:15
Copy link
Owner

@dcantrell dcantrell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change, but the unit tests have failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants