laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/dahdi-linux/+/26970 )
Change subject: vpmadt032: Create .o.cmd file for the shipped object file.
......................................................................
vpmadt032: Create .o.cmd file for the shipped object file.
Kernel version 5.8, in commit "modpost: use read_text_file() and
get_line() for reading text files" [1] made it an error if the .o.cmd
file is missing. However, this file is not generated for shipped .o
files.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
Signed-off-by: Shaun Ruffell <sruffell(a)sruffell.net>
Change-Id: I06d201bcd07b35cb41c8c4a8467bcad6471c431a
---
M drivers/dahdi/Kbuild
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/70/26970/1
diff --git a/drivers/dahdi/Kbuild b/drivers/dahdi/Kbuild
index 958e070..6a90fee 100644
--- a/drivers/dahdi/Kbuild
+++ b/drivers/dahdi/Kbuild
@@ -133,6 +133,7 @@
ifneq ($(DAHDI_ARCH),)
ifneq ($(wildcard $(src)/vpmadt032_loader/vpmadt032_$(DAHDI_ARCH).o_shipped),)
+ $(shell touch $(KBUILD_EXTMOD)/vpmadt032_loader/.vpmadt032_$(DAHDI_ARCH).o.cmd)
VPMADT032_LOADER_PRESENT=yes
dahdi_vpmadt032_loader-objs += vpmadt032_loader/vpmadt032_$(DAHDI_ARCH).o
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_VPMADT032_LOADER) += dahdi_vpmadt032_loader.o
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/26970
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I06d201bcd07b35cb41c8c4a8467bcad6471c431a
Gerrit-Change-Number: 26970
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: neels.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26969 )
Change subject: bsc: logp("start") also for handler_mode := false
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26969
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I4421a674055cd7013d21c52e9de6e369d1a72b6b
Gerrit-Change-Number: 26969
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 23 Jan 2022 10:29:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26619 )
Change subject: bsc: detect subscr and conn leaks during f_shutdown_helper()
......................................................................
bsc: detect subscr and conn leaks during f_shutdown_helper()
Invoke f_verify_talloc_count() for bsc_subscr and
gsm_subscriber_connection, expecting none to remain after each test.
This makes numerous tests fail, where the test does not properly release
the RSL and BSSAP connections. An upcoming patch fixes all of those
cases: I9396efcabc085d2850244c6468b83c5f3a3ff3a2
Related: OS#5337
Change-Id: I69d4c5c6f8d499bb7f0b96a48af045361433c57b
---
M bsc/BSC_Tests.ttcn
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 891d340..d68cba2 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -857,6 +857,11 @@
friend function f_shutdown_helper() runs on test_CT {
+ /* Run the subscr and conn leak test only when the VTY is initialized */
+ if (BSCVTY.checkstate("Mapped")) {
+ f_verify_talloc_count(BSCVTY, {"struct bsc_subscr", "struct gsm_subscriber_connection"});
+ }
+
all component.stop;
setverdict(pass);
mtc.stop;
null--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26619
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I69d4c5c6f8d499bb7f0b96a48af045361433c57b
Gerrit-Change-Number: 26619
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26618 )
Change subject: vty: add f_verify_talloc_count()
......................................................................
vty: add f_verify_talloc_count()
Counts talloc objects via VTY and waits for a specific object count.
Useful to test against leaks.
The intended use is to check against leakage of bsc_subscr and
gsm_subscriber_connection after each BSC_Tests.*, see patch in 'Related'
below.
Related: OS#5337
Related: I69d4c5c6f8d499bb7f0b96a48af045361433c57b (osmo-ttcn3-hacks)
Change-Id: Iafe720a4931270e868f40c4f623d10bb9c14dc80
---
M library/Osmocom_VTY_Functions.ttcn
1 file changed, 64 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
diff --git a/library/Osmocom_VTY_Functions.ttcn b/library/Osmocom_VTY_Functions.ttcn
index 49f587d..e4a9182 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -14,6 +14,7 @@
import from Misc_Helpers all;
import from TELNETasp_PortType all;
import from Osmocom_Types all;
+ import from TCCConversion_Functions all;
modulepar {
charstring mp_prompt_prefix := "OpenBSC";
@@ -226,4 +227,67 @@
return "";
}
+/* Return a count of how many times sub_str occurs in str. */
+function f_strstr_count(in charstring str, in charstring sub_str) return integer
+{
+ var integer count := 0;
+ var integer pos := 0;
+
+ while (true) {
+ var integer at := f_strstr(str, sub_str, pos);
+ if (at < 0) {
+ break;
+ }
+ count := count + 1;
+ pos := at + 1;
+ }
+ return count;
+}
+
+private type record of charstring StrList;
+
+/* Perform a 'show talloc-context' to get a count of the given object_strs that are still allocated.
+ * Retry 'attempts' times until the actual talloc object count matches 'expect_count'.
+ * Useful to ensure that no mem leaks remain after running a test. */
+function f_verify_talloc_count(TELNETasp_PT pt, StrList object_strs, integer expect_count := 0,
+ integer attempts := 5, float wait_time := 3.0)
+{
+ var charstring show_cmd := "show talloc-context application full filter ";
+ for (var integer i := 0; i < lengthof(object_strs); i := i + 1) {
+ var charstring obj_str := object_strs[i];
+ /* spaces confuse the VTY command */
+ obj_str := f_replaceEveryOccurenceOfSubstring(obj_str, " ", ".");
+ /* In the regexp, expect word start and word end to bound the obj name */
+ obj_str := "\\<" & obj_str & "\\>";
+ if (i > 0) {
+ show_cmd := show_cmd & "\\|";
+ }
+ show_cmd := show_cmd & obj_str;
+ }
+
+ while (attempts > 0) {
+ attempts := attempts - 1;
+ var charstring ret := f_vty_transceive_ret(pt, show_cmd);
+
+ var boolean ok := true;
+ for (var integer i := 0; i < lengthof(object_strs); i := i + 1) {
+ var charstring object_str := object_strs[i];
+ var integer count := f_strstr_count(ret, object_str);
+ log("talloc reports ", object_str, " x ", count, ", expecting ", expect_count);
+ if (count != expect_count) {
+ ok := false;
+ }
+ }
+ if (ok) {
+ return;
+ }
+ if (attempts == 0) {
+ break;
+ }
+ log("count mismatch, retrying in ", wait_time);
+ f_sleep(wait_time);
+ }
+ setverdict(fail, "talloc count mismatch");
+}
+
}
null--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26618
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iafe720a4931270e868f40c4f623d10bb9c14dc80
Gerrit-Change-Number: 26618
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged