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

Improve the "expected failures" experience #178

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

jku
Copy link
Member

@jku jku commented Aug 27, 2024

If we add more tests that we consider more or less optional features, we need a way for clients to manage them."xfails" seems like it should work for that: Make it possible to write the expected failures to a file next to the client-under-test executable

  • This should make managing a longer xfail list reasonable.
  • This also means we don't need to repeat the xfails for go-tuf in two places.

I'm happy to get other opinions on this too: I have no idea if there are best practices for this sort of thing, I just made this up...


This is a change in the GitHub Action API (since I removed the expected-failures input) so we should bump major version. That said, I don't think any outside user was using the input yet.

Should make #33 more feasible

@jku jku requested a review from AdamKorcz August 27, 2024 16:17

try:
with open(xfail_file) as f:
return f.read().splitlines()
Copy link
Member Author

@jku jku Aug 28, 2024

Choose a reason for hiding this comment

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

it might be useful to parse the content a bit -- e.g. allow comments so you could do something like this

# RSA PSS not yet supported https://github.com/theupdateframework/go-tuf/pull/625 
test_keytype_and_scheme[rsa/rsassa-pss-sha256]

in the .xfails file... but maybe we add that when someone actually wants it

If we add more tests that we consider more or less optional features,
we need a way for clients to manage them.

xfails seems like it should work for that: Make it possible to
write the expected failures to a file next to the client-under-test
executable. This should make managing a longer xfail list reasonable.

This also means we don't need to repeat the xfails for go-tuf in two
places.

Signed-off-by: Jussi Kukkonen <[email protected]>
@jku
Copy link
Member Author

jku commented Aug 28, 2024

rebased on main

@jku jku merged commit 733adb0 into theupdateframework:main Aug 29, 2024
3 checks passed
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