diff mbox

test-ranap failures

Message ID 20160502125333.GB2646@ass40.sysmocom.de
State New
Headers show

Commit Message

Neels Hofmeyr May 2, 2016, 12:53 p.m. UTC
Hi Harald & others,

just dropping a note on a recent test failure with some confusion included
concerning the osmo-iuh test-ranap.c test suite...  I fixed it in master's HEAD
95d0ba5, this mail is just in case anyone else hits this confusion.


from Harald's recent commits on osmo-iuh, I see two test failures.

The first that came to my attention is a missing free:

[[[
3. testsuite.at:18: 3. ranap (testsuite.at:18): FAILED (testsuite.at:21)
]]]

I'm not sure how this reversal came to be in test-ranap.ok. All I know is it
works in master's HEAD, but not in 14da5411a4fbe05eccff5b4f0.

~Neels

Comments

Harald Welte May 2, 2016, 1:08 p.m. UTC | #1
On Mon, May 02, 2016 at 02:53:33PM +0200, Neels Hofmeyr wrote:
> I found that it is introduced by 14da5411a4fbe05eccff5b4f0934d52773a3f97a
> ("test-ranap: Add test case about constrained integer range decode")
> -- merely a missing free of the decoded RANAP_Cause_t*.

thanks for spotting it.

> However, when warping back to that commit I also see an unexpected reversal of
> the byte order of two bytes in six places, introduced in f764a15c2339d5b24f
> ("Add test case about RANAP MaxBitrate encoding") and later secretly fixed in

> bb289e3b810683d ("RAB parameters: add Extended Max Bitrate") which is actually
> my commit but now appears in master as authored by you. 

My apologies for this.  I spotted it only after I had pushed it to
git.osmocom.org.  I don't know how this happened, I just used git rebase
-i and did some manual editing/merging associated with that.  Not sure
why git changed the author information, that's clearly not my intention.

> -        14 00 3C 40 00 00 00 50 3D 02 02 00 0D C0 35 00 
> +        14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35 00 

> I'm not sure how this reversal came to be in test-ranap.ok. All I know is it
> works in master's HEAD, but not in 14da5411a4fbe05eccff5b4f0.

do you know in which part of the message the byte reversal is happening?

did you actually check on your system tu build + run test-ranap in both
master and the 14da5411a4fbe05eccff5b4f0 commit?

I suspect the difference is actually related to the fact that I switched
to an updated/fixed libasn1c in between, something that's unfortunately
not visible in the git changelog of osmo-iuh.git :/
Neels Hofmeyr May 2, 2016, 5:06 p.m. UTC | #2
On Mon, May 02, 2016 at 03:08:49PM +0200, Harald Welte wrote:
> why git changed the author information, that's clearly not my intention.

np :)

> > I'm not sure how this reversal came to be in test-ranap.ok. All I know is it
> > works in master's HEAD, but not in 14da5411a4fbe05eccff5b4f0.
> 
> do you know in which part of the message the byte reversal is happening?

Checked just now, it appears to be the
RANAP_UserPlaneMode_transparent_mode value in first.userPlaneInformation
of RANAP_ProtocolIE_ID_id_RAB_SetupOrModifyItem.

> did you actually check on your system tu build + run test-ranap in both
> master and the 14da5411a4fbe05eccff5b4f0 commit?

I rebuilt several commits separately and traced the test failures and
test-ranap.ok commits like that. The test failure output in my previous
mail is from test runs built on detached-heads of the commits I mentioned.

On master there was only the missing free error, on 14da5411a4fbe0 there
were both the missing free and the reversed bytes, while its parent
f764a15c2339 has only the reversal.

> I suspect the difference is actually related to the fact that I switched
> to an updated/fixed libasn1c in between, something that's unfortunately
> not visible in the git changelog of osmo-iuh.git :/

That would explain it at least :)

~Neels
diff mbox

Patch

--- expout  2016-05-02 14:23:55.303083568 +0200
+++ /n/s/osmo/git/osmo-iuh/src/tests/testsuite.dir/at-groups/3/stdout 2016-05-02 14:23:55.311083487 +0200
@@ -213,6 +213,7 @@ 
 </RANAP_IE>
 00 0a 00 11 00 00 01 00 29 40 0a 00 00 01 00 28 40 03 05 c2 d0 
 report
