Skip to content

liburing: update to 2.2 #510

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

Merged
merged 2 commits into from
Jun 27, 2022
Merged

Conversation

fischerling
Copy link
Contributor

@fischerling fischerling commented Jun 26, 2022

Simplify the test definitions and bump the required meson version to
use the filesystem module.

Reflect the upstream changes to the custom ./configure script in the
root meson build definition.

Signed-off-by: Florian Fischer [email protected]

@fischerling fischerling force-pushed the update-liburing branch 3 times, most recently from 1bc1459 to 4767f32 Compare June 26, 2022 22:03
@eli-schwartz
Copy link
Member

Hmm, so you're just unconditionally linking to -pthread whether the test needs it or not?

@fischerling
Copy link
Contributor Author

fischerling commented Jun 26, 2022

Hmm, so you're just unconditionally linking to -pthread whether the test needs it or not?

Yes this is what the upstream Makefile does too.
It was changed in axboe/liburing@664bf78

Copy link
Member

@eli-schwartz eli-schwartz left a comment

Choose a reason for hiding this comment

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

@@ -74,13 +88,19 @@ has_cxx = cpp.compiles(code, name: 'C++')
has_ucontext = (cc.has_type('ucontext_t', prefix: '#include <ucontext.h>')
and cc.has_function('makecontext', prefix: '#include <ucontext.h>'))

has_memfd_create = cc.has_function('memfd_create',
args: ['-D_GNU_SOURCE'],
prefix: '#include <sys/mman.h>')
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But this commit is after the liburing-2.2 tag. Should we include the changes in our 2.2 wrap?

Copy link
Member

Choose a reason for hiding this comment

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

Well, probably not. The newly added code is there in the release anyway, the define is needed to prevent conflicting definitions, but the newly added code was immediately dropped post-release, meh. :p

@eli-schwartz
Copy link
Member

While comparing the diff upstream, I realized that this wrap has never set the version: ... kwarg for the library. It's supposed to be the same as the project version (in this case, '2.2' with the soname auto-derived from the first component).

runtests_sh,
args : t[0],
args : test_name,
Copy link
Member

Choose a reason for hiding this comment

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

The test harness will try to detect issues logged in dmesg, but relies on not having intermixed logs in that case. So I think this should probably have used is_parallel: false all along?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! I agree that we should not run the tests in parallel when trying to match dmesg messages to a particular test.
I added an additional test suite running the tests in parallel similar to upstreams make runtests-parallel.

Copy link
Member

Choose a reason for hiding this comment

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

Since there are multiple test suites which I guess shouldn't all be run at the same time by a default meson test, perhaps we should use add_test_setup() to define a test profile which only runs the "once" tests, and declare it as the default?

Copy link
Member

Choose a reason for hiding this comment

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

Also style nit: I'd probably put the is_parallel kwarg after the "args" kwarg.

@fischerling
Copy link
Contributor Author

While comparing the diff upstream, I realized that this wrap has never set the version: ... kwarg for the library. It's supposed to be the same as the project version (in this case, '2.2' with the soname auto-derived from the first component).

Thanks. The wrap now sets the library version and soversion derived from the project version.

I kept the changes relating the review in a separate commit which I would squash when the PR is ready.

runtests_sh,
args : t[0],
args : test_name,
Copy link
Member

Choose a reason for hiding this comment

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

Since there are multiple test suites which I guess shouldn't all be run at the same time by a default meson test, perhaps we should use add_test_setup() to define a test profile which only runs the "once" tests, and declare it as the default?

runtests_sh,
args : t[0],
args : test_name,
Copy link
Member

Choose a reason for hiding this comment

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

Also style nit: I'd probably put the is_parallel kwarg after the "args" kwarg.

@eli-schwartz
Copy link
Member

Alright, that looks pretty good. Time to squash the fixup changes I think.

I'm thinking organization-wise it might make sense to have two commits:

  • one for the cleanups
  • then one for the version bump and associated config.h / test list updates

What do you think?

* Set library version.
* Run tests sequentially to not intermix dmesg output.
* Add a 'parallel' test suite to mirror make test-parallel.
* Add default test setup running each test once (the 'once' suite)

Suggested-by: Eli Schwartz <[email protected]>
Signed-off-by: Florian Fischer <[email protected]>
Simplify the test definitions by using the filesystem module and always
depending on the thread dependency.

Reflect the upstream changes between 2.1 and 2.2 to the custom ./configure
script in the root meson build definition.

Signed-off-by: Florian Fischer <[email protected]>
@fischerling
Copy link
Contributor Author

Alright, that looks pretty good. Time to squash the fixup changes I think.

I'm thinking organization-wise it might make sense to have two commits:

  • one for the cleanups
  • then one for the version bump and associated config.h / test list updates

What do you think?

Sounds good to me.
I have squashed and swapped the cleanup changes with the actual update.

@eli-schwartz eli-schwartz merged commit b800267 into mesonbuild:master Jun 27, 2022
@fischerling fischerling deleted the update-liburing branch June 27, 2022 19:15
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