dsp: base: decode_pldm_base_negotiate_transfer_params_resp() is stable
cb987c5c8863 ("dsp: base: Added
decode_pldm_base_negotiate_transfer_params_req()") accidentally
set `decode_pldm_base_negotiate_transfer_params_resp()` back to
`LIBPLDM_ABI_TESTING` when it was stabilized by 26c8eb2a2f22 ("Stabilize
PLDM File Transfer related APIs").
Further, the existing integration of abi-compliance-checker was unable
to find the fault as the generated dump contained testing symbols, and
so decode_pldm_base_negotiate_transfer_params_resp() wasn't found to
be absent. We rework scripts/pre-submit such that this kind of problem
results in a CI failure.
Change-Id: I27d48e275646bbd75f19a3e1fe309a584d893cf2
Fixes: cb987c5c8863 ("dsp: base: Added decode_pldm_base_negotiate_transfer_params_req()")
Signed-off-by: Chau Ly <chaul@amperecomputing.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a996aa5..9f28c0d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -94,6 +94,7 @@
PLDM_MSG_DEFINE_P.
- include, tests: Address concerns from -Wsign-compare
+- dsp: base: decode_pldm_base_negotiate_transfer_params_resp() is stable
### Security
diff --git a/meson.options b/meson.options
index 89f2309..8f72e2c 100644
--- a/meson.options
+++ b/meson.options
@@ -9,6 +9,7 @@
'abi-compliance-check',
type: 'boolean',
description: 'Detect public ABI/API changes',
+ value: false,
)
option(
'oem',
diff --git a/scripts/pre-submit b/scripts/pre-submit
index 7fd3dd2..388046f 100755
--- a/scripts/pre-submit
+++ b/scripts/pre-submit
@@ -29,7 +29,7 @@
# Ensure the test suite passes in the default configuration. Note
# that we don't specify -Dabi=... - the default is equivalent to
# -Dabi=deprecated,stable,testing.
-CC=gcc CXX=g++ CFLAGS=-fanalyzer meson setup -Dabi-compliance-check=false "$BUILD"
+CC=gcc CXX=g++ CFLAGS=-fanalyzer meson setup "$BUILD"
meson compile -C "$BUILD"
meson test -C "$BUILD"
@@ -42,13 +42,18 @@
meson compile -C "$BUILD"
meson test -C "$BUILD" --timeout-multiplier 10 --wrapper 'valgrind --error-exitcode=1'
-# Ensure the test suite links when testing symbols are removed from the ABI
+# Ensure that the test suite doesn't fail to link against the stable ABI, and
+# the stable ABI matches what's recorded
meson configure --buildtype=debug "$BUILD"
meson configure -Dabi=deprecated,stable "$BUILD"
+! command -v abi-compliance-checker > /dev/null ||
+ meson configure -Dabi-compliance-check=true "$BUILD"
meson compile -C "$BUILD"
meson test -C "$BUILD"
# Ensure the build completes for maintenance purposes. Note that tests are
# disabled as we don't yet guard them appropriately.
-meson configure -Dabi=stable,testing -Dtests=false "$BUILD"
+meson configure -Dabi=stable,testing "$BUILD"
+meson configure -Dabi-compliance-check=false "$BUILD"
+meson configure -Dtests=false "$BUILD"
meson compile -C "$BUILD"
diff --git a/src/dsp/base.c b/src/dsp/base.c
index a094cb2..cc805df 100644
--- a/src/dsp/base.c
+++ b/src/dsp/base.c
@@ -914,7 +914,7 @@
return pldm_msgbuf_complete_consumed(buf);
}
-LIBPLDM_ABI_TESTING
+LIBPLDM_ABI_STABLE
int decode_pldm_base_negotiate_transfer_params_resp(
const struct pldm_msg *msg, size_t payload_length,
struct pldm_base_negotiate_transfer_params_resp *resp)