From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: "Cavitt, Jonathan" <jonathan.cavitt@intel.com>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] lib/igt_aux.c: since procps-ng 4.0.5, PIDS_VAL() takes 3 arguments, not 4
Date: Sat, 4 Jan 2025 22:44:29 +0100 [thread overview]
Message-ID: <20250104224429.0d3d00de@windsurf> (raw)
In-Reply-To: <BL1PR11MB5445B391A20BFCB58D2EE8D7E5152@BL1PR11MB5445.namprd11.prod.outlook.com>
Hello Jonathan,
Thanks for the quick feedback!
On Fri, 3 Jan 2025 23:33:27 +0000
"Cavitt, Jonathan" <jonathan.cavitt@intel.com> wrote:
> "HAVE_LIBPROC2_POST_4_0_5_API" works as a name for this new tag,
> though I wonder if "HAVE_LIBPROC2_NO_INFO" would also work?
I don't have a strong opinion on the macro name, but "NO_INFO" sounds
very generic. Here we're just talking about the "info" argument of this
specific PIDS_VAL() macro.
It is worth mentioning that I had reported the issue to upstream
procps-ng and they don't consider it as a bug:
https://gitlab.com/procps-ng/procps/-/issues/366
Also, they said that the SONAME has changed. Which they indeed did in:
https://gitlab.com/procps-ng/procps/-/commit/f8d20531f840e280fcbe1f3a0634ab72c9b4e74d
So maybe our macro name should be based somehow on this SONAME, which
identifies the API version?
> I don't see any other granular version checks in the meson build file (at
> least, I don't see any that aren't strict version requirements for certain
> dependencies), so AFAICT this type of tag is fairly novel. So whatever
> name we end up choosing may end up inadvertently becoming a
> standard naming convention for future tags like this one.
Note that I am not entirely happy with it being a version check.
Ideally, we shouldn't check the version, but rather test the feature
itself: build a simple program that uses the 4 argument variant of
PIDS_VAL() and decide depending on the success/failure which variant we
should use. This is generally less fragile than a version check, at
least IMO.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
next prev parent reply other threads:[~2025-01-04 21:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-03 22:26 [PATCH i-g-t] lib/igt_aux.c: since procps-ng 4.0.5, PIDS_VAL() takes 3 arguments, not 4 Thomas Petazzoni
2025-01-03 23:33 ` Cavitt, Jonathan
2025-01-04 21:44 ` Thomas Petazzoni [this message]
2025-01-06 17:42 ` Lucas De Marchi
2025-01-09 14:45 ` Kamil Konieczny
2025-01-03 23:44 ` ✓ Xe.CI.BAT: success for " Patchwork
2025-01-03 23:47 ` ✓ i915.CI.BAT: " Patchwork
2025-01-04 2:27 ` ✗ i915.CI.Full: failure " Patchwork
2025-01-04 6:48 ` ✗ Xe.CI.Full: " Patchwork
2025-01-07 19:54 ` [PATCH i-g-t] " Kamil Konieczny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250104224429.0d3d00de@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jonathan.cavitt@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox