
Hi, On Tue, Apr 19, 2022 at 02:40:05PM +0200, Peter Krempa wrote:
On Thu, Apr 14, 2022 at 22:47:14 +0200, Victor Toso wrote:
Minor hand adjustments around syntax, not the metadata per se.
Signed-off-by: Victor Toso <victortoso@redhat.com> --- include/libvirt/libvirt-domain-checkpoint.h | 28 +- include/libvirt/libvirt-domain-snapshot.h | 60 +- include/libvirt/libvirt-domain.h | 877 +++++++++++--------- include/libvirt/libvirt-host.h | 36 +- include/libvirt/libvirt-interface.h | 4 +- include/libvirt/libvirt-network.h | 50 +- include/libvirt/libvirt-nodedev.h | 54 +- include/libvirt/libvirt-nwfilter.h | 4 +- include/libvirt/libvirt-secret.h | 10 +- include/libvirt/libvirt-storage.h | 96 ++- include/libvirt/virterror.h | 394 ++++----- 11 files changed, 877 insertions(+), 736 deletions(-)
[...]
typedef enum { VIR_DOMAIN_RUNNING_UNKNOWN = 0, - VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot */ - VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host */ - VIR_DOMAIN_RUNNING_RESTORED = 3, /* restored from a state file */ - VIR_DOMAIN_RUNNING_FROM_SNAPSHOT = 4, /* restored from snapshot */ - VIR_DOMAIN_RUNNING_UNPAUSED = 5, /* returned from paused state */ - VIR_DOMAIN_RUNNING_MIGRATION_CANCELED = 6, /* returned from migration */ - VIR_DOMAIN_RUNNING_SAVE_CANCELED = 7, /* returned from failed save process */ + VIR_DOMAIN_RUNNING_BOOTED = 1, /* normal startup from boot (Since: v1.0.0) */ + VIR_DOMAIN_RUNNING_MIGRATED = 2, /* migrated from another host (Since: v1.0.0) */
Your script doesn't seem to handle well versions prior to v1.0.0. This specific constant was added in commit v0.9.1-133-gd65a924b34 thus it should be 'Since v0.9.2'.
I actually followed the suggestion to started with v1.0.0. I can change it to work with the exact tags that it would first appear in libvirt if you think it is necessary. CC'ing Andrea for input.
I understand that we might not want to deal with too old releases, but in such case we should rather pick a different marker meaning that the symbol was added too long ago.
Since v1.0.0 is not wrong if it was introduced before v1.0.0. It is just a criteria for adding the version metadata for too old releases, after the fact.
Note that this is definitely not an exhaustive search, just something I've noticed randomly because there were just simply too many symbols refering to v1.0.0 and the particular release was not special in any way, we simply bumped the major version on the 7th anniversary of libvirt.
The simplest way I can think of to verify is to make another script, that looks in the output XML APIs, get the $version and $name and check if $name is present in $version but *not* in $previous_version. Anything that fails here, would be a valid concern to manually check, that is, apart from the v1.0.0 scenario that you pointed above. Thanks for the review. Cheers, Victor