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

Introduce FIX ME assertion in uktest #1027

Open
nderjung opened this issue Aug 7, 2023 · 3 comments · May be fixed by #1401
Open

Introduce FIX ME assertion in uktest #1027

nderjung opened this issue Aug 7, 2023 · 3 comments · May be fixed by #1401
Assignees
Labels
kind/enhancement New feature or request lib/uktest uktest: Unikraft Test Suite topic/testing Topics on testing

Comments

@nderjung
Copy link
Member

nderjung commented Aug 7, 2023

Feature request summary

This issue tracks the addition of a new intermediate assertion to be used in uktest that is used for known failures which are temporarily and purposefully omitted from the failure count such that the internal test suite can pass.

This intermediate assertion level, to be introduced as FIX ME or UK_FIXME_{ASSERTF,EXPECT,etc...} is used to downgrade known failing test assertions and therefore not to be counted from the overall number of test failures. Explicitly, this makes the unikernel pass a test suite which would otherwise fail.

This is useful in a number of contexts and comes with explicit requirements so as to prevent misuse or to purposefully introduce error-prone code.

Unikraft is still under development and as a result, some tests from libc-test simply do not yet apply and therefore fail. This does not prevent Unikraft to operate under a number of known working conditions. Instead of simply disabling this test in lieu of this intermediate assertion level, the replacement with a FIX ME test is used to signify a test for a set of functionality that has yet to be implemented. Otherwise removing the test would a). potentially lead the test to be forgotten in the sands of time and never to be run again and b). mislead overall coverage of Unikraft's ability to handle the full suite of libc-tests.

To this end, introducing a new middle-ground that simply warns the user that a test has been omitted from the general failure count is intended to not only allow tests to pass that would enable the unikernel to operate but also help identify future sets of functionality that need to be implemented by Unikraft.

This addition comes with a strict requirement that must be included in uktest's documentation: changes from a general assertion to a FIXME assertion must come with an associated GitHub issue that is addressed as a comment preamble such that discussion and tracking can be done for the specific assertion.

For example, for a given assertion, the following diff is considered valid:

- UK_TEST_EXPECT_NOT_NULL(var)
+ FIXME(nderjung): See https://github.com/unikraft/unikraft/issue/xyz
+ UK_FIXME_EXPECT_NOT_NULL(var)

Finally, a strict-mode should be provided as an option to uktest which when enabled, still counts FIXME assertions towards the over failure count. This can be useful for debugging purposes.

Describe alternatives

No response

Related architectures

None

Related platforms

None

Additional context

This issue also acts as an RFC.

Seeking comments and feedback from: @skuenzer @marcrittinghaus @michpappas

@nderjung nderjung added kind/enhancement New feature or request lib/uktest uktest: Unikraft Test Suite topic/testing Topics on testing labels Aug 7, 2023
@CharanSriramUni
Copy link

Hi! I'm a student at UT Austin taking a course in virtualization, and I wanted to see if I could contribute to this issue. Is this issue still relevant, and if so, could I take a stab at it?

@YuanSamuel
Copy link

Hi! I'll be working with Charan on this issue—could I also be assigned?

Additionally, is there some other context we should know or roadmap of changes we should make to implement this? We just want to make sure we're making the right changes in the right places.

Thanks!

@nderjung
Copy link
Member Author

nderjung commented Apr 2, 2024

Thanks @CharanSriramUni and @YuanSamuel for volunteering to tackle this issue, it's very much appreciated!

As for scope and coverage, the issue should have it all. We aim to support all tests (whether properly or via FIXME) from libc-test. However, please do start iteratively and with a smaller change to uktest and libc-test first (e.g. one test, or one suite). This will allow you to gather feedback on your approach (namely from @razvand and @michpappas who can provide this, or at least do proper delegation of this topic and its implementation to relevant other community members).

In case you have not already, do make sure to join our Discord server to get in contact with maintainers and other contributors if you run into any issues.

@YuanSamuel YuanSamuel linked a pull request Apr 30, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request lib/uktest uktest: Unikraft Test Suite topic/testing Topics on testing
Projects
Status: 🏗 In Progress
Development

Successfully merging a pull request may close this issue.

3 participants