Change in libosmocore[master]: tests: a5_test: Print wrong buffer correctly on error

2018-05-17 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9208 )

Change subject: tests: a5_test: Print wrong buffer correctly on error
..

tests: a5_test: Print wrong buffer correctly on error

Before this patch, osmo_hexdump is called stacked in th esame printf
function. As a result, the first returned buffer is overwriten by the
second, which means the printed buffers will show as the same always.

Change-Id: I364328a59da31537c6c9b969e34edd360b685081
---
M tests/a5/a5_test.c
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved



diff --git a/tests/a5/a5_test.c b/tests/a5/a5_test.c
index 6d7cc3c..69f1035 100644
--- a/tests/a5/a5_test.c
+++ b/tests/a5/a5_test.c
@@ -48,7 +48,9 @@
osmo_hexparse(block, res, len);
osmo_ubit2pbit(buf, out, 114);
if (0 != memcmp(buf, res, len)) {
-   printf("FAIL\nGOT: [%d] %s\nEXP: [%d] %s\n", k, 
osmo_hexdump_nospc(buf, len), k, osmo_hexdump_nospc(res, len));
+   printf("FAIL:\n");
+   printf("GOT: [%d] %s\n", k, osmo_hexdump_nospc(buf, len));
+   printf("EXP: [%d] %s\n", k, osmo_hexdump_nospc(res, len));
return false;
}
printf("OK\n");

--
To view, visit https://gerrit.osmocom.org/9208
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I364328a59da31537c6c9b969e34edd360b685081
Gerrit-Change-Number: 9208
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 


Change in libosmocore[master]: tests: a5_test: Print wrong buffer correctly on error

2018-05-16 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/9208 )

Change subject: tests: a5_test: Print wrong buffer correctly on error
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/9208
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I364328a59da31537c6c9b969e34edd360b685081
Gerrit-Change-Number: 9208
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Wed, 16 May 2018 23:05:20 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in libosmocore[master]: tests: a5_test: Print wrong buffer correctly on error

2018-05-16 Thread Pau Espin Pedrol
Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/9208


Change subject: tests: a5_test: Print wrong buffer correctly on error
..

tests: a5_test: Print wrong buffer correctly on error

Before this patch, osmo_hexdump is called stacked in th esame printf
function. As a result, the first returned buffer is overwriten by the
second, which means the printed buffers will show as the same always.

Change-Id: I364328a59da31537c6c9b969e34edd360b685081
---
M tests/a5/a5_test.c
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/08/9208/1

diff --git a/tests/a5/a5_test.c b/tests/a5/a5_test.c
index 6d7cc3c..69f1035 100644
--- a/tests/a5/a5_test.c
+++ b/tests/a5/a5_test.c
@@ -48,7 +48,9 @@
osmo_hexparse(block, res, len);
osmo_ubit2pbit(buf, out, 114);
if (0 != memcmp(buf, res, len)) {
-   printf("FAIL\nGOT: [%d] %s\nEXP: [%d] %s\n", k, 
osmo_hexdump_nospc(buf, len), k, osmo_hexdump_nospc(res, len));
+   printf("FAIL:\n");
+   printf("GOT: [%d] %s\n", k, osmo_hexdump_nospc(buf, len));
+   printf("EXP: [%d] %s\n", k, osmo_hexdump_nospc(res, len));
return false;
}
printf("OK\n");

--
To view, visit https://gerrit.osmocom.org/9208
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I364328a59da31537c6c9b969e34edd360b685081
Gerrit-Change-Number: 9208
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol