Open
Conversation
If this is missing *and* you have a new enough Xen with the headers
that defines this NUMA stub, then linking the XAPI unit tests would
fail with:
```
File "ocaml/xenopsd/xc/dune", line 83, characters 7-21:
83 | (name xenops_xc_main)
^^^^^^^^^^^^^^
/usr/bin/ld: ocaml/libs/xenctrl-ext/libxenctrl_ext_stubs.a(xenctrlext_stubs.o): in function `stub_xc_domain_numa_get_node_pages_wrapper':
/home/edvint-670/git/xen-api/_build/default/ocaml/libs/xenctrl-ext/xenctrlext_stubs.c:762:(.text+0x1d61): undefined reference to `stub_xc_domain_numa_get_node_pages'
```
The implementation of that function would be in xenctrl_stubs.c, but the
mock xenctrl here replaces that (the headers come from the real xenctrl,
and declare that this function is implemented).
The way this stub is implemented in xenctrlext in xenopsd is unusual,
because it directly calls another C stub implemented in another library.
None of the other stubs work that way: they usually implement the
functionality themselves.
Signed-off-by: Edwin Török <edwin.torok@citrix.com>
Member
Author
|
Previously this worked because I had an old Xen RPM installed (which didn't declare this function in its headers). But now I have a new Xen RPM installed on another dev VM, and there XAPI would fail to build its unit tests. This PR fixes it. |
lindig
approved these changes
Mar 16, 2026
| CAMLprim value stub_xc_domain_numa_get_node_pages(value v1, value v2) | ||
| { | ||
| CAMLparam2(v1, v2); | ||
| caml_failwith(__func__); |
Contributor
There was a problem hiding this comment.
This function breaks the pattern established by the other functions above. Should they use CAMLnoreturn as well and use caml_failwith(__func__)?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If this is missing and you have a new enough Xen with the headers that defines this NUMA stub, then linking the XAPI unit tests would fail with:
The implementation of that function would be in xenctrl_stubs.c, but the mock xenctrl here replaces that (the headers come from the real xenctrl, and declare that this function is implemented).
The way this stub is implemented in xenctrlext in xenopsd is unusual, because it directly calls another C stub implemented in another library. None of the other stubs work that way: they usually implement the functionality themselves.