pespin has uploaded this change for review.
jenkins: Validate gsm 08.58 IEs are added to tlv_definition
It was recently found that several IEs which were added in the header
file were not actually added to the tlv_definition, and hence the tlv
parser failed to decode them. Let's make sure we don't foget to add new
IEs in the future.
Related: SYS#5915
Change-Id: Id8a679ca43eb0fcc4882780e9a95ec21c7f51972
---
M contrib/jenkins_common.sh
M include/osmocom/gsm/protocol/gsm_08_58.h
2 files changed, 16 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/46/27646/1
diff --git a/contrib/jenkins_common.sh b/contrib/jenkins_common.sh
index c39b356..fc85a90 100644
--- a/contrib/jenkins_common.sh
+++ b/contrib/jenkins_common.sh
@@ -28,6 +28,20 @@
}
verify_gsm0808_tlv_definition
+verify_gsm_08_05_tlv_definition() {
+ set +x;
+ enums=$(grep "RSL_IE_" include/osmocom/gsm/protocol/gsm_08_58.h | grep "=" | awk '{ print $1 }')
+ counted_enums=$(for f in $enums; do printf "%-60s %s\n" "$f" "$(grep -c "\[$f\]" src/gsm/rsl.c)"; done)
+ missing_enums=$(echo "$counted_enums" | grep "0$" || true)
+ if [ "x$missing_enums" != "x" ]; then
+ echo "Missing IEs in src/gsm/rsl.c!"
+ echo "$missing_enums"
+ exit 1
+ fi
+ set -x;
+}
+verify_gsm_08_05_tlv_definition
+
prep_build() {
_src_dir="$1"
_build_dir="$2"
diff --git a/include/osmocom/gsm/protocol/gsm_08_58.h b/include/osmocom/gsm/protocol/gsm_08_58.h
index 7a527ff..d1720fa 100644
--- a/include/osmocom/gsm/protocol/gsm_08_58.h
+++ b/include/osmocom/gsm/protocol/gsm_08_58.h
@@ -385,9 +385,9 @@
RSL_IE_IPAC_RTP_CSD_FMT = 0xf9,
RSL_IE_IPAC_RTP_JIT_BUF = 0xfa,
RSL_IE_IPAC_RTP_COMPR = 0xfb,
- RSL_IE_IPAC_RTP_PAYLOAD2= 0xfc,
+ RSL_IE_IPAC_RTP_PAYLOAD2 = 0xfc,
RSL_IE_IPAC_RTP_MPLEX = 0xfd,
- RSL_IE_IPAC_RTP_MPLEX_ID= 0xfe,
+ RSL_IE_IPAC_RTP_MPLEX_ID = 0xfe,
};
/* Ericsson specific IEs, clash with above partially, so they're not
To view, visit change 27646. To unsubscribe, or for help writing mail filters, visit settings.