-talloc report on 'asn1_context' (total      0 bytes in   1 blocks)
+talloc report on 'asn1_context' (total     40 bytes in   2 blocks)
+    constr_CHOICE.c:927            contains     40 bytes in   1 blocks (ref 0) 0x1c81690
 talloc report on 'msgb' (total      1 bytes in   1 blocks)
 exit
3. testsuite.at:18: 3. ranap (testsuite.at:18): FAILED (testsuite.at:21)
]]]


I found that it is introduced by 14da5411a4fbe05eccff5b4f0934d52773a3f97a
("test-ranap: Add test case about constrained integer range decode")
-- merely a missing free of the decoded RANAP_Cause_t*.


However, when warping back to that commit I also see an unexpected reversal of
the byte order of two bytes in six places, introduced in f764a15c2339d5b24f
("Add test case about RANAP MaxBitrate encoding") and later secretly fixed in
bb289e3b810683d ("RAB parameters: add Extended Max Bitrate") which is actually
my commit but now appears in master as authored by you. The failure looks like
this:

[[[
./testsuite.at:21: $abs_top_builddir/src/tests/test-ranap
--- expout  2016-05-02 14:24:18.018852893 +0200
+++ /n/s/osmo/git/osmo-iuh/src/tests/testsuite.dir/at-groups/3/stdout 2016-05-02 14:24:18.046852609 +0200
@@ -88,7 +88,7 @@ 
     <firstValue>
         38 02 D8 01 2F A7 20 2F A8 00 00 F4 4C 08 0A 02 
         80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 
-        14 00 3C 40 00 00 00 50 3D 02 02 00 0D C0 35 00 
+        14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35 00 
         01 0A 0B 0C 0D 40 00 00 00 01
     </firstValue>
     <secondCriticality><ignore/></secondCriticality>
@@ -101,11 +101,11 @@ 
         00 00 01 00 35 00 3A 38 02 D8 01 2F A7 20 2F A8 
         00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 14 
         00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 3D 
-        02 02 00 0D C0 35 00 01 0A 0B 0C 0D 40 00 00 00 
+        02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 00 00 00 
         01 40 01 00
     </value>
 </RANAP_IE>
-00 00 00 4b 00 00 01 00 36 40 44 00 00 01 00 35 00 3a 38 02 d8 01 2f a7 20 2f a8 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 02 00 0d c0 35 00 01 0a 0b 0c 0d 40 00 00 00 01 40 01 00 
+00 00 00 4b 00 00 01 00 36 40 44 00 00 01 00 35 00 3a 38 02 d8 01 2f a7 20 2f a8 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 00 00 00 01 40 01 00 
 
 ==> RAB ASSIGNMENT COMMAND (DATA)
 <RANAP_ProtocolIE-FieldPair>
@@ -113,7 +113,7 @@ 
     <firstCriticality><reject/></firstCriticality>
     <firstValue>
         38 04 10 DE 18 69 FF 80 0C 34 FF 00 1F 40 08 06 
-        08 9E 00 04 00 1B 80 35 00 01 1A 1B 1C 1D 00 11 
+        08 9E 00 00 04 1B 80 35 00 01 1A 1B 1C 1D 00 11 
         22 33 44
     </firstValue>
     <secondCriticality><ignore/></secondCriticality>
@@ -124,12 +124,12 @@ 
     <criticality><ignore/></criticality>
     <value>
         00 00 01 00 35 00 23 38 04 10 DE 18 69 FF 80 0C 
-        34 FF 00 1F 40 08 06 08 9E 00 04 00 1B 80 35 00 
+        34 FF 00 1F 40 08 06 08 9E 00 00 04 1B 80 35 00 
         01 1A 1B 1C 1D 00 11 22 33 44 40 06 78 1C 00 00 
         00 00
     </value>
 </RANAP_IE>
-00 00 00 39 00 00 01 00 36 40 32 00 00 01 00 35 00 23 38 04 10 de 18 69 ff 80 0c 34 ff 00 1f 40 08 06 08 9e 00 04 00 1b 80 35 00 01 1a 1b 1c 1d 00 11 22 33 44 40 06 78 1c 00 00 00 00 
+00 00 00 39 00 00 01 00 36 40 32 00 00 01 00 35 00 23 38 04 10 de 18 69 ff 80 0c 34 ff 00 1f 40 08 06 08 9e 00 00 04 1b 80 35 00 01 1a 1b 1c 1d 00 11 22 33 44 40 06 78 1c 00 00 00 00 
 
 ==> RESET CMD
 <RANAP_IE>