[MERGED] osmo-mgw[master]: debian: rename libosmo-mgcp-client0 -> libosmo-mgcp-client1
Neels Hofmeyr has submitted this change and it was merged. Change subject: debian: rename libosmo-mgcp-client0 -> libosmo-mgcp-client1 .. debian: rename libosmo-mgcp-client0 -> libosmo-mgcp-client1 The numeral is describing the library major version. libosmo-mgcp-client has version 1.0.0 Change-Id: I66394109f909cfe0385d4519c14236bc53a10b14 --- M debian/control 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 6556370..262ba69 100644 --- a/debian/control +++ b/debian/control @@ -48,7 +48,7 @@ Depends: libosmo-legacy-mgcp0 (= ${binary:Version}), ${misc:Depends} Description: libosmo-legacy-mgcp: Osmocom's Media Gateway server library -Package: libosmo-mgcp-client0 +Package: libosmo-mgcp-client1 Section: libs Architecture: any Multi-Arch: same @@ -60,12 +60,12 @@ Section: debug Architecture: any Multi-Arch: same -Depends: libosmo-mgcp-client0 (= ${binary:Version}), ${misc:Depends} +Depends: libosmo-mgcp-client1 (= ${binary:Version}), ${misc:Depends} Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities Package: libosmo-mgcp-client-dev Section: libdevel Architecture: any Multi-Arch: same -Depends: libosmo-mgcp-client0 (= ${binary:Version}), ${misc:Depends} +Depends: libosmo-mgcp-client1 (= ${binary:Version}), ${misc:Depends} Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities -- To view, visit https://gerrit.osmocom.org/3943 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I66394109f909cfe0385d4519c14236bc53a10b14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels
[MERGED] osmo-mgw[master]: debian: .install: split mgcp-client out of legacy-mgcp
Neels Hofmeyr has submitted this change and it was merged. Change subject: debian: .install: split mgcp-client out of legacy-mgcp .. debian: .install: split mgcp-client out of legacy-mgcp Change-Id: I681e9a1299607ff3a30de34c043da499c471bc31 --- M debian/libosmo-legacy-mgcp-dev.install M debian/libosmo-legacy-mgcp0.install A debian/libosmo-mgcp-client-dev.install A debian/libosmo-mgcp-client1.install 4 files changed, 10 insertions(+), 4 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/libosmo-legacy-mgcp-dev.install b/debian/libosmo-legacy-mgcp-dev.install index 5bd9dd0..4184fef 100644 --- a/debian/libosmo-legacy-mgcp-dev.install +++ b/debian/libosmo-legacy-mgcp-dev.install @@ -1,3 +1,4 @@ -usr/include -usr/lib/*/*.so -usr/lib/*/pkgconfig/*.pc +usr/include/osmocom/legacy_mgcp +usr/lib/*/*legacy-mgcp*.so +usr/lib/*/*legacy-mgcp*.a +usr/lib/*/pkgconfig/*legacy-mgcp*.pc diff --git a/debian/libosmo-legacy-mgcp0.install b/debian/libosmo-legacy-mgcp0.install index 3de3b10..a47cc34 100644 --- a/debian/libosmo-legacy-mgcp0.install +++ b/debian/libosmo-legacy-mgcp0.install @@ -1 +1 @@ -usr/lib/*/*.so.* +usr/lib/*/*legacy-mgcp*.so.* diff --git a/debian/libosmo-mgcp-client-dev.install b/debian/libosmo-mgcp-client-dev.install new file mode 100644 index 000..c12a86a --- /dev/null +++ b/debian/libosmo-mgcp-client-dev.install @@ -0,0 +1,4 @@ +usr/include/osmocom/mgcp_client +usr/lib/*/libosmo-mgcp-client.so +usr/lib/*/libosmo-mgcp-client.a +usr/lib/*/pkgconfig/libosmo-mgcp-client.pc diff --git a/debian/libosmo-mgcp-client1.install b/debian/libosmo-mgcp-client1.install new file mode 100644 index 000..4fc8bc6 --- /dev/null +++ b/debian/libosmo-mgcp-client1.install @@ -0,0 +1 @@ +usr/lib/*/*mgcp-client*.so.* -- To view, visit https://gerrit.osmocom.org/3944 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I681e9a1299607ff3a30de34c043da499c471bc31 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels
[MERGED] osmo-mgw[master]: debian: use new dbgsym package instead of old dbg packages.
Neels Hofmeyr has submitted this change and it was merged. Change subject: debian: use new dbgsym package instead of old dbg packages. .. debian: use new dbgsym package instead of old dbg packages. The new dbgsym packages gets created automatic without taken care of them. Change-Id: I4113c10d7698232217071becddd997fad918ca36 --- M debian/control M debian/rules 2 files changed, 0 insertions(+), 25 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 262ba69..2dfeb09 100644 --- a/debian/control +++ b/debian/control @@ -19,26 +19,12 @@ Depends: libosmo-legacy-mgcp0, ${misc:Depends}, ${shlibs:Depends} Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks -Package: osmo-mgw-dbg -Section: debug -Architecture: any -Multi-Arch: same -Depends: osmo-mgw (= ${binary:Version}), ${misc:Depends} -Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks - Package: libosmo-legacy-mgcp0 Section: libs Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} -Description: libosmo-legacy-mgcp: Osmocom's Media Gateway server library - -Package: libosmo-legacy-mgcp-dbg -Section: debug -Architecture: any -Multi-Arch: same -Depends: libosmo-legacy-mgcp0 (= ${binary:Version}), ${misc:Depends} Description: libosmo-legacy-mgcp: Osmocom's Media Gateway server library Package: libosmo-legacy-mgcp-dev @@ -54,13 +40,6 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} -Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities - -Package: libosmo-mgcp-client-dbg -Section: debug -Architecture: any -Multi-Arch: same -Depends: libosmo-mgcp-client1 (= ${binary:Version}), ${misc:Depends} Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities Package: libosmo-mgcp-client-dev diff --git a/debian/rules b/debian/rules index 8514f30..d089345 100755 --- a/debian/rules +++ b/debian/rules @@ -31,7 +31,3 @@ dh_autoreconf # See https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-dbg -override_dh_strip: - dh_strip --dbg-package=osmo-mgw-dbg - dh_strip --dbg-package=libosmo-legacy-mgcp-dbg - dh_strip --dbg-package=libosmo-mgcp-client-dbg -- To view, visit https://gerrit.osmocom.org/3946 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4113c10d7698232217071becddd997fad918ca36 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels
[MERGED] osmo-mgw[master]: debian/rules: compile with debug symbols
Neels Hofmeyr has submitted this change and it was merged. Change subject: debian/rules: compile with debug symbols .. debian/rules: compile with debug symbols The debug symbol will be stripped out of the "normal" package. Change-Id: I2428b922298c312c6071f51f23d7fd5939e5af91 --- M debian/rules 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/rules b/debian/rules index 8976ede..8514f30 100755 --- a/debian/rules +++ b/debian/rules @@ -10,6 +10,8 @@ DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1) VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g') +CFLAGS += -g + # main packaging script based on dh7 syntax %: dh $@ --with autoreconf -- To view, visit https://gerrit.osmocom.org/3945 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2428b922298c312c6071f51f23d7fd5939e5af91 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels
[MERGED] osmo-sgsn[master]: debian: fix paths of examples
Neels Hofmeyr has submitted this change and it was merged. Change subject: debian: fix paths of examples .. debian: fix paths of examples Change-Id: I054e500be9527b1dd0fc0c21cde2b7b2d2fdfbff --- M debian/osmo-gbproxy.install M debian/osmo-gtphub.install M debian/osmo-sgsn.install 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/debian/osmo-gbproxy.install b/debian/osmo-gbproxy.install index 62ebe2a..33ec570 100644 --- a/debian/osmo-gbproxy.install +++ b/debian/osmo-gbproxy.install @@ -1,2 +1,2 @@ usr/bin/osmo-gbproxy -usr/share/doc/openbsc/examples/osmo-gbproxy +usr/share/doc/osmo-sgsn/examples/osmo-gbproxy diff --git a/debian/osmo-gtphub.install b/debian/osmo-gtphub.install index 8a5dafd..fb4c095 100644 --- a/debian/osmo-gtphub.install +++ b/debian/osmo-gtphub.install @@ -1,2 +1,2 @@ usr/bin/osmo-gtphub -usr/share/doc/openbsc/examples/osmo-gtphub +usr/share/doc/osmo-sgsn/examples/osmo-gtphub diff --git a/debian/osmo-sgsn.install b/debian/osmo-sgsn.install index a92ae18..bde329a 100644 --- a/debian/osmo-sgsn.install +++ b/debian/osmo-sgsn.install @@ -1,2 +1,2 @@ usr/bin/osmo-sgsn -usr/share/doc/openbsc/examples/osmo-sgsn +usr/share/doc/osmo-sgsn/examples/osmo-sgsn -- To view, visit https://gerrit.osmocom.org/3947 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I054e500be9527b1dd0fc0c21cde2b7b2d2fdfbff Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels
osmo-sgsn[master]: debian: fix paths of examples
Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/3947 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I054e500be9527b1dd0fc0c21cde2b7b2d2fdfbff Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels Gerrit-HasComments: No
osmo-sgsn[master]: debian: fix paths of examples
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3947 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I054e500be9527b1dd0fc0c21cde2b7b2d2fdfbff Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels Gerrit-HasComments: No
[MERGED] osmo-msc[master]: debian: fix dependency to mgcp library
Neels Hofmeyr has submitted this change and it was merged. Change subject: debian: fix dependency to mgcp library .. debian: fix dependency to mgcp library osmo-mgw has split the MGCP client to a separate library in change-id I8e0b2d2a399b77086a36606f5e427271c6242df1 or commit 97df691307e48c39170ac39b2394a7095d7f0ee5. Change-Id: I9c56c218fce2264fe0acae62caed4d9ff4bfb54c --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: lynxis lazus: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 13d4806..ce51a7d 100644 --- a/debian/control +++ b/debian/control @@ -19,7 +19,7 @@ libosmocore-dev, libosmo-sccp-dev, libosmo-abis-dev, - libosmo-legacy-mgcp-dev, + libosmo-mgcp-client-dev, libosmo-netif-dev, libosmo-ranap-dev Standards-Version: 3.9.8 -- To view, visit https://gerrit.osmocom.org/3941 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c56c218fce2264fe0acae62caed4d9ff4bfb54c Gerrit-PatchSet: 2 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: lynxis lazus
[PATCH] osmo-sgsn[master]: debian: fix paths of examples
Review at https://gerrit.osmocom.org/3947 debian: fix paths of examples Change-Id: I054e500be9527b1dd0fc0c21cde2b7b2d2fdfbff --- M debian/osmo-gbproxy.install M debian/osmo-gtphub.install M debian/osmo-sgsn.install 3 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/47/3947/1 diff --git a/debian/osmo-gbproxy.install b/debian/osmo-gbproxy.install index 62ebe2a..33ec570 100644 --- a/debian/osmo-gbproxy.install +++ b/debian/osmo-gbproxy.install @@ -1,2 +1,2 @@ usr/bin/osmo-gbproxy -usr/share/doc/openbsc/examples/osmo-gbproxy +usr/share/doc/osmo-sgsn/examples/osmo-gbproxy diff --git a/debian/osmo-gtphub.install b/debian/osmo-gtphub.install index 8a5dafd..fb4c095 100644 --- a/debian/osmo-gtphub.install +++ b/debian/osmo-gtphub.install @@ -1,2 +1,2 @@ usr/bin/osmo-gtphub -usr/share/doc/openbsc/examples/osmo-gtphub +usr/share/doc/osmo-sgsn/examples/osmo-gtphub diff --git a/debian/osmo-sgsn.install b/debian/osmo-sgsn.install index a92ae18..bde329a 100644 --- a/debian/osmo-sgsn.install +++ b/debian/osmo-sgsn.install @@ -1,2 +1,2 @@ usr/bin/osmo-sgsn -usr/share/doc/openbsc/examples/osmo-sgsn +usr/share/doc/osmo-sgsn/examples/osmo-sgsn -- To view, visit https://gerrit.osmocom.org/3947 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I054e500be9527b1dd0fc0c21cde2b7b2d2fdfbff Gerrit-PatchSet: 1 Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Owner: lynxis lazus
osmo-msc[master]: debian: fix dependency to mgcp library
Patch Set 1: Code-Review+1 LGTM -- To view, visit https://gerrit.osmocom.org/3941 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c56c218fce2264fe0acae62caed4d9ff4bfb54c Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No
openbsc[master]: vty tests: drop testBSCreload
Patch Set 2: Code-Review-1 Having this ready for the case that the vty tests start failing with "Broken pipe" again and we're fed up and don't want to fix it. -- To view, visit https://gerrit.osmocom.org/3922 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib042cd24857cc58a4297d666a8a525e05bd4c917 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[ABANDON] osmo-msc[master]: remove contrib/soap.py, seems to apply to osmo-bsc only
Neels Hofmeyr has abandoned this change. Change subject: remove contrib/soap.py, seems to apply to osmo-bsc only .. Abandoned I don't feel competent, may others move the script or change it. -- To view, visit https://gerrit.osmocom.org/3812 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I647be0a646bbc3cfee226c55061e0e57fa1211fa Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr
osmo-mgw[master]: debian: use new dbgsym package instead of old dbg packages.
Patch Set 1: Code-Review+2 maybe mention that it is related to the CFLAGS = -g ? -- To view, visit https://gerrit.osmocom.org/3946 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4113c10d7698232217071becddd997fad918ca36 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels Gerrit-HasComments: No
osmo-mgw[master]: debian/rules: compile with debug symbols
Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/3945/1//COMMIT_MSG Commit Message: Line 9: The debug symbol will be stripped out of the "normal" package. if you say so... -- To view, visit https://gerrit.osmocom.org/3945 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2428b922298c312c6071f51f23d7fd5939e5af91 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels Gerrit-HasComments: Yes
osmo-mgw[master]: debian: rename libosmo-mgcp-client0 -> libosmo-mgcp-client1
Patch Set 1: Code-Review+2 the plan is to move to 2.0.0 when the split is complete ... note to self, take this as a blueprint for then. -- To view, visit https://gerrit.osmocom.org/3943 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I66394109f909cfe0385d4519c14236bc53a10b14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels Gerrit-HasComments: No
[PATCH] libosmocore[master]: VTY: allow comments in the same line as vty commands
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3882 to look at the new patch set (#3). VTY: allow comments in the same line as vty commands Note: this breaks users' VTY config when a command's argument starts with a '!' or '#'. Allow comments following VTY commands, on the same line. Start a comment with '!' or '#' following a space, which allows using the comment characters in command arguments -- just not at the start of an argument. This patch allows to do: remote-ip 10.23.24.1# where to reach the STP When they are not preceded by a space, the comment characters still count as VTY command tokens, i.e. still allowing: short-name instance#23 This would parse "instance#23" as name. (We usually use '!' as the VTY comment delimiter, but the code also allowed and still allows using '#', hence add both '#' and '!' as same-line comment delimiter.) Change-Id: Iccd9cc8604494379910c534b35ce7e74e329d863 --- M src/vty/command.c M tests/Makefile.am A tests/vty/ok_comments.cfg M tests/vty/vty_test.c M tests/vty/vty_test.ok 5 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/3882/3 diff --git a/src/vty/command.c b/src/vty/command.c index a65b4de..0f5538a 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -246,6 +246,9 @@ /* Copy each command piece and set into vector. */ while (1) { + if (*cp == '!' || *cp == '#') + break; + start = cp; while (!(isspace((int)*cp) || *cp == '\r' || *cp == '\n') && *cp != '\0') diff --git a/tests/Makefile.am b/tests/Makefile.am index 8935bf7..b43d9b7 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -222,6 +222,7 @@ vty/fail_tabs_and_spaces.cfg \ vty/fail_too_much_indent.cfg \ vty/ok.cfg \ +vty/ok_comments.cfg \ vty/ok_ignore_blank.cfg \ vty/ok_ignore_comment.cfg \ vty/ok_indented_root.cfg \ diff --git a/tests/vty/ok_comments.cfg b/tests/vty/ok_comments.cfg new file mode 100644 index 000..c040892 --- /dev/null +++ b/tests/vty/ok_comments.cfg @@ -0,0 +1,3 @@ +line vty ! comments + no login # after +log stderr #commands diff --git a/tests/vty/vty_test.c b/tests/vty/vty_test.c index eba9995..27e5b5c 100644 --- a/tests/vty/vty_test.c +++ b/tests/vty/vty_test.c @@ -342,6 +342,7 @@ test_exit_by_indent("fail_too_much_indent.cfg", -EINVAL); test_exit_by_indent("fail_tabs_and_spaces.cfg", -EINVAL); test_exit_by_indent("ok_indented_root.cfg", 0); + test_exit_by_indent("ok_comments.cfg", 0); /* Leak check */ OSMO_ASSERT(talloc_total_blocks(stats_ctx) == 1); diff --git a/tests/vty/vty_test.ok b/tests/vty/vty_test.ok index b2df1a1..a09e7ef 100644 --- a/tests/vty/vty_test.ok +++ b/tests/vty/vty_test.ok @@ -128,4 +128,6 @@ got rc=-22 reading file ok_indented_root.cfg, expecting rc=0 got rc=0 +reading file ok_comments.cfg, expecting rc=0 +got rc=0 All tests passed -- To view, visit https://gerrit.osmocom.org/3882 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iccd9cc8604494379910c534b35ce7e74e329d863 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
osmo-mgw[master]: debian: .install: split mgcp-client out of legacy-mgcp
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3944 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I681e9a1299607ff3a30de34c043da499c471bc31 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazusGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: neels Gerrit-HasComments: No
[PATCH] libosmocore[master]: VTY: implicit node exit by de-indenting, not parent lookup
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3880 to look at the new patch set (#4). VTY: implicit node exit by de-indenting, not parent lookup Note: This will break users' config files if they do not use consistent indenting. (see below for a definition of "consistent".) When reading VTY commands from a file, use indenting as means to implicitly exit child nodes. Do not look for commands in the parent node implicitly. The VTY so far implies 'exit' commands if a VTY line cannot be parsed on the current node, but succeeds on the parent node. That is the mechanism by which our VTY config files do not need 'exit' at the end of each child node. We've hit problems with this in the following scenarios, which will show improved user experience after this patch: *) When both a parent and its child node have commands with identical names: cs7 instace 0 point-code 1.2.3 sccp-address osmo-msc point-code 0.0.1 If I put the parent's command below the child, it is still interpreted in the context of the child node: cs7 instace 0 sccp-address osmo-msc point-code 0.0.1 point-code 1.2.3 Though the indenting lets me assume I am setting the cs7 instance's global PC to 1.2.3, I'm actually overwriting osmo-msc's PC with 1.2.3 and discarding the 0.0.1. *) When a software change moves a VTY command from a child to a parent. Say 'timezone' moved from 'bts' to 'network' level: network timezone 1 2 Say a user still has an old config file with 'timezone' on the child level: network bts 0 timezone 1 2 trx 0 The user would expect an error message that 'timezone' is invalid on the 'bts' level. Instead, the VTY finds the parent node's 'timezone', steps out of 'bts' to the 'network' level, and instead says that the 'trx' command does not exist. Format: Consistent means that two adjacent indenting lines have the exact same indenting characters for the common length: Weird mix if you ask me, but correct and consistent: ROOT PARENT CHILD GRANDCHILD GRANDCHILD2 SIBLING Inconsistent: ROOT PARENT CHILD GRANDCHILD GRANDCHILD2 SIBLING Also, when going back to a parent level, the exact same indenting must be used as before in that node: Incorrect: ROOT PARENT CHILD SIBLING As not really intended side effect, it is also permitted to indent the entire file starting from the root level. We could guard against it but there's no harm: Correct and consistent: ROOT PARENT CHILD SIBLING Implementation: Track parent nodes state: whenever a command enters a child node, push a parent node onto an llist to remember the exact indentation characters used for that level. As soon as the first line on a child node is parsed, remember this new indentation (which must have a longer strlen() than its parent level) to apply to all remaining child siblings and grandchildren. If the amount of spaces that indent a following VTY command are less than this expected indentation, call vty_go_parent() until it matches up. At any level, if the common length of indentation characters mismatch, abort parsing in error. Transitions to child node are spread across VTY implementations and are hard to change. But transitions to the parent node are all handled by vty_go_parent(). By popping a parent from the list of parents in vty_go_parent(), we can also detect that a command has changed the node without changing the parent, hence it must have stepped into a child node, and we can push a parent frame. The behavior on the interactive telnet VTY remains unchanged. Change-Id: I24cbb3f6de111f2d31110c3c484c066f1153aac9 --- M include/osmocom/vty/command.h M include/osmocom/vty/vty.h M src/vty/command.c M src/vty/vty.c M tests/Makefile.am M tests/testsuite.at A tests/vty/fail_not_de-indented.cfg A tests/vty/fail_tabs_and_spaces.cfg A tests/vty/fail_too_much_indent.cfg A tests/vty/ok.cfg A tests/vty/ok_ignore_blank.cfg A tests/vty/ok_ignore_comment.cfg A tests/vty/ok_indented_root.cfg A tests/vty/ok_more_spaces.cfg A tests/vty/ok_tabs.cfg A tests/vty/ok_tabs_and_spaces.cfg M tests/vty/vty_test.c M tests/vty/vty_test.ok 18 files changed, 321 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/80/3880/4 diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h index 0fa5175..cb2edaa 100644 --- a/include/osmocom/vty/command.h +++ b/include/osmocom/vty/command.h @@ -161,6 +161,7 @@ #define CMD_COMPLETE_MATCH 8 #define CMD_COMPLETE_LIST_MATCH 9 #define CMD_SUCCESS_DAEMON 10 +#define CMD_ERR_INVALID_INDENT 11 /* Argc max counts. */ #define CMD_ARGC_MAX 256 @@ -368,6 +369,7 @@ char *argv_concat(const char **argv, int argc, int shift); vector cmd_make_strvec(const char *); +int cmd_make_strvec2(const char *string, char **indent, vector *strvec_p); void cmd_free_strvec(vector); vector cmd_describe_command(); char
[PATCH] osmo-mgw[master]: debian/rules: compile with debug symbols
Review at https://gerrit.osmocom.org/3945 debian/rules: compile with debug symbols The debug symbol will be stripped out of the "normal" package. Change-Id: I2428b922298c312c6071f51f23d7fd5939e5af91 --- M debian/rules 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/45/3945/1 diff --git a/debian/rules b/debian/rules index 8976ede..8514f30 100755 --- a/debian/rules +++ b/debian/rules @@ -10,6 +10,8 @@ DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1) VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g') +CFLAGS += -g + # main packaging script based on dh7 syntax %: dh $@ --with autoreconf -- To view, visit https://gerrit.osmocom.org/3945 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2428b922298c312c6071f51f23d7fd5939e5af91 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazus
[PATCH] osmo-mgw[master]: debian: .install: split mgcp-client out of legacy-mgcp
Review at https://gerrit.osmocom.org/3944 debian: .install: split mgcp-client out of legacy-mgcp Change-Id: I681e9a1299607ff3a30de34c043da499c471bc31 --- M debian/libosmo-legacy-mgcp-dev.install M debian/libosmo-legacy-mgcp0.install A debian/libosmo-mgcp-client-dev.install A debian/libosmo-mgcp-client1.install 4 files changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/44/3944/1 diff --git a/debian/libosmo-legacy-mgcp-dev.install b/debian/libosmo-legacy-mgcp-dev.install index 5bd9dd0..4184fef 100644 --- a/debian/libosmo-legacy-mgcp-dev.install +++ b/debian/libosmo-legacy-mgcp-dev.install @@ -1,3 +1,4 @@ -usr/include -usr/lib/*/*.so -usr/lib/*/pkgconfig/*.pc +usr/include/osmocom/legacy_mgcp +usr/lib/*/*legacy-mgcp*.so +usr/lib/*/*legacy-mgcp*.a +usr/lib/*/pkgconfig/*legacy-mgcp*.pc diff --git a/debian/libosmo-legacy-mgcp0.install b/debian/libosmo-legacy-mgcp0.install index 3de3b10..a47cc34 100644 --- a/debian/libosmo-legacy-mgcp0.install +++ b/debian/libosmo-legacy-mgcp0.install @@ -1 +1 @@ -usr/lib/*/*.so.* +usr/lib/*/*legacy-mgcp*.so.* diff --git a/debian/libosmo-mgcp-client-dev.install b/debian/libosmo-mgcp-client-dev.install new file mode 100644 index 000..c12a86a --- /dev/null +++ b/debian/libosmo-mgcp-client-dev.install @@ -0,0 +1,4 @@ +usr/include/osmocom/mgcp_client +usr/lib/*/libosmo-mgcp-client.so +usr/lib/*/libosmo-mgcp-client.a +usr/lib/*/pkgconfig/libosmo-mgcp-client.pc diff --git a/debian/libosmo-mgcp-client1.install b/debian/libosmo-mgcp-client1.install new file mode 100644 index 000..4fc8bc6 --- /dev/null +++ b/debian/libosmo-mgcp-client1.install @@ -0,0 +1 @@ +usr/lib/*/*mgcp-client*.so.* -- To view, visit https://gerrit.osmocom.org/3944 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I681e9a1299607ff3a30de34c043da499c471bc31 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazus
[PATCH] osmo-mgw[master]: debian: use new dbgsym package instead of old dbg packages.
Review at https://gerrit.osmocom.org/3946 debian: use new dbgsym package instead of old dbg packages. The new dbgsym packages gets created automatic without taken care of them. Change-Id: I4113c10d7698232217071becddd997fad918ca36 --- M debian/control M debian/rules 2 files changed, 0 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/46/3946/1 diff --git a/debian/control b/debian/control index 262ba69..2dfeb09 100644 --- a/debian/control +++ b/debian/control @@ -19,26 +19,12 @@ Depends: libosmo-legacy-mgcp0, ${misc:Depends}, ${shlibs:Depends} Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks -Package: osmo-mgw-dbg -Section: debug -Architecture: any -Multi-Arch: same -Depends: osmo-mgw (= ${binary:Version}), ${misc:Depends} -Description: OsmoMGW: Osmocom's Media Gateway for 2G and 3G circuit-switched mobile networks - Package: libosmo-legacy-mgcp0 Section: libs Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} -Description: libosmo-legacy-mgcp: Osmocom's Media Gateway server library - -Package: libosmo-legacy-mgcp-dbg -Section: debug -Architecture: any -Multi-Arch: same -Depends: libosmo-legacy-mgcp0 (= ${binary:Version}), ${misc:Depends} Description: libosmo-legacy-mgcp: Osmocom's Media Gateway server library Package: libosmo-legacy-mgcp-dev @@ -54,13 +40,6 @@ Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} -Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities - -Package: libosmo-mgcp-client-dbg -Section: debug -Architecture: any -Multi-Arch: same -Depends: libosmo-mgcp-client1 (= ${binary:Version}), ${misc:Depends} Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities Package: libosmo-mgcp-client-dev diff --git a/debian/rules b/debian/rules index 8514f30..d089345 100755 --- a/debian/rules +++ b/debian/rules @@ -31,7 +31,3 @@ dh_autoreconf # See https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-dbg -override_dh_strip: - dh_strip --dbg-package=osmo-mgw-dbg - dh_strip --dbg-package=libosmo-legacy-mgcp-dbg - dh_strip --dbg-package=libosmo-mgcp-client-dbg -- To view, visit https://gerrit.osmocom.org/3946 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4113c10d7698232217071becddd997fad918ca36 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazus
[PATCH] osmo-mgw[master]: debian: rename libosmo-mgcp-client0 -> libosmo-mgcp-client1
Review at https://gerrit.osmocom.org/3943 debian: rename libosmo-mgcp-client0 -> libosmo-mgcp-client1 The numeral is describing the library major version. libosmo-mgcp-client has version 1.0.0 Change-Id: I66394109f909cfe0385d4519c14236bc53a10b14 --- M debian/control 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/43/3943/1 diff --git a/debian/control b/debian/control index 6556370..262ba69 100644 --- a/debian/control +++ b/debian/control @@ -48,7 +48,7 @@ Depends: libosmo-legacy-mgcp0 (= ${binary:Version}), ${misc:Depends} Description: libosmo-legacy-mgcp: Osmocom's Media Gateway server library -Package: libosmo-mgcp-client0 +Package: libosmo-mgcp-client1 Section: libs Architecture: any Multi-Arch: same @@ -60,12 +60,12 @@ Section: debug Architecture: any Multi-Arch: same -Depends: libosmo-mgcp-client0 (= ${binary:Version}), ${misc:Depends} +Depends: libosmo-mgcp-client1 (= ${binary:Version}), ${misc:Depends} Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities Package: libosmo-mgcp-client-dev Section: libdevel Architecture: any Multi-Arch: same -Depends: libosmo-mgcp-client0 (= ${binary:Version}), ${misc:Depends} +Depends: libosmo-mgcp-client1 (= ${binary:Version}), ${misc:Depends} Description: libosmo-mgcp-client: Osmocom's Media Gateway Control Protocol client utilities -- To view, visit https://gerrit.osmocom.org/3943 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I66394109f909cfe0385d4519c14236bc53a10b14 Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: lynxis lazus
[PATCH] osmo-bsc[master]: doc/examples: tweak osmo-bsc.cfg, add osmo-bsc_custom-sccp.cfg
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3832 to look at the new patch set (#4). doc/examples: tweak osmo-bsc.cfg, add osmo-bsc_custom-sccp.cfg Now osmo-bsc.cfg's SCCP addresses work by internal defaults, while osmo-bsc_custom-sccp.cfg shows how to use custom STP IP address and SCCP point codes. Change-Id: Icb41d5adc24b2ee5613be691a201df8f3566e5dd --- M doc/examples/osmo-bsc/osmo-bsc.cfg A doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg M osmoappdesc.py 3 files changed, 129 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/32/3832/4 diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg b/doc/examples/osmo-bsc/osmo-bsc.cfg index 7c10e9d..efa27ec 100644 --- a/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -1,11 +1,5 @@ -! -! OsmoBSC (0.9.14+gitr1+3d331c0062bb0c9694dbd4d1eab7adc58138c3ae) configuration saved from vty -!! -password foo -! -! -line vty - no login +! osmo-bsc default configuration +! (assumes STP to run on 127.0.0.1 and uses default point codes) ! e1_input e1_line 0 driver ipa @@ -15,12 +9,14 @@ short name OsmoBSC long name OsmoBSC auth policy closed + authorized-regexp .* location updating reject cause 13 encryption a5 0 - neci 1 + authentication optional + neci 0 paging any use tch 0 rrlp mode none - mm info 1 + mm info 0 handover 0 handover window rxlev averaging 10 handover window rxqual averaging 1 @@ -28,21 +24,25 @@ handover power budget interval 6 handover power budget hysteresis 3 handover maximum distance + dyn_ts_allow_tch_f 0 + periodic location update 30 bts 0 - type nanobts + type sysmobts band DCS1800 cell_identity 0 location_area_code 1 - training_sequence_code 7 base_station_id_code 63 ms max power 15 cell reselection hysteresis 4 rxlev access min 0 + radio-link-timeout 32 channel allocator ascending rach tx integer 9 rach max transmission 7 - dtx uplink force - dtx downlink + channel-descrption attach 1 + channel-descrption bs-pa-mfrms 5 + channel-descrption bs-ag-blks-res 1 + early-classmark-sending forbidden ip.access unit_id 0 0 oml ip.access stream_id 255 line 0 neighbor-list mode manual-si5 @@ -50,11 +50,14 @@ neighbor-list add arfcn 200 si5 neighbor-list add arfcn 10 si5 neighbor-list add arfcn 20 + codec-support fr gprs mode none + no force-combined-si trx 0 rf_locked 0 arfcn 871 nominal power 23 + ! to use full TRX power, set max_power_red 0 max_power_red 20 rsl e1 tei 0 timeslot 0 @@ -81,21 +84,24 @@ timeslot 7 phys_chan_config TCH/F hopping enabled 0 -cs7 instance 1 - point-code 3.0.0 - sccp-address bsc_local - point-code 3.0.0 - sccp-address msc_remote - point-code 1.0.0 -msc - bsc-addr bsc_local - msc-addr msc_remote +msc 0 ip.access rtp-base 4000 timeout-ping 20 timeout-pong 5 - dest 192.168.100.11 0 - access-list-name msc-list - no access-list-name + no timeout-ping advanced + no bsc-welcome-text + no bsc-msc-lost-text + no bsc-grace-text + type normal + allow-emergency allow + amr-config 12_2k forbidden + amr-config 10_2k forbidden + amr-config 7_95k forbidden + amr-config 7_40k forbidden + amr-config 6_70k forbidden + amr-config 5_90k allowed + amr-config 5_15k forbidden + amr-config 4_75k forbidden bsc - no access-list-name - access-list-name bsc-list + mid-call-timeout 0 + no missing-msc-text diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg new file mode 100644 index 000..59e7090 --- /dev/null +++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg @@ -0,0 +1,93 @@ +! osmo-bsc configuration example for custom SCCP addresses +! +e1_input + e1_line 0 driver ipa +network + network country code 1 + mobile network code 1 + short name OsmoBSC + long name OsmoBSC + auth policy closed + authorized-regexp .* + location updating reject cause 13 + encryption a5 0 + authentication optional + neci 0 + paging any use tch 0 + rrlp mode none + mm info 0 + handover 0 + handover window rxlev averaging 10 + handover window rxqual averaging 1 + handover window rxlev neighbor averaging 10 + handover power budget interval 6 + handover power budget hysteresis 3 + handover maximum distance + dyn_ts_allow_tch_f 0 + periodic location update 30 + bts 0 + type sysmobts + band DCS1800 + cell_identity 0 + location_area_code 1 + base_station_id_code 63 + ms max power 15 + cell reselection hysteresis 4 + rxlev access min 0 + radio-link-timeout 32 + channel allocator ascending + rach tx integer 9 + rach max transmission 7 + channel-descrption attach 1 + channel-descrption bs-pa-mfrms 5 + channel-descrption bs-ag-blks-res 1 + early-classmark-sending forbidden + ip.access unit_id 0 0 + oml ip.access stream_id 255 line 0 + neighbor-list mode manual-si5 + neighbor-list add arfcn 100 + neighbor-list
[PATCH] libosmo-abis[master]: cosmetic: ipa.c: use msgb_dequeue(), drop local var
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3942 to look at the new patch set (#2). cosmetic: ipa.c: use msgb_dequeue(), drop local var Make ipa_server_conn_write() a lot simpler and shorter by using msgb_dequeue() and avoiding local pointer that was used only once. Change-Id: Id968e60d081a6d69de482a908ca3fe5e1044aaa3 --- M src/input/ipa.c 1 file changed, 3 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/42/3942/2 diff --git a/src/input/ipa.c b/src/input/ipa.c index ce155ce..fbed038 100644 --- a/src/input/ipa.c +++ b/src/input/ipa.c @@ -358,20 +358,16 @@ static void ipa_server_conn_write(struct ipa_server_conn *conn) { - struct osmo_fd *ofd = >ofd; struct msgb *msg; - struct llist_head *lh; int ret; LOGP(DLINP, LOGL_DEBUG, "sending data\n"); + msg = msgb_dequeue(>tx_queue); - if (llist_empty(>tx_queue)) { - ofd->when &= ~BSC_FD_WRITE; + if (!msg) { + conn->ofd.when &= ~BSC_FD_WRITE; return; } - lh = conn->tx_queue.next; - llist_del(lh); - msg = llist_entry(lh, struct msgb, list); ret = send(conn->ofd.fd, msg->data, msg->len, 0); if (ret < 0) { -- To view, visit https://gerrit.osmocom.org/3942 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id968e60d081a6d69de482a908ca3fe5e1044aaa3 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Jenkins Builder
[PATCH] libosmo-abis[master]: cosmetic: ipa.c: use msgb_dequeue() instead of code dup
Review at https://gerrit.osmocom.org/3942 cosmetic: ipa.c: use msgb_dequeue() instead of code dup Change-Id: Id968e60d081a6d69de482a908ca3fe5e1044aaa3 --- M src/input/ipa.c 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/42/3942/1 diff --git a/src/input/ipa.c b/src/input/ipa.c index ce155ce..b7863b8 100644 --- a/src/input/ipa.c +++ b/src/input/ipa.c @@ -364,14 +364,12 @@ int ret; LOGP(DLINP, LOGL_DEBUG, "sending data\n"); + msg = msgb_dequeue(>tx_queue); - if (llist_empty(>tx_queue)) { + if (!msg) { ofd->when &= ~BSC_FD_WRITE; return; } - lh = conn->tx_queue.next; - llist_del(lh); - msg = llist_entry(lh, struct msgb, list); ret = send(conn->ofd.fd, msg->data, msg->len, 0); if (ret < 0) { -- To view, visit https://gerrit.osmocom.org/3942 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id968e60d081a6d69de482a908ca3fe5e1044aaa3 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[ABANDON] osmo-gsm-tester[master]: add jenkins-make-check-and-run.sh, fix lock_test
Neels Hofmeyr has abandoned this change. Change subject: add jenkins-make-check-and-run.sh, fix lock_test .. Abandoned merged as two separate patches. this one was just to see what the gerrit job made of it -- To view, visit https://gerrit.osmocom.org/3939 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Iefc7fd5207c926fdeb3282d9d5b4708f1b56d20c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
openbsc[master]: libmsc: db_subscriber_alloc_exten() remove infinite loop
Patch Set 3: In this discussion I'd also like to plug the forward perspective that all subscriber management will move to osmo-hlr, where we also are not using libdbi anymore for its cumbersomeness. So if your problem goes away from using sqlite directly, consider that accomodating libdbi might be purely a waste of time. https://osmocom.org/issues/1591 We need/want to add vty commands for subscriber management to osmo-hlr, which still lacks those completely. However, I'm not sure whether the plan is for the osmo-hlr to automatically allocate extensions, the osmo-hlr being mostly for SIM cards with auth+ciph keys where you'd allocate extensions while running your tool to enter all sim cards into the db... but it has to allocate extensions if we're going to support the same features as osmo-nitb, right? I'm ambiguous on that. -- To view, visit https://gerrit.osmocom.org/3910 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icf0f1e5a7f360bc27592a55890f74a9a12bc9f42 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Keith WhyteGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pablo Neira Ayuso Gerrit-HasComments: No
libosmo-netif[master]: src: _snprintf() helper functions nul-terminate buffers, if ...
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3830 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I97e517f2d98e83894ea707c63489559302ff6bd2 Gerrit-PatchSet: 3 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Pablo Neira AyusoGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pablo Neira Ayuso Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[MERGED] libosmocore[master]: osmo-auc-gen.c: squelch compiler warnings, move local var
Harald Welte has submitted this change and it was merged. Change subject: osmo-auc-gen.c: squelch compiler warnings, move local var .. osmo-auc-gen.c: squelch compiler warnings, move local var The compiler thinks that ind or ind_mask may be used uninitialized, because it doesn't analyze the conditionality of command line arguments and other variables set accordingly. Make the compiler happy by zero initializing. Change-Id: I9ddcb0525159da520aceaeb6e908a735a003bb5a --- M utils/osmo-auc-gen.c 1 file changed, 3 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/utils/osmo-auc-gen.c b/utils/osmo-auc-gen.c index fee9767..1f5c838 100644 --- a/utils/osmo-auc-gen.c +++ b/utils/osmo-auc-gen.c @@ -98,15 +98,14 @@ struct osmo_auth_vector *vec = &_vec; uint8_t _rand[16], _auts[14]; uint64_t sqn; - unsigned int ind; + unsigned int ind = 0; int rc, option_index; int rand_is_set = 0; int auts_is_set = 0; int sqn_is_set = 0; int ind_is_set = 0; int fmt_triplets_dat = 0; - uint64_t seq_1; - uint64_t ind_mask; + uint64_t ind_mask = 0; printf("osmo-auc-gen (C) 2011-2012 by Harald Welte\n"); printf("This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY\n\n"); @@ -270,7 +269,7 @@ memset(vec, 0, sizeof(*vec)); if (test_aud.type == OSMO_AUTH_TYPE_UMTS) { - seq_1 = 1LL << test_aud.u.umts.ind_bitlen; + uint64_t seq_1 = 1LL << test_aud.u.umts.ind_bitlen; ind_mask = seq_1 - 1; if (sqn_is_set) { -- To view, visit https://gerrit.osmocom.org/3908 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9ddcb0525159da520aceaeb6e908a735a003bb5a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
libosmocore[master]: osmo-auc-gen.c: squelch compiler warnings, move local var
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3908 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9ddcb0525159da520aceaeb6e908a735a003bb5a Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-pcu[master]: Simplify TS alloc: separate capacity computation
Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/3934 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd88fc7ff818ea2a041eae61c5d457926a0df0f2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-pcu[master]: Simplify TS alloc: adjust allocator signatures
Patch Set 7: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/3807 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I39d81ab64ff790b9c4c2d0312a574485cd83e755 Gerrit-PatchSet: 7 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-pcu[master]: Simplify TS alloc: adjust function signatures
Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/3912 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I211b10b4da59c73d509b719346774515c761886a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-pcu[master]: Simplify TS alloc: replace debug printer
Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/3929 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia13855877b2145cb57b1646f5562b2af3b87bcfb Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-HasComments: No
osmo-gsm-tester[master]: contrib: Build octphy osmo-bts variant and make it generic
Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/3928 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib8814e4ce49596b586990f20d7d625a719852e90 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-HasComments: No
meta-telephony[201705]: Add git-review config
Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/3925 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4178b4866078f20f7415772255e9c755dcb90efe Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No
[MERGED] meta-telephony[201705]: Add git-review config
Harald Welte has submitted this change and it was merged. Change subject: Add git-review config .. Add git-review config Change-Id: I4178b4866078f20f7415772255e9c755dcb90efe --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved; Verified diff --git a/.gitreview b/.gitreview new file mode 100644 index 000..30ca929 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=meta-telephony -- To view, visit https://gerrit.osmocom.org/3925 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4178b4866078f20f7415772255e9c755dcb90efe Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus
meta-telephony[201705]: Add git-review config
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3925 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4178b4866078f20f7415772255e9c755dcb90efe Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No
osmo-pcu[master]: Simplify TS alloc: use define for constant
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3920 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2699ceebf0cbec01652a02fa68ccc9e9419d0293 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: MaxGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-gsm-tester[master]: add jenkins-make-check-and-run.sh, fix lock_test
Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/3939 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iefc7fd5207c926fdeb3282d9d5b4708f1b56d20c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
osmo-msc[master]: debian: fix dependency to mgcp library
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3941 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c56c218fce2264fe0acae62caed4d9ff4bfb54c Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-gsm-tester[master]: fix util.py/FileLock and lock_test
Neels Hofmeyr has submitted this change and it was merged. Change subject: fix util.py/FileLock and lock_test .. fix util.py/FileLock and lock_test Do not pass os.O_TRUNC to open(), that immediately empties out the lock file. Fix lock_test to be able to catch this error. So far things were happening too fast to notice it. Caught by running 'make check' on a main unit APU that has different timing behavior. Change-Id: I872a3d2548ac84097ac7acf13cb12c36822e076e --- M selftest/lock_test.ok M selftest/lock_test.sh M selftest/lock_test_help.py M src/osmo_gsm_tester/util.py 4 files changed, 42 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/selftest/lock_test.ok b/selftest/lock_test.ok index 604767b..011a89c 100644 --- a/selftest/lock_test.ok +++ b/selftest/lock_test.ok @@ -1,4 +1,14 @@ +creating files +launch a program that locks a given file, it will create $dir/lock_test +wait until this lock_test lock file was created by program +expecting the lock file to reflect "long name" launched first, locked by: 'long name' +launching second program, should find the lock intact and wait launched second, locked by: 'long name' +drop the first lock, $f1 removal signals the first process to stop locking +wait for first program to carry out the lock release +now expecting second program to lock waited, locked by: 'shorter' +release the second program also +expecting the lock to be gone waited more, locked by: '' diff --git a/selftest/lock_test.sh b/selftest/lock_test.sh index 049c4d9..4f3f7ad 100755 --- a/selftest/lock_test.sh +++ b/selftest/lock_test.sh @@ -1,4 +1,6 @@ #!/bin/sh + +echo 'creating files' dir="$(mktemp -d)" n1="long name" f1="$dir/$n1" @@ -7,21 +9,45 @@ f2="$dir/$n2" touch "$f2" sync + +echo 'launch a program that locks a given file, it will create $dir/lock_test' python3 ./lock_test_help.py "$dir" "$n1" & + +echo 'wait until this lock_test lock file was created by program' while [ ! -f "$dir/lock_test" ]; do sleep .1 done +sync + +echo 'expecting the lock file to reflect "long name"' echo "launched first, locked by: '$(cat "$dir/lock_test")'" + +echo 'launching second program, should find the lock intact and wait' python3 ./lock_test_help.py "$dir" "$n2" & +while [ ! -f "$f2.ready" ]; do + sleep .1 +done +sleep 1 +sync echo "launched second, locked by: '$(cat "$dir/lock_test")'" + +echo 'drop the first lock, $f1 removal signals the first process to stop locking' rm "$f1" + +echo 'wait for first program to carry out the lock release' while [ ! -f "$f1.done" ]; do sleep .1 done + +echo 'now expecting second program to lock' echo "waited, locked by: '$(cat "$dir/lock_test")'" + +echo 'release the second program also' rm "$f2" while [ ! -f "$f2.done" ]; do sleep .1 done + +echo 'expecting the lock to be gone' echo "waited more, locked by: '$(cat "$dir/lock_test")'" rm -rf "$dir" diff --git a/selftest/lock_test_help.py b/selftest/lock_test_help.py index bdf7c64..f4e1f9b 100644 --- a/selftest/lock_test_help.py +++ b/selftest/lock_test_help.py @@ -8,11 +8,15 @@ testdir, name = sys.argv[1:] stop_signalling_file = os.path.join(testdir, name) -assert os.path.isfile(stop_signalling_file) +if not os.path.isfile(stop_signalling_file): +print('expected a stop-file %r' % stop_signalling_file) +exit(1) lockfile_path = os.path.join(testdir, 'lock_test') fl = FileLock(lockfile_path, name) +touch_file(stop_signalling_file + '.ready') + with fl: while os.path.exists(stop_signalling_file): time.sleep(.1) diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index af6a2f0..197dc97 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -101,7 +101,7 @@ def __enter__(self): if self.f is not None: return -self.fd = os.open(self.path, os.O_CREAT | os.O_WRONLY | os.O_TRUNC) +self.fd = os.open(self.path, os.O_CREAT | os.O_WRONLY) fcntl.flock(self.fd, fcntl.LOCK_EX) os.truncate(self.fd, 0) os.write(self.fd, str(self.owner).encode('utf-8')) -- To view, visit https://gerrit.osmocom.org/3940 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I872a3d2548ac84097ac7acf13cb12c36822e076e Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[MERGED] osmo-gsm-tester[master]: add jenkins-make-check-and-run.sh
Neels Hofmeyr has submitted this change and it was merged. Change subject: add jenkins-make-check-and-run.sh .. add jenkins-make-check-and-run.sh Change-Id: I493142bb4cd6c0465e34b4171461d28455315ef4 --- A contrib/jenkins-make-check-and-run.sh 1 file changed, 14 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified Objections: Jenkins Builder: Fails diff --git a/contrib/jenkins-make-check-and-run.sh b/contrib/jenkins-make-check-and-run.sh new file mode 100755 index 000..3017fd4 --- /dev/null +++ b/contrib/jenkins-make-check-and-run.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -e -x +base="$PWD" + +run_script="osmo-gsm-tester/contrib/jenkins-run.sh" +test -x "$run_script" + +cd osmo-gsm-tester +make deps +make check +cd "$base" + +PATH="$base/osmo-gsm-tester/src:$PATH" \ + "$run_script" -- To view, visit https://gerrit.osmocom.org/3936 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I493142bb4cd6c0465e34b4171461d28455315ef4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
osmo-gsm-tester[master]: add jenkins-make-check-and-run.sh
Patch Set 2: Code-Review+2 Verified+1 +V comes from the following patch, #3940. +2ing to match what jenkins expects to find. -- To view, visit https://gerrit.osmocom.org/3936 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I493142bb4cd6c0465e34b4171461d28455315ef4 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[PATCH] osmo-msc[master]: debian: fix dependency to mgcp library
Review at https://gerrit.osmocom.org/3941 debian: fix dependency to mgcp library osmo-mgw has split the MGCP client to a separate library in change-id I8e0b2d2a399b77086a36606f5e427271c6242df1 or commit 97df691307e48c39170ac39b2394a7095d7f0ee5. Change-Id: I9c56c218fce2264fe0acae62caed4d9ff4bfb54c --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/41/3941/1 diff --git a/debian/control b/debian/control index 13d4806..ce51a7d 100644 --- a/debian/control +++ b/debian/control @@ -19,7 +19,7 @@ libosmocore-dev, libosmo-sccp-dev, libosmo-abis-dev, - libosmo-legacy-mgcp-dev, + libosmo-mgcp-client-dev, libosmo-netif-dev, libosmo-ranap-dev Standards-Version: 3.9.8 -- To view, visit https://gerrit.osmocom.org/3941 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c56c218fce2264fe0acae62caed4d9ff4bfb54c Gerrit-PatchSet: 1 Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: fix util.py/FileLock and lock_test
Review at https://gerrit.osmocom.org/3940 fix util.py/FileLock and lock_test Do not pass os.O_TRUNC to open(), that immediately empties out the lock file. Fix lock_test to be able to catch this error. So far things were happening too fast to notice it. Caught by running 'make check' on a main unit APU that has different timing behavior. Change-Id: I872a3d2548ac84097ac7acf13cb12c36822e076e --- M selftest/lock_test.ok M selftest/lock_test.sh M selftest/lock_test_help.py M src/osmo_gsm_tester/util.py 4 files changed, 42 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/40/3940/1 diff --git a/selftest/lock_test.ok b/selftest/lock_test.ok index 604767b..011a89c 100644 --- a/selftest/lock_test.ok +++ b/selftest/lock_test.ok @@ -1,4 +1,14 @@ +creating files +launch a program that locks a given file, it will create $dir/lock_test +wait until this lock_test lock file was created by program +expecting the lock file to reflect "long name" launched first, locked by: 'long name' +launching second program, should find the lock intact and wait launched second, locked by: 'long name' +drop the first lock, $f1 removal signals the first process to stop locking +wait for first program to carry out the lock release +now expecting second program to lock waited, locked by: 'shorter' +release the second program also +expecting the lock to be gone waited more, locked by: '' diff --git a/selftest/lock_test.sh b/selftest/lock_test.sh index 049c4d9..4f3f7ad 100755 --- a/selftest/lock_test.sh +++ b/selftest/lock_test.sh @@ -1,4 +1,6 @@ #!/bin/sh + +echo 'creating files' dir="$(mktemp -d)" n1="long name" f1="$dir/$n1" @@ -7,21 +9,45 @@ f2="$dir/$n2" touch "$f2" sync + +echo 'launch a program that locks a given file, it will create $dir/lock_test' python3 ./lock_test_help.py "$dir" "$n1" & + +echo 'wait until this lock_test lock file was created by program' while [ ! -f "$dir/lock_test" ]; do sleep .1 done +sync + +echo 'expecting the lock file to reflect "long name"' echo "launched first, locked by: '$(cat "$dir/lock_test")'" + +echo 'launching second program, should find the lock intact and wait' python3 ./lock_test_help.py "$dir" "$n2" & +while [ ! -f "$f2.ready" ]; do + sleep .1 +done +sleep 1 +sync echo "launched second, locked by: '$(cat "$dir/lock_test")'" + +echo 'drop the first lock, $f1 removal signals the first process to stop locking' rm "$f1" + +echo 'wait for first program to carry out the lock release' while [ ! -f "$f1.done" ]; do sleep .1 done + +echo 'now expecting second program to lock' echo "waited, locked by: '$(cat "$dir/lock_test")'" + +echo 'release the second program also' rm "$f2" while [ ! -f "$f2.done" ]; do sleep .1 done + +echo 'expecting the lock to be gone' echo "waited more, locked by: '$(cat "$dir/lock_test")'" rm -rf "$dir" diff --git a/selftest/lock_test_help.py b/selftest/lock_test_help.py index bdf7c64..f4e1f9b 100644 --- a/selftest/lock_test_help.py +++ b/selftest/lock_test_help.py @@ -8,11 +8,15 @@ testdir, name = sys.argv[1:] stop_signalling_file = os.path.join(testdir, name) -assert os.path.isfile(stop_signalling_file) +if not os.path.isfile(stop_signalling_file): +print('expected a stop-file %r' % stop_signalling_file) +exit(1) lockfile_path = os.path.join(testdir, 'lock_test') fl = FileLock(lockfile_path, name) +touch_file(stop_signalling_file + '.ready') + with fl: while os.path.exists(stop_signalling_file): time.sleep(.1) diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index af6a2f0..197dc97 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -101,7 +101,7 @@ def __enter__(self): if self.f is not None: return -self.fd = os.open(self.path, os.O_CREAT | os.O_WRONLY | os.O_TRUNC) +self.fd = os.open(self.path, os.O_CREAT | os.O_WRONLY) fcntl.flock(self.fd, fcntl.LOCK_EX) os.truncate(self.fd, 0) os.write(self.fd, str(self.owner).encode('utf-8')) -- To view, visit https://gerrit.osmocom.org/3940 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I872a3d2548ac84097ac7acf13cb12c36822e076e Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[ABANDON] osmo-gsm-tester[master]: fix util.py/FileLock and lock_test
Neels Hofmeyr has abandoned this change. Change subject: fix util.py/FileLock and lock_test .. Abandoned how hard can it be to just fire a gerrit build! -- To view, visit https://gerrit.osmocom.org/3938 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I60240179478f177fc41ce8978d3e8326fefe4427 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: add jenkins-make-check-and-run.sh, fix lock_test
Review at https://gerrit.osmocom.org/3939 add jenkins-make-check-and-run.sh, fix lock_test fix util.py/FileLock and lock_test Do not pass os.O_TRUNC to open(), that immediately empties out the lock file. Fix lock_test to be able to catch this error. So far things were happening too fast to notice it. Caught by running 'make check' on a main unit APU that has different timing behavior. Change-Id: Iefc7fd5207c926fdeb3282d9d5b4708f1b56d20c --- A contrib/jenkins-make-check-and-run.sh M selftest/lock_test.ok M selftest/lock_test.sh M selftest/lock_test_help.py M src/osmo_gsm_tester/util.py 5 files changed, 56 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/39/3939/1 diff --git a/contrib/jenkins-make-check-and-run.sh b/contrib/jenkins-make-check-and-run.sh new file mode 100755 index 000..3017fd4 --- /dev/null +++ b/contrib/jenkins-make-check-and-run.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -e -x +base="$PWD" + +run_script="osmo-gsm-tester/contrib/jenkins-run.sh" +test -x "$run_script" + +cd osmo-gsm-tester +make deps +make check +cd "$base" + +PATH="$base/osmo-gsm-tester/src:$PATH" \ + "$run_script" diff --git a/selftest/lock_test.ok b/selftest/lock_test.ok index 604767b..011a89c 100644 --- a/selftest/lock_test.ok +++ b/selftest/lock_test.ok @@ -1,4 +1,14 @@ +creating files +launch a program that locks a given file, it will create $dir/lock_test +wait until this lock_test lock file was created by program +expecting the lock file to reflect "long name" launched first, locked by: 'long name' +launching second program, should find the lock intact and wait launched second, locked by: 'long name' +drop the first lock, $f1 removal signals the first process to stop locking +wait for first program to carry out the lock release +now expecting second program to lock waited, locked by: 'shorter' +release the second program also +expecting the lock to be gone waited more, locked by: '' diff --git a/selftest/lock_test.sh b/selftest/lock_test.sh index 049c4d9..4f3f7ad 100755 --- a/selftest/lock_test.sh +++ b/selftest/lock_test.sh @@ -1,4 +1,6 @@ #!/bin/sh + +echo 'creating files' dir="$(mktemp -d)" n1="long name" f1="$dir/$n1" @@ -7,21 +9,45 @@ f2="$dir/$n2" touch "$f2" sync + +echo 'launch a program that locks a given file, it will create $dir/lock_test' python3 ./lock_test_help.py "$dir" "$n1" & + +echo 'wait until this lock_test lock file was created by program' while [ ! -f "$dir/lock_test" ]; do sleep .1 done +sync + +echo 'expecting the lock file to reflect "long name"' echo "launched first, locked by: '$(cat "$dir/lock_test")'" + +echo 'launching second program, should find the lock intact and wait' python3 ./lock_test_help.py "$dir" "$n2" & +while [ ! -f "$f2.ready" ]; do + sleep .1 +done +sleep 1 +sync echo "launched second, locked by: '$(cat "$dir/lock_test")'" + +echo 'drop the first lock, $f1 removal signals the first process to stop locking' rm "$f1" + +echo 'wait for first program to carry out the lock release' while [ ! -f "$f1.done" ]; do sleep .1 done + +echo 'now expecting second program to lock' echo "waited, locked by: '$(cat "$dir/lock_test")'" + +echo 'release the second program also' rm "$f2" while [ ! -f "$f2.done" ]; do sleep .1 done + +echo 'expecting the lock to be gone' echo "waited more, locked by: '$(cat "$dir/lock_test")'" rm -rf "$dir" diff --git a/selftest/lock_test_help.py b/selftest/lock_test_help.py index bdf7c64..f4e1f9b 100644 --- a/selftest/lock_test_help.py +++ b/selftest/lock_test_help.py @@ -8,11 +8,15 @@ testdir, name = sys.argv[1:] stop_signalling_file = os.path.join(testdir, name) -assert os.path.isfile(stop_signalling_file) +if not os.path.isfile(stop_signalling_file): +print('expected a stop-file %r' % stop_signalling_file) +exit(1) lockfile_path = os.path.join(testdir, 'lock_test') fl = FileLock(lockfile_path, name) +touch_file(stop_signalling_file + '.ready') + with fl: while os.path.exists(stop_signalling_file): time.sleep(.1) diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index af6a2f0..197dc97 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -101,7 +101,7 @@ def __enter__(self): if self.f is not None: return -self.fd = os.open(self.path, os.O_CREAT | os.O_WRONLY | os.O_TRUNC) +self.fd = os.open(self.path, os.O_CREAT | os.O_WRONLY) fcntl.flock(self.fd, fcntl.LOCK_EX) os.truncate(self.fd, 0) os.write(self.fd, str(self.owner).encode('utf-8')) -- To view, visit https://gerrit.osmocom.org/3939 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iefc7fd5207c926fdeb3282d9d5b4708f1b56d20c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: fix util.py/FileLock and lock_test
fix util.py/FileLock and lock_test Do not pass os.O_TRUNC to open(), that immediately empties out the lock file. Fix lock_test to be able to catch this error. So far things were happening too fast to notice it. Caught by running 'make check' on a main unit APU that has different timing behavior. Change-Id: I60240179478f177fc41ce8978d3e8326fefe4427 --- M selftest/lock_test.ok M selftest/lock_test.sh M selftest/lock_test_help.py M src/osmo_gsm_tester/util.py 4 files changed, 42 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/38/3938/2 diff --git a/selftest/lock_test.ok b/selftest/lock_test.ok index 604767b..011a89c 100644 --- a/selftest/lock_test.ok +++ b/selftest/lock_test.ok @@ -1,4 +1,14 @@ +creating files +launch a program that locks a given file, it will create $dir/lock_test +wait until this lock_test lock file was created by program +expecting the lock file to reflect "long name" launched first, locked by: 'long name' +launching second program, should find the lock intact and wait launched second, locked by: 'long name' +drop the first lock, $f1 removal signals the first process to stop locking +wait for first program to carry out the lock release +now expecting second program to lock waited, locked by: 'shorter' +release the second program also +expecting the lock to be gone waited more, locked by: '' diff --git a/selftest/lock_test.sh b/selftest/lock_test.sh index 049c4d9..4f3f7ad 100755 --- a/selftest/lock_test.sh +++ b/selftest/lock_test.sh @@ -1,4 +1,6 @@ #!/bin/sh + +echo 'creating files' dir="$(mktemp -d)" n1="long name" f1="$dir/$n1" @@ -7,21 +9,45 @@ f2="$dir/$n2" touch "$f2" sync + +echo 'launch a program that locks a given file, it will create $dir/lock_test' python3 ./lock_test_help.py "$dir" "$n1" & + +echo 'wait until this lock_test lock file was created by program' while [ ! -f "$dir/lock_test" ]; do sleep .1 done +sync + +echo 'expecting the lock file to reflect "long name"' echo "launched first, locked by: '$(cat "$dir/lock_test")'" + +echo 'launching second program, should find the lock intact and wait' python3 ./lock_test_help.py "$dir" "$n2" & +while [ ! -f "$f2.ready" ]; do + sleep .1 +done +sleep 1 +sync echo "launched second, locked by: '$(cat "$dir/lock_test")'" + +echo 'drop the first lock, $f1 removal signals the first process to stop locking' rm "$f1" + +echo 'wait for first program to carry out the lock release' while [ ! -f "$f1.done" ]; do sleep .1 done + +echo 'now expecting second program to lock' echo "waited, locked by: '$(cat "$dir/lock_test")'" + +echo 'release the second program also' rm "$f2" while [ ! -f "$f2.done" ]; do sleep .1 done + +echo 'expecting the lock to be gone' echo "waited more, locked by: '$(cat "$dir/lock_test")'" rm -rf "$dir" diff --git a/selftest/lock_test_help.py b/selftest/lock_test_help.py index bdf7c64..f4e1f9b 100644 --- a/selftest/lock_test_help.py +++ b/selftest/lock_test_help.py @@ -8,11 +8,15 @@ testdir, name = sys.argv[1:] stop_signalling_file = os.path.join(testdir, name) -assert os.path.isfile(stop_signalling_file) +if not os.path.isfile(stop_signalling_file): +print('expected a stop-file %r' % stop_signalling_file) +exit(1) lockfile_path = os.path.join(testdir, 'lock_test') fl = FileLock(lockfile_path, name) +touch_file(stop_signalling_file + '.ready') + with fl: while os.path.exists(stop_signalling_file): time.sleep(.1) diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index af6a2f0..197dc97 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -101,7 +101,7 @@ def __enter__(self): if self.f is not None: return -self.fd = os.open(self.path, os.O_CREAT | os.O_WRONLY | os.O_TRUNC) +self.fd = os.open(self.path, os.O_CREAT | os.O_WRONLY) fcntl.flock(self.fd, fcntl.LOCK_EX) os.truncate(self.fd, 0) os.write(self.fd, str(self.owner).encode('utf-8')) -- To view, visit https://gerrit.osmocom.org/3938 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I60240179478f177fc41ce8978d3e8326fefe4427 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: fix util.py/FileLock and lock_test
Review at https://gerrit.osmocom.org/3938 fix util.py/FileLock and lock_test Do not pass os.O_TRUNC to open(), that immediately empties out the lock file. Fix lock_test to be able to catch this error. So far things were happening too fast to notice it. Caught by running 'make check' on a main unit APU that has different timing behavior. Change-Id: I60240179478f177fc41ce8978d3e8326fefe4427 --- M selftest/lock_test.ok M selftest/lock_test.sh M selftest/lock_test_help.py M src/osmo_gsm_tester/util.py 4 files changed, 42 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/38/3938/1 diff --git a/selftest/lock_test.ok b/selftest/lock_test.ok index 604767b..011a89c 100644 --- a/selftest/lock_test.ok +++ b/selftest/lock_test.ok @@ -1,4 +1,14 @@ +creating files +launch a program that locks a given file, it will create $dir/lock_test +wait until this lock_test lock file was created by program +expecting the lock file to reflect "long name" launched first, locked by: 'long name' +launching second program, should find the lock intact and wait launched second, locked by: 'long name' +drop the first lock, $f1 removal signals the first process to stop locking +wait for first program to carry out the lock release +now expecting second program to lock waited, locked by: 'shorter' +release the second program also +expecting the lock to be gone waited more, locked by: '' diff --git a/selftest/lock_test.sh b/selftest/lock_test.sh index 049c4d9..4f3f7ad 100755 --- a/selftest/lock_test.sh +++ b/selftest/lock_test.sh @@ -1,4 +1,6 @@ #!/bin/sh + +echo 'creating files' dir="$(mktemp -d)" n1="long name" f1="$dir/$n1" @@ -7,21 +9,45 @@ f2="$dir/$n2" touch "$f2" sync + +echo 'launch a program that locks a given file, it will create $dir/lock_test' python3 ./lock_test_help.py "$dir" "$n1" & + +echo 'wait until this lock_test lock file was created by program' while [ ! -f "$dir/lock_test" ]; do sleep .1 done +sync + +echo 'expecting the lock file to reflect "long name"' echo "launched first, locked by: '$(cat "$dir/lock_test")'" + +echo 'launching second program, should find the lock intact and wait' python3 ./lock_test_help.py "$dir" "$n2" & +while [ ! -f "$f2.ready" ]; do + sleep .1 +done +sleep 1 +sync echo "launched second, locked by: '$(cat "$dir/lock_test")'" + +echo 'drop the first lock, $f1 removal signals the first process to stop locking' rm "$f1" + +echo 'wait for first program to carry out the lock release' while [ ! -f "$f1.done" ]; do sleep .1 done + +echo 'now expecting second program to lock' echo "waited, locked by: '$(cat "$dir/lock_test")'" + +echo 'release the second program also' rm "$f2" while [ ! -f "$f2.done" ]; do sleep .1 done + +echo 'expecting the lock to be gone' echo "waited more, locked by: '$(cat "$dir/lock_test")'" rm -rf "$dir" diff --git a/selftest/lock_test_help.py b/selftest/lock_test_help.py index bdf7c64..f4e1f9b 100644 --- a/selftest/lock_test_help.py +++ b/selftest/lock_test_help.py @@ -8,11 +8,15 @@ testdir, name = sys.argv[1:] stop_signalling_file = os.path.join(testdir, name) -assert os.path.isfile(stop_signalling_file) +if not os.path.isfile(stop_signalling_file): +print('expected a stop-file %r' % stop_signalling_file) +exit(1) lockfile_path = os.path.join(testdir, 'lock_test') fl = FileLock(lockfile_path, name) +touch_file(stop_signalling_file + '.ready') + with fl: while os.path.exists(stop_signalling_file): time.sleep(.1) diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index af6a2f0..197dc97 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -101,7 +101,7 @@ def __enter__(self): if self.f is not None: return -self.fd = os.open(self.path, os.O_CREAT | os.O_WRONLY | os.O_TRUNC) +self.fd = os.open(self.path, os.O_CREAT | os.O_WRONLY) fcntl.flock(self.fd, fcntl.LOCK_EX) os.truncate(self.fd, 0) os.write(self.fd, str(self.owner).encode('utf-8')) -- To view, visit https://gerrit.osmocom.org/3938 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60240179478f177fc41ce8978d3e8326fefe4427 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[ABANDON] osmo-gsm-tester[master]: fix util.py/FileLock and lock_test
Neels Hofmeyr has abandoned this change. Change subject: fix util.py/FileLock and lock_test .. Abandoned bloody gerrit won't retrigger unless I resubmit this -- To view, visit https://gerrit.osmocom.org/3937 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I8a6e992836b09df3ecec89b3ec36d3641744fc0c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Jenkins Builder
[PATCH] osmo-gsm-tester[master]: fix util.py/FileLock and lock_test
Review at https://gerrit.osmocom.org/3937 fix util.py/FileLock and lock_test Do not pass os.O_TRUNC to open(), that immediately empties out the lock file. Fix lock_test to be able to catch this error. So far things were happening too fast to notice it. Caught by running 'make check' on a main unit APU that has different timing behavior. Change-Id: I8a6e992836b09df3ecec89b3ec36d3641744fc0c --- M selftest/lock_test.ok M selftest/lock_test.sh M selftest/lock_test_help.py M src/osmo_gsm_tester/util.py 4 files changed, 42 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/37/3937/1 diff --git a/selftest/lock_test.ok b/selftest/lock_test.ok index 604767b..011a89c 100644 --- a/selftest/lock_test.ok +++ b/selftest/lock_test.ok @@ -1,4 +1,14 @@ +creating files +launch a program that locks a given file, it will create $dir/lock_test +wait until this lock_test lock file was created by program +expecting the lock file to reflect "long name" launched first, locked by: 'long name' +launching second program, should find the lock intact and wait launched second, locked by: 'long name' +drop the first lock, $f1 removal signals the first process to stop locking +wait for first program to carry out the lock release +now expecting second program to lock waited, locked by: 'shorter' +release the second program also +expecting the lock to be gone waited more, locked by: '' diff --git a/selftest/lock_test.sh b/selftest/lock_test.sh index 049c4d9..4f3f7ad 100755 --- a/selftest/lock_test.sh +++ b/selftest/lock_test.sh @@ -1,4 +1,6 @@ #!/bin/sh + +echo 'creating files' dir="$(mktemp -d)" n1="long name" f1="$dir/$n1" @@ -7,21 +9,45 @@ f2="$dir/$n2" touch "$f2" sync + +echo 'launch a program that locks a given file, it will create $dir/lock_test' python3 ./lock_test_help.py "$dir" "$n1" & + +echo 'wait until this lock_test lock file was created by program' while [ ! -f "$dir/lock_test" ]; do sleep .1 done +sync + +echo 'expecting the lock file to reflect "long name"' echo "launched first, locked by: '$(cat "$dir/lock_test")'" + +echo 'launching second program, should find the lock intact and wait' python3 ./lock_test_help.py "$dir" "$n2" & +while [ ! -f "$f2.ready" ]; do + sleep .1 +done +sleep 1 +sync echo "launched second, locked by: '$(cat "$dir/lock_test")'" + +echo 'drop the first lock, $f1 removal signals the first process to stop locking' rm "$f1" + +echo 'wait for first program to carry out the lock release' while [ ! -f "$f1.done" ]; do sleep .1 done + +echo 'now expecting second program to lock' echo "waited, locked by: '$(cat "$dir/lock_test")'" + +echo 'release the second program also' rm "$f2" while [ ! -f "$f2.done" ]; do sleep .1 done + +echo 'expecting the lock to be gone' echo "waited more, locked by: '$(cat "$dir/lock_test")'" rm -rf "$dir" diff --git a/selftest/lock_test_help.py b/selftest/lock_test_help.py index bdf7c64..f4e1f9b 100644 --- a/selftest/lock_test_help.py +++ b/selftest/lock_test_help.py @@ -8,11 +8,15 @@ testdir, name = sys.argv[1:] stop_signalling_file = os.path.join(testdir, name) -assert os.path.isfile(stop_signalling_file) +if not os.path.isfile(stop_signalling_file): +print('expected a stop-file %r' % stop_signalling_file) +exit(1) lockfile_path = os.path.join(testdir, 'lock_test') fl = FileLock(lockfile_path, name) +touch_file(stop_signalling_file + '.ready') + with fl: while os.path.exists(stop_signalling_file): time.sleep(.1) diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index af6a2f0..197dc97 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -101,7 +101,7 @@ def __enter__(self): if self.f is not None: return -self.fd = os.open(self.path, os.O_CREAT | os.O_WRONLY | os.O_TRUNC) +self.fd = os.open(self.path, os.O_CREAT | os.O_WRONLY) fcntl.flock(self.fd, fcntl.LOCK_EX) os.truncate(self.fd, 0) os.write(self.fd, str(self.owner).encode('utf-8')) -- To view, visit https://gerrit.osmocom.org/3937 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a6e992836b09df3ecec89b3ec36d3641744fc0c Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[MERGED] osmo-gsm-tester[master]: bts_osmotrx: Fix mkdtemp use in python < 3.5
Neels Hofmeyr has submitted this change and it was merged. Change subject: bts_osmotrx: Fix mkdtemp use in python < 3.5 .. bts_osmotrx: Fix mkdtemp use in python < 3.5 We are currently seeing this issues in prod setup, which uses python 3.4: File "/home/jenkins/workspace/osmo-gsm-tester_run/osmo-gsm-tester/src/osmo_gsm_tester/bts_osmotrx.py", line 44, in __init__ self.pcu_sk_tmp_dir = tempfile.mkdtemp(None, 'ogtpcusk', None) File "/usr/lib/python3.4/tempfile.py", line 432, in mkdtemp file = _os.path.join(dir, prefix + name + suffix) TypeError: Can't convert 'NoneType' object to str implicitly Acording to mkdtemp man in python3: "Changed in version 3.5: suffix, prefix, and dir may now be supplied in bytes in order to obtain a bytes return value. Prior to this, only str was allowed. suffix and prefix now accept and default to None to cause an appropriate default value to be used." This issue went unnoticed because the RnD env is running debian 9, which probably has python version >= 3.5. Change-Id: If3226183fe21b4820149b1d03207193dc6f139e2 --- M src/osmo_gsm_tester/bts_osmotrx.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 3077b0f..6130ca9 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -41,7 +41,7 @@ self.suite_run = suite_run self.conf = conf self.env = {} -self.pcu_sk_tmp_dir = tempfile.mkdtemp(None, 'ogtpcusk', None) +self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') if len(self.pcu_socket_path().encode()) > 107: raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) -- To view, visit https://gerrit.osmocom.org/3926 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If3226183fe21b4820149b1d03207193dc6f139e2 Gerrit-PatchSet: 3 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
[PATCH] osmo-gsm-tester[master]: add jenkins-make-check-and-run.sh
Review at https://gerrit.osmocom.org/3936 add jenkins-make-check-and-run.sh Change-Id: I493142bb4cd6c0465e34b4171461d28455315ef4 --- A contrib/jenkins-make-check-and-run.sh 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/36/3936/1 diff --git a/contrib/jenkins-make-check-and-run.sh b/contrib/jenkins-make-check-and-run.sh new file mode 100755 index 000..3017fd4 --- /dev/null +++ b/contrib/jenkins-make-check-and-run.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -e -x +base="$PWD" + +run_script="osmo-gsm-tester/contrib/jenkins-run.sh" +test -x "$run_script" + +cd osmo-gsm-tester +make deps +make check +cd "$base" + +PATH="$base/osmo-gsm-tester/src:$PATH" \ + "$run_script" -- To view, visit https://gerrit.osmocom.org/3936 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I493142bb4cd6c0465e34b4171461d28455315ef4 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
[PATCH] osmo-pcu[master]: Simplify TS alloc: move slot check into function
Review at https://gerrit.osmocom.org/3935 Simplify TS alloc: move slot check into function Move timeslot applicability check outside of nested for loop into separate function and document it. Change-Id: Ic39e848da47dc11357782362fdf6206d2c1457c2 Related: OS#2282 --- M src/gprs_rlcmac_ts_alloc.cpp 1 file changed, 116 insertions(+), 107 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/35/3935/1 diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index f654ffa..cb790f7 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -527,6 +527,119 @@ return capacity; } +enum { MASK_TT, MASK_TR }; + +static bool skip_slot(const struct gprs_rlcmac_trx *trx, const struct gprs_ms_multislot_class *ms_class, + uint8_t *rx_mask, unsigned mask_sel, unsigned ul_ts, int *capacity, uint32_t *checked_rx, + uint8_t dl_slots, uint8_t ul_slots, int *rx_window, int tx_window, uint16_t rx_valid_win, + unsigned tx_slot_count, bool enable_debug) +{ + char slot_info[9] = { 0 }; + unsigned common_slot_count; + unsigned req_common_slots; + unsigned rx_slot_count; + uint8_t rx_good; + + /* Filter out bad slots */ + uint16_t rx_bad = (uint16_t)(0xff & ~rx_mask[mask_sel]) << ul_ts; + rx_bad = (rx_bad | (rx_bad >> 8)) & 0xff; + rx_good = dl_slots & ~rx_bad; + + /* TODO: CHECK this calculation -> separate function for unit testing */ + + *rx_window = rx_good & rx_valid_win; + rx_slot_count = pcu_bitcount(*rx_window); + + if (enable_debug) + LOGP(DRLCMAC, LOGL_DEBUG, +"n_tx=%d, n_rx=%d, mask_sel=%d, tx=%02x, rx=%02x, mask=%02x, bad=%02x, good=%02x, " +"ul=%02x, dl=%02x\n", +tx_slot_count, rx_slot_count, mask_sel, +tx_window, rx_window, rx_mask[mask_sel], rx_bad, rx_good, +ul_slots, dl_slots); + + /* Check compliance with TS 45.002, table 6.4.2.2.1 */ + /* Whether to skip this round doesn not only depend on the bit +* sets but also on mask_sel. Therefore this check must be done +* before doing the test_and_set_bit shortcut. */ + if (ms_class->type == 1) { + unsigned slot_sum = rx_slot_count + tx_slot_count; + /* Assume down + up / dynamic. +* TODO: For ext-dynamic, down only, up only add more cases. +*/ + if (slot_sum <= 6 && tx_slot_count < 3) { + if (mask_sel != MASK_TR) + return true; /* Skip Tta */ + } else if (slot_sum > 6 && tx_slot_count < 3) { + if (mask_sel != MASK_TT) + return true; /* Skip Tra */ + } else { + /* No supported row in TS 45.002, table 6.4.2.2.1. */ + if (enable_debug) { + snprintf(slot_info, 9, OSMO_BIT_SPEC, OSMO_BIT_PRINT_EX(rx_bad, 'x')); + masked_override_with(slot_info, *rx_window, 'D'); + masked_override_with(slot_info, tx_window, 'U'); + LOGP(DRLCMAC, LOGL_DEBUG, +" Skipping DL/UL slots: (TS=0)\"%s\"(TS=7), combination not supported\n", +slot_info); + } + + return true; + } + } + + /* Avoid repeated RX combination check */ + if (test_and_set_bit(checked_rx, *rx_window)) + return true; + + if (!rx_good) { + if (enable_debug) { + snprintf(slot_info, 9, OSMO_BIT_SPEC, OSMO_BIT_PRINT_EX(rx_bad, 'x')); + masked_override_with(slot_info, tx_window, 'U'); + LOGP(DRLCMAC, LOGL_DEBUG, +" Skipping DL/UL slots: (TS=0)\"%s\"(TS=7), no DL slots available\n", slot_info); + } + + return true; + } + + if (!(*rx_window)) + return true; + + /* Check number of common slots according to TS 45.002, §6.4.2.2 */ + common_slot_count = pcu_bitcount(tx_window & *rx_window); + req_common_slots = OSMO_MIN(tx_slot_count, rx_slot_count); + if (ms_class->type == 1) + req_common_slots = OSMO_MIN(req_common_slots, 2); + + if (req_common_slots != common_slot_count) { + if (enable_debug) { + snprintf(slot_info, 9, OSMO_BIT_SPEC, OSMO_BIT_PRINT_EX(rx_bad, 'x')); + masked_override_with(slot_info, *rx_window, 'D'); + masked_override_with(slot_info, tx_window, 'U'); + LOGP(DRLCMAC, LOGL_DEBUG, +" Skipping DL/UL
[PATCH] osmo-pcu[master]: Simplify TS alloc: cosmetic, use proper formatting
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3914 to look at the new patch set (#3). Simplify TS alloc: cosmetic, use proper formatting The find_multi_slots() function has 5 nested for(;;) loops but it's formatted as one. Before trying to split this into smth saner, let's first fix code formatting to make nested loops obvious. Also, fix typos in comments. Change-Id: I50b59b12e8d938bd96f9b29d00a649cd3e77bc5e Related: OS#2282 --- M src/gprs_rlcmac_ts_alloc.cpp 1 file changed, 142 insertions(+), 141 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/14/3914/3 diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 301b2eb..cfef05a 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -604,8 +604,7 @@ rx_mask[MASK_TT] = (0x100 >> OSMO_MAX(Ttb, Tta)) - 1; rx_mask[MASK_TT] &= ~((1 << (Trb + num_tx)) - 1); rx_mask[MASK_TR] = (0x100 >> Ttb) - 1; - rx_mask[MASK_TR] &= - ~((1 << (OSMO_MAX(Trb, Tra) + num_tx)) - 1); + rx_mask[MASK_TR] &= ~((1 << (OSMO_MAX(Trb, Tra) + num_tx)) - 1); } else { /* Class type 2 MS have independant RX and TX */ rx_mask[MASK_TT] = 0xff; @@ -615,177 +614,179 @@ rx_mask[MASK_TT] = (rx_mask[MASK_TT] << 3) | (rx_mask[MASK_TT] >> 5); rx_mask[MASK_TR] = (rx_mask[MASK_TR] << 3) | (rx_mask[MASK_TR] >> 5); - /* Rotate group of TX slots: UUU-, -UUU, ..., UU-U */ - for (ul_ts = 0; ul_ts < 8; ul_ts += 1, tx_valid_win <<= 1) { - unsigned tx_slot_count; - int max_rx; - uint16_t rx_valid_win; - uint32_t checked_rx[256/32] = {0}; + /* Rotate group of TX slots: UUU-, -UUU, ..., UU-U */ + for (ul_ts = 0; ul_ts < 8; ul_ts += 1, tx_valid_win <<= 1) { + unsigned tx_slot_count; + int max_rx; + uint16_t rx_valid_win; + uint32_t checked_rx[256/32] = {0}; - /* Wrap valid window */ - tx_valid_win = (tx_valid_win | tx_valid_win >> 8) & 0xff; + /* Wrap valid window */ + tx_valid_win = (tx_valid_win | tx_valid_win >> 8) & 0xff; - tx_window = tx_valid_win; + tx_window = tx_valid_win; - /* Filter out unavailable slots */ - tx_window &= *ul_slots; + /* Filter out unavailable slots */ + tx_window &= *ul_slots; - /* Skip if the the first TS (ul_ts) is not in the set */ - if ((tx_window & (1 << ul_ts)) == 0) - continue; + /* Skip if the the first TS (ul_ts) is not in the set */ + if ((tx_window & (1 << ul_ts)) == 0) + continue; - /* Skip if the the last TS (ul_ts+num_tx-1) is not in the set */ - if ((tx_window & (1 << ((ul_ts+num_tx-1) % 8))) == 0) - continue; + /* Skip if the the last TS (ul_ts+num_tx-1) is not in the set */ + if ((tx_window & (1 << ((ul_ts+num_tx-1) % 8))) == 0) + continue; - tx_slot_count = pcu_bitcount(tx_window); + tx_slot_count = pcu_bitcount(tx_window); - max_rx = OSMO_MIN(ms_class->rx, ms_class->sum - num_tx); - rx_valid_win = (1 << max_rx) - 1; + max_rx = OSMO_MIN(ms_class->rx, ms_class->sum - num_tx); + rx_valid_win = (1 << max_rx) - 1; - /* Rotate group of RX slots: DDD-, -DDD, ..., DD-D */ - for (dl_ts = 0; dl_ts < 8; dl_ts += 1, rx_valid_win <<= 1) { - /* Wrap valid window */ - rx_valid_win = (rx_valid_win | rx_valid_win >> 8) & 0xff; + /* Rotate group of RX slots: DDD-, -DDD, ..., DD-D */ + for (dl_ts = 0; dl_ts < 8; dl_ts += 1, rx_valid_win <<= 1) { + /* Wrap valid window */ + rx_valid_win = (rx_valid_win | rx_valid_win >> 8) & 0xff; - /* Validate with both Tta/Ttb/Trb and Ttb/Tra/Trb */ - for (mask_sel = MASK_TT; mask_sel <= MASK_TR; mask_sel += 1) { - unsigned common_slot_count; - unsigned req_common_slots; - unsigned rx_slot_count; - uint16_t rx_bad; - uint8_t rx_good; - unsigned ts; - int capacity; + /* Validate with both Tta/Ttb/Trb and Ttb/Tra/Trb
osmo-gsm-tester[master]: fix build: properly remove artifacts
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib7e5995aa6914e34f8b7bbb8a8ed46ff9230a913 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[MERGED] osmo-gsm-tester[master]: fix build: properly remove artifacts
Neels Hofmeyr has submitted this change and it was merged. Change subject: fix build: properly remove artifacts .. fix build: properly remove artifacts The jenkins scripts are run by sh, which does not support the {a,b} syntax shell glob. As a result, old build artifacts pile up in the workspaces. Use two separate lines to remove .tgz and .md5. Change-Id: Ib7e5995aa6914e34f8b7bbb8a8ed46ff9230a913 --- M contrib/jenkins-build-common.sh 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins-build-common.sh b/contrib/jenkins-build-common.sh index a5b34af..39046ef 100644 --- a/contrib/jenkins-build-common.sh +++ b/contrib/jenkins-build-common.sh @@ -56,7 +56,8 @@ env | grep -v "^LESS" | sort # clean the workspace -rm -f "$base"/*.build-*.{tgz,md5} +rm -f "$base"/*.build-*.tgz +rm -f "$base"/*.build-*.md5 rm -rf "$prefix_real" mkdir -p "$prefix_real" -- To view, visit https://gerrit.osmocom.org/3933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib7e5995aa6914e34f8b7bbb8a8ed46ff9230a913 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
[PATCH] osmo-gsm-tester[master]: fix build: properly remove artifacts
Review at https://gerrit.osmocom.org/3933 fix build: properly remove artifacts The jenkins scripts are run by sh, which does not support the {a,b} syntax shell glob. As a result, old build artifacts pile up in the workspaces. Use two separate lines to remove .tgz and .md5. Change-Id: Ib7e5995aa6914e34f8b7bbb8a8ed46ff9230a913 --- M contrib/jenkins-build-common.sh 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/33/3933/1 diff --git a/contrib/jenkins-build-common.sh b/contrib/jenkins-build-common.sh index a5b34af..39046ef 100644 --- a/contrib/jenkins-build-common.sh +++ b/contrib/jenkins-build-common.sh @@ -56,7 +56,8 @@ env | grep -v "^LESS" | sort # clean the workspace -rm -f "$base"/*.build-*.{tgz,md5} +rm -f "$base"/*.build-*.tgz +rm -f "$base"/*.build-*.md5 rm -rf "$prefix_real" mkdir -p "$prefix_real" -- To view, visit https://gerrit.osmocom.org/3933 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7e5995aa6914e34f8b7bbb8a8ed46ff9230a913 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr
meta-telephony[201705]: Add git-review config
Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/3925 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4178b4866078f20f7415772255e9c755dcb90efe Gerrit-PatchSet: 1 Gerrit-Project: meta-telephony Gerrit-Branch: 201705 Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[PATCH] osmo-gsm-tester[master]: contrib: Build octphy osmo-bts variant and make it generic
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3928 to look at the new patch set (#2). contrib: Build octphy osmo-bts variant and make it generic This is a first step to add support for osmo-bts-octpy to osmo-gsm-tester. There's no point in building separate insts for different osmo-bts variants which run on the main unit and which come from the same git repository, this we make the osmo-bts-trx one generic to handle all variants which fall into the description above. Tested locally on my laptop that it builds susccessfully. Once this patch is applied, jenkins jobs need to be adjusted: - RnD: osmo-gsm-tester_manual-build-all - Prod: osmo-gsm-tester_build-osmo-bts-trx (and rename it) Change-Id: Ib8814e4ce49596b586990f20d7d625a719852e90 --- R contrib/jenkins-build-osmo-bts.sh M src/osmo_gsm_tester/bts_osmotrx.py 2 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/28/3928/2 diff --git a/contrib/jenkins-build-osmo-bts-trx.sh b/contrib/jenkins-build-osmo-bts.sh similarity index 61% rename from contrib/jenkins-build-osmo-bts-trx.sh rename to contrib/jenkins-build-osmo-bts.sh index 6188be1..7349ce5 100755 --- a/contrib/jenkins-build-osmo-bts-trx.sh +++ b/contrib/jenkins-build-osmo-bts.sh @@ -1,14 +1,15 @@ #!/bin/sh set -e -x base="$PWD" -name="osmo-bts-trx" +name="osmo-bts" . "$(dirname "$0")/jenkins-build-common.sh" # for gsm_data_shared.* have_repo openbsc +have_repo octphy-2g-headers build_repo libosmocore --disable-doxygen build_repo libosmo-abis -build_repo osmo-bts --enable-trx --with-openbsc=$base/openbsc/openbsc/include +build_repo osmo-bts --enable-trx --with-openbsc=$base/openbsc/openbsc/include --enable-octphy --with-octsdr-2g=$base/octphy-2g-headers -create_bin_tgz osmo-bts-trx +create_bin_tgz osmo-bts-trx osmo-bts-octphy diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 3077b0f..23d5a29 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -84,7 +84,7 @@ self.log('Waiting for osmo-trx to start up...') event_loop.wait(self, self.trx.trx_ready) -self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst(OsmoBtsTrx.BIN_BTS_TRX))) +self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-bts'))) lib = self.inst.child('lib') if not os.path.isdir(lib): raise RuntimeError('No lib/ in %r' % self.inst) -- To view, visit https://gerrit.osmocom.org/3928 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib8814e4ce49596b586990f20d7d625a719852e90 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels
[PATCH] osmo-pcu[master]: TS alloc: print suggested TRX on allocation errors
Review at https://gerrit.osmocom.org/3931 TS alloc: print suggested TRX on allocation errors If TS allocation fails due to unavailable TFI, print TRX which was suggested to allocator. This simplifies allocator debugging but requires cosmetic modifications to test output. Change-Id: Icaf97d71d71985d52dc0bda448c26b19fe5645e7 Related: OS#2282 --- M src/bts.cpp M tests/alloc/AllocTest.err 2 files changed, 833 insertions(+), 833 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/31/3931/1 diff --git a/src/bts.cpp b/src/bts.cpp index f5f6f44..172008f 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -478,7 +478,7 @@ } if (!free_tfis) { - LOGP(DRLCMAC, LOGL_NOTICE, "No TFI available.\n"); + LOGP(DRLCMAC, LOGL_NOTICE, "No TFI available (suggested TRX: %d).\n", use_trx); return -EBUSY; } diff --git a/tests/alloc/AllocTest.err b/tests/alloc/AllocTest.err index a74c42b..a804bab 100644 --- a/tests/alloc/AllocTest.err +++ b/tests/alloc/AllocTest.err @@ -1,894 +1,894 @@ -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). - Failed to find a usable TRX (TFI exhausted) - Failed to allocate a TS, no USF available -No TFI available. -No TFI available. -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). - Failed to find a usable TRX (TFI exhausted) - Failed to allocate a TS, no USF available - Failed to allocate a TS, no USF available -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: -1). - Failed to allocate a TFI -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: -1). - Failed to allocate a TFI -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: -1). - Failed to allocate a TFI -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: -1). - Failed to allocate a TFI -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: -1). - Failed to allocate a TFI -No TFI available. -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). - Failed to allocate a TS, no USF available - Failed to allocate a TS, no USF available -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: -1). - Failed to allocate a TFI -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: -1). - Failed to allocate a TFI - Failed to allocate a TS, no USF available -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). - Failed to find a usable TRX (TFI exhausted) -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). - Failed to allocate a TFI -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). - Failed to allocate a TFI -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. -No TFI available. +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). +No TFI available (suggested TRX: 0). +No
[PATCH] osmo-pcu[master]: TS alloc: expand tests log
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3895 to look at the new patch set (#14). TS alloc: expand tests log * restructure code for easier reading * use consistent formatting for output * log essential allocation parameters on failure Change-Id: I4b78951a79ddbc0745b39d091080a4e0e247d3c5 Related: OS#2282 --- M src/gprs_rlcmac_ts_alloc.cpp M tests/alloc/AllocTest.err M tests/tbf/TbfTest.err 3 files changed, 192 insertions(+), 184 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/95/3895/14 diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 49e0391..43f1602 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -429,13 +429,14 @@ const gprs_rlcmac_tbf *tbf = tbf_; gprs_rlcmac_trx *trx = ms->current_trx(); - LOGP(DRLCMAC, LOGL_DEBUG, "Slot Allocation (Algorithm A) for class " - "%d\n", tbf->ms_class()); + LOGP(DRLCMAC, LOGL_DEBUG, "Slot Allocation (Algorithm A) for class %d [%s]\n", +tbf->ms_class(), (tbf->direction == GPRS_RLCMAC_DL_TBF) ? "DL" : "UL"); trx_no = find_trx(bts, ms, use_trx); if (trx_no < 0) { LOGP(DRLCMAC, LOGL_NOTICE, - "- Failed to find a usable TRX (TFI exhausted)\n"); +"algo A [%s] (suggested TRX: %d): failed to find a usable TRX (TFI exhausted) for %s\n", +single ? "single" : "multi", use_trx, (tbf->direction == GPRS_RLCMAC_DL_TBF) ? "DL" : "UL"); return trx_no; } if (!trx) @@ -463,14 +464,16 @@ , ); if (tbf->direction == GPRS_RLCMAC_UL_TBF && usf < 0) { - LOGP(DRLCMAC, LOGL_NOTICE, "- Failed " - "to allocate a TS, no USF available\n"); + LOGP(DRLCMAC, LOGL_NOTICE, +"algo A [%s] (suggested TRX: %d): failed to allocate a TS, no USF available for %s\n", +single ? "single" : "multi", use_trx, (tbf->direction == GPRS_RLCMAC_DL_TBF) ? "DL" : "UL"); return -EBUSY; } if (ts < 0) { - LOGP(DRLCMAC, LOGL_NOTICE, "- Failed " - "to allocate a TS, no TFI available\n"); + LOGP(DRLCMAC, LOGL_NOTICE, +"algo A [%s] (suggested TRX: %d): failed to allocate a TS, no TFI available for %s\n", +single ? "single" : "multi", use_trx, (tbf->direction == GPRS_RLCMAC_DL_TBF) ? "DL" : "UL"); return -EBUSY; } @@ -948,7 +951,7 @@ LOGPC(DRLCMAC, LOGL_DEBUG, "- Selected DL"); } - LOGPC(DRLCMAC, LOGL_DEBUG, " slots: (TS=0)\"%s\"(TS=7)%s\n", slot_info, single ? ", single" : ""); + LOGPC(DRLCMAC, LOGL_DEBUG, " slots: (TS=0)\"%s\"(TS=7), %s\n", slot_info, single ? "single" : "multi"); return sl; } @@ -1037,7 +1040,8 @@ /* Step 2a: Find usable TRX and TFI */ tfi = tfi_find_free(bts->bts, trx, ms, tbf->direction, use_trx, _no); if (tfi < 0) { - LOGP(DRLCMAC, LOGL_NOTICE, "- Failed to allocate a TFI\n"); + LOGP(DRLCMAC, LOGL_NOTICE, "algo B [%s] (suggested TRX: %d): failed to allocate a TFI for %s\n", +single ? "single" : "multi", use_trx, (tbf->direction == GPRS_RLCMAC_DL_TBF) ? "DL" : "UL"); return tfi; } @@ -1081,23 +1085,27 @@ first_common_ts = ffs(dl_slots & ul_slots) - 1; if (first_common_ts < 0) { - LOGP(DRLCMAC, LOGL_NOTICE, "No first common slots available\n"); + LOGP(DRLCMAC, LOGL_NOTICE, "algo B [%s] (suggested TRX: %d): no first common slots available for %s\n", +single ? "single" : "multi", use_trx, (tbf->direction == GPRS_RLCMAC_DL_TBF) ? "DL" : "UL"); return -EINVAL; } + if (first_ts < 0) { - LOGP(DRLCMAC, LOGL_NOTICE, "No first slot available\n"); + LOGP(DRLCMAC, LOGL_NOTICE, "algo B [%s] (suggested TRX: %d): no first slot available for %s\n", +single ? "single" : "multi", use_trx, (tbf->direction == GPRS_RLCMAC_DL_TBF) ? "DL" : "UL"); return -EINVAL; } if (single && slotcount) { tbf_->upgrade_to_multislot = (avail_count > slotcount); - LOGP(DRLCMAC, LOGL_INFO, "Using single slot at TS %d for %s\n", - first_ts, - (tbf->direction == GPRS_RLCMAC_DL_TBF) ? "DL" : "UL"); + LOGP(DRLCMAC, LOGL_INFO, "algo B [%s] (suggested TRX: %d): using single slot at TS %d for %s\n", +single ? "single" : "multi", use_trx, first_ts, +(tbf->direction == GPRS_RLCMAC_DL_TBF) ? "DL" : "UL"); } else { tbf_->upgrade_to_multislot = 0; -
[PATCH] osmo-pcu[master]: Simplify TS alloc: move slot assignment
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3905 to look at the new patch set (#5). Simplify TS alloc: move slot assignment Move into separate functions: * move timeslot reservation * move UL timeslot assignment * move DL timeslot assignment Change-Id: I64cf78c5cfc78664766f9769dd5cde632dab92b0 Related: OS#2282 --- M src/gprs_rlcmac_ts_alloc.cpp 1 file changed, 74 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/05/3905/5 diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 9eb8464..81b19a5 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -802,6 +802,75 @@ return 0; } +/*! Update MS' reserved timeslots + * + * \param[in,out] trx Pointer to TRX struct + * \param[in,out] ms_ Pointer to MS object + * \param[in] tbf_ Pointer to TBF struct + * \param[in] res_ul_slots Newly reserved UL slots + * \param[in] res_dl_slots Newly reserved DL slots + * \param[in] ul_slots available UL slots (for logging only) + * \param[in] dl_slots available DL slots (for logging only) + */ +static void update_ms_reserved_slots(gprs_rlcmac_trx *trx, GprsMs *ms, uint8_t res_ul_slots, uint8_t res_dl_slots, +uint8_t ul_slots, uint8_t dl_slots) +{ + char slot_info[9] = { 0 }; + + if (res_ul_slots == ms->reserved_ul_slots() && res_dl_slots == ms->reserved_dl_slots()) + return; + + /* The reserved slots have changed, update the MS */ + ms->set_reserved_slots(trx, res_ul_slots, res_dl_slots); + + ts_print(slot_info, dl_slots, ul_slots); + LOGP(DRLCMAC, LOGL_DEBUG, "- Reserved DL/UL slots: (TS=0)\"%s\"(TS=7)\n", slot_info); +} + +/*! Assign given UL timeslots to UL TBF + * + * \param[in,out] ul_tbf Pointer to UL TBF struct + * \param[in,out] trx Pointer to TRX object + * \param[in] ul_slots Set of slots to be assigned + * \param[in] tfi selected TFI + * \param[in] usf selected USF + */ +static void assign_ul_tbf_slots(struct gprs_rlcmac_ul_tbf *ul_tbf, gprs_rlcmac_trx *trx, uint8_t ul_slots, int tfi, + int *usf) +{ + uint8_t ts; + + for (ts = 0; ts < 8; ts++) { + if (!(ul_slots & (1 << ts))) + continue; + + OSMO_ASSERT(usf[ts] >= 0); + + LOGP(DRLCMAC, LOGL_DEBUG, "- Assigning UL TS %u\n", ts); + assign_uplink_tbf_usf(>pdch[ts], ul_tbf, tfi, usf[ts]); + } +} + +/*! Assign given DL timeslots to DL TBF + * + * \param[in,out] dl_tbf Pointer to DL TBF struct + * \param[in,out] trx Pointer to TRX object + * \param[in] ul_slots Set of slots to be assigned + * \param[in] tfi selected TFI + */ +static void assign_dl_tbf_slots(struct gprs_rlcmac_dl_tbf *dl_tbf, gprs_rlcmac_trx *trx, uint8_t dl_slots, int tfi) +{ + uint8_t ts; + + for (ts = 0; ts < 8; ts++) { + if (!(dl_slots & (1 << ts))) + continue; + + LOGP(DRLCMAC, LOGL_DEBUG, "- Assigning DL TS %u\n", ts); + assign_dlink_tbf(>pdch[ts], dl_tbf, tfi); + } +} + /*! Slot Allocation: Algorithm B * * Assign as many downlink slots as possible. @@ -982,46 +1051,15 @@ /* Step 4: Update MS and TBF and really allocate the resources */ - /* The reserved slots have changed, update the MS */ - if (reserved_ul_slots != ms->reserved_ul_slots() || - reserved_dl_slots != ms->reserved_dl_slots()) - { - ms_->set_reserved_slots(trx, - reserved_ul_slots, reserved_dl_slots); - - ts_print(slot_info, dl_slots, ul_slots); - LOGP(DRLCMAC, LOGL_DEBUG, "- Reserved DL/UL slots: (TS=0)\"%s\"(TS=7)\n", slot_info); - } - + update_ms_reserved_slots(trx, ms_, reserved_ul_slots, reserved_dl_slots, ul_slots, dl_slots); tbf_->trx = trx; tbf_->first_common_ts = first_common_ts; tbf_->first_ts = first_ts; - if (tbf->direction == GPRS_RLCMAC_DL_TBF) { - struct gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(tbf_); - for (ts = 0; ts < 8; ts++) { - if (!(dl_slots & (1 << ts))) - continue; - - LOGP(DRLCMAC, LOGL_DEBUG, "- Assigning DL TS " - "%d\n", ts); - assign_dlink_tbf(>pdch[ts], dl_tbf, tfi); - } - } else { - struct gprs_rlcmac_ul_tbf *ul_tbf = as_ul_tbf(tbf_); - - for (ts = 0; ts < 8; ts++) { - if (!(ul_slots & (1 << ts))) - continue; - - OSMO_ASSERT(usf[ts] >= 0); - - LOGP(DRLCMAC, LOGL_DEBUG, "- Assigning UL TS " - "%d\n", ts); -
[PATCH] osmo-pcu[master]: Simplify TS alloc: cosmetic, use proper formatting
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3914 to look at the new patch set (#2). Simplify TS alloc: cosmetic, use proper formatting The find_multi_slots() function has 4 nested for(;;) loops but it's formatted as one. Before trying to split this into smth saner, let's first fix code formatting to make nested loops obvious. Also, fix typos in comments. Change-Id: I50b59b12e8d938bd96f9b29d00a649cd3e77bc5e Related: OS#2282 --- M src/gprs_rlcmac_ts_alloc.cpp 1 file changed, 142 insertions(+), 141 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/14/3914/2 diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 301b2eb..cfef05a 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -604,8 +604,7 @@ rx_mask[MASK_TT] = (0x100 >> OSMO_MAX(Ttb, Tta)) - 1; rx_mask[MASK_TT] &= ~((1 << (Trb + num_tx)) - 1); rx_mask[MASK_TR] = (0x100 >> Ttb) - 1; - rx_mask[MASK_TR] &= - ~((1 << (OSMO_MAX(Trb, Tra) + num_tx)) - 1); + rx_mask[MASK_TR] &= ~((1 << (OSMO_MAX(Trb, Tra) + num_tx)) - 1); } else { /* Class type 2 MS have independant RX and TX */ rx_mask[MASK_TT] = 0xff; @@ -615,177 +614,179 @@ rx_mask[MASK_TT] = (rx_mask[MASK_TT] << 3) | (rx_mask[MASK_TT] >> 5); rx_mask[MASK_TR] = (rx_mask[MASK_TR] << 3) | (rx_mask[MASK_TR] >> 5); - /* Rotate group of TX slots: UUU-, -UUU, ..., UU-U */ - for (ul_ts = 0; ul_ts < 8; ul_ts += 1, tx_valid_win <<= 1) { - unsigned tx_slot_count; - int max_rx; - uint16_t rx_valid_win; - uint32_t checked_rx[256/32] = {0}; + /* Rotate group of TX slots: UUU-, -UUU, ..., UU-U */ + for (ul_ts = 0; ul_ts < 8; ul_ts += 1, tx_valid_win <<= 1) { + unsigned tx_slot_count; + int max_rx; + uint16_t rx_valid_win; + uint32_t checked_rx[256/32] = {0}; - /* Wrap valid window */ - tx_valid_win = (tx_valid_win | tx_valid_win >> 8) & 0xff; + /* Wrap valid window */ + tx_valid_win = (tx_valid_win | tx_valid_win >> 8) & 0xff; - tx_window = tx_valid_win; + tx_window = tx_valid_win; - /* Filter out unavailable slots */ - tx_window &= *ul_slots; + /* Filter out unavailable slots */ + tx_window &= *ul_slots; - /* Skip if the the first TS (ul_ts) is not in the set */ - if ((tx_window & (1 << ul_ts)) == 0) - continue; + /* Skip if the the first TS (ul_ts) is not in the set */ + if ((tx_window & (1 << ul_ts)) == 0) + continue; - /* Skip if the the last TS (ul_ts+num_tx-1) is not in the set */ - if ((tx_window & (1 << ((ul_ts+num_tx-1) % 8))) == 0) - continue; + /* Skip if the the last TS (ul_ts+num_tx-1) is not in the set */ + if ((tx_window & (1 << ((ul_ts+num_tx-1) % 8))) == 0) + continue; - tx_slot_count = pcu_bitcount(tx_window); + tx_slot_count = pcu_bitcount(tx_window); - max_rx = OSMO_MIN(ms_class->rx, ms_class->sum - num_tx); - rx_valid_win = (1 << max_rx) - 1; + max_rx = OSMO_MIN(ms_class->rx, ms_class->sum - num_tx); + rx_valid_win = (1 << max_rx) - 1; - /* Rotate group of RX slots: DDD-, -DDD, ..., DD-D */ - for (dl_ts = 0; dl_ts < 8; dl_ts += 1, rx_valid_win <<= 1) { - /* Wrap valid window */ - rx_valid_win = (rx_valid_win | rx_valid_win >> 8) & 0xff; + /* Rotate group of RX slots: DDD-, -DDD, ..., DD-D */ + for (dl_ts = 0; dl_ts < 8; dl_ts += 1, rx_valid_win <<= 1) { + /* Wrap valid window */ + rx_valid_win = (rx_valid_win | rx_valid_win >> 8) & 0xff; - /* Validate with both Tta/Ttb/Trb and Ttb/Tra/Trb */ - for (mask_sel = MASK_TT; mask_sel <= MASK_TR; mask_sel += 1) { - unsigned common_slot_count; - unsigned req_common_slots; - unsigned rx_slot_count; - uint16_t rx_bad; - uint8_t rx_good; - unsigned ts; - int capacity; + /* Validate with both Tta/Ttb/Trb and Ttb/Tra/Trb
[PATCH] osmo-pcu[master]: Simplify TS alloc: split USF/UL allocation
Review at https://gerrit.osmocom.org/3930 Simplify TS alloc: split USF/UL allocation * move USF allocation into separate function * document USF allocation This allows to clearly see where selected UL TS is forced into single TS in algorithm B allocator. Change-Id: I563dc10827ce68295553f88f3bf2e1fc0ba595c1 Related: OS#2282 --- M src/gprs_rlcmac_ts_alloc.cpp 1 file changed, 42 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/30/3930/1 diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index cfef05a..6dfb13b 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -950,6 +950,44 @@ return sl; } +/*! Allocate USF according to a given UL TS mapping + * + * N. B: this is legacy implementation which ignores given selected_ul_slots + * \param[in] trx Pointer to TRX object + * \param[in] tbf Pointer to TBF object + * \param[in] first_common_ts First TS which is common to both UL and DL + * \param[in] selected_ul_slots set of UL timeslots selected for allocation + * \param[in] dl_slots set of DL timeslots + * \param[out] usf array for allocated USF + * \returns updated UL TS or negative on error + */ +static int allocate_usf(const gprs_rlcmac_trx *trx, int8_t first_common_ts, uint8_t selected_ul_slots, uint8_t dl_slots, + int *usf) +{ + int free_usf = -1, ts; + uint8_t ul_slots = selected_ul_slots; + + if (first_common_ts >= 0) + ul_slots = 1 << first_common_ts; + else + ul_slots = ul_slots & dl_slots; + + ts = find_least_busy_pdch(trx, GPRS_RLCMAC_UL_TBF, ul_slots, compute_usage_by_num_tbfs, NULL, _usf); + + if (free_usf < 0 || ts < 0) { + LOGP(DRLCMAC, LOGL_NOTICE, "No USF available\n"); + return -EBUSY; + } + + OSMO_ASSERT(ts >= 0 && ts <= 8); + + /* We will stick to that single UL slot, unreserve the others */ + ul_slots = 1 << ts; + usf[ts] = free_usf; + + return ul_slots; +} + /*! Slot Allocation: Algorithm B * * Assign as many downlink slots as possible. @@ -973,7 +1011,6 @@ int8_t first_common_ts; uint8_t slotcount = 0; uint8_t avail_count = 0, trx_no; - int ts; int first_ts = -1; int usf[8] = {-1, -1, -1, -1, -1, -1, -1, -1}; int rc; @@ -1027,27 +1064,12 @@ dl_slots = rc; update_slot_counters(dl_slots, reserved_dl_slots, , _count); } else { - int free_usf = -1; - - ul_slots = rc; - - if (first_common_ts >= 0) - ul_slots = 1 << first_common_ts; - else - ul_slots = ul_slots & dl_slots; - - ts = find_least_busy_pdch(trx, GPRS_RLCMAC_UL_TBF, ul_slots, compute_usage_by_num_tbfs, NULL, _usf); - - if (free_usf < 0) { - LOGP(DRLCMAC, LOGL_NOTICE, "No USF available\n"); - return -EBUSY; - } - - OSMO_ASSERT(ts >= 0 && ts <= 8); + rc = allocate_usf(trx, first_common_ts, rc, dl_slots, usf); + if (rc < 0) + return rc; /* We will stick to that single UL slot, unreserve the others */ - ul_slots = 1 << ts; - usf[ts] = free_usf; + ul_slots = rc; reserved_ul_slots = ul_slots; update_slot_counters(ul_slots, reserved_ul_slots, , _count); -- To view, visit https://gerrit.osmocom.org/3930 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I563dc10827ce68295553f88f3bf2e1fc0ba595c1 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max
[PATCH] osmo-pcu[master]: TS alloc: enable debugging instrumentation
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3913 to look at the new patch set (#2). TS alloc: enable debugging instrumentation Previously extra debugging was disabled by preprocessor directives which means allocation tests were run without it. Enable it explicitly via boolean parameter which can be set from tests but keep it unset in main code to avoid interference with production setup. Change-Id: I731726a096bba7ee97499e5cbe3e7401869d7392 Related: OS#2282 --- M src/bts.cpp M src/gprs_rlcmac_ts_alloc.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M tests/alloc/AllocTest.cpp M tests/tbf/TbfTest.cpp 7 files changed, 83 insertions(+), 82 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/13/3913/2 diff --git a/src/bts.cpp b/src/bts.cpp index 6e5a018..f5f6f44 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -651,11 +651,11 @@ /* FIXME: Copy and paste with other routines.. */ if (is_11bit) { - tbf = tbf_alloc_ul_tbf(_bts, NULL, -1, 0, ms_class, true); + tbf = tbf_alloc_ul_tbf(_bts, NULL, -1, 0, ms_class, true, false); } else { /* set class to 0, since we don't know the multislot * class yet */ - tbf = tbf_alloc_ul_tbf(_bts, NULL, -1, 0, 0, true); + tbf = tbf_alloc_ul_tbf(_bts, NULL, -1, 0, 0, true, false); } if (!tbf) { diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 6dfb13b..49e0391 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -506,9 +506,11 @@ * \param[in] ms Pointer to MS object * \param[in,out] ul_slots set of UL timeslots * \param[in,out] dl_slots set of DL timeslots + * \param[in] enable_debug Flag to enable excessive logging not suitable for production run but necessary for tests * \returns negative error code or 0 on success */ -static int find_multi_slots(const struct gprs_rlcmac_trx *trx, const GprsMs *ms, uint8_t *ul_slots, uint8_t *dl_slots) +static int find_multi_slots(const struct gprs_rlcmac_trx *trx, const GprsMs *ms, uint8_t *ul_slots, uint8_t *dl_slots, + bool enable_debug) { const struct gprs_ms_multislot_class *ms_class; uint8_t Tx, Sum;/* Maximum Number of Slots: RX, Tx, Sum Rx+Tx */ @@ -667,14 +669,13 @@ rx_window = rx_good & rx_valid_win; rx_slot_count = pcu_bitcount(rx_window); -#if 0 - LOGP(DRLCMAC, LOGL_DEBUG, "n_tx=%d, n_rx=%d, mask_sel=%d, " -"tx=%02x, rx=%02x, mask=%02x, bad=%02x, good=%02x, " -"ul=%02x, dl=%02x\n", -tx_slot_count, rx_slot_count, mask_sel, -tx_window, rx_window, rx_mask[mask_sel], rx_bad, rx_good, -*ul_slots, *dl_slots); -#endif + if (enable_debug) + LOGP(DRLCMAC, LOGL_DEBUG, "n_tx=%d, n_rx=%d, mask_sel=%d, " +"tx=%02x, rx=%02x, mask=%02x, bad=%02x, good=%02x, " +"ul=%02x, dl=%02x\n", +tx_slot_count, rx_slot_count, mask_sel, +tx_window, rx_window, rx_mask[mask_sel], rx_bad, rx_good, +*ul_slots, *dl_slots); /* Check compliance with TS 45.002, table 6.4.2.2.1 */ /* Whether to skip this round doesn not only depend on the bit @@ -695,15 +696,15 @@ continue; } else { /* No supported row in TS 45.002, table 6.4.2.2.1. */ -#ifdef ENABLE_TS_ALLOC_DEBUG - snprintf(slot_info, 9, OSMO_BIT_SPEC, - OSMO_BIT_PRINT_EX(rx_bad, 'x')); - masked_override_with(slot_info, rx_window, 'D'); - masked_override_with(slot_info, tx_window, 'U'); - LOGP(DRLCMAC, LOGL_DEBUG, -"- Skipping DL/UL slots: (TS=0)\"%s\"(TS=7), " -
[PATCH] osmo-pcu[master]: Simplify TS alloc: replace debug printer
Review at https://gerrit.osmocom.org/3929 Simplify TS alloc: replace debug printer Replace unreadable recursive debug printer with simpler functions. Note: the new printer also correctly handle reserved TS so Control slot overrides TS for the bits set for both Uplink and Downlink slots. This does not change the allocation semantics of course but requires cosmetic adjustement to TBF tests output. Change-Id: Ia13855877b2145cb57b1646f5562b2af3b87bcfb Related: OS#2282 --- M src/gprs_rlcmac.h M src/gprs_rlcmac_ts_alloc.cpp M tests/tbf/TbfTest.err 3 files changed, 44 insertions(+), 60 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/29/3929/1 diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h index 0616069..004f77a 100644 --- a/src/gprs_rlcmac.h +++ b/src/gprs_rlcmac.h @@ -65,6 +65,8 @@ uint8_t block_payload; }; +void ts_print(char *buf, uint8_t dl_mask, uint8_t ul_mask); + int gprs_rlcmac_received_lost(struct gprs_rlcmac_dl_tbf *tbf, uint16_t received, uint16_t lost); diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 0cebd93..9eb8464 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -81,18 +81,19 @@ /* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA }, }; -static char *set_flag_chars(char *buf, uint8_t val, char set_char, char unset_char = 0) +static inline void masked_override_with(char *buf, uint8_t mask, char set_char) { int i; - - for (i = 0; i < 8; i += 1, val = val >> 1) { - if (val & 1) + for (i = 0; mask; i++, mask >>= 1) + if (mask & 1) buf[i] = set_char; - else if (unset_char) - buf[i] = unset_char; - } +} - return buf; +void ts_print(char *buf, uint8_t dl_mask, uint8_t ul_mask) +{ + snprintf(buf, 9, OSMO_BIT_SPEC, OSMO_BIT_PRINT_EX(dl_mask, 'D')); + masked_override_with(buf, ul_mask, 'U'); + masked_override_with(buf, ul_mask & dl_mask, 'C'); } static bool test_and_set_bit(uint32_t *bits, size_t elem) @@ -588,11 +589,8 @@ *dl_slots &= pdch_slots; *ul_slots &= pdch_slots; - LOGP(DRLCMAC, LOGL_DEBUG, "- Possible DL/UL slots: (TS=0)\"%s\"(TS=7)\n", - set_flag_chars(set_flag_chars(set_flag_chars(slot_info, - *dl_slots, 'D', '.'), - *ul_slots, 'U'), - *ul_slots & *dl_slots, 'C')); + ts_print(slot_info, *dl_slots, *ul_slots); + LOGP(DRLCMAC, LOGL_DEBUG, "- Possible DL/UL slots: (TS=0)\"%s\"(TS=7)\n", slot_info); /* Check for each UL (TX) slot */ @@ -704,14 +702,12 @@ } else { /* No supported row in table 6.4.2.2.1. */ #ifdef ENABLE_TS_ALLOC_DEBUG + snprintf(slot_info, 9, OSMO_BIT_SPEC, OSMO_BIT_PRINT_EX(rx_bad, 'x')); + masked_override_with(slot_info, rx_window, 'D'); + masked_override_with(slot_info, tx_window, 'U'); LOGP(DRLCMAC, LOGL_DEBUG, - "- Skipping DL/UL slots: (TS=0)\"%s\"(TS=7), " - "combination not supported\n", - set_flag_chars(set_flag_chars(set_flag_chars( - slot_info, - rx_bad, 'x', '.'), - rx_window, 'D'), - tx_window, 'U')); +"- Skipping DL/UL slots: (TS=0)\"%s\"(TS=7), " +"combination not supported\n", slot_info); #endif continue; } @@ -723,12 +719,11 @@ if (!rx_good) { #ifdef ENABLE_TS_ALLOC_DEBUG + snprintf(slot_info, 9, OSMO_BIT_SPEC, OSMO_BIT_PRINT_EX(rx_bad, 'x')); + masked_override_with(slot_info, tx_window, 'U'); LOGP(DRLCMAC, LOGL_DEBUG, - "- Skipping DL/UL slots: (TS=0)\"%s\"(TS=7), " - "no DL slots available\n", - set_flag_chars(set_flag_chars(slot_info, - rx_bad, 'x', '.'), - tx_window, 'U')); +"- Skipping DL/UL slots: (TS=0)\"%s\"(TS=7), " +"no DL slots available\n", slot_info); #endif continue; } @@ -744,16 +739,13 @@ if (req_common_slots != common_slot_count) { #ifdef ENABLE_TS_ALLOC_DEBUG +
[PATCH] osmo-pcu[master]: TS alloc: update tests
Review at https://gerrit.osmocom.org/3932 TS alloc: update tests * restructure code for easier reading * rearrange tests order to facilitate further UL alloc changes Change-Id: I6d1df8e96e1dad04ab7cf2655b8363233d6e210f Related: OS#2282 --- M tests/alloc/AllocTest.cpp M tests/alloc/AllocTest.err 2 files changed, 282 insertions(+), 292 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/32/3932/1 diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index dd5f242..64ff0d1 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -21,6 +21,7 @@ #include "gprs_debug.h" #include "tbf.h" #include "bts.h" +#include "pcu_utils.h" #include #include @@ -471,6 +472,19 @@ TEST_MODE_UL_AFTER_DL, }; +static inline char *test_mode_descr(enum test_mode t) +{ + switch (t) { + case TEST_MODE_UL_ONLY: return (char*)"UL only"; + case TEST_MODE_DL_ONLY: return (char*)"DL only"; + case TEST_MODE_UL_AND_DL: return (char*)"UL and DL"; + case TEST_MODE_DL_AND_UL: return (char*)"DL and UL"; + case TEST_MODE_DL_AFTER_UL: return (char*)"DL after UL"; + case TEST_MODE_UL_AFTER_DL: return (char*)"UL after DL"; + default: return NULL; + } +} + static GprsMs *alloc_tbfs(BTS *the_bts, GprsMs *ms, unsigned ms_class, enum test_mode mode) { @@ -619,24 +633,23 @@ busy_slots |= 1 << i; } - printf(" TBF[%d] class %d reserves %c%c%c%c%c%c%c%c\n", - tfi, ms_class, - get_dir_char(0x01, ul_slots, dl_slots, busy_slots), - get_dir_char(0x02, ul_slots, dl_slots, busy_slots), - get_dir_char(0x04, ul_slots, dl_slots, busy_slots), - get_dir_char(0x08, ul_slots, dl_slots, busy_slots), - get_dir_char(0x10, ul_slots, dl_slots, busy_slots), - get_dir_char(0x20, ul_slots, dl_slots, busy_slots), - get_dir_char(0x40, ul_slots, dl_slots, busy_slots), - get_dir_char(0x80, ul_slots, dl_slots, busy_slots)); + printf(" TBF[%2d] class %2d reserves %c%c%c%c%c%c%c%c [%2u /%2u /%2u ]\n", + tfi, ms_class, + get_dir_char(0x01, ul_slots, dl_slots, busy_slots), + get_dir_char(0x02, ul_slots, dl_slots, busy_slots), + get_dir_char(0x04, ul_slots, dl_slots, busy_slots), + get_dir_char(0x08, ul_slots, dl_slots, busy_slots), + get_dir_char(0x10, ul_slots, dl_slots, busy_slots), + get_dir_char(0x20, ul_slots, dl_slots, busy_slots), + get_dir_char(0x40, ul_slots, dl_slots, busy_slots), + get_dir_char(0x80, ul_slots, dl_slots, busy_slots), + pcu_bitcount(ul_slots), pcu_bitcount(dl_slots), pcu_bitcount(busy_slots)); if (tfi >= 0) { OSMO_ASSERT(ms->current_trx()); - tfi2 = the_bts->tfi_find_free(dir, _no2, - ms->current_trx()->trx_no); + tfi2 = the_bts->tfi_find_free(dir, _no2, ms->current_trx()->trx_no); OSMO_ASSERT(tfi != tfi2); - OSMO_ASSERT(tfi2 < 0 || - trx_no2 == ms->current_trx()->trx_no); + OSMO_ASSERT(tfi2 < 0 || trx_no2 == ms->current_trx()->trx_no); } ms_class += 1; @@ -647,16 +660,16 @@ return counter; } -static void test_successive_allocation(algo_t algo, unsigned min_class, - unsigned max_class, enum test_mode mode, - unsigned expect_num, const char *text) +static void test_successive_alloc(unsigned min_class, unsigned max_class, unsigned expect_num, enum test_mode mode, + algo_t algo, const char *text) { BTS the_bts; struct gprs_rlcmac_bts *bts; struct gprs_rlcmac_trx *trx; unsigned counter; - printf("Going to test assignment with many TBF, %s\n", text); + printf("Going to test assignment with many TBF, algorithm %s class %u..%u (%s)\n", + text, min_class, max_class, test_mode_descr(mode)); bts = the_bts.bts_data(); bts->alloc_algorithm = algo; @@ -670,9 +683,11 @@ counter = alloc_many_tbfs(_bts, min_class, max_class, mode); - printf(" Successfully allocated %d UL TBFs\n", counter); + printf(" Successfully allocated %d UL TBFs, algorithm %s class %u..%u (%s)\n", + counter, text, min_class, max_class, test_mode_descr(mode)); if (counter != expect_num) - fprintf(stderr, " Expected %d TBFs for %s\n", expect_num, text); + fprintf(stderr, " Expected %d TBFs, algorithm %s class %u..%u (%s)\n", +
[PATCH] osmo-gsm-tester[master]: contrib: Build octphy osmo-bts variant and make it generic
Review at https://gerrit.osmocom.org/3928 contrib: Build octphy osmo-bts variant and make it generic This is a first step to add support for osmo-bts-octpy to osmo-gsm-tester. There's no point in building separate insts for different osmo-bts variants which run on the main unit and which come from the same git repository, this we make the osmo-bts-trx one generic to handle all variants which fall into the description above. Tested locally on my laptop that it builds susccessfully. To coordinate together with this patch: - Update build jobs in jenkins (run_all for RnD, rename the osmo-bts-trx for prod). - Modify bts_osmotrx.py to use inst 'osmo-bts' instead of 'osmo-bts-trx'. Change-Id: Ib8814e4ce49596b586990f20d7d625a719852e90 --- R contrib/jenkins-build-osmo-bts.sh 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/28/3928/1 diff --git a/contrib/jenkins-build-osmo-bts-trx.sh b/contrib/jenkins-build-osmo-bts.sh similarity index 61% rename from contrib/jenkins-build-osmo-bts-trx.sh rename to contrib/jenkins-build-osmo-bts.sh index 6188be1..7349ce5 100755 --- a/contrib/jenkins-build-osmo-bts-trx.sh +++ b/contrib/jenkins-build-osmo-bts.sh @@ -1,14 +1,15 @@ #!/bin/sh set -e -x base="$PWD" -name="osmo-bts-trx" +name="osmo-bts" . "$(dirname "$0")/jenkins-build-common.sh" # for gsm_data_shared.* have_repo openbsc +have_repo octphy-2g-headers build_repo libosmocore --disable-doxygen build_repo libosmo-abis -build_repo osmo-bts --enable-trx --with-openbsc=$base/openbsc/openbsc/include +build_repo osmo-bts --enable-trx --with-openbsc=$base/openbsc/openbsc/include --enable-octphy --with-octsdr-2g=$base/octphy-2g-headers -create_bin_tgz osmo-bts-trx +create_bin_tgz osmo-bts-trx osmo-bts-octphy -- To view, visit https://gerrit.osmocom.org/3928 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8814e4ce49596b586990f20d7d625a719852e90 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
[PATCH] osmo-gsm-tester[master]: bts_osmotrx: Fix mkdtemp use in python < 3.5
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3926 to look at the new patch set (#2). bts_osmotrx: Fix mkdtemp use in python < 3.5 We are currently seeing this issues in prod setup, which uses python 3.4: File "/home/jenkins/workspace/osmo-gsm-tester_run/osmo-gsm-tester/src/osmo_gsm_tester/bts_osmotrx.py", line 44, in __init__ self.pcu_sk_tmp_dir = tempfile.mkdtemp(None, 'ogtpcusk', None) File "/usr/lib/python3.4/tempfile.py", line 432, in mkdtemp file = _os.path.join(dir, prefix + name + suffix) TypeError: Can't convert 'NoneType' object to str implicitly Acording to mkdtemp man in python3: "Changed in version 3.5: suffix, prefix, and dir may now be supplied in bytes in order to obtain a bytes return value. Prior to this, only str was allowed. suffix and prefix now accept and default to None to cause an appropriate default value to be used." This issue went unnoticed because the RnD env is running debian 9, which probably has python version >= 3.5. Change-Id: If3226183fe21b4820149b1d03207193dc6f139e2 --- M src/osmo_gsm_tester/bts_osmotrx.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/26/3926/2 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 3077b0f..6130ca9 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -41,7 +41,7 @@ self.suite_run = suite_run self.conf = conf self.env = {} -self.pcu_sk_tmp_dir = tempfile.mkdtemp(None, 'ogtpcusk', None) +self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') if len(self.pcu_socket_path().encode()) > 107: raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) -- To view, visit https://gerrit.osmocom.org/3926 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If3226183fe21b4820149b1d03207193dc6f139e2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder
[PATCH] osmo-gsm-tester[master]: bts_osmotrx: Fix mkdtemp use inf python < 3.5
Review at https://gerrit.osmocom.org/3926 bts_osmotrx: Fix mkdtemp use inf python < 3.5 We are currently seeing this issues in prod setup, which uses python 3.4: File "/home/jenkins/workspace/osmo-gsm-tester_run/osmo-gsm-tester/src/osmo_gsm_tester/bts_osmotrx.py", line 44, in __init__ self.pcu_sk_tmp_dir = tempfile.mkdtemp(None, 'ogtpcusk', None) File "/usr/lib/python3.4/tempfile.py", line 432, in mkdtemp file = _os.path.join(dir, prefix + name + suffix) TypeError: Can't convert 'NoneType' object to str implicitly Acording to mkdtemp man in python3: "Changed in version 3.5: suffix, prefix, and dir may now be supplied in bytes in order to obtain a bytes return value. Prior to this, only str was allowed. suffix and prefix now accept and default to None to cause an appropriate default value to be used." This issue went unnoticed because the RnD env is running debian 9, which probably has python version >= 3.5. Change-Id: If3226183fe21b4820149b1d03207193dc6f139e2 --- M src/osmo_gsm_tester/bts_osmotrx.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/26/3926/1 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 3077b0f..6130ca9 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -41,7 +41,7 @@ self.suite_run = suite_run self.conf = conf self.env = {} -self.pcu_sk_tmp_dir = tempfile.mkdtemp(None, 'ogtpcusk', None) +self.pcu_sk_tmp_dir = tempfile.mkdtemp('', 'ogtpcusk') if len(self.pcu_socket_path().encode()) > 107: raise log.Error('Path for pcu socket is longer than max allowed len for unix socket path (107):', self.pcu_socket_path()) -- To view, visit https://gerrit.osmocom.org/3926 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3226183fe21b4820149b1d03207193dc6f139e2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol
osmo-gsm-tester[master]: ofono_client: Discover modem path from imsi
Patch Set 1: Code-Review-2 related: https://osmocom.org/issues/2509 -- To view, visit https://gerrit.osmocom.org/2696 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I602604d25f51b24d87877bc8ac798525b7be61dd Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[MERGED] python/osmo-python-tests[master]: vty: Print open file descriptors of the VTY test runner
Neels Hofmeyr has submitted this change and it was merged. Change subject: vty: Print open file descriptors of the VTY test runner .. vty: Print open file descriptors of the VTY test runner /proc/self/fd refers to the process opening the file. In this case self will be "ls". Maybe it is better to look at the FDs open in the test runner itself. Change-Id: I638e94f16f4019a7b6026d1fae69e677870fb253 --- M osmopy/obscvty.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Neels Hofmeyr: Looks good to me, approved; Verified diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index f1f1c59..0371dc9 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -43,7 +43,7 @@ global debug_tcp_sockets if not debug_tcp_sockets: return -cmd('ls /proc/self/fd'); +cmd('ls /proc/' + str(os.getpid()) + '/fd'); cmd('ss -tn'); cmd('ss -tln'); cmd('ps xua | grep osmo'); -- To view, visit https://gerrit.osmocom.org/3923 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I638e94f16f4019a7b6026d1fae69e677870fb253 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Holger FreytherGerrit-Reviewer: Neels Hofmeyr
python/osmo-python-tests[master]: vty: Print open file descriptors of the VTY test runner
Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/3923 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I638e94f16f4019a7b6026d1fae69e677870fb253 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Holger FreytherGerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
openbsc[master]: libmsc: sms_route_mt_sms() may return uninitialized return v...
Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3899 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0c0bcd919cc3275d491995d17c6a32bb61c6afe1 Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pablo Neira AyusoGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pablo Neira Ayuso Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-HasComments: No
[MERGED] openbsc[master]: libmsc: sms_route_mt_sms() may return uninitialized return v...
Neels Hofmeyr has submitted this change and it was merged. Change subject: libmsc: sms_route_mt_sms() may return uninitialized return value .. libmsc: sms_route_mt_sms() may return uninitialized return value If smpp_first is set off and there is a local receiver for this sms, then return 0. Without this patch, we return 'rc' which is uninitialized in the scenario that I'm describing above. Change-Id: I0c0bcd919cc3275d491995d17c6a32bb61c6afe1 --- M openbsc/src/libmsc/gsm_04_11.c 1 file changed, 22 insertions(+), 21 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c index 27bffc9..25ef487 100644 --- a/openbsc/src/libmsc/gsm_04_11.c +++ b/openbsc/src/libmsc/gsm_04_11.c @@ -363,31 +363,32 @@ /* determine gsms->receiver based on dialled number */ gsms->receiver = subscr_get_by_extension(conn->network->subscr_group, gsms->dst.addr); - if (!gsms->receiver) { -#ifdef BUILD_SMPP - /* Avoid a second look-up */ - if (smpp_first) { - rate_ctr_inc(>network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); - return GSM411_RP_CAUSE_MO_NUM_UNASSIGNED; - } + if (gsms->receiver) + return 0; - rc = smpp_try_deliver(gsms, conn); - if (rc == GSM411_RP_CAUSE_MO_NUM_UNASSIGNED) { - rate_ctr_inc(>network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); - } else if (rc < 0) { - LOGP(DLSMS, LOGL_ERROR, "%s: SMS delivery error: %d.", -subscr_name(conn->subscr), rc); - rc = GSM411_RP_CAUSE_MO_TEMP_FAIL; - /* rc will be logged by gsm411_send_rp_error() */ - rate_ctr_inc(>bts->network->msc_ctrs->ctr[ - MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR]); - } -#else - rc = GSM411_RP_CAUSE_MO_NUM_UNASSIGNED; +#ifdef BUILD_SMPP + /* Avoid a second look-up */ + if (smpp_first) { rate_ctr_inc(>network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); -#endif + return GSM411_RP_CAUSE_MO_NUM_UNASSIGNED; } + rc = smpp_try_deliver(gsms, conn); + if (rc == GSM411_RP_CAUSE_MO_NUM_UNASSIGNED) { + rate_ctr_inc(>network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); + } else if (rc < 0) { + LOGP(DLSMS, LOGL_ERROR, "%s: SMS delivery error: %d.", +subscr_name(conn->subscr), rc); + rc = GSM411_RP_CAUSE_MO_TEMP_FAIL; + /* rc will be logged by gsm411_send_rp_error() */ + rate_ctr_inc(>bts->network->msc_ctrs->ctr[ + MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR]); + } +#else + rc = GSM411_RP_CAUSE_MO_NUM_UNASSIGNED; + rate_ctr_inc(>network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); +#endif + return rc; } -- To view, visit https://gerrit.osmocom.org/3899 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0c0bcd919cc3275d491995d17c6a32bb61c6afe1 Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pablo Neira AyusoGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pablo Neira Ayuso Gerrit-Reviewer: laforge Gerrit-Reviewer: neels
osmo-gsm-tester[master]: resource: ipa_unit_id is expected to be a positive integer
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3916 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I26d7a4351089b73716d193496d7161bf3d9988bb Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-gsm-tester[master]: resource: times is expected to be a non-zero positive integer
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3917 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie9e313727053a411cec2f698c3bd654d27e8013f Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-gsm-tester[master]: Move code to replicate dicts based on times attr to its own ...
Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3918 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I26ddae2124813bfb63a7c97c466e056cd2ef991a Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-gsm-tester[master]: config: replicate_times: insert replicates in place
Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/3919/1/src/osmo_gsm_tester/config.py File src/osmo_gsm_tester/config.py: Line 286: idx += times (might be more obvious code to create an entirely new list on the side, but nevermind if it works) -- To view, visit https://gerrit.osmocom.org/3919 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id78e2326db964d5efb6648854b57d8addce4deb0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes
osmo-gsm-tester[master]: Reserve ARFCN dynamically based on BTS band support
Patch Set 7: Code-Review-2 as a reminder to not merge, -2 to keep it sticky. Main reason that all resources shall be reserved before the tests start running. -- To view, visit https://gerrit.osmocom.org/3731 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6fb5d95bed1fa50c3deaf62a7a6df3cb276bc3c9 Gerrit-PatchSet: 7 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: neels Gerrit-HasComments: No
python/osmo-python-tests[master]: vty: Print open file descriptors of the VTY test runner
Patch Set 1: Code-Review+2 lol that was my fault -- To view, visit https://gerrit.osmocom.org/3923 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I638e94f16f4019a7b6026d1fae69e677870fb253 Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Holger FreytherGerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
osmo-gsm-tester[master]: modem: Fix race condition when connect() is called more than...
Patch Set 2: Code-Review+2 If the cancellable object remains valid and usable after calling cancel(), then it should indeed remain. But if calling self.cancellable.cancel() somehow invalidates that object / makes it not useful anymore, then please set it to None whenever you cancel()ed, and also check for not-None before using self.cancellable. -- To view, visit https://gerrit.osmocom.org/3901 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic4bb1c6b72c23cd860c33bee7851bca3d0ac0e1b Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-HasComments: No
[MERGED] openbsc[master]: fix vty tests: vty no longer goes to parent node implicitly
Neels Hofmeyr has submitted this change and it was merged. Change subject: fix vty tests: vty no longer goes to parent node implicitly .. fix vty tests: vty no longer goes to parent node implicitly Fix four instances of VTY tests working because it used to include implicit 'exit' commands to the parent node. Since libosmocore change-id Id73cba2dd34676bad8a130e9c45e67a272f19588 = commit d64b6aed235f6e4d84a2cb8e84b32c3179260254, we no longer do this implicit-exit in interactive VTY shells. *) the nitb node lacked the default command set (including 'end' and 'exit'), so it was impossible to leave the nitb node. This hit in testSubscriberCreateDelete. Add vty_install_default(NITB_NODE). *) in testPingPongConfiguration, the intention is to enter the /msc 0 node. Drop prior entry of the 'network' node, which looks like an oversight. So far the 'msc 0' caused an implicit 'exit' and thus worked, now fails. *) Two instances following comments "# Check searching for outer node's commands", which look like they are intended to check for this implicit-exit behavior. This is obsolete, drop those parts of the tests. Change-Id: I77931d6a09c42c443c6936000592f22a7fd06cab --- M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/tests/vty_test_runner.py 2 files changed, 1 insertion(+), 22 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 4a99cf1..f66769b 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -1294,6 +1294,7 @@ install_element(CONFIG_NODE, _nitb_cmd); install_node(_node, config_write_nitb); + vty_install_default(NITB_NODE); install_element(NITB_NODE, _nitb_subscr_create_cmd); install_element(NITB_NODE, _nitb_subscr_random_cmd); install_element(NITB_NODE, _nitb_no_subscr_create_cmd); diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 92775d5..accabae 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -606,14 +606,6 @@ self.assertTrue(self.vty.verify("exit", [''])) self.assertTrue(self.vty.node() is None) -# Check searching for outer node's commands -self.vty.command("configure terminal") -self.vty.command('msc 0') -self.vty.command("bsc") -self.assertEquals(self.vty.node(), 'config-bsc') -self.vty.command("msc 0") -self.assertEquals(self.vty.node(), 'config-msc') - def testUssdNotificationsMsc(self): self.vty.enable() self.vty.command("configure terminal") @@ -716,7 +708,6 @@ def testPingPongConfiguration(self): self.vty.enable() self.vty.verify("configure terminal", ['']) -self.vty.verify("network", ['']) self.vty.verify("msc 0", ['']) self.vty.verify("timeout-ping 12", ['']) @@ -856,19 +847,6 @@ self.assertEquals(self.vty.node(), 'config') self.assertTrue(self.vty.verify('exit', [''])) self.assertTrue(self.vty.node() is None) - -# Check searching for outer node's commands -self.vty.command('configure terminal') -self.vty.command('mgcp') -self.vty.command('nat') -self.assertEquals(self.vty.node(), 'config-nat') -self.vty.command('mgcp') -self.assertEquals(self.vty.node(), 'config-mgcp') -self.vty.command('nat') -self.assertEquals(self.vty.node(), 'config-nat') -self.vty.command('bsc 0') -self.vty.command('mgcp') -self.assertEquals(self.vty.node(), 'config-mgcp') def testRewriteNoRewrite(self): self.vty.enable() -- To view, visit https://gerrit.osmocom.org/3921 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I77931d6a09c42c443c6936000592f22a7fd06cab Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr
openbsc[master]: fix vty tests: vty no longer goes to parent node implicitly
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3921 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I77931d6a09c42c443c6936000592f22a7fd06cab Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No
[PATCH] openbsc[master]: fix vty tests: vty no longer goes to parent node implicitly
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3921 to look at the new patch set (#2). fix vty tests: vty no longer goes to parent node implicitly Fix four instances of VTY tests working because it used to include implicit 'exit' commands to the parent node. Since libosmocore change-id Id73cba2dd34676bad8a130e9c45e67a272f19588 = commit d64b6aed235f6e4d84a2cb8e84b32c3179260254, we no longer do this implicit-exit in interactive VTY shells. *) the nitb node lacked the default command set (including 'end' and 'exit'), so it was impossible to leave the nitb node. This hit in testSubscriberCreateDelete. Add vty_install_default(NITB_NODE). *) in testPingPongConfiguration, the intention is to enter the /msc 0 node. Drop prior entry of the 'network' node, which looks like an oversight. So far the 'msc 0' caused an implicit 'exit' and thus worked, now fails. *) Two instances following comments "# Check searching for outer node's commands", which look like they are intended to check for this implicit-exit behavior. This is obsolete, drop those parts of the tests. Change-Id: I77931d6a09c42c443c6936000592f22a7fd06cab --- M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/tests/vty_test_runner.py 2 files changed, 1 insertion(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/21/3921/2 diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 4a99cf1..f66769b 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -1294,6 +1294,7 @@ install_element(CONFIG_NODE, _nitb_cmd); install_node(_node, config_write_nitb); + vty_install_default(NITB_NODE); install_element(NITB_NODE, _nitb_subscr_create_cmd); install_element(NITB_NODE, _nitb_subscr_random_cmd); install_element(NITB_NODE, _nitb_no_subscr_create_cmd); diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 92775d5..accabae 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -606,14 +606,6 @@ self.assertTrue(self.vty.verify("exit", [''])) self.assertTrue(self.vty.node() is None) -# Check searching for outer node's commands -self.vty.command("configure terminal") -self.vty.command('msc 0') -self.vty.command("bsc") -self.assertEquals(self.vty.node(), 'config-bsc') -self.vty.command("msc 0") -self.assertEquals(self.vty.node(), 'config-msc') - def testUssdNotificationsMsc(self): self.vty.enable() self.vty.command("configure terminal") @@ -716,7 +708,6 @@ def testPingPongConfiguration(self): self.vty.enable() self.vty.verify("configure terminal", ['']) -self.vty.verify("network", ['']) self.vty.verify("msc 0", ['']) self.vty.verify("timeout-ping 12", ['']) @@ -856,19 +847,6 @@ self.assertEquals(self.vty.node(), 'config') self.assertTrue(self.vty.verify('exit', [''])) self.assertTrue(self.vty.node() is None) - -# Check searching for outer node's commands -self.vty.command('configure terminal') -self.vty.command('mgcp') -self.vty.command('nat') -self.assertEquals(self.vty.node(), 'config-nat') -self.vty.command('mgcp') -self.assertEquals(self.vty.node(), 'config-mgcp') -self.vty.command('nat') -self.assertEquals(self.vty.node(), 'config-nat') -self.vty.command('bsc 0') -self.vty.command('mgcp') -self.assertEquals(self.vty.node(), 'config-mgcp') def testRewriteNoRewrite(self): self.vty.enable() -- To view, visit https://gerrit.osmocom.org/3921 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I77931d6a09c42c443c6936000592f22a7fd06cab Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels HofmeyrGerrit-Reviewer: Jenkins Builder
openbsc[master]: libmsc: db_subscriber_alloc_exten() remove infinite loop
Patch Set 2: Yes, I get avoiding many calls of rand(). Not sure I/we should spend so much time on this. I spotted it and am being very nit picky, and thought it was an opportunity to learn.. It's very unlikely one would run out of extensions, unless one did happen to configure a very limited number of them. I would do what you suggest to avoid so much rand() but right now I'm stuck trying to get the output of select count(*) from libdbi, which is frustrating. -- To view, visit https://gerrit.osmocom.org/3910 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icf0f1e5a7f360bc27592a55890f74a9a12bc9f42 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Keith WhyteGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pablo Neira Ayuso Gerrit-HasComments: No
[PATCH] openbsc[master]: libmsc: sms_route_mt_sms() may return uninitialized return v...
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3899 to look at the new patch set (#4). libmsc: sms_route_mt_sms() may return uninitialized return value If smpp_first is set off and there is a local receiver for this sms, then return 0. Without this patch, we return 'rc' which is uninitialized in the scenario that I'm describing above. Change-Id: I0c0bcd919cc3275d491995d17c6a32bb61c6afe1 --- M openbsc/src/libmsc/gsm_04_11.c 1 file changed, 22 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/99/3899/4 diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c index 27bffc9..25ef487 100644 --- a/openbsc/src/libmsc/gsm_04_11.c +++ b/openbsc/src/libmsc/gsm_04_11.c @@ -363,31 +363,32 @@ /* determine gsms->receiver based on dialled number */ gsms->receiver = subscr_get_by_extension(conn->network->subscr_group, gsms->dst.addr); - if (!gsms->receiver) { -#ifdef BUILD_SMPP - /* Avoid a second look-up */ - if (smpp_first) { - rate_ctr_inc(>network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); - return GSM411_RP_CAUSE_MO_NUM_UNASSIGNED; - } + if (gsms->receiver) + return 0; - rc = smpp_try_deliver(gsms, conn); - if (rc == GSM411_RP_CAUSE_MO_NUM_UNASSIGNED) { - rate_ctr_inc(>network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); - } else if (rc < 0) { - LOGP(DLSMS, LOGL_ERROR, "%s: SMS delivery error: %d.", -subscr_name(conn->subscr), rc); - rc = GSM411_RP_CAUSE_MO_TEMP_FAIL; - /* rc will be logged by gsm411_send_rp_error() */ - rate_ctr_inc(>bts->network->msc_ctrs->ctr[ - MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR]); - } -#else - rc = GSM411_RP_CAUSE_MO_NUM_UNASSIGNED; +#ifdef BUILD_SMPP + /* Avoid a second look-up */ + if (smpp_first) { rate_ctr_inc(>network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); -#endif + return GSM411_RP_CAUSE_MO_NUM_UNASSIGNED; } + rc = smpp_try_deliver(gsms, conn); + if (rc == GSM411_RP_CAUSE_MO_NUM_UNASSIGNED) { + rate_ctr_inc(>network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); + } else if (rc < 0) { + LOGP(DLSMS, LOGL_ERROR, "%s: SMS delivery error: %d.", +subscr_name(conn->subscr), rc); + rc = GSM411_RP_CAUSE_MO_TEMP_FAIL; + /* rc will be logged by gsm411_send_rp_error() */ + rate_ctr_inc(>bts->network->msc_ctrs->ctr[ + MSC_CTR_SMS_DELIVER_UNKNOWN_ERROR]); + } +#else + rc = GSM411_RP_CAUSE_MO_NUM_UNASSIGNED; + rate_ctr_inc(>network->msc_ctrs->ctr[MSC_CTR_SMS_NO_RECEIVER]); +#endif + return rc; } -- To view, visit https://gerrit.osmocom.org/3899 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0c0bcd919cc3275d491995d17c6a32bb61c6afe1 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Pablo Neira AyusoGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: Pablo Neira Ayuso Gerrit-Reviewer: laforge Gerrit-Reviewer: neels
openbsc[master]: libmsc: db_subscriber_alloc_exten() remove infinite loop
Patch Set 2: Ok, let me reformulate my question: Do you ever see this message after this patch? "Out of Trys, no extension for IMSI %s" What I see from the code you're posting is that we now have a loop that is limited by the number of extensions that are available, however, we still use a random function. So I see this as a lottery game, where the less extensions are available, the less chances you have to land on a spare extension, since candidates are selected randomly. -- To view, visit https://gerrit.osmocom.org/3910 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icf0f1e5a7f360bc27592a55890f74a9a12bc9f42 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Keith WhyteGerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Keith Whyte Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pablo Neira Ayuso Gerrit-HasComments: No
[PATCH] python/osmo-python-tests[master]: vty: Follow links to see what is a file and what is a socket
Review at https://gerrit.osmocom.org/3924 vty: Follow links to see what is a file and what is a socket Change-Id: I3d94cde8523a2ed26a66b8b8b3f651606aa17a9d --- M osmopy/obscvty.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/24/3924/1 diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py index 0371dc9..1e05d77 100755 --- a/osmopy/obscvty.py +++ b/osmopy/obscvty.py @@ -43,7 +43,7 @@ global debug_tcp_sockets if not debug_tcp_sockets: return -cmd('ls /proc/' + str(os.getpid()) + '/fd'); +cmd('ls -l /proc/' + str(os.getpid()) + '/fd'); cmd('ss -tn'); cmd('ss -tln'); cmd('ps xua | grep osmo'); -- To view, visit https://gerrit.osmocom.org/3924 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d94cde8523a2ed26a66b8b8b3f651606aa17a9d Gerrit-PatchSet: 1 Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Owner: Holger Freyther