Skip to content

libnvme_mi: check-public-headers test fails when building with mi disabled #3331

@bgoing-micron-oss

Description

@bgoing-micron-oss

The libnvme_mi_* public methods are included in libnvme.ld, but when building with mi=disabled, the mi.h and libnvme-mi.h files don't get installed, so check-public-headers fails.

I investigated moving the libnvme_mi_* methods into a separate libnvme-mi.ld, similar to libnvmf.ld, but even with mi disabled, libnvme_mi_status_to_string is used outside of libnvme. There is an implementation for this in no-mi.c, which gets compiled and used when mi is disabled, but the declaration for the method is in mi.h, which doesn't get installed when mi is disabled, so there is still a disconnect.

Possible solutions:

  • Install mi.h and libnvme-mi.h even when want_mi is false, since they are still included unconditionally in files outside of libnvme. This fixes the test behavior and fixes the potential include issues from including libnvme-mi.h and mi.h when they aren't installed, but it also includes the declarations for a lot of methods that will not have implementations when built with mi disabled.
  • Move the libnvme_mi_* methods into a separate .ld file and conditionally remove the includes of libnvme-mi.h and uses of libnvme_mi_status_to_string when mi is disabled.

@igaw If you have a preference for how this gets resolved, I'd be happy to work on the implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions