This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
neels gerrit-no-reply at lists.osmocom.orgneels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/21206 ) Change subject: speed up vty tests: add --fast-shutdown option to osmo-bsc ...................................................................... speed up vty tests: add --fast-shutdown option to osmo-bsc Change-Id: I506349c532b13751f674e4b9a132219d823f19e1 --- M src/osmo-bsc/osmo_bsc_main.c M tests/Makefile.am M tests/vty_test_runner.py 3 files changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/06/21206/1 diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index aa45bf0..39fd616 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -88,6 +88,7 @@ static const char *config_file = "osmo-bsc.cfg"; static const char *rf_ctrl = NULL; static int daemonize = 0; +static bool fast_shutdown = false; static void print_usage() { @@ -108,6 +109,7 @@ printf(" -e --log-level number Set a global loglevel.\n"); printf(" -r --rf-ctl NAME A unix domain socket to listen for cmds.\n"); printf(" -t --testmode A special mode to provoke failures at the MSC.\n"); + printf(" --fast-shutdown Omit shutdown delay, for rapid testing purposes.\n"); printf("\nVTY reference generation:\n"); printf(" --vty-ref-mode MODE VTY reference generation mode (e.g. 'expert').\n"); @@ -133,6 +135,9 @@ get_value_string(vty_ref_gen_mode_desc, vty_ref_mode)); vty_dump_xml_ref_mode(stdout, (enum vty_ref_gen_mode) vty_ref_mode); exit(0); + case 3: + fast_shutdown = true; + break; default: fprintf(stderr, "%s: error parsing cmdline options\n", prog_name); exit(2); @@ -158,6 +163,7 @@ {"testmode", 0, 0, 't'}, {"vty-ref-mode", 1, &long_option, 1}, {"vty-ref-xml", 0, &long_option, 2}, + {"fast-shutdown", 0, &long_option, 3}, {0, 0, 0, 0} }; @@ -691,7 +697,8 @@ case SIGTERM: bsc_shutdown_net(bsc_gsmnet); osmo_signal_dispatch(SS_L_GLOBAL, S_L_GLOBAL_SHUTDOWN, NULL); - sleep(3); + if (!fast_shutdown) + sleep(3); exit(0); break; case SIGABRT: diff --git a/tests/Makefile.am b/tests/Makefile.am index c061baa..1493ac2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -70,7 +70,7 @@ vty-test: osmo_verify_transcript_vty.py -v \ -n OsmoBSC -p 4242 \ - -r "$(top_builddir)/src/osmo-bsc/osmo-bsc -c $(top_srcdir)/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg" \ + -r "$(top_builddir)/src/osmo-bsc/osmo-bsc --fast-shutdown -c $(top_srcdir)/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg" \ $(U) $(srcdir)/$(VTY_TEST) check-local: atconfig $(TESTSUITE) diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py index 34ddcc7..172b14e 100755 --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -108,7 +108,7 @@ class TestVTYBSC(TestVTYGenericBSC): def vty_command(self): - return ["./src/osmo-bsc/osmo-bsc", "-c", + return ["./src/osmo-bsc/osmo-bsc", "--fast-shutdown", "-c", "doc/examples/osmo-bsc/osmo-bsc.cfg"] def vty_app(self): -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/21206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I506349c532b13751f674e4b9a132219d823f19e1 Gerrit-Change-Number: 21206 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201117/42960fc1/attachment.htm>