Skip to content

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'

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

In the past there have been problems with pyparted not including all of
the partition flags from libparted due to its 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 bcl force-pushed the master-known-flags branch from c0df3a7 to 6ea817c Compare January 21, 2025 22:37
@bcl
Copy link
Contributor Author

bcl commented Jan 21, 2025

Rebased onto main, added no_automount to the test. Needs the semicolon fix from #111 for tests to pass.

@bcl bcl requested a review from dcantrell January 21, 2025 22:38
@dcantrell dcantrell merged commit 68fdb5e into dcantrell:main Jan 24, 2025
1 check 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