From admin at opensuse.org Sat Feb 1 13:18:36 2020 From: admin at opensuse.org (OBS Notification) Date: Sat, 01 Feb 2020 13:18:36 +0000 Subject: Build failure of network:osmocom:latest/limesuite in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5e357aafeca31_2dd02b1d355b65f810223bd@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/limesuite/Raspbian_10/armv7l Package network:osmocom:latest/limesuite failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:latest limesuite Last lines of build log: [ 891s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o -c /usr/src/packages/BUILD/src/boards_wxgui/pnlGPIO.cpp [ 899s] [ 80%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_gui.cpp.o [ 899s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_gui.cpp.o -c /usr/src/packages/BUILD/src/limeRFE/limeRFE_gui.cpp [ 901s] [ 80%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_wxgui.cpp.o [ 901s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_wxgui.cpp.o -c /usr/src/packages/BUILD/src/limeRFE/limeRFE_wxgui.cpp [ 905s] [ 81%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_cmd.cpp.o [ 905s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_cmd.cpp.o -c /usr/src/packages/BUILD/src/limeRFE/limeRFE_cmd.cpp [ 920s] [ 82%] Linking CXX executable ../bin/LimeSuiteGUI [ 920s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/LimeSuiteGUI.dir/link.txt --verbose=1 [ 921s] /usr/bin/c++ -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -Wl,-z,relro -rdynamic CMakeFiles/LimeSuiteGUI.dir/ADF4002/ADF4002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlXBUF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCalibrations_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTRF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCDS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLimeLightPAD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIST_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewIRAM.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_gui_utilities.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlSX_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgVCOfrequencies.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLDO_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlAFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlGains_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/CoefficientFileParser.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_mainPanel.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewSFR.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCLKGEN_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlMCU_BD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIAS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgGFIR_Coefficients.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlR3.cpp.o CMakeFiles/LimeSuiteGUI.dir/LMS_Programing/LMS_Programing_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgConnectionSettings.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/pnlMiniLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/pnlAPI.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/SPI_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgFullMessageLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgDeviceInfo.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/utilities_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteAppFrame.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/RFSpark_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/Si5351C/Si5351C_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp.cpp.o CMakeFiles/LimeSuiteGUI.dir/FPGAcontrols_wxgui/FPGAcontrols_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/dlgAbout.cpp.o CMakeFiles/LimeSuiteGUI.dir/numericSlider/numericSlider.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_frFFTviewer.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteEvents/lms7suiteEvents.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlBoardControls.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlQSpark.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnluLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlUltimateEVB.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlBuffers.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlCoreSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeNetMicro.cpp.o CMakeFiles/LimeSuiteGUI.dir/__/external/kissFFT/kiss_fft.c.o CMakeFiles/LimeSuiteGUI.dir/windowFunction.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_cmd.cpp.o -o ../bin/LimeSuiteGUI -Wl,-rpath,/usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src: libLimeSuite.so.20.01.0 oglGraph/liboglGraph.a -L/usr/lib/arm-linux-gnueabihf -pthread -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 -lusb-1.0 -lGL -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 [ 926s] /usr/bin/ld: libLimeSuite.so.20.01.0: undefined reference to `__atomic_store_8' [ 926s] /usr/bin/ld: libLimeSuite.so.20.01.0: undefined reference to `__atomic_load_8' [ 926s] collect2: error: ld returned 1 exit status [ 926s] make[3]: *** [src/CMakeFiles/LimeSuiteGUI.dir/build.make:990: bin/LimeSuiteGUI] Error 1 [ 926s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 926s] make[2]: *** [CMakeFiles/Makefile2:142: src/CMakeFiles/LimeSuiteGUI.dir/all] Error 2 [ 926s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 926s] make[1]: *** [Makefile:133: all] Error 2 [ 926s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 926s] dh_auto_build: cd obj-arm-linux-gnueabihf && make -j4 returned exit code 2 [ 926s] make: *** [debian/rules:28: binary] Error 2 [ 926s] dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 [ 926s] [ 926s] armbuild04 failed "build limesuite_20.01.0-1.dsc" at Sat Feb 1 13:18:16 UTC 2020. [ 926s] [ 926s] ### VM INTERACTION START ### [ 929s] [ 851.167030] sysrq: SysRq : Power Off [ 929s] [ 851.184356] reboot: Power down [ 930s] ### VM INTERACTION END ### -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Feb 1 13:38:36 2020 From: admin at opensuse.org (OBS Notification) Date: Sat, 01 Feb 2020 13:38:36 +0000 Subject: Build failure of network:osmocom:latest/eclipse-titan in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5e357f601d75d_2dd02b1d355b65f810319c4@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/eclipse-titan/Raspbian_10/armv7l Package network:osmocom:latest/eclipse-titan failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:latest eclipse-titan Last lines of build log: [ 797s] -h: generate TTCN-3 code allowing type substitution [ 797s] -m: generate only the UsefulTtcn3Types and XSD predefined modules [ 797s] -o: generate all definitions into one module (called XSD_Definitions) [ 797s] -p: do not generate the UsefulTtcn3Types and XSD predefined modules [ 797s] -q: quiet mode - disable the issue of status messages [ 797s] -s: parse and validate only - no TTCN-3 module generation [ 797s] -t: disable the generation of timing information in TTCN-3 modules [ 797s] -v: show version information [ 797s] -w: suppress warnings [ 797s] -x: disable schema validation but generate TTCN-3 modules [ 797s] -z: zap URI scheme from module name [ 797s] make[4]: *** [Makefile:284: TitanLoggerApi.ttcn] Error 1 [ 797s] make[4]: Leaving directory '/usr/src/packages/BUILD/core' [ 797s] make[3]: *** [../../Makefile.genrules:60: ../../core/RInt.o] Error 2 [ 797s] make[3]: Leaving directory '/usr/src/packages/BUILD/mctr2/mctr' [ 797s] make[2]: *** [Makefile:32: all] Error 2 [ 797s] make[2]: Leaving directory '/usr/src/packages/BUILD/mctr2' [ 797s] make[1]: *** [Makefile:65: all] Error 2 [ 797s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 797s] dh_auto_build: make -j1 returned exit code 2 [ 797s] make: *** [debian/rules:6: build] Error 2 [ 797s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 797s] [ 797s] obs-arm-6 failed "build eclipse-titan_6.5.0-1.dsc" at Sat Feb 1 13:38:26 UTC 2020. [ 797s] [ 797s] ### VM INTERACTION START ### [ 800s] [ 772.704695] sysrq: SysRq : Power Off [ 800s] [ 772.721314] reboot: Power down [ 801s] ### VM INTERACTION END ### -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sat Feb 1 13:49:10 2020 From: admin at opensuse.org (OBS Notification) Date: Sat, 01 Feb 2020 13:49:10 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5e3581f214ffb_2dd02b1d355b65f8103737@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/Raspbian_10/armv7l Package network:osmocom:nightly/limesuite failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 782s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o -c /usr/src/packages/BUILD/src/boards_wxgui/pnlGPIO.cpp [ 790s] [ 77%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_gui.cpp.o [ 790s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_gui.cpp.o -c /usr/src/packages/BUILD/src/limeRFE/limeRFE_gui.cpp [ 791s] [ 77%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_wxgui.cpp.o [ 792s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_wxgui.cpp.o -c /usr/src/packages/BUILD/src/limeRFE/limeRFE_wxgui.cpp [ 804s] [ 78%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_cmd.cpp.o [ 805s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_cmd.cpp.o -c /usr/src/packages/BUILD/src/limeRFE/limeRFE_cmd.cpp [ 810s] [ 79%] Linking CXX executable ../bin/LimeSuiteGUI [ 811s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/LimeSuiteGUI.dir/link.txt --verbose=1 [ 811s] /usr/bin/c++ -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -Wl,-z,relro -rdynamic CMakeFiles/LimeSuiteGUI.dir/ADF4002/ADF4002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlXBUF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCalibrations_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTRF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCDS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLimeLightPAD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIST_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewIRAM.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_gui_utilities.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlSX_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgVCOfrequencies.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLDO_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlAFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlGains_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/CoefficientFileParser.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_mainPanel.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewSFR.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCLKGEN_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlMCU_BD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIAS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgGFIR_Coefficients.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlR3.cpp.o CMakeFiles/LimeSuiteGUI.dir/LMS_Programing/LMS_Programing_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgConnectionSettings.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/pnlMiniLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/pnlAPI.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/SPI_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgFullMessageLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgDeviceInfo.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/utilities_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteAppFrame.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/RFSpark_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/Si5351C/Si5351C_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp.cpp.o CMakeFiles/LimeSuiteGUI.dir/FPGAcontrols_wxgui/FPGAcontrols_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/dlgAbout.cpp.o CMakeFiles/LimeSuiteGUI.dir/numericSlider/numericSlider.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_frFFTviewer.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteEvents/lms7suiteEvents.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlBoardControls.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlQSpark.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnluLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlUltimateEVB.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlBuffers.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlCoreSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeNetMicro.cpp.o CMakeFiles/LimeSuiteGUI.dir/__/external/kissFFT/kiss_fft.c.o CMakeFiles/LimeSuiteGUI.dir/windowFunction.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_cmd.cpp.o -o ../bin/LimeSuiteGUI -Wl,-rpath,/usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src: libLimeSuite.so.20.01.0 oglGraph/liboglGraph.a -L/usr/lib/arm-linux-gnueabihf -pthread -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 -lusb-1.0 -lGL -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 [ 815s] /usr/bin/ld: libLimeSuite.so.20.01.0: undefined reference to `__atomic_store_8' [ 815s] /usr/bin/ld: libLimeSuite.so.20.01.0: undefined reference to `__atomic_load_8' [ 815s] collect2: error: ld returned 1 exit status [ 815s] make[3]: *** [src/CMakeFiles/LimeSuiteGUI.dir/build.make:990: bin/LimeSuiteGUI] Error 1 [ 815s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 815s] make[2]: *** [CMakeFiles/Makefile2:142: src/CMakeFiles/LimeSuiteGUI.dir/all] Error 2 [ 815s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 815s] make[1]: *** [Makefile:133: all] Error 2 [ 815s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 815s] dh_auto_build: cd obj-arm-linux-gnueabihf && make -j2 returned exit code 2 [ 815s] make: *** [debian/rules:28: binary] Error 2 [ 815s] dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 [ 815s] [ 815s] armbuild25 failed "build limesuite_20.01.0-1.dsc" at Sat Feb 1 13:49:00 UTC 2020. [ 815s] [ 815s] ### VM INTERACTION START ### [ 818s] [ 793.517938] sysrq: SysRq : Power Off [ 818s] [ 793.519544] reboot: Power down [ 818s] ### VM INTERACTION END ### -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sun Feb 2 12:14:02 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 2 Feb 2020 12:14:02 +0000 Subject: Change in osmo-sgsn[master]: mm_state_gb_fsm: Handle implicit detach from mm_standby In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/17080 ) Change subject: mm_state_gb_fsm: Handle implicit detach from mm_standby ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/17080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I63d04a2dcdc17b4df6616c515641c435d919c787 Gerrit-Change-Number: 17080 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: lynxis lazus Gerrit-Comment-Date: Sun, 02 Feb 2020 12:14:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 2 12:14:06 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 2 Feb 2020 12:14:06 +0000 Subject: Change in osmo-sgsn[master]: mm_state_gb_fsm: Handle implicit detach from mm_standby In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/17080 ) Change subject: mm_state_gb_fsm: Handle implicit detach from mm_standby ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/17080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I63d04a2dcdc17b4df6616c515641c435d919c787 Gerrit-Change-Number: 17080 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: lynxis lazus Gerrit-Comment-Date: Sun, 02 Feb 2020 12:14:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 2 12:14:44 2020 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sun, 2 Feb 2020 12:14:44 +0000 Subject: Change in osmo-sgsn[master]: mm_state_gb_fsm: Handle implicit detach from mm_standby In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/17080 ) Change subject: mm_state_gb_fsm: Handle implicit detach from mm_standby ...................................................................... Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/17080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I63d04a2dcdc17b4df6616c515641c435d919c787 Gerrit-Change-Number: 17080 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 02 Feb 2020 12:14:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 2 12:14:53 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 2 Feb 2020 12:14:53 +0000 Subject: Change in osmo-sgsn[master]: mm_state_gb_fsm: Handle implicit detach from mm_standby In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/17080 ) Change subject: mm_state_gb_fsm: Handle implicit detach from mm_standby ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/17080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I63d04a2dcdc17b4df6616c515641c435d919c787 Gerrit-Change-Number: 17080 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 02 Feb 2020 12:14:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 2 12:18:22 2020 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sun, 2 Feb 2020 12:18:22 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm: Check for RAT change and ensure this only happens for RAU/ATT In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/17081 ) Change subject: gprs_gmm: Check for RAT change and ensure this only happens for RAU/ATT ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/17081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I38cb31907eddeade5350cdb648df179408d908d2 Gerrit-Change-Number: 17081 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 02 Feb 2020 12:18:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 2 12:19:31 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 2 Feb 2020 12:19:31 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm: Check for RAT change and ensure this only happens for RAU/ATT In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/17081 ) Change subject: gprs_gmm: Check for RAT change and ensure this only happens for RAU/ATT ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/17081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I38cb31907eddeade5350cdb648df179408d908d2 Gerrit-Change-Number: 17081 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 02 Feb 2020 12:19:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 2 12:43:47 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 2 Feb 2020 12:43:47 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 ) Change subject: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g ...................................................................... Patch Set 12: (2 comments) https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm.c File src/sgsn/gprs_gmm.c: https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm.c at 1119 PS12, Line 1119: if (MSG_IU_UE_CTX(msg) && mmctx->ran_type != MM_CTX_T_UTRAN_Iu) rat_chg.new_ran_type = MSG_IU_CTX(msg) ? Iu : Geran if (new_ran_type != mmctx->ran_type) osmo_fsm_inst_dispatch() https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm_fsm.c File src/sgsn/gprs_gmm_fsm.c: https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm_fsm.c at 173 PS12, Line 173: if (rat_chg->llme) this if is not needed, llme should always be there in this case. Add an asert if you want. -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 Gerrit-Change-Number: 15487 Gerrit-PatchSet: 12 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-CC: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Sun, 02 Feb 2020 12:43:47 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 2 12:56:44 2020 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sun, 2 Feb 2020 12:56:44 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 ) Change subject: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g ...................................................................... Patch Set 12: (2 comments) https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm.c File src/sgsn/gprs_gmm.c: https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm.c at 1257 PS12, Line 1257: ctx && ctx is always valid here https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm.c at 1675 PS12, Line 1675: mmctx mmctx is always valid here. -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 Gerrit-Change-Number: 15487 Gerrit-PatchSet: 12 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-CC: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Sun, 02 Feb 2020 12:56:44 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 2 13:06:56 2020 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sun, 2 Feb 2020 13:06:56 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 ) Change subject: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g ...................................................................... Patch Set 12: (1 comment) https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm.c File src/sgsn/gprs_gmm.c: https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm.c at 1641 PS12, Line 1641: if (!mmctx_did_rat_change(mmctx, msg)) Add a comment: Rat changes will trigger the E_GMM_COMMON_PROC_INIT_REQ later, protect it here from calling twice. -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 Gerrit-Change-Number: 15487 Gerrit-PatchSet: 12 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-CC: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Sun, 02 Feb 2020 13:06:56 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 2 13:09:26 2020 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sun, 2 Feb 2020 13:09:26 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g In-Reply-To: References: Message-ID: lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 ) Change subject: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g ...................................................................... Patch Set 12: Code-Review-1 small comments, I'm fine with merging it afterwards (hey it's half my patch, must be good :D) -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 Gerrit-Change-Number: 15487 Gerrit-PatchSet: 12 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-CC: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Sun, 02 Feb 2020 13:09:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 2 23:24:05 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 2 Feb 2020 23:24:05 +0000 Subject: Change in osmo-gsm-tester[master]: contrib: Add scripts to build srsLTE software In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17067 ) Change subject: contrib: Add scripts to build srsLTE software ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17067/1/src/osmo_gsm_tester/test.py File src/osmo_gsm_tester/test.py: https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17067/1/src/osmo_gsm_tester/test.py at a1 PS1, Line 1: # osmo_gsm_tester: test class > is removing this file inherently related ot srsLTE buld scripts? looks like an accidential change Indeed that shouldn't be there (and neither the other dropped file). I don't know how this ended up here (I don't recall deleeting them locally...) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Id9d63920a44a80af187e649c9be5fd7498fa5f44 Gerrit-Change-Number: 17067 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Sun, 02 Feb 2020 23:24:05 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 09:43:45 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 3 Feb 2020 09:43:45 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: fixup: fix length check in gprs_bssgp_pcu_rx_dl_ud() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17082 ) Change subject: gprs_bssgp_pcu: fixup: fix length check in gprs_bssgp_pcu_rx_dl_ud() ...................................................................... gprs_bssgp_pcu: fixup: fix length check in gprs_bssgp_pcu_rx_dl_ud() Change-Id: I7d49b27a615350a7707154aa3cc903db7c1df374 Fixes: I7f84bd776cc780a45880f136107f6e0bc56241d1 --- M src/gprs_bssgp_pcu.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/82/17082/1 diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 080245a..ccf233a 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -108,7 +108,7 @@ data = (uint8_t *) TLVP_VAL(tp, BSSGP_IE_LLC_PDU); len = TLVP_LEN(tp, BSSGP_IE_LLC_PDU); - if (len > sizeof(LLC_MAX_LEN)) + if (len > LLC_MAX_LEN) { LOGP(DBSSGP, LOGL_NOTICE, "BSSGP TLLI=0x%08x Rx UL-UD IE_LLC_PDU too large\n", tlli); return bssgp_tx_status(BSSGP_CAUSE_COND_IE_ERR, NULL, msg); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7d49b27a615350a7707154aa3cc903db7c1df374 Gerrit-Change-Number: 17082 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 09:46:04 2020 From: gerrit-no-reply at lists.osmocom.org (keith) Date: Mon, 3 Feb 2020 09:46:04 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: fixup: fix length check in gprs_bssgp_pcu_rx_dl_ud() In-Reply-To: References: Message-ID: keith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17082 ) Change subject: gprs_bssgp_pcu: fixup: fix length check in gprs_bssgp_pcu_rx_dl_ud() ...................................................................... Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17082/1/src/gprs_bssgp_pcu.cpp File src/gprs_bssgp_pcu.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17082/1/src/gprs_bssgp_pcu.cpp at 111 PS1, Line 111: if (len > LLC_MAX_LEN) tested on UHD hardware. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7d49b27a615350a7707154aa3cc903db7c1df374 Gerrit-Change-Number: 17082 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: keith Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Mon, 03 Feb 2020 09:46:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 09:51:15 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 3 Feb 2020 09:51:15 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: fixup: fix length check in gprs_bssgp_pcu_rx_dl_ud() In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17082 ) Change subject: gprs_bssgp_pcu: fixup: fix length check in gprs_bssgp_pcu_rx_dl_ud() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7d49b27a615350a7707154aa3cc903db7c1df374 Gerrit-Change-Number: 17082 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: keith Gerrit-Comment-Date: Mon, 03 Feb 2020 09:51:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 09:51:23 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 3 Feb 2020 09:51:23 +0000 Subject: Change in osmo-pcu[master]: gprs_bssgp_pcu: fixup: fix length check in gprs_bssgp_pcu_rx_dl_ud() In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17082 ) Change subject: gprs_bssgp_pcu: fixup: fix length check in gprs_bssgp_pcu_rx_dl_ud() ...................................................................... gprs_bssgp_pcu: fixup: fix length check in gprs_bssgp_pcu_rx_dl_ud() Change-Id: I7d49b27a615350a7707154aa3cc903db7c1df374 Fixes: I7f84bd776cc780a45880f136107f6e0bc56241d1 --- M src/gprs_bssgp_pcu.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: keith: Looks good to me, approved fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 080245a..ccf233a 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -108,7 +108,7 @@ data = (uint8_t *) TLVP_VAL(tp, BSSGP_IE_LLC_PDU); len = TLVP_LEN(tp, BSSGP_IE_LLC_PDU); - if (len > sizeof(LLC_MAX_LEN)) + if (len > LLC_MAX_LEN) { LOGP(DBSSGP, LOGL_NOTICE, "BSSGP TLLI=0x%08x Rx UL-UD IE_LLC_PDU too large\n", tlli); return bssgp_tx_status(BSSGP_CAUSE_COND_IE_ERR, NULL, msg); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17082 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7d49b27a615350a7707154aa3cc903db7c1df374 Gerrit-Change-Number: 17082 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: keith Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 14:39:38 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 14:39:38 +0000 Subject: Change in osmo-pcu[master]: cosmetic: csn1.cpp: Fix whitespace In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16985 ) Change subject: cosmetic: csn1.cpp: Fix whitespace ...................................................................... cosmetic: csn1.cpp: Fix whitespace Change-Id: I663c5c20a878b3643db6a8ddd58e29bc9fe93d80 --- M src/csn1.cpp 1 file changed, 7 insertions(+), 8 deletions(-) Approvals: neels: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/csn1.cpp b/src/csn1.cpp index f248b95..1a3a530 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -69,7 +69,7 @@ result &= maskBits[no_of_bits]; } else - { + { guint8 hight_part = (0x2B ^ ((guint8)bitvec_read_field(vector, &readIndex, 8))) & maskBits[8 - relative_bit_offset]; hight_part = (guint8) (hight_part << (-bit_shift)); result = (0x2B ^ ((guint8)bitvec_read_field(vector, &readIndex, 8))) >> (8 + bit_shift); @@ -613,7 +613,7 @@ /* Assign UnionType */ pui8 = pui8DATA(data, pDescr->offset); *pui8 = index; - + /* script index to continue on, limited in case we do not have a power of 2 */ pDescr += (MIN(index + 1, count)); @@ -1128,7 +1128,7 @@ no_of_bits -= 8; } if (no_of_bits > 0) - { + { *pui8 = bitvec_read_field(vector, &readIndex, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; @@ -1339,7 +1339,7 @@ ElementCount++; LOGPC(DCSN1, LOGL_NOTICE, "%s { | ", pDescr->sz); - + csnStreamInit(&arT, bit_offset, remaining_bits_len); Status = csnStreamDecoder(&arT, (const CSN_DESCR*)pDescr->descr.ptr, vector, readIndex, pui8); @@ -1827,7 +1827,7 @@ } else { - // Has already been processed: + // Has already been processed: return Status; } @@ -1857,9 +1857,9 @@ //read index from data and write to vector bitvec_write_field(vector, &writeIndex, *pui8, Bits); - //decode index + //decode index writeIndex -= Bits; - + while (Bits > 0) { index <<= 1; @@ -2669,4 +2669,3 @@ return ProcessError(writeIndex,"csnStreamEncoder", CSN_ERROR_NEED_MORE_BITS_TO_UNPACK, pDescr); } - -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16985 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I663c5c20a878b3643db6a8ddd58e29bc9fe93d80 Gerrit-Change-Number: 16985 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 14:40:28 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 14:40:28 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Install srsLTE dependencies In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17066 ) Change subject: ansible: gsm-tester: Install srsLTE dependencies ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17066 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ia6804d0d0c40ad2ebe8a09b0861f14f15578a834 Gerrit-Change-Number: 17066 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 03 Feb 2020 14:40:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 14:40:31 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 14:40:31 +0000 Subject: Change in osmo-ci[master]: jobs: Introduce osmo-gsm-tester_build-srslte In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17068 ) Change subject: jobs: Introduce osmo-gsm-tester_build-srslte ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17068 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I08a59c6065ca4fb6fbbed5b12e73abf4024f1dcb Gerrit-Change-Number: 17068 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 03 Feb 2020 14:40:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 14:40:35 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 14:40:35 +0000 Subject: Change in osmo-ci[master]: Install srsLTE build dependencies in jenkins buildhosts In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17069 ) Change subject: Install srsLTE build dependencies in jenkins buildhosts ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17069 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib42987416ee90868ab088bfa2f92d92c764088b0 Gerrit-Change-Number: 17069 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 03 Feb 2020 14:40:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 14:40:42 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 14:40:42 +0000 Subject: Change in osmo-ci[master]: ansible: mdbus2 is not nowadays available on Debian10 In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17070 ) Change subject: ansible: mdbus2 is not nowadays available on Debian10 ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17070 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0eb2ed28d9e3bc9054ffeb81c9e6fb5428af5bfb Gerrit-Change-Number: 17070 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 03 Feb 2020 14:40:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 14:40:45 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 14:40:45 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Install srsLTE dependencies In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17066 ) Change subject: ansible: gsm-tester: Install srsLTE dependencies ...................................................................... ansible: gsm-tester: Install srsLTE dependencies Change-Id: Ia6804d0d0c40ad2ebe8a09b0861f14f15578a834 --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 14 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index d880127..5cc83bc 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -37,6 +37,20 @@ - liblua5.3-dev - lua-socket +- name: install srsLTE runtime dependencies + apt: + name: "{{ item }}" + with_items: + - cmake + - libfftw3-dev + - libmbedtls-dev + - libboost-program-options-dev + - libconfig++-dev + - libsctp-dev + - libpcsclite-dev + - libuhd-dev + - libczmq-dev + - name: install ofono build dependencies apt: name: ofono -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17066 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ia6804d0d0c40ad2ebe8a09b0861f14f15578a834 Gerrit-Change-Number: 17066 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 14:40:45 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 14:40:45 +0000 Subject: Change in osmo-ci[master]: jobs: Introduce osmo-gsm-tester_build-srslte In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17068 ) Change subject: jobs: Introduce osmo-gsm-tester_build-srslte ...................................................................... jobs: Introduce osmo-gsm-tester_build-srslte Change-Id: I08a59c6065ca4fb6fbbed5b12e73abf4024f1dcb --- M jobs/osmo-gsm-tester-builder.yml M jobs/osmo-gsm-tester-runner.yml M jobs/osmo-gsm-tester-trigger.yml 3 files changed, 7 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/jobs/osmo-gsm-tester-builder.yml b/jobs/osmo-gsm-tester-builder.yml index 470aed0..a519f93 100644 --- a/jobs/osmo-gsm-tester-builder.yml +++ b/jobs/osmo-gsm-tester-builder.yml @@ -29,6 +29,7 @@ triggered-by: master-osmo-bts - osmo-pcu-oc2g: triggered-by: master-osmo-pcu + - srslte triggered-by: 'master-{repo}' jobs: @@ -99,6 +100,8 @@ name: OSMO_GSM_TESTER_BUILD_osmo_trx - add_param_build_branch: name: OSMO_GSM_TESTER_BUILD_osmocom_bb + - add_param_build_branch: + name: OSMO_GSM_TESTER_BUILD_srslte scm: - osmo-gsm-tester-repo diff --git a/jobs/osmo-gsm-tester-runner.yml b/jobs/osmo-gsm-tester-runner.yml index a4b64fd..4a47c8e 100644 --- a/jobs/osmo-gsm-tester-runner.yml +++ b/jobs/osmo-gsm-tester-runner.yml @@ -86,6 +86,8 @@ repo: osmo-gsm-tester_build-osmo-bts-oc2g - copy_artifact: repo: osmo-gsm-tester_build-osmo-pcu-oc2g + - copy_artifact: + repo: osmo-gsm-tester_build-srslte - defaults: name: runner @@ -128,6 +130,7 @@ - osmo-gsm-tester_build-osmo-pcu-sysmo - osmo-gsm-tester_build-osmo-bts-oc2g - osmo-gsm-tester_build-osmo-pcu-oc2g + - osmo-gsm-tester_build-srslte builders: - copy_artifact_all - shell: !include-raw: osmo-gsm-tester_run-{stage}.sh diff --git a/jobs/osmo-gsm-tester-trigger.yml b/jobs/osmo-gsm-tester-trigger.yml index 43298dc..e37c1f1 100644 --- a/jobs/osmo-gsm-tester-trigger.yml +++ b/jobs/osmo-gsm-tester-trigger.yml @@ -29,3 +29,4 @@ osmo-gsm-tester_build-osmo-pcu-sysmo, osmo-gsm-tester_build-osmo-bts-oc2g, osmo-gsm-tester_build-osmo-pcu-oc2g + osmo-gsm-tester_build-srslte -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17068 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I08a59c6065ca4fb6fbbed5b12e73abf4024f1dcb Gerrit-Change-Number: 17068 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 14:40:46 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 14:40:46 +0000 Subject: Change in osmo-ci[master]: Install srsLTE build dependencies in jenkins buildhosts In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17069 ) Change subject: Install srsLTE build dependencies in jenkins buildhosts ...................................................................... Install srsLTE build dependencies in jenkins buildhosts Change-Id: Ib42987416ee90868ab088bfa2f92d92c764088b0 --- M ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml 1 file changed, 16 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml index daec1f6..bfa9715 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml @@ -133,3 +133,19 @@ - libjansson-dev - libulfius-dev when: ansible_distribution == 'Debian' and ansible_distribution_version == '9' + +- name: install srsLTE build dependencies + apt: + name: "{{ item }}" + cache_valid_time: 3600 + update_cache: yes + with_items: + - cmake + - libfftw3-dev + - libmbedtls-dev + - libboost-program-options-dev + - libconfig++-dev + - libsctp-dev + - libpcsclite-dev + - libuhd-dev + - libczmq-dev -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17069 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib42987416ee90868ab088bfa2f92d92c764088b0 Gerrit-Change-Number: 17069 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 14:40:46 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 14:40:46 +0000 Subject: Change in osmo-ci[master]: ansible: mdbus2 is not nowadays available on Debian10 In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17070 ) Change subject: ansible: mdbus2 is not nowadays available on Debian10 ...................................................................... ansible: mdbus2 is not nowadays available on Debian10 Change-Id: I0eb2ed28d9e3bc9054ffeb81c9e6fb5428af5bfb --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 5cc83bc..83b3db6 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -33,10 +33,17 @@ - libsofia-sip-ua-glib-dev - libsqlite3-dev - libasound2-dev - - mdbus2 - liblua5.3-dev - lua-socket +# mdbus2 is not available in debian10. TODO: compile it for >9 +- name: install mdbus2 + apt: + name: "{{ item }}" + with_items: + - mdbus2 + when: ansible_distribution == 'Debian' and ansible_distribution_version <= '9' + - name: install srsLTE runtime dependencies apt: name: "{{ item }}" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17070 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0eb2ed28d9e3bc9054ffeb81c9e6fb5428af5bfb Gerrit-Change-Number: 17070 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 14:56:53 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 14:56:53 +0000 Subject: Change in osmo-gsm-tester[master]: contrib: Add scripts to build srsLTE software In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17067 to look at the new patch set (#2). Change subject: contrib: Add scripts to build srsLTE software ...................................................................... contrib: Add scripts to build srsLTE software Change-Id: Id9d63920a44a80af187e649c9be5fd7498fa5f44 --- M contrib/jenkins-build-common.sh A contrib/jenkins-build-srslte.sh A suites/4g/mo_mt_sms.py A suites/4g/suite.conf D update_version.sh 5 files changed, 55 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/67/17067/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Id9d63920a44a80af187e649c9be5fd7498fa5f44 Gerrit-Change-Number: 17067 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 15:05:35 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 15:05:35 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Add missing dep python3-setuptools References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17083 ) Change subject: ansible: gsm-tester: Add missing dep python3-setuptools ...................................................................... ansible: gsm-tester: Add missing dep python3-setuptools That's required when building python modules with pip. Change-Id: I80785a4061e91126092a04080a2c9fdb288be49a --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/83/17083/1 diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 83b3db6..88f072e 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -137,6 +137,7 @@ - tcpdump - sqlite3 - python3 + - python3-setuptools - python3-yaml - python3-mako - python3-gi -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I80785a4061e91126092a04080a2c9fdb288be49a Gerrit-Change-Number: 17083 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 16:21:32 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 16:21:32 +0000 Subject: Change in osmo-gsm-tester[master]: contrib: Add scripts to build srsLTE software In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17067 ) Change subject: contrib: Add scripts to build srsLTE software ...................................................................... Patch Set 2: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Id9d63920a44a80af187e649c9be5fd7498fa5f44 Gerrit-Change-Number: 17067 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 03 Feb 2020 16:21:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 18:27:59 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 18:27:59 +0000 Subject: Change in osmo-pcu[master]: csn1.cpp: Rework ProcessError() function to print errors References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17084 ) Change subject: csn1.cpp: Rework ProcessError() function to print errors ...................................................................... csn1.cpp: Rework ProcessError() function to print errors Same API is kept to more easily keep code compatibility with wireshark's packet-csn1.c implementation. Change-Id: I1ce2c52e2357841aa1f31babfdce9011435f866b --- M src/csn1.cpp 1 file changed, 27 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/84/17084/1 diff --git a/src/csn1.cpp b/src/csn1.cpp index 1a3a530..e97df92 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -37,6 +37,10 @@ #include "csn1.h" #include +extern "C" { +#include +#include +} #define pvDATA(_pv, _offset) ((void*) ((unsigned char*)_pv + _offset)) #define pui8DATA(_pv, _offset) ((guint8*) pvDATA(_pv, _offset)) @@ -92,35 +96,34 @@ ar->direction = 0; } -static const char* ErrCodes[] = -{ - "General 0", - "General -1", - "DATA_NOT VALID", - "IN SCRIPT", - "INVALID UNION INDEX", - "NEED_MORE BITS TO UNPACK", - "ILLEGAL BIT VALUE", - "Internal", - "STREAM_NOT_SUPPORTED", - "MESSAGE_TOO_LONG" +static const struct value_string csn1_error_names[] = { + { CSN_OK, "General 0" }, + { CSN_ERROR_GENERAL, "General -1" }, + { CSN_ERROR_DATA_NOT_VALID, "DATA_NOT VALID" }, + { CSN_ERROR_IN_SCRIPT, "IN SCRIPT" }, + { CSN_ERROR_INVALID_UNION_INDEX, "INVALID UNION INDEX" }, + { CSN_ERROR_NEED_MORE_BITS_TO_UNPACK, "NEED_MORE BITS TO UNPACK" }, + { CSN_ERROR_NEED_MORE_BITS_TO_UNPACK, "ILLEGAL BIT VALUE" }, + { CSN_ERROR_ILLEGAL_BIT_VALUE, "Internal" }, + { CSN_ERROR_STREAM_NOT_SUPPORTED, "STREAM_NOT_SUPPORTED" }, + { CSN_ERROR_MESSAGE_TOO_LONG, "MESSAGE_TOO_LONG" }, + { 0, NULL } }; -static gint16 -ProcessError( unsigned readIndex, const char* sz, gint16 err, const CSN_DESCR* pDescr) + +static gint16 ProcessError_impl(const char *file, int line, unsigned readIndex, + const char* sz, gint16 err, const CSN_DESCR* pDescr) { - gint16 i = MIN(-err, ((gint16) ElementsOf(ErrCodes)-1)); - if (i >= 0) - { - //LOG(ERR) << sz << "Error code: "<< ErrCodes[i] << pDescr?(pDescr->sz):"-"; - } - else - { - //LOG(ERR) << sz << ": " << pDescr?(pDescr->sz):"-"; - } - return err; + if (err != CSN_OK) + LOGPSRC(DCSN1, LOGL_ERROR, file, line, "%s: error %s (%d) at %s (idx %d)\n", + sz, get_value_string(csn1_error_names, err), err, + pDescr ? pDescr->sz : "-", readIndex); + return err; } +#define ProcessError(readIndex, sz, err, pDescr) \ + ProcessError_impl(__FILE__, __LINE__, readIndex, sz, err, pDescr) + /** * ================================================================================================ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1ce2c52e2357841aa1f31babfdce9011435f866b Gerrit-Change-Number: 17084 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 18:28:00 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 18:28:00 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Return error code from csn1 encoder/decoder References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17085 ) Change subject: rlcmac: Return error code from csn1 encoder/decoder ...................................................................... rlcmac: Return error code from csn1 encoder/decoder Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc --- M src/gsm_rlcmac.cpp M src/gsm_rlcmac.h 2 files changed, 143 insertions(+), 98 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/85/17085/1 diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index 4550c47..2041e39 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -4807,21 +4807,23 @@ M_UINT_LH (SI6_RestOctet_t, BandIndicator, 1), CSN_DESCR_END (SI6_RestOctet_t) -void decode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data) +/* Returns 0 on success, negative on error. */ +int decode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data) { csnStream_t ar; + int ret; unsigned readIndex = 0; guint8 payload_type = bitvec_read_field(vector, &readIndex, 2); if (payload_type == PAYLOAD_TYPE_DATA) { LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); - return; + return -1; } else if (payload_type == PAYLOAD_TYPE_RESERVED) { LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); - return; + return -1; } data->NrOfBits = 23 * 8; csnStreamInit(&ar, 0, data->NrOfBits); @@ -4837,88 +4839,98 @@ * CSNDESCR is an array that holds the different element types * ar is the csn context holding the bitcount, offset and output */ - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Failure_t), vector, readIndex, &data->u.Packet_Cell_Change_Failure); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Failure_t), vector, readIndex, &data->u.Packet_Cell_Change_Failure); break; } case MT_PACKET_CONTROL_ACK: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Control_Acknowledgement_t), vector, readIndex, &data->u.Packet_Control_Acknowledgement); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Control_Acknowledgement_t), vector, readIndex, &data->u.Packet_Control_Acknowledgement); break; } case MT_PACKET_DOWNLINK_ACK_NACK: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Ack_Nack_t), vector, readIndex, &data->u.Packet_Downlink_Ack_Nack); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Ack_Nack_t), vector, readIndex, &data->u.Packet_Downlink_Ack_Nack); break; } case MT_PACKET_UPLINK_DUMMY_CONTROL_BLOCK: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Dummy_Control_Block_t), vector, readIndex, &data->u.Packet_Uplink_Dummy_Control_Block); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Dummy_Control_Block_t), vector, readIndex, &data->u.Packet_Uplink_Dummy_Control_Block); break; } case MT_PACKET_MEASUREMENT_REPORT: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Measurement_Report_t), vector, readIndex, &data->u.Packet_Measurement_Report); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Measurement_Report_t), vector, readIndex, &data->u.Packet_Measurement_Report); break; } case MT_PACKET_RESOURCE_REQUEST: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Resource_Request_t), vector, readIndex, &data->u.Packet_Resource_Request); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Resource_Request_t), vector, readIndex, &data->u.Packet_Resource_Request); break; } case MT_PACKET_MOBILE_TBF_STATUS: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Mobile_TBF_Status_t), vector, readIndex, &data->u.Packet_Mobile_TBF_Status); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Mobile_TBF_Status_t), vector, readIndex, &data->u.Packet_Mobile_TBF_Status); break; } case MT_PACKET_PSI_STATUS: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_PSI_Status_t), vector, readIndex, &data->u.Packet_PSI_Status); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PSI_Status_t), vector, readIndex, &data->u.Packet_PSI_Status); break; } case MT_EGPRS_PACKET_DOWNLINK_ACK_NACK: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(EGPRS_PD_AckNack_t), vector, readIndex, &data->u.Egprs_Packet_Downlink_Ack_Nack); + ret = csnStreamDecoder(&ar, CSNDESCR(EGPRS_PD_AckNack_t), vector, readIndex, &data->u.Egprs_Packet_Downlink_Ack_Nack); break; } case MT_PACKET_PAUSE: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Pause_t), vector, readIndex, &data->u.Packet_Pause); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Pause_t), vector, readIndex, &data->u.Packet_Pause); break; } case MT_PACKET_ENHANCED_MEASUREMENT_REPORT: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Enh_Measurement_Report_t), vector, readIndex, &data->u.Packet_Enh_Measurement_Report); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Enh_Measurement_Report_t), vector, readIndex, &data->u.Packet_Enh_Measurement_Report); break; } case MT_ADDITIONAL_MS_RAC: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Additional_MS_Rad_Access_Cap_t), vector, readIndex, &data->u.Additional_MS_Rad_Access_Cap); + ret = csnStreamDecoder(&ar, CSNDESCR(Additional_MS_Rad_Access_Cap_t), vector, readIndex, &data->u.Additional_MS_Rad_Access_Cap); break; } case MT_PACKET_CELL_CHANGE_NOTIFICATION: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Notification_t), vector, readIndex, &data->u.Packet_Cell_Change_Notification); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Notification_t), vector, readIndex, &data->u.Packet_Cell_Change_Notification); break; } case MT_PACKET_SI_STATUS: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_SI_Status_t), vector, readIndex, &data->u.Packet_SI_Status); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_SI_Status_t), vector, readIndex, &data->u.Packet_SI_Status); break; } default: - /*ret = -1;*/ + ret = -1; break; } + + if (ret > 0) { + LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by decoder at the end of bitvec\n", ret); + ret = 0; + } + + return ret; } -void decode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data) +/* Returns 0 on success, negative on error. */ +int decode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data) { csnStream_t ar; /* See RLC/MAC downlink control block structure in TS 44.060 / 10.3.1 */ gint bit_offset = 0; gint bit_length; unsigned readIndex = 0; + int ret; + data->PAYLOAD_TYPE = bitvec_read_field(vector, &readIndex, 2); data->RRBP = bitvec_read_field(vector, &readIndex, 2); data->SP = bitvec_read_field(vector, &readIndex, 1); @@ -4927,12 +4939,12 @@ if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_DATA) { LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); - return; + return -1; } else if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_RESERVED) { LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); - return; + return -1; } /* We can decode the message */ else @@ -4975,139 +4987,149 @@ { case MT_PACKET_ACCESS_REJECT: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Access_Reject_t), vector, readIndex, &data->u.Packet_Access_Reject); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Access_Reject_t), vector, readIndex, &data->u.Packet_Access_Reject); break; } case MT_PACKET_CELL_CHANGE_ORDER: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Order_t), vector, readIndex, &data->u.Packet_Cell_Change_Order); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Order_t), vector, readIndex, &data->u.Packet_Cell_Change_Order); break; } case MT_PACKET_CELL_CHANGE_CONTINUE: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Continue_t), vector, readIndex, &data->u.Packet_Cell_Change_Continue); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Continue_t), vector, readIndex, &data->u.Packet_Cell_Change_Continue); break; } case MT_PACKET_DOWNLINK_ASSIGNMENT: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Assignment_t), vector, readIndex, &data->u.Packet_Downlink_Assignment); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Assignment_t), vector, readIndex, &data->u.Packet_Downlink_Assignment); break; } case MT_PACKET_MEASUREMENT_ORDER: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Measurement_Order_t), vector, readIndex, &data->u.Packet_Measurement_Order); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Measurement_Order_t), vector, readIndex, &data->u.Packet_Measurement_Order); break; } case MT_PACKET_NEIGHBOUR_CELL_DATA: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Neighbour_Cell_Data_t), vector, readIndex, &data->u.Packet_Neighbour_Cell_Data); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Neighbour_Cell_Data_t), vector, readIndex, &data->u.Packet_Neighbour_Cell_Data); break; } case MT_PACKET_SERVING_CELL_DATA: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Serving_Cell_Data_t), vector, readIndex, &data->u.Packet_Serving_Cell_Data); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Serving_Cell_Data_t), vector, readIndex, &data->u.Packet_Serving_Cell_Data); break; } case MT_PACKET_PAGING_REQUEST: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Paging_Request_t), vector, readIndex, &data->u.Packet_Paging_Request); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Paging_Request_t), vector, readIndex, &data->u.Packet_Paging_Request); break; } case MT_PACKET_PDCH_RELEASE: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_PDCH_Release_t), vector, readIndex, &data->u.Packet_PDCH_Release); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PDCH_Release_t), vector, readIndex, &data->u.Packet_PDCH_Release); break; } case MT_PACKET_POLLING_REQ: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Polling_Request_t), vector, readIndex, &data->u.Packet_Polling_Request); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Polling_Request_t), vector, readIndex, &data->u.Packet_Polling_Request); break; } case MT_PACKET_POWER_CONTROL_TIMING_ADVANCE: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Power_Control_Timing_Advance_t), vector, readIndex, &data->u.Packet_Power_Control_Timing_Advance); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Power_Control_Timing_Advance_t), vector, readIndex, &data->u.Packet_Power_Control_Timing_Advance); break; } case MT_PACKET_PRACH_PARAMETERS: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_PRACH_Parameters_t), vector, readIndex, &data->u.Packet_PRACH_Parameters); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PRACH_Parameters_t), vector, readIndex, &data->u.Packet_PRACH_Parameters); break; } case MT_PACKET_QUEUEING_NOTIFICATION: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Queueing_Notification_t), vector, readIndex, &data->u.Packet_Queueing_Notification); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Queueing_Notification_t), vector, readIndex, &data->u.Packet_Queueing_Notification); break; } case MT_PACKET_TIMESLOT_RECONFIGURE: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Timeslot_Reconfigure_t), vector, readIndex, &data->u.Packet_Timeslot_Reconfigure); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Timeslot_Reconfigure_t), vector, readIndex, &data->u.Packet_Timeslot_Reconfigure); break; } case MT_PACKET_TBF_RELEASE: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_TBF_Release_t), vector, readIndex, &data->u.Packet_TBF_Release); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_TBF_Release_t), vector, readIndex, &data->u.Packet_TBF_Release); break; } case MT_PACKET_UPLINK_ACK_NACK: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Ack_Nack_t), vector, readIndex, &data->u.Packet_Uplink_Ack_Nack); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Ack_Nack_t), vector, readIndex, &data->u.Packet_Uplink_Ack_Nack); break; } case MT_PACKET_UPLINK_ASSIGNMENT: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Assignment_t), vector, readIndex, &data->u.Packet_Uplink_Assignment); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Assignment_t), vector, readIndex, &data->u.Packet_Uplink_Assignment); break; } case MT_PACKET_HANDOVER_COMMAND: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Handover_Command_t), vector, readIndex, &data->u.Packet_Handover_Command); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Handover_Command_t), vector, readIndex, &data->u.Packet_Handover_Command); break; } case MT_PACKET_PHYSICAL_INFORMATION: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_PhysicalInformation_t), vector, readIndex, &data->u.Packet_Handover_Command); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PhysicalInformation_t), vector, readIndex, &data->u.Packet_Handover_Command); break; } case MT_PACKET_DOWNLINK_DUMMY_CONTROL_BLOCK: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Dummy_Control_Block_t), vector, readIndex, &data->u.Packet_Downlink_Dummy_Control_Block); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Dummy_Control_Block_t), vector, readIndex, &data->u.Packet_Downlink_Dummy_Control_Block); break; } case MT_PACKET_SYSTEM_INFO_1: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(PSI1_t), vector, readIndex, &data->u.PSI1); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI1_t), vector, readIndex, &data->u.PSI1); break; } case MT_PACKET_SYSTEM_INFO_2: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(PSI2_t), vector, readIndex, &data->u.PSI2); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI2_t), vector, readIndex, &data->u.PSI2); break; } case MT_PACKET_SYSTEM_INFO_3: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(PSI3_t), vector, readIndex, &data->u.PSI3); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI3_t), vector, readIndex, &data->u.PSI3); break; } case MT_PACKET_SYSTEM_INFO_5: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(PSI5_t), vector, readIndex, &data->u.PSI5); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI5_t), vector, readIndex, &data->u.PSI5); break; } case MT_PACKET_SYSTEM_INFO_13: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(PSI13_t), vector, readIndex, &data->u.PSI13); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI13_t), vector, readIndex, &data->u.PSI13); break; } default: - /*ret = -1;*/ + ret = -1; break; } + + if (ret > 0) { + LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by decoder at the end of bitvec\n", ret); + ret = 0; + } + + return ret; } -void encode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data) +/* Returns 0 on success, negative on error. */ +int encode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data) { csnStream_t ar; unsigned writeIndex = 0; + int ret; + data->NrOfBits = 23 * 8; csnStreamInit(&ar, 0, data->NrOfBits); writeIndex = 0; @@ -5120,85 +5142,93 @@ * CSNDESCR is an array that holds the different element types * ar is the csn context holding the bitcount, offset and output */ - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Failure_t), vector, writeIndex, &data->u.Packet_Cell_Change_Failure); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Failure_t), vector, writeIndex, &data->u.Packet_Cell_Change_Failure); break; } case MT_PACKET_CONTROL_ACK: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Control_Acknowledgement_t), vector, writeIndex, &data->u.Packet_Control_Acknowledgement); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Control_Acknowledgement_t), vector, writeIndex, &data->u.Packet_Control_Acknowledgement); break; } case MT_PACKET_DOWNLINK_ACK_NACK: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Ack_Nack_t), vector, writeIndex, &data->u.Packet_Downlink_Ack_Nack); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Ack_Nack_t), vector, writeIndex, &data->u.Packet_Downlink_Ack_Nack); break; } case MT_PACKET_UPLINK_DUMMY_CONTROL_BLOCK: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Dummy_Control_Block_t), vector, writeIndex, &data->u.Packet_Uplink_Dummy_Control_Block); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Dummy_Control_Block_t), vector, writeIndex, &data->u.Packet_Uplink_Dummy_Control_Block); break; } case MT_PACKET_MEASUREMENT_REPORT: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Measurement_Report_t), vector, writeIndex, &data->u.Packet_Measurement_Report); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Measurement_Report_t), vector, writeIndex, &data->u.Packet_Measurement_Report); break; } case MT_PACKET_RESOURCE_REQUEST: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Resource_Request_t), vector, writeIndex, &data->u.Packet_Resource_Request); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Resource_Request_t), vector, writeIndex, &data->u.Packet_Resource_Request); break; } case MT_PACKET_MOBILE_TBF_STATUS: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Mobile_TBF_Status_t), vector, writeIndex, &data->u.Packet_Mobile_TBF_Status); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Mobile_TBF_Status_t), vector, writeIndex, &data->u.Packet_Mobile_TBF_Status); break; } case MT_PACKET_PSI_STATUS: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_PSI_Status_t), vector, writeIndex, &data->u.Packet_PSI_Status); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PSI_Status_t), vector, writeIndex, &data->u.Packet_PSI_Status); break; } case MT_EGPRS_PACKET_DOWNLINK_ACK_NACK: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(EGPRS_PD_AckNack_t), vector, writeIndex, &data->u.Egprs_Packet_Downlink_Ack_Nack); + ret = csnStreamEncoder(&ar, CSNDESCR(EGPRS_PD_AckNack_t), vector, writeIndex, &data->u.Egprs_Packet_Downlink_Ack_Nack); break; } case MT_PACKET_PAUSE: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Pause_t), vector, writeIndex, &data->u.Packet_Pause); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Pause_t), vector, writeIndex, &data->u.Packet_Pause); break; } case MT_PACKET_ENHANCED_MEASUREMENT_REPORT: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Enh_Measurement_Report_t), vector, writeIndex, &data->u.Packet_Enh_Measurement_Report); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Enh_Measurement_Report_t), vector, writeIndex, &data->u.Packet_Enh_Measurement_Report); break; } case MT_ADDITIONAL_MS_RAC: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Additional_MS_Rad_Access_Cap_t), vector, writeIndex, &data->u.Additional_MS_Rad_Access_Cap); + ret = csnStreamEncoder(&ar, CSNDESCR(Additional_MS_Rad_Access_Cap_t), vector, writeIndex, &data->u.Additional_MS_Rad_Access_Cap); break; } case MT_PACKET_CELL_CHANGE_NOTIFICATION: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Notification_t), vector, writeIndex, &data->u.Packet_Cell_Change_Notification); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Notification_t), vector, writeIndex, &data->u.Packet_Cell_Change_Notification); break; } case MT_PACKET_SI_STATUS: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_SI_Status_t), vector, writeIndex, &data->u.Packet_SI_Status); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_SI_Status_t), vector, writeIndex, &data->u.Packet_SI_Status); break; } default: - /*ret = -1;*/ + ret = -1; break; } + + if (ret > 0) { + LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by encoder at the end of bitvec\n", ret); + ret = 0; + } + + return ret; } -void encode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data) +/* Returns 0 on success, negative on error. */ +int encode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data) { csnStream_t ar; - + int ret; /* See RLC/MAC downlink control block structure in TS 44.060 / 10.3.1 */ gint bit_offset = 0; gint bit_length; @@ -5207,12 +5237,12 @@ if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_DATA) { LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); - return; + return -1; } else if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_RESERVED) { LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); - return; + return -1; } /* We can decode the message */ else @@ -5257,133 +5287,140 @@ { case MT_PACKET_ACCESS_REJECT: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Access_Reject_t), vector, writeIndex, &data->u.Packet_Access_Reject); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Access_Reject_t), vector, writeIndex, &data->u.Packet_Access_Reject); break; } case MT_PACKET_CELL_CHANGE_ORDER: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Order_t), vector, writeIndex, &data->u.Packet_Cell_Change_Order); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Order_t), vector, writeIndex, &data->u.Packet_Cell_Change_Order); break; } case MT_PACKET_CELL_CHANGE_CONTINUE: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Continue_t), vector, writeIndex, &data->u.Packet_Cell_Change_Continue); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Continue_t), vector, writeIndex, &data->u.Packet_Cell_Change_Continue); break; } case MT_PACKET_DOWNLINK_ASSIGNMENT: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Assignment_t), vector, writeIndex, &data->u.Packet_Downlink_Assignment); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Assignment_t), vector, writeIndex, &data->u.Packet_Downlink_Assignment); break; } case MT_PACKET_MEASUREMENT_ORDER: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Measurement_Order_t), vector, writeIndex, &data->u.Packet_Measurement_Order); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Measurement_Order_t), vector, writeIndex, &data->u.Packet_Measurement_Order); break; } case MT_PACKET_NEIGHBOUR_CELL_DATA: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Neighbour_Cell_Data_t), vector, writeIndex, &data->u.Packet_Neighbour_Cell_Data); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Neighbour_Cell_Data_t), vector, writeIndex, &data->u.Packet_Neighbour_Cell_Data); break; } case MT_PACKET_SERVING_CELL_DATA: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Serving_Cell_Data_t), vector, writeIndex, &data->u.Packet_Serving_Cell_Data); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Serving_Cell_Data_t), vector, writeIndex, &data->u.Packet_Serving_Cell_Data); break; } case MT_PACKET_PAGING_REQUEST: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Paging_Request_t), vector, writeIndex, &data->u.Packet_Paging_Request); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Paging_Request_t), vector, writeIndex, &data->u.Packet_Paging_Request); break; } case MT_PACKET_PDCH_RELEASE: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_PDCH_Release_t), vector, writeIndex, &data->u.Packet_PDCH_Release); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PDCH_Release_t), vector, writeIndex, &data->u.Packet_PDCH_Release); break; } case MT_PACKET_POLLING_REQ: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Polling_Request_t), vector, writeIndex, &data->u.Packet_Polling_Request); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Polling_Request_t), vector, writeIndex, &data->u.Packet_Polling_Request); break; } case MT_PACKET_POWER_CONTROL_TIMING_ADVANCE: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Power_Control_Timing_Advance_t), vector, writeIndex, &data->u.Packet_Power_Control_Timing_Advance); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Power_Control_Timing_Advance_t), vector, writeIndex, &data->u.Packet_Power_Control_Timing_Advance); break; } case MT_PACKET_PRACH_PARAMETERS: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_PRACH_Parameters_t), vector, writeIndex, &data->u.Packet_PRACH_Parameters); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PRACH_Parameters_t), vector, writeIndex, &data->u.Packet_PRACH_Parameters); break; } case MT_PACKET_QUEUEING_NOTIFICATION: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Queueing_Notification_t), vector, writeIndex, &data->u.Packet_Queueing_Notification); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Queueing_Notification_t), vector, writeIndex, &data->u.Packet_Queueing_Notification); break; } case MT_PACKET_TIMESLOT_RECONFIGURE: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Timeslot_Reconfigure_t), vector, writeIndex, &data->u.Packet_Timeslot_Reconfigure); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Timeslot_Reconfigure_t), vector, writeIndex, &data->u.Packet_Timeslot_Reconfigure); break; } case MT_PACKET_TBF_RELEASE: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_TBF_Release_t), vector, writeIndex, &data->u.Packet_TBF_Release); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_TBF_Release_t), vector, writeIndex, &data->u.Packet_TBF_Release); break; } case MT_PACKET_UPLINK_ACK_NACK: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Ack_Nack_t), vector, writeIndex, &data->u.Packet_Uplink_Ack_Nack); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Ack_Nack_t), vector, writeIndex, &data->u.Packet_Uplink_Ack_Nack); break; } case MT_PACKET_UPLINK_ASSIGNMENT: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Assignment_t), vector, writeIndex, &data->u.Packet_Uplink_Assignment); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Assignment_t), vector, writeIndex, &data->u.Packet_Uplink_Assignment); break; } case MT_PACKET_HANDOVER_COMMAND: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Handover_Command_t), vector, writeIndex, &data->u.Packet_Handover_Command); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Handover_Command_t), vector, writeIndex, &data->u.Packet_Handover_Command); break; } case MT_PACKET_PHYSICAL_INFORMATION: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_PhysicalInformation_t), vector, writeIndex, &data->u.Packet_Handover_Command); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PhysicalInformation_t), vector, writeIndex, &data->u.Packet_Handover_Command); break; } case MT_PACKET_DOWNLINK_DUMMY_CONTROL_BLOCK: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Dummy_Control_Block_t), vector, writeIndex, &data->u.Packet_Downlink_Dummy_Control_Block); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Dummy_Control_Block_t), vector, writeIndex, &data->u.Packet_Downlink_Dummy_Control_Block); break; } case MT_PACKET_SYSTEM_INFO_1: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(PSI1_t), vector, writeIndex, &data->u.PSI1); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI1_t), vector, writeIndex, &data->u.PSI1); break; } case MT_PACKET_SYSTEM_INFO_2: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(PSI2_t), vector, writeIndex, &data->u.PSI2); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI2_t), vector, writeIndex, &data->u.PSI2); break; } case MT_PACKET_SYSTEM_INFO_3: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(PSI3_t), vector, writeIndex, &data->u.PSI3); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI3_t), vector, writeIndex, &data->u.PSI3); break; } case MT_PACKET_SYSTEM_INFO_5: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(PSI5_t), vector, writeIndex, &data->u.PSI5); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI5_t), vector, writeIndex, &data->u.PSI5); break; } case MT_PACKET_SYSTEM_INFO_13: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(PSI13_t), vector, writeIndex, &data->u.PSI13); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI13_t), vector, writeIndex, &data->u.PSI13); break; } default: - /*ret = -1;*/ + ret = -1; break; } + + if (ret > 0) { + LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by encoder at the end of bitvec\n", ret); + ret = 0; + } + + return ret; } void decode_gsm_rlcmac_uplink_data(bitvec * vector, RlcMacUplinkDataBlock_t * data) @@ -5525,7 +5562,15 @@ int decode_gsm_ra_cap(bitvec * vector, MS_Radio_Access_capability_t *data) { csnStream_t ar; + int ret; unsigned readIndex = 0; + csnStreamInit(&ar, 0, 8 * vector->data_len); - return csnStreamDecoder(&ar, CSNDESCR(MS_Radio_Access_capability_t), vector, readIndex, data); + ret = csnStreamDecoder(&ar, CSNDESCR(MS_Radio_Access_capability_t), vector, readIndex, data); + + if (ret > 0) { + LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by decoder at the end of bitvec\n", ret); + ret = 0; + } + return ret; } diff --git a/src/gsm_rlcmac.h b/src/gsm_rlcmac.h index 461fda3..e9b355d 100644 --- a/src/gsm_rlcmac.h +++ b/src/gsm_rlcmac.h @@ -5154,10 +5154,10 @@ } EnhancedMeasurementReport_t; - void decode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data); - void decode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data); - void encode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data); - void encode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data); + int decode_gsm_rlcmac_uplink(bitvec *vector, RlcMacUplink_t *data); + int decode_gsm_rlcmac_downlink(bitvec *vector, RlcMacDownlink_t *data); + int encode_gsm_rlcmac_downlink(bitvec *vector, RlcMacDownlink_t *data); + int encode_gsm_rlcmac_uplink(bitvec *vector, RlcMacUplink_t *data); void decode_gsm_rlcmac_uplink_data(bitvec * vector, RlcMacUplinkDataBlock_t * data); void encode_gsm_rlcmac_downlink_data(bitvec * vector, RlcMacDownlinkDataBlock_t * data); int decode_gsm_ra_cap(bitvec * vector, MS_Radio_Access_capability_t * data); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc Gerrit-Change-Number: 17085 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 18:28:00 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 18:28:00 +0000 Subject: Change in osmo-pcu[master]: Check return code of rlcmac decode/encode functions References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17086 ) Change subject: Check return code of rlcmac decode/encode functions ...................................................................... Check return code of rlcmac decode/encode functions Change-Id: Iabcb768bd714680aa768b35c786dea2015d1e451 --- M src/pdch.cpp M src/tbf.cpp M tests/rlcmac/RLCMACTest.cpp M tests/rlcmac/RLCMACTest.ok M tests/tbf/TbfTest.cpp 5 files changed, 116 insertions(+), 70 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/86/17086/1 diff --git a/src/pdch.cpp b/src/pdch.cpp index e15af2c..943e4a3 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -175,8 +175,11 @@ struct msgb *gprs_rlcmac_pdch::packet_paging_request() { struct gprs_rlcmac_paging *pag; + RlcMacDownlink_t *mac_control_block; + bitvec *pag_vec; struct msgb *msg; unsigned wp = 0, len; + int rc; /* no paging, no message */ pag = dequeue_paging(); @@ -191,7 +194,7 @@ talloc_free(pag); return NULL; } - bitvec *pag_vec = bitvec_alloc(23, tall_pcu_ctx); + pag_vec = bitvec_alloc(23, tall_pcu_ctx); if (!pag_vec) { msgb_free(msg); talloc_free(pag); @@ -240,15 +243,23 @@ } bitvec_pack(pag_vec, msgb_put(msg, 23)); - RlcMacDownlink_t * mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t); + mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t); LOGP(DRLCMAC, LOGL_DEBUG, "+++++++++++++++++++++++++ TX : Packet Paging Request +++++++++++++++++++++++++\n"); - decode_gsm_rlcmac_downlink(pag_vec, mac_control_block); - LOGPC(DCSN1, LOGL_NOTICE, "\n"); + rc = decode_gsm_rlcmac_downlink(pag_vec, mac_control_block); + if (rc < 0) { + LOGP(DRLCMAC, LOGL_ERROR, "Decoding of Tx Packet Paging Request failed (%d)\n", rc); + goto free_ret; + } LOGP(DRLCMAC, LOGL_DEBUG, "------------------------- TX : Packet Paging Request -------------------------\n"); bitvec_free(pag_vec); talloc_free(mac_control_block); - return msg; + +free_ret: + bitvec_free(pag_vec); + talloc_free(mac_control_block); + msgb_free(msg); + return NULL; } bool gprs_rlcmac_pdch::add_paging(uint8_t chan_needed, const uint8_t *mi, uint8_t mi_len) @@ -686,6 +697,7 @@ bitvec *rlc_block; RlcMacUplink_t *ul_control_block; unsigned len = cs.maxBytesUL(); + int rc; if (!(rlc_block = bitvec_alloc(len, tall_pcu_ctx))) return -ENOMEM; @@ -693,8 +705,12 @@ ul_control_block = (RlcMacUplink_t *)talloc_zero(tall_pcu_ctx, RlcMacUplink_t); LOGP(DRLCMAC, LOGL_DEBUG, "+++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++\n"); - decode_gsm_rlcmac_uplink(rlc_block, ul_control_block); - LOGPC(DCSN1, LOGL_NOTICE, "\n"); + rc = decode_gsm_rlcmac_uplink(rlc_block, ul_control_block); + if(rc < 0) { + LOGP(DRLCMACUL, LOGL_ERROR, "Dropping control block with invalid " + "content, decode failed: %d)\n", rc); + goto free_ret; + } LOGP(DRLCMAC, LOGL_DEBUG, "------------------------- RX : Uplink Control Block -------------------------\n"); if (ul_control_block->u.MESSAGE_TYPE == MT_PACKET_UPLINK_DUMMY_CONTROL_BLOCK) @@ -728,9 +744,10 @@ "RX: [PCU <- BTS] unknown control block(%d) received\n", ul_control_block->u.MESSAGE_TYPE); } +free_ret: talloc_free(ul_control_block); bitvec_free(rlc_block); - return 1; + return rc; } /* received RLC/MAC block from L1 */ diff --git a/src/tbf.cpp b/src/tbf.cpp index 61d8d58..747d51f 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1201,6 +1201,8 @@ { struct msgb *msg; struct gprs_rlcmac_dl_tbf *new_dl_tbf = NULL; + RlcMacDownlink_t *mac_control_block = NULL; + bitvec *ass_vec = NULL; int poll_ass_dl = 1; unsigned int rrbp = 0; uint32_t new_poll_fn = 0; @@ -1264,27 +1266,26 @@ msg = msgb_alloc(23, "rlcmac_dl_ass"); if (!msg) return NULL; - bitvec *ass_vec = bitvec_alloc(23, tall_pcu_ctx); - if (!ass_vec) { - msgb_free(msg); - return NULL; - } + ass_vec = bitvec_alloc(23, tall_pcu_ctx); + if (!ass_vec) + goto free_ret; bitvec_unhex(ass_vec, DUMMY_VEC); LOGPTBF(new_dl_tbf, LOGL_INFO, "start Packet Downlink Assignment (PACCH)\n"); - RlcMacDownlink_t * mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t); + mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t); Encoding::write_packet_downlink_assignment(mac_control_block, old_tfi_is_valid, m_tfi, (direction == GPRS_RLCMAC_DL_TBF), new_dl_tbf, poll_ass_dl, rrbp, bts_data()->alpha, bts_data()->gamma, -1, 0, is_egprs_enabled()); LOGP(DTBF, LOGL_DEBUG, "+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++\n"); - encode_gsm_rlcmac_downlink(ass_vec, mac_control_block); - LOGPC(DCSN1, LOGL_NOTICE, "\n"); + rc = encode_gsm_rlcmac_downlink(ass_vec, mac_control_block); + if (rc < 0) { + LOGP(DTBF, LOGL_ERROR, "Decoding of Tx Packet Downlink Ass failed (%d)\n", rc); + goto free_ret; + } LOGP(DTBF, LOGL_DEBUG, "------------------------- TX : Packet Downlink Assignment -------------------------\n"); bts->pkt_dl_assignemnt(); bitvec_pack(ass_vec, msgb_put(msg, 23)); - bitvec_free(ass_vec); - talloc_free(mac_control_block); if (poll_ass_dl) { set_polling(new_poll_fn, ts, GPRS_RLCMAC_POLL_DL_ASS); @@ -1297,7 +1298,15 @@ } + bitvec_free(ass_vec); + talloc_free(mac_control_block); return msg; + +free_ret: + bitvec_free(ass_vec); + talloc_free(mac_control_block); + msgb_free(msg); + return NULL; } struct msgb *gprs_rlcmac_tbf::create_packet_access_reject() @@ -1330,8 +1339,10 @@ struct msgb *gprs_rlcmac_tbf::create_ul_ass(uint32_t fn, uint8_t ts) { - struct msgb *msg; + struct msgb *msg = NULL; struct gprs_rlcmac_ul_tbf *new_tbf = NULL; + RlcMacDownlink_t *mac_control_block = NULL; + bitvec *ass_vec = NULL; int rc; unsigned int rrbp; uint32_t new_poll_fn; @@ -1360,29 +1371,37 @@ if (!msg) return NULL; LOGPTBF(new_tbf, LOGL_INFO, "start Packet Uplink Assignment (PACCH)\n"); - bitvec *ass_vec = bitvec_alloc(23, tall_pcu_ctx); - if (!ass_vec) { - msgb_free(msg); - return NULL; - } + ass_vec = bitvec_alloc(23, tall_pcu_ctx); + if (!ass_vec) + goto free_ret; bitvec_unhex(ass_vec, DUMMY_VEC); Encoding::write_packet_uplink_assignment(ass_vec, m_tfi, (direction == GPRS_RLCMAC_DL_TBF), tlli(), is_tlli_valid(), new_tbf, 1, rrbp, bts_data()->alpha, bts_data()->gamma, -1, is_egprs_enabled()); bitvec_pack(ass_vec, msgb_put(msg, 23)); - RlcMacDownlink_t * mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t); + + mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t); LOGP(DTBF, LOGL_DEBUG, "+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++\n"); - decode_gsm_rlcmac_downlink(ass_vec, mac_control_block); - LOGPC(DCSN1, LOGL_NOTICE, "\n"); + rc = decode_gsm_rlcmac_downlink(ass_vec, mac_control_block); + if (rc < 0) { + LOGP(DTBF, LOGL_ERROR, "Decoding of Tx Packet Uplink Ass failed (%d)\n", rc); + goto free_ret; + } LOGP(DTBF, LOGL_DEBUG, "------------------------- TX : Packet Uplink Assignment -------------------------\n"); bts->pkt_ul_assignment(); - bitvec_free(ass_vec); - talloc_free(mac_control_block); set_polling(new_poll_fn, ts, GPRS_RLCMAC_POLL_UL_ASS); + bitvec_free(ass_vec); + talloc_free(mac_control_block); return msg; + +free_ret: + bitvec_free(ass_vec); + talloc_free(mac_control_block); + msgb_free(msg); + return NULL; } void gprs_rlcmac_tbf::free_all(struct gprs_rlcmac_trx *trx) diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp index f911b09..926400b 100644 --- a/tests/rlcmac/RLCMACTest.cpp +++ b/tests/rlcmac/RLCMACTest.cpp @@ -93,6 +93,8 @@ void testRlcMacDownlink(void *test_ctx) { printf("*** %s ***\n", __func__); + + int rc; struct bitvec *resultVector = bitvec_alloc(23, test_ctx); bitvec_unhex(resultVector, DUMMY_VEC); @@ -121,11 +123,11 @@ RlcMacDownlink_t data; memset(&data, 0, sizeof(data)); cout << "=========Start DECODE===========" << endl; - decode_gsm_rlcmac_downlink(vector, &data); - cout << "+++++++++Finish DECODE++++++++++" << endl; + rc = decode_gsm_rlcmac_downlink(vector, &data); + cout << "+++++++++Finish DECODE ("<< rc <<")++++++++++" << endl; cout << "=========Start ENCODE=============" << endl; - encode_gsm_rlcmac_downlink(resultVector, &data); - cout << "+++++++++Finish ENCODE+++++++++++" << endl; + rc = encode_gsm_rlcmac_downlink(resultVector, &data); + cout << "+++++++++Finish ENCODE ("<< rc <<")+++++++++++" << endl; cout << "vector1 = " << osmo_hexdump(vector->data, 23) << endl; cout << "vector2 = " << osmo_hexdump(resultVector->data, 23) << endl; if (memcmp(vector->data, resultVector->data, 23) == 0) @@ -143,6 +145,8 @@ void testRlcMacUplink(void *test_ctx) { printf("*** %s ***\n", __func__); + + int rc; struct bitvec *resultVector = bitvec_alloc(23, test_ctx); bitvec_unhex(resultVector, DUMMY_VEC); @@ -167,11 +171,11 @@ RlcMacUplink_t data; memset(&data, 0, sizeof(data)); cout << "=========Start DECODE===========" << endl; - decode_gsm_rlcmac_uplink(vector, &data); - cout << "+++++++++Finish DECODE++++++++++" << endl; + rc = decode_gsm_rlcmac_uplink(vector, &data); + cout << "+++++++++Finish DECODE ("<< rc << ")++++++++++" << endl; cout << "=========Start ENCODE=============" << endl; - encode_gsm_rlcmac_uplink(resultVector, &data); - cout << "+++++++++Finish ENCODE+++++++++++" << endl; + rc = encode_gsm_rlcmac_uplink(resultVector, &data); + cout << "+++++++++Finish ENCODE ("<< rc <<")+++++++++++" << endl; cout << "vector1 = " << osmo_hexdump(vector->data, 23) << endl; cout << "vector2 = " << osmo_hexdump(resultVector->data, 23) << endl; if (memcmp(vector->data, resultVector->data, 23) == 0) @@ -188,9 +192,11 @@ void testCsnLeftAlignedVarBmpBounds(void *test_ctx) { printf("*** %s ***\n", __func__); + struct msgb *m = msgb_alloc(80, "test"); static uint8_t exp[] = { 0x7f, 0xff, 0xff, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; bitvec *vector = bitvec_alloc(23, test_ctx); + int rc; bitvec_unhex(vector, "40200bffd161003e0e519ffffffb800000000000000000"); RlcMacUplink_t data; @@ -198,7 +204,8 @@ EGPRS_AckNack_Desc_t *urbb = &data.u.Egprs_Packet_Downlink_Ack_Nack.EGPRS_AckNack.Desc; - decode_gsm_rlcmac_uplink(vector, &data); + rc = decode_gsm_rlcmac_uplink(vector, &data); + assert(rc == 0); memcpy(msgb_put(m, 13), urbb->URBB, 13); if (!msgb_eq_data_print(m, exp, 13)) diff --git a/tests/rlcmac/RLCMACTest.ok b/tests/rlcmac/RLCMACTest.ok index 5793d57..24ea4b7 100644 --- a/tests/rlcmac/RLCMACTest.ok +++ b/tests/rlcmac/RLCMACTest.ok @@ -2,81 +2,81 @@ DOWNLINK vector1 = 4e082500e3f1a81d080820800b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 4e 08 25 00 e3 f1 a8 1d 08 08 20 80 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 4e 08 25 00 e3 f1 a8 1d 08 08 20 80 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 48282407a6a07422720100032b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 48 28 24 07 a6 a0 74 22 72 01 00 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 48 28 24 07 a6 a0 74 22 72 01 00 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 47240c00400000000000000079eb2ac9402b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 47 24 0c 00 40 00 00 00 00 00 00 00 79 eb 2a c9 40 2b 2b 2b 2b 2b 2b vector2 = 47 24 0c 00 40 00 00 00 00 00 00 00 79 eb 2a c9 40 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 47283c367513ba333004242b2b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 47 28 3c 36 75 13 ba 33 30 04 24 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 47 28 3c 36 75 13 ba 33 30 04 24 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 400820001a3904df0680efb3300b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 08 20 00 1a 39 04 df 06 80 ef b3 30 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 40 08 20 00 1a 39 04 df 06 80 ef b3 30 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 40284f0000001009810c826f4406809dcecb2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 28 4f 00 00 00 10 09 81 0c 82 6f 44 06 80 9d ce cb 2b 2b 2b 2b 2b vector2 = 40 28 4f 00 00 00 10 09 81 0c 82 6f 44 06 80 9d ce cb 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 4024030f2f0000000087b0042b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 24 03 0f 2f 00 00 00 00 87 b0 04 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 40 24 03 0f 2f 00 00 00 00 87 b0 04 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 4913e00850884013a8048b2b2b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 49 13 e0 08 50 88 40 13 a8 04 8b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 49 13 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : FALSE vector1 = 412430007fffffffffffffffefd19c7ba12b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 41 24 30 00 7f ff ff ff ff ff ff ff ef d1 9c 7b a1 2b 2b 2b 2b 2b 2b vector2 = 41 24 30 00 7f ff ff ff ff ff ff ff ef d1 9c 7b a1 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 41942b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 41 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 41 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE @@ -84,41 +84,41 @@ UPLINK vector1 = 400e1e61d11d2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 0e 1e 61 d1 1d 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 40 0e 1e 61 d1 1d 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 400b8020000000000000002480e0032b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 0b 80 20 00 00 00 00 00 00 00 24 80 e0 03 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 40 0b 80 20 00 00 00 00 00 00 00 24 80 e0 03 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 4016713dc094270ca2ae57ef909006aa0fc0001f80222b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 16 71 3d c0 94 27 0c a2 ae 57 ef 90 90 06 aa 0f c0 00 1f 80 22 2b vector2 = 40 16 71 3d c0 94 27 0c a2 ae 57 ef 90 90 06 aa 0f c0 00 1f 80 22 2b vector1 == vector2 : TRUE vector1 = 40200ffc0021ec010b2b2b2b2b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 20 0f fc 00 21 ec 01 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 40 20 0f fc 00 21 ec 01 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 400a9020000000000000003010012a0800132b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 0a 90 20 00 00 00 00 00 00 00 30 10 01 2a 08 00 13 2b 2b 2b 2b 2b vector2 = 40 0a 90 20 00 00 00 00 00 00 00 30 10 01 2a 08 00 13 2b 2b 2b 2b 2b vector1 == vector2 : TRUE diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index bdbc138..4d9dff2 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -43,6 +43,7 @@ } #include +#include #define DUMMY_FN 2654167 @@ -615,7 +616,7 @@ rlc_block = bitvec_alloc(23, tall_pcu_ctx); - encode_gsm_rlcmac_uplink(rlc_block, ulreq); + OSMO_ASSERT(encode_gsm_rlcmac_uplink(rlc_block, ulreq) == 0); num_bytes = bitvec_pack(rlc_block, &buf[0]); OSMO_ASSERT(size_t(num_bytes) < sizeof(buf)); bitvec_free(rlc_block); @@ -2511,6 +2512,7 @@ RlcMacUplink_t ul_control_block; gprs_rlc_v_b *prlcmvb; gprs_rlc_dl_window *prlcdlwindow; + int rc; memset(&ul_control_block, 0, sizeof(RlcMacUplink_t)); @@ -2557,7 +2559,8 @@ bits.data_len = sizeof(bits_data); bits.cur_bit = 0; - decode_gsm_rlcmac_uplink(block, &ul_control_block); + rc = decode_gsm_rlcmac_uplink(block, &ul_control_block); + assert(rc == 0); ack_nack = &ul_control_block.u.Egprs_Packet_Downlink_Ack_Nack; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17086 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iabcb768bd714680aa768b35c786dea2015d1e451 Gerrit-Change-Number: 17086 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 18:28:00 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 18:28:00 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Transform a few LOGPC messages to LOGP References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17087 ) Change subject: rlcmac: Transform a few LOGPC messages to LOGP ...................................................................... rlcmac: Transform a few LOGPC messages to LOGP Those messages are self contained and don't need LOGPC. Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 --- M src/gsm_rlcmac.cpp 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/87/17087/1 diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index 2041e39..25f9072 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -4817,12 +4817,12 @@ if (payload_type == PAYLOAD_TYPE_DATA) { - LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); + LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); return -1; } else if (payload_type == PAYLOAD_TYPE_RESERVED) { - LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); + LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); return -1; } data->NrOfBits = 23 * 8; @@ -4938,12 +4938,12 @@ if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_DATA) { - LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); + LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); return -1; } else if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_RESERVED) { - LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); + LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); return -1; } /* We can decode the message */ @@ -5236,12 +5236,12 @@ if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_DATA) { - LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); + LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); return -1; } else if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_RESERVED) { - LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); + LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); return -1; } /* We can decode the message */ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 Gerrit-Change-Number: 17087 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 18:28:01 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 18:28:01 +0000 Subject: Change in osmo-pcu[master]: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17088 ) Change subject: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 ...................................................................... Fix trailing newline mess with LOGP(C) in rlcmac/csn1 Output was incorrect before this patch. LOPC was being called without having any initial LOGP, and trailing newline was usually missing at the end. Since csnDecoder/encoder functions are recursive, it's difficult to handle logging state in a coherent way inside them. Let's better simply control start/end of logging related topics in the callers of those functions, and simply use LOGPC everywhere in csn1.cpp. Change-Id: I50da7560939fac360b7545e2a6bfaf45ed0c4832 --- M src/csn1.cpp M src/gsm_rlcmac.cpp 2 files changed, 38 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/88/17088/1 diff --git a/src/csn1.cpp b/src/csn1.cpp index e97df92..d59030c 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -114,8 +114,9 @@ static gint16 ProcessError_impl(const char *file, int line, unsigned readIndex, const char* sz, gint16 err, const CSN_DESCR* pDescr) { + /* Don't add trailing newline, top caller is responsible for appending it */ if (err != CSN_OK) - LOGPSRC(DCSN1, LOGL_ERROR, file, line, "%s: error %s (%d) at %s (idx %d)\n", + LOGPSRC(DCSN1, LOGL_ERROR, file, line, "%s: error %s (%d) at %s (idx %d)", sz, get_value_string(csn1_error_names, err), err, pDescr ? pDescr->sz : "-", readIndex); return err; diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index 25f9072..753960b 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -4825,11 +4825,15 @@ LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); return -1; } + data->NrOfBits = 23 * 8; csnStreamInit(&ar, 0, data->NrOfBits); readIndex += 6; data->u.MESSAGE_TYPE = bitvec_read_field(vector, &readIndex, 6); readIndex = 0; + + /* recursive csnStreamDecoder call uses LOGPC everywhere, so we need to start the log somewhere... */ + LOGP(DCSN1, LOGL_INFO, "csnStreamDecoder (type=%d): ", data->u.MESSAGE_TYPE); switch (data->u.MESSAGE_TYPE) { case MT_PACKET_CELL_CHANGE_FAILURE: @@ -4913,6 +4917,10 @@ break; } + /* recursive csnStreamDecoder call uses LOGPC everywhere without trailing + newline, so as a caller we are responisble for submitting it */ + LOGPC(DCSN1, LOGL_INFO, "\n"); + if (ret > 0) { LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by decoder at the end of bitvec\n", ret); ret = 0; @@ -4983,6 +4991,9 @@ csnStreamInit(&ar, bit_offset, bit_length); + /* recursive csnStreamDecoder call uses LOGPC everywhere, so we need to start the log somewhere... */ + LOGP(DCSN1, LOGL_INFO, "csnStreamDecoder (type=%d): ", data->u.MESSAGE_TYPE); + switch (data->u.MESSAGE_TYPE) { case MT_PACKET_ACCESS_REJECT: @@ -5115,6 +5126,10 @@ break; } + /* recursive csnStreamDecoder call uses LOGPC everywhere without trailing + newline, so as a caller we are responisble for submitting it */ + LOGPC(DCSN1, LOGL_INFO, "\n"); + if (ret > 0) { LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by decoder at the end of bitvec\n", ret); ret = 0; @@ -5133,6 +5148,9 @@ data->NrOfBits = 23 * 8; csnStreamInit(&ar, 0, data->NrOfBits); writeIndex = 0; + + /* recursive csnStreamEncoder call uses LOGPC everywhere, so we need to start the log somewhere... */ + LOGP(DCSN1, LOGL_INFO, "csnStreamEncoder (type=%d): ", data->u.MESSAGE_TYPE); switch (data->u.MESSAGE_TYPE) { case MT_PACKET_CELL_CHANGE_FAILURE: @@ -5216,6 +5234,10 @@ break; } + /* recursive csnStreamDecoder call uses LOGPC everywhere without trailing + newline, so as a caller we are responisble for submitting it */ + LOGPC(DCSN1, LOGL_INFO, "\n"); + if (ret > 0) { LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by encoder at the end of bitvec\n", ret); ret = 0; @@ -5283,6 +5305,9 @@ csnStreamInit(&ar, bit_offset, bit_length); + + /* recursive csnStreamEncoder call uses LOGPC everywhere, so we need to start the log somewhere... */ + LOGP(DCSN1, LOGL_INFO, "csnStreamEncoder (type=%d): ", data->u.MESSAGE_TYPE); switch (data->u.MESSAGE_TYPE) { case MT_PACKET_ACCESS_REJECT: @@ -5415,6 +5440,10 @@ break; } + /* recursive csnStreamDecoder call uses LOGPC everywhere without trailing + newline, so as a caller we are responisble for submitting it */ + LOGPC(DCSN1, LOGL_INFO, "\n"); + if (ret > 0) { LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by encoder at the end of bitvec\n", ret); ret = 0; @@ -5566,8 +5595,15 @@ unsigned readIndex = 0; csnStreamInit(&ar, 0, 8 * vector->data_len); + + /* recursive csnStreamEncoder call uses LOGPC everywhere, so we need to start the log somewhere... */ + LOGP(DCSN1, LOGL_INFO, "csnStreamEncoder (RAcap): "); ret = csnStreamDecoder(&ar, CSNDESCR(MS_Radio_Access_capability_t), vector, readIndex, data); + /* recursive csnStreamDecoder call uses LOGPC everywhere without trailing + newline, so as a caller we are responisble for submitting it */ + LOGPC(DCSN1, LOGL_INFO, "\n"); + if (ret > 0) { LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by decoder at the end of bitvec\n", ret); ret = 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I50da7560939fac360b7545e2a6bfaf45ed0c4832 Gerrit-Change-Number: 17088 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 18:48:41 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 18:48:41 +0000 Subject: Change in libosmocore[master]: value_string: Switch val from unsigned to int References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17089 ) Change subject: value_string: Switch val from unsigned to int ...................................................................... value_string: Switch val from unsigned to int There's nothing really preventing a user from user negative values. Otherwise if we keep it like this then g++ is not happy when passing eg. { -2, "foobar" } when initializing a value_string array. Change-Id: I754fa7e054cb89801ef82edc82199dcfbe59c6ab --- M include/osmocom/core/utils.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/89/17089/1 diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 01c4de6..6f76e71 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -40,7 +40,7 @@ /*! A mapping between human-readable string and numeric value */ struct value_string { - unsigned int value; /*!< numeric value */ + int value; /*!< numeric value */ const char *str; /*!< human-readable string */ }; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I754fa7e054cb89801ef82edc82199dcfbe59c6ab Gerrit-Change-Number: 17089 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 3 18:49:21 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 3 Feb 2020 18:49:21 +0000 Subject: Change in osmo-pcu[master]: csn1.cpp: Rework ProcessError() function to print errors In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17084 ) Change subject: csn1.cpp: Rework ProcessError() function to print errors ...................................................................... Patch Set 1: This depends on libosmocore.git fix here: https://gerrit.osmocom.org/c/libosmocore/+/17089 value_string: Switch val from unsigned to int -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1ce2c52e2357841aa1f31babfdce9011435f866b Gerrit-Change-Number: 17084 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 03 Feb 2020 18:49:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 08:34:25 2020 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Tue, 4 Feb 2020 08:34:25 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g In-Reply-To: References: Message-ID: daniel has uploaded a new patch set (#13) to the change originally created by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 ) Change subject: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g ...................................................................... gprs_gmm_fsm.c: Implement RAT change between 2g and 3g Related: OS#2737 Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 --- M include/osmocom/sgsn/gprs_gmm_fsm.h M src/sgsn/gprs_gmm.c M src/sgsn/gprs_gmm_fsm.c 3 files changed, 64 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/87/15487/13 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 Gerrit-Change-Number: 15487 Gerrit-PatchSet: 13 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-CC: fixeria Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 09:08:11 2020 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Tue, 4 Feb 2020 09:08:11 +0000 Subject: Change in osmo-sgsn[master]: mm_state_gb_fsm: Handle implicit detach from mm_standby In-Reply-To: References: Message-ID: daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/17080 ) Change subject: mm_state_gb_fsm: Handle implicit detach from mm_standby ...................................................................... Patch Set 1: I'm not quite sure I understand. Do you want me to explain more why this is needed or do you doubt that it is? While refactoring the other patch I looked through the Iu and Gb FSMs and saw that in the Iu FSM the implicit detach event will always go to state DETACHED while in Gb it will not. Also the Gb FSM state STANDBY already has an out_state_mask which includes ST_MM_IDLE, but st_mm_standby() never transitions to it. Finally, st_mm_idle_on_enter() will clean up the llme, which is what we want to do during a RAT change. So apart from the last all are more meta-reasons for me. Another issu with this patch: src/sgsn/sgsn_libgtp.c:668 has an OSMO_ASSERT() on Gb FSM state not being IDLE. Will something break here? This could happen if an MS RAT-changes from 2G to 3G and back to 2G, right? The TTCN3 tests pass without this patch, so I moved it at the end to get the rest merged for the moment. -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/17080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I63d04a2dcdc17b4df6616c515641c435d919c787 Gerrit-Change-Number: 17080 Gerrit-PatchSet: 1 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 04 Feb 2020 09:08:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 09:08:46 2020 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Tue, 4 Feb 2020 09:08:46 +0000 Subject: Change in osmo-sgsn[master]: mm_state_gb_fsm: Handle implicit detach from mm_standby In-Reply-To: References: Message-ID: daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/17080 ) Change subject: mm_state_gb_fsm: Handle implicit detach from mm_standby ...................................................................... Patch Set 2: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/17080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I63d04a2dcdc17b4df6616c515641c435d919c787 Gerrit-Change-Number: 17080 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 04 Feb 2020 09:08:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 09:10:52 2020 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Tue, 4 Feb 2020 09:10:52 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g In-Reply-To: References: Message-ID: daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 ) Change subject: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g ...................................................................... Patch Set 13: (5 comments) https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm.c File src/sgsn/gprs_gmm.c: https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm.c at 1119 PS12, Line 1119: if (MSG_IU_UE_CTX(msg) && mmctx->ran_type != MM_CTX_T_UTRAN_Iu) > rat_chg.new_ran_type = MSG_IU_CTX(msg) ? Iu : Geran [?] Done https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm.c at 1257 PS12, Line 1257: ctx && > ctx is always valid here Done https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm.c at 1641 PS12, Line 1641: if (!mmctx_did_rat_change(mmctx, msg)) > Add a comment: Rat changes will trigger the E_GMM_COMMON_PROC_INIT_REQ later, protect it here from c [?] Done https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm.c at 1675 PS12, Line 1675: mmctx > mmctx is always valid here. Done https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm_fsm.c File src/sgsn/gprs_gmm_fsm.c: https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/12/src/sgsn/gprs_gmm_fsm.c at 173 PS12, Line 173: if (rat_chg->llme) > this if is not needed, llme should always be there in this case. Add an asert if you want. Done -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 Gerrit-Change-Number: 15487 Gerrit-PatchSet: 13 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-CC: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 04 Feb 2020 09:10:52 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: lynxis lazus Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 09:16:59 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 4 Feb 2020 09:16:59 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 ) Change subject: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g ...................................................................... Patch Set 13: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/13/src/sgsn/gprs_gmm.c File src/sgsn/gprs_gmm.c: https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/13/src/sgsn/gprs_gmm.c at 1254 PS13, Line 1254: if (mmctx_did_rat_change(ctx, msg)) { unneeded {} -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 Gerrit-Change-Number: 15487 Gerrit-PatchSet: 13 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Tue, 04 Feb 2020 09:16:59 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 09:25:54 2020 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Tue, 4 Feb 2020 09:25:54 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g In-Reply-To: References: Message-ID: daniel has uploaded a new patch set (#14) to the change originally created by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 ) Change subject: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g ...................................................................... gprs_gmm_fsm.c: Implement RAT change between 2g and 3g Related: OS#2737 Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 --- M include/osmocom/sgsn/gprs_gmm_fsm.h M src/sgsn/gprs_gmm.c M src/sgsn/gprs_gmm_fsm.c 3 files changed, 63 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/87/15487/14 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 Gerrit-Change-Number: 15487 Gerrit-PatchSet: 14 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 09:25:59 2020 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Tue, 4 Feb 2020 09:25:59 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g In-Reply-To: References: Message-ID: daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 ) Change subject: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g ...................................................................... Patch Set 13: (3 comments) https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/11/src/sgsn/gprs_gmm.c File src/sgsn/gprs_gmm.c: https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/11/src/sgsn/gprs_gmm.c at 1644 PS11, Line 1644: if (MSG_IU_UE_CTX(msg) && mmctx->ran_type != MM_CTX_T_UTRAN_Iu) > Thanks for the clarification. [?] Done https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/13/src/sgsn/gprs_gmm.c File src/sgsn/gprs_gmm.c: https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/13/src/sgsn/gprs_gmm.c at 1254 PS13, Line 1254: if (mmctx_did_rat_change(ctx, msg)) { > unneeded {} Done https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/11/src/sgsn/gprs_gmm_fsm.c File src/sgsn/gprs_gmm_fsm.c: https://gerrit.osmocom.org/c/osmo-sgsn/+/15487/11/src/sgsn/gprs_gmm_fsm.c at 165 PS11, Line 165: gmm_fsm_state_chg(fi, ST_GMM_DEREGISTERED); > It looks to me like we should just have a fall-through to the default: case in addition to setting t [?] Done? -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 Gerrit-Change-Number: 15487 Gerrit-PatchSet: 13 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Tue, 04 Feb 2020 09:25:59 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: lynxis lazus Comment-In-Reply-To: pespin Comment-In-Reply-To: daniel Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 09:58:59 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 4 Feb 2020 09:58:59 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 ) Change subject: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g ...................................................................... Patch Set 14: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 Gerrit-Change-Number: 15487 Gerrit-PatchSet: 14 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Tue, 04 Feb 2020 09:58:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 10:11:51 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 4 Feb 2020 10:11:51 +0000 Subject: Change in osmo-gsm-tester[master]: contrib: Add scripts to build srsLTE software In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17067 ) Change subject: contrib: Add scripts to build srsLTE software ...................................................................... contrib: Add scripts to build srsLTE software Change-Id: Id9d63920a44a80af187e649c9be5fd7498fa5f44 --- M contrib/jenkins-build-common.sh A contrib/jenkins-build-srslte.sh A suites/4g/mo_mt_sms.py A suites/4g/suite.conf D update_version.sh 5 files changed, 55 insertions(+), 14 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/contrib/jenkins-build-common.sh b/contrib/jenkins-build-common.sh index a9eaf7a..d64f92d 100644 --- a/contrib/jenkins-build-common.sh +++ b/contrib/jenkins-build-common.sh @@ -142,10 +142,18 @@ cd "$dep/${dir}" - set +x; echo; echo; set -x - autoreconf -fi - set +x; echo; echo; set -x - ./configure --prefix="$prefix" --with-systemdsystemunitdir=no $CONFIGURE_FLAGS $configure_opts + if [ -f configure.ac ]; then + set +x; echo; echo; set -x + autoreconf -fi + set +x; echo; echo; set -x + ./configure --prefix="$prefix" --with-systemdsystemunitdir=no $CONFIGURE_FLAGS $configure_opts + elif [ -f CMakeLists.txt ]; then + rm -rf build && mkdir build && cd build || exit 1 + set +x; echo; echo; set -x + cmake -DCMAKE_INSTALL_PREFIX=$prefix ../ + else + echo "Unknwown build system" && exit 1 + fi set +x; echo; echo; set -x make -j8 || make # libsmpp34 can't build in parallel set +x; echo; echo; set -x @@ -213,6 +221,9 @@ prune_files bin "$wanted_binaries_bin" prune_files sbin "$wanted_binaries_sbin" + # Drop all static libraries if exist: + rm -f $prefix_real/lib/*.a + rm -f $prefix_real/lib/*.la cd "$prefix_real" add_rpath diff --git a/contrib/jenkins-build-srslte.sh b/contrib/jenkins-build-srslte.sh new file mode 100755 index 0000000..258354d --- /dev/null +++ b/contrib/jenkins-build-srslte.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -e -x + +base="$PWD" +name="srslte" +git_url="https://github.com/srsLTE/" +. "$(dirname "$0")/jenkins-build-common.sh" + +#TODO: make sure libconfig, zeroMQ is installed +build_repo srsLTE + +create_bin_tgz "srsue srsenb srsepc" diff --git a/suites/4g/mo_mt_sms.py b/suites/4g/mo_mt_sms.py new file mode 100755 index 0000000..8aa4357 --- /dev/null +++ b/suites/4g/mo_mt_sms.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.testenv import * + +#epc = suite.epc() +#enb = suite.enb() +ue = suite.modem() + +#enb.start() +#epc.enb_add(enb) +#epc.start() + +#wait(epc.enb_is_connected, enb) + +#hss/epc.subscriber_add(ue) + +#ue.connect(epc.mcc_mnc()) +ue.connect() + + +print('waiting for modem to attach...') +#wait(ue.is_connected, msc.mcc_mnc()) +sleep(10) diff --git a/suites/4g/suite.conf b/suites/4g/suite.conf new file mode 100644 index 0000000..c55b610 --- /dev/null +++ b/suites/4g/suite.conf @@ -0,0 +1,6 @@ +resources: + ip_address: + - times: 1 + modem: + - times: 1 + type: srsue diff --git a/update_version.sh b/update_version.sh deleted file mode 100755 index 3d5fe42..0000000 --- a/update_version.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -e -git describe --abbrev=8 --dirty | sed 's/v\([^-]*\)-\([^-]*\)-\(.*\)/\1.dev\2.\3/' > version -cat version -echo "# osmo-gsm-tester version. -# Automatically generated by update_version.sh. -# Gets imported by __init__.py. - -_version = '$(cat version)'" \ - > src/osmo_gsm_tester/_version.py -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Id9d63920a44a80af187e649c9be5fd7498fa5f44 Gerrit-Change-Number: 17067 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 10:37:28 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 4 Feb 2020 10:37:28 +0000 Subject: Change in osmo-gsm-tester[master]: Introduce RemoteHost and refactor code to use it In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17065 to look at the new patch set (#3). Change subject: Introduce RemoteHost and refactor code to use it ...................................................................... Introduce RemoteHost and refactor code to use it Let's move code related to coping stuff to remote hosts and managing remote processes under a class where relevant information is stored. This simplifies parameters being passed all over and allows to reuse more code. Change-Id: Ifff5ded8fdb28e8ef267cebe6c5f30a910cae11a --- M src/osmo_gsm_tester/bts_oc2g.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/process.py A src/osmo_gsm_tester/remote.py 5 files changed, 170 insertions(+), 117 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/65/17065/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17065 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ifff5ded8fdb28e8ef267cebe6c5f30a910cae11a Gerrit-Change-Number: 17065 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 10:47:25 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 4 Feb 2020 10:47:25 +0000 Subject: Change in osmo-gsm-tester[master]: Re-add accidentally removed update_version.sh References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17090 ) Change subject: Re-add accidentally removed update_version.sh ...................................................................... Re-add accidentally removed update_version.sh Last commit removed this file accidentally. Change-Id: I030f927af26d4750e88662e591cde3eea6b810c7 --- A update_version.sh 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/90/17090/1 diff --git a/update_version.sh b/update_version.sh new file mode 100755 index 0000000..3d5fe42 --- /dev/null +++ b/update_version.sh @@ -0,0 +1,10 @@ +#!/bin/sh +set -e +git describe --abbrev=8 --dirty | sed 's/v\([^-]*\)-\([^-]*\)-\(.*\)/\1.dev\2.\3/' > version +cat version +echo "# osmo-gsm-tester version. +# Automatically generated by update_version.sh. +# Gets imported by __init__.py. + +_version = '$(cat version)'" \ + > src/osmo_gsm_tester/_version.py -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17090 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I030f927af26d4750e88662e591cde3eea6b810c7 Gerrit-Change-Number: 17090 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 10:51:32 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 4 Feb 2020 10:51:32 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Transform a few LOGPC messages to LOGP In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17087 ) Change subject: rlcmac: Transform a few LOGPC messages to LOGP ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17087/1/src/gsm_rlcmac.cpp File src/gsm_rlcmac.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17087/1/src/gsm_rlcmac.cpp at 4820 PS1, Line 4820: LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); Why the format strings missing \n? -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 Gerrit-Change-Number: 17087 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-Comment-Date: Tue, 04 Feb 2020 10:51:32 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 11:57:18 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 4 Feb 2020 11:57:18 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Transform a few LOGPC messages to LOGP In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17087 ) Change subject: rlcmac: Transform a few LOGPC messages to LOGP ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17087/1/src/gsm_rlcmac.cpp File src/gsm_rlcmac.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17087/1/src/gsm_rlcmac.cpp at 4820 PS1, Line 4820: LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); > Why the format strings missing \n? That's indeed wrong, thanks for catching. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 Gerrit-Change-Number: 17087 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Tue, 04 Feb 2020 11:57:18 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 12:49:02 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 4 Feb 2020 12:49:02 +0000 Subject: Change in osmo-gsm-tester[master]: Re-add accidentally removed update_version.sh In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17090 ) Change subject: Re-add accidentally removed update_version.sh ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17090 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I030f927af26d4750e88662e591cde3eea6b810c7 Gerrit-Change-Number: 17090 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 04 Feb 2020 12:49:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 12:49:05 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 4 Feb 2020 12:49:05 +0000 Subject: Change in osmo-gsm-tester[master]: Re-add accidentally removed update_version.sh In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17090 ) Change subject: Re-add accidentally removed update_version.sh ...................................................................... Re-add accidentally removed update_version.sh Last commit removed this file accidentally. Change-Id: I030f927af26d4750e88662e591cde3eea6b810c7 --- A update_version.sh 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/update_version.sh b/update_version.sh new file mode 100755 index 0000000..3d5fe42 --- /dev/null +++ b/update_version.sh @@ -0,0 +1,10 @@ +#!/bin/sh +set -e +git describe --abbrev=8 --dirty | sed 's/v\([^-]*\)-\([^-]*\)-\(.*\)/\1.dev\2.\3/' > version +cat version +echo "# osmo-gsm-tester version. +# Automatically generated by update_version.sh. +# Gets imported by __init__.py. + +_version = '$(cat version)'" \ + > src/osmo_gsm_tester/_version.py -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17090 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I030f927af26d4750e88662e591cde3eea6b810c7 Gerrit-Change-Number: 17090 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 14:17:58 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 4 Feb 2020 14:17:58 +0000 Subject: Change in libosmocore[master]: value_string: Switch val from unsigned to int In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17089 ) Change subject: value_string: Switch val from unsigned to int ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/17089/1/include/osmocom/core/utils.h File include/osmocom/core/utils.h: https://gerrit.osmocom.org/c/libosmocore/+/17089/1/include/osmocom/core/utils.h at 43 PS1, Line 43: /*!< numeric value */ Please make it aligned to the comment below. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I754fa7e054cb89801ef82edc82199dcfbe59c6ab Gerrit-Change-Number: 17089 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 04 Feb 2020 14:17:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 14:26:37 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 4 Feb 2020 14:26:37 +0000 Subject: Change in libosmocore[master]: value_string: Switch val from unsigned to int In-Reply-To: References: Message-ID: Hello fixeria, daniel, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/17089 to look at the new patch set (#2). Change subject: value_string: Switch val from unsigned to int ...................................................................... value_string: Switch val from unsigned to int There's nothing really preventing a user from user negative values. Otherwise if we keep it like this then g++ is not happy when passing eg. { -2, "foobar" } when initializing a value_string array. Change-Id: I754fa7e054cb89801ef82edc82199dcfbe59c6ab --- M include/osmocom/core/utils.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/89/17089/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I754fa7e054cb89801ef82edc82199dcfbe59c6ab Gerrit-Change-Number: 17089 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 14:41:12 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 4 Feb 2020 14:41:12 +0000 Subject: Change in libosmocore[master]: value_string: Switch val from unsigned to int In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17089 ) Change subject: value_string: Switch val from unsigned to int ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I754fa7e054cb89801ef82edc82199dcfbe59c6ab Gerrit-Change-Number: 17089 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 04 Feb 2020 14:41:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 15:09:18 2020 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Tue, 4 Feb 2020 15:09:18 +0000 Subject: Change in libosmocore[master]: value_string: Switch val from unsigned to int In-Reply-To: References: Message-ID: daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17089 ) Change subject: value_string: Switch val from unsigned to int ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I754fa7e054cb89801ef82edc82199dcfbe59c6ab Gerrit-Change-Number: 17089 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 04 Feb 2020 15:09:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 15:22:20 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 4 Feb 2020 15:22:20 +0000 Subject: Change in libosmocore[master]: value_string: Switch val from unsigned to int In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17089 ) Change subject: value_string: Switch val from unsigned to int ...................................................................... value_string: Switch val from unsigned to int There's nothing really preventing a user from user negative values. Otherwise if we keep it like this then g++ is not happy when passing eg. { -2, "foobar" } when initializing a value_string array. Change-Id: I754fa7e054cb89801ef82edc82199dcfbe59c6ab --- M include/osmocom/core/utils.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: daniel: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 01c4de6..40f4446 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -40,7 +40,7 @@ /*! A mapping between human-readable string and numeric value */ struct value_string { - unsigned int value; /*!< numeric value */ + int value; /*!< numeric value */ const char *str; /*!< human-readable string */ }; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17089 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I754fa7e054cb89801ef82edc82199dcfbe59c6ab Gerrit-Change-Number: 17089 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 18:01:57 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 4 Feb 2020 18:01:57 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Transform a few LOGPC messages to LOGP In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17087 to look at the new patch set (#2). Change subject: rlcmac: Transform a few LOGPC messages to LOGP ...................................................................... rlcmac: Transform a few LOGPC messages to LOGP Those messages are self contained and don't need LOGPC. Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 --- M src/gsm_rlcmac.cpp 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/87/17087/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 Gerrit-Change-Number: 17087 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 18:57:28 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 4 Feb 2020 18:57:28 +0000 Subject: Change in libosmocore[master]: tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17017 ) Change subject: tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() ...................................................................... Patch Set 2: > Patch Set 2: > > > Patch Set 2: > > > > is that ebcause app-specific nodes use negative values? > > No, the point is that they're not a part of node_type enum (their values are greater, AFAIR starting from NODE_TYPE_MAX + 1). If the values are greater, shouldn't then it be an unsigned int instead of an int? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ifb4c406c85d76a25fc53fc235484599aa87dc77c Gerrit-Change-Number: 17017 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Tue, 04 Feb 2020 18:57:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 23:23:41 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 4 Feb 2020 23:23:41 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_... References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17091 ) Change subject: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_field() ...................................................................... csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_field() As was discovered by pespin, changing logging level of DCSN1 makes the CSN.1 decoder behave differently (see OS4375). In particular, this makes RLCMACTest (encode / decode test) fail. I did a quick investigation and noticed that some of the logging statements call bitvec_read_field(). By definition this function moves the internal pointer (current bit position) of a given vector and increments readIndex by a given amount of bits. The problem is that LOGPC would not evaluate its format string if the logging message is not going to be printed, e.g. if a given logging level is lower than the current one, or in case if logging is not enabled at all. The first two conditional calls to bitvec_read_field() are related to CSN_PADDING_BITS, so that's not critical because padding is always in the end of messages. The later two are related to CSN_RECURSIVE_ARRAY and CSN_RECURSIVE_TARRAY respectively. Let's use bitvec_get_uint() instead to keep readIndex unchanged. Change-Id: Ia331048db9f790ca407fd341ced01df12d10a233 Fixes: OS#4375 --- M src/csn1.cpp 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/91/17091/1 diff --git a/src/csn1.cpp b/src/csn1.cpp index 1a3a530..12f9819 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -1153,13 +1153,13 @@ guint bits_to_handle = remaining_bits_len%8; if (bits_to_handle > 0) { - LOGPC(DCSN1, LOGL_NOTICE, "%" PRIu64 "|", bitvec_read_field(vector, &readIndex, bits_to_handle)); + LOGPC(DCSN1, LOGL_NOTICE, "%d|", bitvec_get_uint(vector, bits_to_handle)); remaining_bits_len -= bits_to_handle; bit_offset += bits_to_handle; } else if (bits_to_handle == 0) { - LOGPC(DCSN1, LOGL_NOTICE, "%" PRIu64 "|", bitvec_read_field(vector, &readIndex, 8)); + LOGPC(DCSN1, LOGL_NOTICE, "%d|", bitvec_get_uint(vector, 8)); remaining_bits_len -= 8; bit_offset += 8; } @@ -1247,7 +1247,7 @@ bit_offset += no_of_bits; } - LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)bitvec_read_field(vector, &readIndex, 1)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , bitvec_get_uint(vector, 1)); /* existNextElement() returned FALSE, 1 bit consumed */ bit_offset++; remaining_bits_len--; @@ -1300,7 +1300,7 @@ } } - LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)bitvec_read_field(vector, &readIndex, 1)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , bitvec_get_uint(vector, 1)); /* existNextElement() returned FALSE, 1 bit consumed */ bit_offset++; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ia331048db9f790ca407fd341ced01df12d10a233 Gerrit-Change-Number: 17091 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 23:45:50 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 4 Feb 2020 23:45:50 +0000 Subject: Change in osmo-pcu[master]: csn1.cpp: Rework ProcessError() function to print errors In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17084 ) Change subject: csn1.cpp: Rework ProcessError() function to print errors ...................................................................... Patch Set 1: Code-Review+1 Fine, however the existing code uses 2 spaces, not 4. I would CR+2, but... :) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1ce2c52e2357841aa1f31babfdce9011435f866b Gerrit-Change-Number: 17084 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 04 Feb 2020 23:45:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 4 23:53:04 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 4 Feb 2020 23:53:04 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Return error code from csn1 encoder/decoder In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17085 ) Change subject: rlcmac: Return error code from csn1 encoder/decoder ...................................................................... Patch Set 1: Code-Review+1 (5 comments) https://gerrit.osmocom.org/c/osmo-pcu/+/17085/1/src/gsm_rlcmac.cpp File src/gsm_rlcmac.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17085/1/src/gsm_rlcmac.cpp at 4821 PS1, Line 4821: -1 CSN_ERROR_GENERAL https://gerrit.osmocom.org/c/osmo-pcu/+/17085/1/src/gsm_rlcmac.cpp at 4942 PS1, Line 4942: -1 CSN_ERROR_GENERAL https://gerrit.osmocom.org/c/osmo-pcu/+/17085/1/src/gsm_rlcmac.cpp at 5114 PS1, Line 5114: -1 CSN_ERROR_GENERAL Also, would be nice to print a error message here (idea for a separate patch). https://gerrit.osmocom.org/c/osmo-pcu/+/17085/1/src/gsm_rlcmac.cpp at 5215 PS1, Line 5215: -1 same https://gerrit.osmocom.org/c/osmo-pcu/+/17085/1/src/gsm_rlcmac.cpp at 5219 PS1, Line 5219: ret > 0 Is this even possible in case of encoding? -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc Gerrit-Change-Number: 17085 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Tue, 04 Feb 2020 23:53:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 00:02:57 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 5 Feb 2020 00:02:57 +0000 Subject: Change in osmo-pcu[master]: Check return code of rlcmac decode/encode functions In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17086 ) Change subject: Check return code of rlcmac decode/encode functions ...................................................................... Patch Set 1: Code-Review+1 (7 comments) https://gerrit.osmocom.org/c/osmo-pcu/+/17086/1/src/pdch.cpp File src/pdch.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17086/1/src/pdch.cpp at 250 PS1, Line 250: Tx Downlink https://gerrit.osmocom.org/c/osmo-pcu/+/17086/1/src/pdch.cpp at 710 PS1, Line 710: control Uplink control https://gerrit.osmocom.org/c/osmo-pcu/+/17086/1/src/tbf.cpp File src/tbf.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17086/1/src/tbf.cpp at 1283 PS1, Line 1283: Tx This is redundant, the message already contains Downlink. https://gerrit.osmocom.org/c/osmo-pcu/+/17086/1/src/tbf.cpp at 1388 PS1, Line 1388: Tx same here https://gerrit.osmocom.org/c/osmo-pcu/+/17086/1/tests/rlcmac/RLCMACTest.cpp File tests/rlcmac/RLCMACTest.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17086/1/tests/rlcmac/RLCMACTest.cpp at 208 PS1, Line 208: assert Why not OSMO_ASSERT()? https://gerrit.osmocom.org/c/osmo-pcu/+/17086/1/tests/rlcmac/RLCMACTest.ok File tests/rlcmac/RLCMACTest.ok: https://gerrit.osmocom.org/c/osmo-pcu/+/17086/1/tests/rlcmac/RLCMACTest.ok at 66 PS1, Line 66: vector1 == vector2 : FALSE Just noticed this o_O. Is it expected? https://gerrit.osmocom.org/c/osmo-pcu/+/17086/1/tests/tbf/TbfTest.cpp File tests/tbf/TbfTest.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17086/1/tests/tbf/TbfTest.cpp at 2563 PS1, Line 2563: assert Why not OSMO_ASSERT? -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17086 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iabcb768bd714680aa768b35c786dea2015d1e451 Gerrit-Change-Number: 17086 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Wed, 05 Feb 2020 00:02:57 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 00:04:00 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 5 Feb 2020 00:04:00 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Transform a few LOGPC messages to LOGP In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17087 ) Change subject: rlcmac: Transform a few LOGPC messages to LOGP ...................................................................... Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17087/2/src/gsm_rlcmac.cpp File src/gsm_rlcmac.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17087/2/src/gsm_rlcmac.cpp at 5499 PS2, Line 5499: LOGPC LOGP -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 Gerrit-Change-Number: 17087 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 05 Feb 2020 00:04:00 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 00:08:22 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 5 Feb 2020 00:08:22 +0000 Subject: Change in osmo-pcu[master]: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17088 ) Change subject: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 ...................................................................... Patch Set 2: Code-Review+2 (2 comments) https://gerrit.osmocom.org/c/osmo-pcu/+/17088/2/src/gsm_rlcmac.cpp File src/gsm_rlcmac.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17088/2/src/gsm_rlcmac.cpp at 4828 PS2, Line 4828: ws https://gerrit.osmocom.org/c/osmo-pcu/+/17088/2/src/gsm_rlcmac.cpp at 4836 PS2, Line 4836: LOGL_INFO Huh, all LOGPC statements I've ever seen use NOTICE for some reason. Makes sense to use INFO for them too, or even DEBUG. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I50da7560939fac360b7545e2a6bfaf45ed0c4832 Gerrit-Change-Number: 17088 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Wed, 05 Feb 2020 00:08:22 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 10:35:03 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 5 Feb 2020 10:35:03 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17091 ) Change subject: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_field() ...................................................................... Patch Set 1: (1 comment) Can you please explain how did you verify that not advancing the pointer in bitvec_read_field() is the correct way to go? I seem to lack now that pointer being updated somewhere near by. https://gerrit.osmocom.org/c/osmo-pcu/+/17091/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-pcu/+/17091/1//COMMIT_MSG at 10 PS1, Line 10: the CSN.1 decoder behave differently (see OS4375). In particular, OS#4375 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ia331048db9f790ca407fd341ced01df12d10a233 Gerrit-Change-Number: 17091 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 05 Feb 2020 10:35:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 10:52:09 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 5 Feb 2020 10:52:09 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Return error code from csn1 encoder/decoder In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17085 ) Change subject: rlcmac: Return error code from csn1 encoder/decoder ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17085/1/src/gsm_rlcmac.cpp File src/gsm_rlcmac.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17085/1/src/gsm_rlcmac.cpp at 5219 PS1, Line 5219: ret > 0 > Is this even possible in case of encoding? Yes it's possible, at least one place returns "return remaining_bits_len;" -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc Gerrit-Change-Number: 17085 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 05 Feb 2020 10:52:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 11:06:18 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 5 Feb 2020 11:06:18 +0000 Subject: Change in osmo-pcu[master]: csn1.cpp: Rework ProcessError() function to print errors In-Reply-To: References: Message-ID: Hello fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17084 to look at the new patch set (#2). Change subject: csn1.cpp: Rework ProcessError() function to print errors ...................................................................... csn1.cpp: Rework ProcessError() function to print errors Same API is kept to more easily keep code compatibility with wireshark's packet-csn1.c implementation. Change-Id: I1ce2c52e2357841aa1f31babfdce9011435f866b --- M src/csn1.cpp 1 file changed, 26 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/84/17084/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1ce2c52e2357841aa1f31babfdce9011435f866b Gerrit-Change-Number: 17084 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 11:06:18 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 5 Feb 2020 11:06:18 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Return error code from csn1 encoder/decoder In-Reply-To: References: Message-ID: Hello fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17085 to look at the new patch set (#2). Change subject: rlcmac: Return error code from csn1 encoder/decoder ...................................................................... rlcmac: Return error code from csn1 encoder/decoder Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc --- M src/gsm_rlcmac.cpp M src/gsm_rlcmac.h 2 files changed, 143 insertions(+), 98 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/85/17085/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc Gerrit-Change-Number: 17085 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 11:06:18 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 5 Feb 2020 11:06:18 +0000 Subject: Change in osmo-pcu[master]: Check return code of rlcmac decode/encode functions In-Reply-To: References: Message-ID: Hello fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17086 to look at the new patch set (#2). Change subject: Check return code of rlcmac decode/encode functions ...................................................................... Check return code of rlcmac decode/encode functions Change-Id: Iabcb768bd714680aa768b35c786dea2015d1e451 --- M src/pdch.cpp M src/tbf.cpp M tests/rlcmac/RLCMACTest.cpp M tests/rlcmac/RLCMACTest.ok M tests/tbf/TbfTest.cpp 5 files changed, 115 insertions(+), 70 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/86/17086/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17086 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iabcb768bd714680aa768b35c786dea2015d1e451 Gerrit-Change-Number: 17086 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 11:06:18 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 5 Feb 2020 11:06:18 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Transform a few LOGPC messages to LOGP In-Reply-To: References: Message-ID: Hello fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17087 to look at the new patch set (#3). Change subject: rlcmac: Transform a few LOGPC messages to LOGP ...................................................................... rlcmac: Transform a few LOGPC messages to LOGP Those messages are self contained and don't need LOGPC. Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 --- M src/gsm_rlcmac.cpp 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/87/17087/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 Gerrit-Change-Number: 17087 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 11:06:18 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 5 Feb 2020 11:06:18 +0000 Subject: Change in osmo-pcu[master]: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 In-Reply-To: References: Message-ID: Hello fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17088 to look at the new patch set (#3). Change subject: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 ...................................................................... Fix trailing newline mess with LOGP(C) in rlcmac/csn1 Output was incorrect before this patch. LOPC was being called without having any initial LOGP, and trailing newline was usually missing at the end. Since csnDecoder/encoder functions are recursive, it's difficult to handle logging state in a coherent way inside them. Let's better simply control start/end of logging related topics in the callers of those functions, and simply use LOGPC everywhere in csn1.cpp. Change-Id: I50da7560939fac360b7545e2a6bfaf45ed0c4832 --- M src/csn1.cpp M src/gsm_rlcmac.cpp 2 files changed, 38 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/88/17088/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I50da7560939fac360b7545e2a6bfaf45ed0c4832 Gerrit-Change-Number: 17088 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 13:52:27 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 5 Feb 2020 13:52:27 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17091 ) Change subject: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_field() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ia331048db9f790ca407fd341ced01df12d10a233 Gerrit-Change-Number: 17091 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 05 Feb 2020 13:52:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 14:21:11 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 5 Feb 2020 14:21:11 +0000 Subject: Change in osmo-pcu[master]: csn1.cpp: Rework ProcessError() function to print errors In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17084 ) Change subject: csn1.cpp: Rework ProcessError() function to print errors ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1ce2c52e2357841aa1f31babfdce9011435f866b Gerrit-Change-Number: 17084 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 05 Feb 2020 14:21:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 14:24:08 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 5 Feb 2020 14:24:08 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Return error code from csn1 encoder/decoder In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17085 ) Change subject: rlcmac: Return error code from csn1 encoder/decoder ...................................................................... Patch Set 2: Code-Review+2 (2 comments) Not critical though. https://gerrit.osmocom.org/c/osmo-pcu/+/17085/2/src/gsm_rlcmac.cpp File src/gsm_rlcmac.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17085/2/src/gsm_rlcmac.cpp at 5114 PS2, Line 5114: ret = -1; Not addressed. https://gerrit.osmocom.org/c/osmo-pcu/+/17085/2/src/gsm_rlcmac.cpp at 5215 PS2, Line 5215: ret = -1; Not addressed. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc Gerrit-Change-Number: 17085 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 05 Feb 2020 14:24:08 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 14:31:48 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 5 Feb 2020 14:31:48 +0000 Subject: Change in osmo-pcu[master]: Check return code of rlcmac decode/encode functions In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17086 ) Change subject: Check return code of rlcmac decode/encode functions ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17086 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iabcb768bd714680aa768b35c786dea2015d1e451 Gerrit-Change-Number: 17086 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Wed, 05 Feb 2020 14:31:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 14:37:39 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 5 Feb 2020 14:37:39 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Transform a few LOGPC messages to LOGP In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17087 ) Change subject: rlcmac: Transform a few LOGPC messages to LOGP ...................................................................... Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17087/3/src/gsm_rlcmac.cpp File src/gsm_rlcmac.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17087/3/src/gsm_rlcmac.cpp at 5499 PS3, Line 5499: LOGPC LOGP? -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 Gerrit-Change-Number: 17087 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 05 Feb 2020 14:37:39 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 14:42:07 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 5 Feb 2020 14:42:07 +0000 Subject: Change in osmo-pcu[master]: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17088 ) Change subject: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 ...................................................................... Patch Set 3: Code-Review+1 We could alternatively move all logging to csnStreamDecoder(). -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I50da7560939fac360b7545e2a6bfaf45ed0c4832 Gerrit-Change-Number: 17088 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Wed, 05 Feb 2020 14:42:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 14:43:24 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 5 Feb 2020 14:43:24 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_... In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17091 to look at the new patch set (#2). Change subject: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_field() ...................................................................... csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_field() As was discovered by pespin, changing logging level of DCSN1 makes the CSN.1 decoder behave differently (see OS#4375). In particular, this makes RLCMACTest (encode / decode test) fail. I did a quick investigation and noticed that some of the logging statements call bitvec_read_field(). By definition this function moves the internal pointer (current bit position) of a given vector and increments readIndex by a given amount of bits. The problem is that LOGPC would not evaluate its format string if the logging message is not going to be printed, e.g. if a given logging level is lower than the current one, or in case if logging is not enabled at all. The first two conditional calls to bitvec_read_field() are related to CSN_PADDING_BITS, so that's not critical because padding is always in the end of messages. The later two are related to CSN_RECURSIVE_ARRAY and CSN_RECURSIVE_TARRAY respectively. Let's use bitvec_get_uint() instead to keep readIndex unchanged. Change-Id: Ia331048db9f790ca407fd341ced01df12d10a233 Fixes: OS#4375 --- M src/csn1.cpp 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/91/17091/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ia331048db9f790ca407fd341ced01df12d10a233 Gerrit-Change-Number: 17091 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 16:19:27 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 5 Feb 2020 16:19:27 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17091 ) Change subject: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_field() ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ia331048db9f790ca407fd341ced01df12d10a233 Gerrit-Change-Number: 17091 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 05 Feb 2020 16:19:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 16:24:07 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 5 Feb 2020 16:24:07 +0000 Subject: Change in osmo-pcu[master]: csn1.cpp: Rework ProcessError() function to print errors In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17084 ) Change subject: csn1.cpp: Rework ProcessError() function to print errors ...................................................................... csn1.cpp: Rework ProcessError() function to print errors Same API is kept to more easily keep code compatibility with wireshark's packet-csn1.c implementation. Change-Id: I1ce2c52e2357841aa1f31babfdce9011435f866b --- M src/csn1.cpp 1 file changed, 26 insertions(+), 23 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/csn1.cpp b/src/csn1.cpp index 1a3a530..d358286 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -37,6 +37,10 @@ #include "csn1.h" #include +extern "C" { +#include +#include +} #define pvDATA(_pv, _offset) ((void*) ((unsigned char*)_pv + _offset)) #define pui8DATA(_pv, _offset) ((guint8*) pvDATA(_pv, _offset)) @@ -92,35 +96,34 @@ ar->direction = 0; } -static const char* ErrCodes[] = -{ - "General 0", - "General -1", - "DATA_NOT VALID", - "IN SCRIPT", - "INVALID UNION INDEX", - "NEED_MORE BITS TO UNPACK", - "ILLEGAL BIT VALUE", - "Internal", - "STREAM_NOT_SUPPORTED", - "MESSAGE_TOO_LONG" +static const struct value_string csn1_error_names[] = { + { CSN_OK, "General 0" }, + { CSN_ERROR_GENERAL, "General -1" }, + { CSN_ERROR_DATA_NOT_VALID, "DATA_NOT VALID" }, + { CSN_ERROR_IN_SCRIPT, "IN SCRIPT" }, + { CSN_ERROR_INVALID_UNION_INDEX, "INVALID UNION INDEX" }, + { CSN_ERROR_NEED_MORE_BITS_TO_UNPACK, "NEED_MORE BITS TO UNPACK" }, + { CSN_ERROR_NEED_MORE_BITS_TO_UNPACK, "ILLEGAL BIT VALUE" }, + { CSN_ERROR_ILLEGAL_BIT_VALUE, "Internal" }, + { CSN_ERROR_STREAM_NOT_SUPPORTED, "STREAM_NOT_SUPPORTED" }, + { CSN_ERROR_MESSAGE_TOO_LONG, "MESSAGE_TOO_LONG" }, + { 0, NULL } }; -static gint16 -ProcessError( unsigned readIndex, const char* sz, gint16 err, const CSN_DESCR* pDescr) + +static gint16 ProcessError_impl(const char *file, int line, unsigned readIndex, + const char* sz, gint16 err, const CSN_DESCR* pDescr) { - gint16 i = MIN(-err, ((gint16) ElementsOf(ErrCodes)-1)); - if (i >= 0) - { - //LOG(ERR) << sz << "Error code: "<< ErrCodes[i] << pDescr?(pDescr->sz):"-"; - } - else - { - //LOG(ERR) << sz << ": " << pDescr?(pDescr->sz):"-"; - } + if (err != CSN_OK) + LOGPSRC(DCSN1, LOGL_ERROR, file, line, "%s: error %s (%d) at %s (idx %d)\n", + sz, get_value_string(csn1_error_names, err), err, + pDescr ? pDescr->sz : "-", readIndex); return err; } +#define ProcessError(readIndex, sz, err, pDescr) \ + ProcessError_impl(__FILE__, __LINE__, readIndex, sz, err, pDescr) + /** * ================================================================================================ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17084 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1ce2c52e2357841aa1f31babfdce9011435f866b Gerrit-Change-Number: 17084 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 16:28:15 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 5 Feb 2020 16:28:15 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Return error code from csn1 encoder/decoder In-Reply-To: References: Message-ID: Hello fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17085 to look at the new patch set (#3). Change subject: rlcmac: Return error code from csn1 encoder/decoder ...................................................................... rlcmac: Return error code from csn1 encoder/decoder Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc --- M src/gsm_rlcmac.cpp M src/gsm_rlcmac.h 2 files changed, 143 insertions(+), 98 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/85/17085/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc Gerrit-Change-Number: 17085 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 16:28:15 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 5 Feb 2020 16:28:15 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Transform a few LOGPC messages to LOGP In-Reply-To: References: Message-ID: Hello fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17087 to look at the new patch set (#4). Change subject: rlcmac: Transform a few LOGPC messages to LOGP ...................................................................... rlcmac: Transform a few LOGPC messages to LOGP Those messages are self contained and don't need LOGPC. Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 --- M src/gsm_rlcmac.cpp 1 file changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/87/17087/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 Gerrit-Change-Number: 17087 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 17:46:37 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 5 Feb 2020 17:46:37 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Return error code from csn1 encoder/decoder In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17085 ) Change subject: rlcmac: Return error code from csn1 encoder/decoder ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc Gerrit-Change-Number: 17085 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 05 Feb 2020 17:46:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 17:47:35 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 5 Feb 2020 17:47:35 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Transform a few LOGPC messages to LOGP In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17087 ) Change subject: rlcmac: Transform a few LOGPC messages to LOGP ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 Gerrit-Change-Number: 17087 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 05 Feb 2020 17:47:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 5 18:06:52 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 5 Feb 2020 18:06:52 +0000 Subject: Change in libosmocore[master]: tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() In-Reply-To: References: Message-ID: Hello neels, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/17017 to look at the new patch set (#3). Change subject: tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() ...................................................................... tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() Some osmo-* applications may need to use their own VTY node as a parent for the timer configuration commands. Therefore it makes more sense to use 'unsigned int' instead of 'enum node_type'. Let's also clarify that osmo_tdef_vty_groups_init() accepts parent node for configuration commands only: 'parent_node' -> 'parent_cfg_node'. Change-Id: Ifb4c406c85d76a25fc53fc235484599aa87dc77c --- M include/osmocom/vty/tdef_vty.h M src/vty/tdef_vty.c 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/17017/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ifb4c406c85d76a25fc53fc235484599aa87dc77c Gerrit-Change-Number: 17017 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 10:27:10 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 6 Feb 2020 10:27:10 +0000 Subject: Change in osmo-pcu[master]: VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/16347 to look at the new patch set (#3). Change subject: VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() ...................................................................... VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() Since I2b32b4fe20732728db6e9cdac7e484d96ab86dc5, go_parent_cb() is completely optional. It no longer has the task to determine the correct parent node. The is_config_node() callback is no longer needed too. Get rid of them. Since Ic5e69a396df659933fd4d50298b9925e837a6861 we depend on 1.3.0. Change-Id: Id7ce8c4e1ac43747ad40a06d01433c366da07b42 --- M src/pcu_vty.c 1 file changed, 0 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/47/16347/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id7ce8c4e1ac43747ad40a06d01433c366da07b42 Gerrit-Change-Number: 16347 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 10:27:12 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 6 Feb 2020 10:27:12 +0000 Subject: Change in osmo-pcu[master]: VTY: install talloc context introspection commands References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17092 ) Change subject: VTY: install talloc context introspection commands ...................................................................... VTY: install talloc context introspection commands Change-Id: I2e1e26be1162b0fb695969e5ac265704adaf9d5c --- M src/pcu_main.cpp M src/pcu_vty.c 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/92/17092/1 diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp index 9b1319c..a33b655 100644 --- a/src/pcu_main.cpp +++ b/src/pcu_main.cpp @@ -269,6 +269,7 @@ gprs_ns_set_log_ss(DNS); bssgp_set_log_ss(DBSSGP); + pcu_vty_info.tall_ctx = tall_pcu_ctx; vty_init(&pcu_vty_info); pcu_vty_init(); diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 94215d7..9cae777 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -1210,6 +1210,7 @@ logging_vty_add_cmds(); osmo_stats_vty_add_cmds(); + osmo_talloc_vty_add_cmds(); install_node(&pcu_node, config_write_pcu); install_element(CONFIG_NODE, &cfg_pcu_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I2e1e26be1162b0fb695969e5ac265704adaf9d5c Gerrit-Change-Number: 17092 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 10:27:13 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 6 Feb 2020 10:27:13 +0000 Subject: Change in osmo-pcu[master]: pcu_sock: fix memleak, allocate pcu_sock_state on stack References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17093 ) Change subject: pcu_sock: fix memleak, allocate pcu_sock_state on stack ...................................................................... pcu_sock: fix memleak, allocate pcu_sock_state on stack It was noticed that OsmoPCU leaks memory when trying to reconnect to the BTS. It could be easily fixed, but we don't really need to allocate the PCU socket state on heap as we never have more than one connection. Change-Id: Iea8930f443caa16f522f7c5375e0004e4e2315cb --- M src/osmobts_sock.cpp 1 file changed, 26 insertions(+), 54 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/93/17093/1 diff --git a/src/osmobts_sock.cpp b/src/osmobts_sock.cpp index 20fb174..2844472 100644 --- a/src/osmobts_sock.cpp +++ b/src/osmobts_sock.cpp @@ -26,7 +26,6 @@ #include #include extern "C" { -#include #include #include #include @@ -42,8 +41,6 @@ #include #include -extern void *tall_pcu_ctx; - extern "C" { int l1if_close_pdch(void *obj); } @@ -52,11 +49,11 @@ * osmo-bts PCU socket functions */ -struct pcu_sock_state { +static struct { struct osmo_fd conn_bfd; /* fd for connection to lcr */ struct osmo_timer_list timer; /* socket connect retry timer */ struct llist_head upqueue; /* queue for sending messages */ -} *pcu_sock_state = NULL; +} pcu_sock_state; static void pcu_sock_timeout(void *_priv) { @@ -66,40 +63,33 @@ static void pcu_tx_txt_retry(void *_priv) { struct gprs_rlcmac_bts *bts = bts_main_data(); - struct pcu_sock_state *state = pcu_sock_state; if (bts->active) return; pcu_tx_txt_ind(PCU_VERSION, "%s", PACKAGE_VERSION); - osmo_timer_schedule(&state->timer, 5, 0); + osmo_timer_schedule(&pcu_sock_state.timer, 5, 0); } int pcu_sock_send(struct msgb *msg) { - struct pcu_sock_state *state = pcu_sock_state; struct osmo_fd *conn_bfd; - if (!state) { - LOGP(DL1IF, LOGL_NOTICE, "PCU socket not created, dropping " - "message\n"); - return -EINVAL; - } - conn_bfd = &state->conn_bfd; + conn_bfd = &pcu_sock_state.conn_bfd; if (conn_bfd->fd <= 0) { LOGP(DL1IF, LOGL_NOTICE, "PCU socket not connected, dropping " "message\n"); return -EIO; } - msgb_enqueue(&state->upqueue, msg); + msgb_enqueue(&pcu_sock_state.upqueue, msg); conn_bfd->when |= BSC_FD_WRITE; return 0; } -static void pcu_sock_close(struct pcu_sock_state *state, int lost) +static void pcu_sock_close(int lost) { - struct osmo_fd *bfd = &state->conn_bfd; + struct osmo_fd *bfd = &pcu_sock_state.conn_bfd; struct gprs_rlcmac_bts *bts = bts_main_data(); uint8_t trx, ts; @@ -111,10 +101,8 @@ osmo_fd_unregister(bfd); /* flush the queue */ - while (!llist_empty(&state->upqueue)) { - struct msgb *msg = msgb_dequeue(&state->upqueue); - msgb_free(msg); - } + while (!llist_empty(&pcu_sock_state.upqueue)) + msgb_free(msgb_dequeue(&pcu_sock_state.upqueue)); /* disable all slots, kick all TBFs */ for (trx = 0; trx < 8; trx++) { @@ -137,7 +125,6 @@ static int pcu_sock_read(struct osmo_fd *bfd) { - struct pcu_sock_state *state = (struct pcu_sock_state *)bfd->data; struct gsm_pcu_if pcu_prim; int rc; @@ -145,7 +132,7 @@ if (rc < 0 && errno == EAGAIN) return 0; /* Try again later */ if (rc <= 0) { - pcu_sock_close(state, 1); + pcu_sock_close(1); return -EIO; } @@ -154,15 +141,14 @@ static int pcu_sock_write(struct osmo_fd *bfd) { - struct pcu_sock_state *state = (struct pcu_sock_state *)bfd->data; int rc; - while (!llist_empty(&state->upqueue)) { + while (!llist_empty(&pcu_sock_state.upqueue)) { struct msgb *msg, *msg2; struct gsm_pcu_if *pcu_prim; /* peek at the beginning of the queue */ - msg = llist_entry(state->upqueue.next, struct msgb, list); + msg = llist_entry(pcu_sock_state.upqueue.next, struct msgb, list); pcu_prim = (struct gsm_pcu_if *)msg->data; bfd->when &= ~BSC_FD_WRITE; @@ -188,14 +174,14 @@ dontsend: /* _after_ we send it, we can deueue */ - msg2 = msgb_dequeue(&state->upqueue); + msg2 = msgb_dequeue(&pcu_sock_state.upqueue); assert(msg == msg2); msgb_free(msg); } return 0; close: - pcu_sock_close(state, 1); + pcu_sock_close(1); return -1; } @@ -217,60 +203,46 @@ int pcu_l1if_open(void) { - struct pcu_sock_state *state; int rc; struct gprs_rlcmac_bts *bts = bts_main_data(); LOGP(DL1IF, LOGL_INFO, "Opening OsmoPCU L1 interface to OsmoBTS\n"); - state = pcu_sock_state; - if (!state) { - state = talloc_zero(tall_pcu_ctx, struct pcu_sock_state); - if (!state) - return -ENOMEM; - INIT_LLIST_HEAD(&state->upqueue); - } + memset(&pcu_sock_state, 0x00, sizeof(pcu_sock_state)); + INIT_LLIST_HEAD(&pcu_sock_state.upqueue); - rc = osmo_sock_unix_init_ofd(&state->conn_bfd, SOCK_SEQPACKET, 0, + rc = osmo_sock_unix_init_ofd(&pcu_sock_state.conn_bfd, SOCK_SEQPACKET, 0, bts->pcu_sock_path, OSMO_SOCK_F_CONNECT); if (rc < 0) { LOGP(DL1IF, LOGL_ERROR, "Failed to connect to the BTS (%s). " "Retrying...\n", bts->pcu_sock_path); - osmo_timer_setup(&state->timer, pcu_sock_timeout, NULL); - osmo_timer_schedule(&state->timer, 5, 0); + osmo_timer_setup(&pcu_sock_state.timer, pcu_sock_timeout, NULL); + osmo_timer_schedule(&pcu_sock_state.timer, 5, 0); return 0; } - state->conn_bfd.cb = pcu_sock_cb; - state->conn_bfd.data = state; + pcu_sock_state.conn_bfd.cb = pcu_sock_cb; + pcu_sock_state.conn_bfd.data = NULL; LOGP(DL1IF, LOGL_NOTICE, "osmo-bts PCU socket %s has been connected\n", bts->pcu_sock_path); - pcu_sock_state = state; - pcu_tx_txt_ind(PCU_VERSION, "%s", PACKAGE_VERSION); /* Schedule a timer so we keep trying until the BTS becomes active. */ - osmo_timer_setup(&state->timer, pcu_tx_txt_retry, NULL); - osmo_timer_schedule(&state->timer, 5, 0); + osmo_timer_setup(&pcu_sock_state.timer, pcu_tx_txt_retry, NULL); + osmo_timer_schedule(&pcu_sock_state.timer, 5, 0); return 0; } void pcu_l1if_close(void) { - struct pcu_sock_state *state = pcu_sock_state; struct osmo_fd *bfd; - if (!state) - return; + osmo_timer_del(&pcu_sock_state.timer); - osmo_timer_del(&state->timer); - - bfd = &state->conn_bfd; + bfd = &pcu_sock_state.conn_bfd; if (bfd->fd > 0) - pcu_sock_close(state, 0); - talloc_free(state); - pcu_sock_state = NULL; + pcu_sock_close(0); } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea8930f443caa16f522f7c5375e0004e4e2315cb Gerrit-Change-Number: 17093 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 10:27:14 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 6 Feb 2020 10:27:14 +0000 Subject: Change in osmo-pcu[master]: pcu_sock: cosmetic: fix typo in a comment message References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17094 ) Change subject: pcu_sock: cosmetic: fix typo in a comment message ...................................................................... pcu_sock: cosmetic: fix typo in a comment message Change-Id: Ia7e91d803152ac3f2af88f4552fced27f59d8270 --- M src/osmobts_sock.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/94/17094/1 diff --git a/src/osmobts_sock.cpp b/src/osmobts_sock.cpp index 2844472..d7aa71a 100644 --- a/src/osmobts_sock.cpp +++ b/src/osmobts_sock.cpp @@ -50,7 +50,7 @@ */ static struct { - struct osmo_fd conn_bfd; /* fd for connection to lcr */ + struct osmo_fd conn_bfd; /* fd for connection to the BTS */ struct osmo_timer_list timer; /* socket connect retry timer */ struct llist_head upqueue; /* queue for sending messages */ } pcu_sock_state; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ia7e91d803152ac3f2af88f4552fced27f59d8270 Gerrit-Change-Number: 17094 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 12:02:55 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 12:02:55 +0000 Subject: Change in libosmocore[master]: tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17017 ) Change subject: tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ifb4c406c85d76a25fc53fc235484599aa87dc77c Gerrit-Change-Number: 17017 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 12:02:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 12:04:20 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 12:04:20 +0000 Subject: Change in osmo-pcu[master]: VTY: install talloc context introspection commands In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17092 ) Change subject: VTY: install talloc context introspection commands ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I2e1e26be1162b0fb695969e5ac265704adaf9d5c Gerrit-Change-Number: 17092 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 12:04:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 12:11:52 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 12:11:52 +0000 Subject: Change in osmo-pcu[master]: pcu_sock: fix memleak, allocate pcu_sock_state on stack In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17093 ) Change subject: pcu_sock: fix memleak, allocate pcu_sock_state on stack ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17093/1/src/osmobts_sock.cpp File src/osmobts_sock.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17093/1/src/osmobts_sock.cpp at 104 PS1, Line 104: while (!llist_empty(&pcu_sock_state.upqueue)) Actually, calling msgb_queue_free(&pcu_sock_state.upqueue) is enough. Better keep old 2 lines ways and submit this change in a different commit. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea8930f443caa16f522f7c5375e0004e4e2315cb Gerrit-Change-Number: 17093 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 12:11:52 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 12:12:21 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 12:12:21 +0000 Subject: Change in osmo-pcu[master]: pcu_sock: cosmetic: fix typo in a comment message In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17094 ) Change subject: pcu_sock: cosmetic: fix typo in a comment message ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ia7e91d803152ac3f2af88f4552fced27f59d8270 Gerrit-Change-Number: 17094 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 12:12:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 12:36:55 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 12:36:55 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Return error code from csn1 encoder/decoder In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17085 ) Change subject: rlcmac: Return error code from csn1 encoder/decoder ...................................................................... rlcmac: Return error code from csn1 encoder/decoder Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc --- M src/gsm_rlcmac.cpp M src/gsm_rlcmac.h 2 files changed, 143 insertions(+), 98 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index 4550c47..ae2b7e4 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -4807,21 +4807,23 @@ M_UINT_LH (SI6_RestOctet_t, BandIndicator, 1), CSN_DESCR_END (SI6_RestOctet_t) -void decode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data) +/* Returns 0 on success, negative on error. */ +int decode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data) { csnStream_t ar; + int ret; unsigned readIndex = 0; guint8 payload_type = bitvec_read_field(vector, &readIndex, 2); if (payload_type == PAYLOAD_TYPE_DATA) { LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); - return; + return CSN_ERROR_GENERAL; } else if (payload_type == PAYLOAD_TYPE_RESERVED) { LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); - return; + return CSN_ERROR_GENERAL; } data->NrOfBits = 23 * 8; csnStreamInit(&ar, 0, data->NrOfBits); @@ -4837,88 +4839,98 @@ * CSNDESCR is an array that holds the different element types * ar is the csn context holding the bitcount, offset and output */ - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Failure_t), vector, readIndex, &data->u.Packet_Cell_Change_Failure); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Failure_t), vector, readIndex, &data->u.Packet_Cell_Change_Failure); break; } case MT_PACKET_CONTROL_ACK: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Control_Acknowledgement_t), vector, readIndex, &data->u.Packet_Control_Acknowledgement); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Control_Acknowledgement_t), vector, readIndex, &data->u.Packet_Control_Acknowledgement); break; } case MT_PACKET_DOWNLINK_ACK_NACK: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Ack_Nack_t), vector, readIndex, &data->u.Packet_Downlink_Ack_Nack); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Ack_Nack_t), vector, readIndex, &data->u.Packet_Downlink_Ack_Nack); break; } case MT_PACKET_UPLINK_DUMMY_CONTROL_BLOCK: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Dummy_Control_Block_t), vector, readIndex, &data->u.Packet_Uplink_Dummy_Control_Block); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Dummy_Control_Block_t), vector, readIndex, &data->u.Packet_Uplink_Dummy_Control_Block); break; } case MT_PACKET_MEASUREMENT_REPORT: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Measurement_Report_t), vector, readIndex, &data->u.Packet_Measurement_Report); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Measurement_Report_t), vector, readIndex, &data->u.Packet_Measurement_Report); break; } case MT_PACKET_RESOURCE_REQUEST: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Resource_Request_t), vector, readIndex, &data->u.Packet_Resource_Request); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Resource_Request_t), vector, readIndex, &data->u.Packet_Resource_Request); break; } case MT_PACKET_MOBILE_TBF_STATUS: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Mobile_TBF_Status_t), vector, readIndex, &data->u.Packet_Mobile_TBF_Status); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Mobile_TBF_Status_t), vector, readIndex, &data->u.Packet_Mobile_TBF_Status); break; } case MT_PACKET_PSI_STATUS: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_PSI_Status_t), vector, readIndex, &data->u.Packet_PSI_Status); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PSI_Status_t), vector, readIndex, &data->u.Packet_PSI_Status); break; } case MT_EGPRS_PACKET_DOWNLINK_ACK_NACK: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(EGPRS_PD_AckNack_t), vector, readIndex, &data->u.Egprs_Packet_Downlink_Ack_Nack); + ret = csnStreamDecoder(&ar, CSNDESCR(EGPRS_PD_AckNack_t), vector, readIndex, &data->u.Egprs_Packet_Downlink_Ack_Nack); break; } case MT_PACKET_PAUSE: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Pause_t), vector, readIndex, &data->u.Packet_Pause); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Pause_t), vector, readIndex, &data->u.Packet_Pause); break; } case MT_PACKET_ENHANCED_MEASUREMENT_REPORT: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Enh_Measurement_Report_t), vector, readIndex, &data->u.Packet_Enh_Measurement_Report); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Enh_Measurement_Report_t), vector, readIndex, &data->u.Packet_Enh_Measurement_Report); break; } case MT_ADDITIONAL_MS_RAC: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Additional_MS_Rad_Access_Cap_t), vector, readIndex, &data->u.Additional_MS_Rad_Access_Cap); + ret = csnStreamDecoder(&ar, CSNDESCR(Additional_MS_Rad_Access_Cap_t), vector, readIndex, &data->u.Additional_MS_Rad_Access_Cap); break; } case MT_PACKET_CELL_CHANGE_NOTIFICATION: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Notification_t), vector, readIndex, &data->u.Packet_Cell_Change_Notification); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Notification_t), vector, readIndex, &data->u.Packet_Cell_Change_Notification); break; } case MT_PACKET_SI_STATUS: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_SI_Status_t), vector, readIndex, &data->u.Packet_SI_Status); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_SI_Status_t), vector, readIndex, &data->u.Packet_SI_Status); break; } default: - /*ret = -1;*/ + ret = -1; break; } + + if (ret > 0) { + LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by decoder at the end of bitvec\n", ret); + ret = 0; + } + + return ret; } -void decode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data) +/* Returns 0 on success, negative on error. */ +int decode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data) { csnStream_t ar; /* See RLC/MAC downlink control block structure in TS 44.060 / 10.3.1 */ gint bit_offset = 0; gint bit_length; unsigned readIndex = 0; + int ret; + data->PAYLOAD_TYPE = bitvec_read_field(vector, &readIndex, 2); data->RRBP = bitvec_read_field(vector, &readIndex, 2); data->SP = bitvec_read_field(vector, &readIndex, 1); @@ -4927,12 +4939,12 @@ if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_DATA) { LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); - return; + return CSN_ERROR_GENERAL; } else if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_RESERVED) { LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); - return; + return CSN_ERROR_GENERAL; } /* We can decode the message */ else @@ -4975,139 +4987,149 @@ { case MT_PACKET_ACCESS_REJECT: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Access_Reject_t), vector, readIndex, &data->u.Packet_Access_Reject); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Access_Reject_t), vector, readIndex, &data->u.Packet_Access_Reject); break; } case MT_PACKET_CELL_CHANGE_ORDER: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Order_t), vector, readIndex, &data->u.Packet_Cell_Change_Order); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Order_t), vector, readIndex, &data->u.Packet_Cell_Change_Order); break; } case MT_PACKET_CELL_CHANGE_CONTINUE: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Continue_t), vector, readIndex, &data->u.Packet_Cell_Change_Continue); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Continue_t), vector, readIndex, &data->u.Packet_Cell_Change_Continue); break; } case MT_PACKET_DOWNLINK_ASSIGNMENT: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Assignment_t), vector, readIndex, &data->u.Packet_Downlink_Assignment); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Assignment_t), vector, readIndex, &data->u.Packet_Downlink_Assignment); break; } case MT_PACKET_MEASUREMENT_ORDER: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Measurement_Order_t), vector, readIndex, &data->u.Packet_Measurement_Order); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Measurement_Order_t), vector, readIndex, &data->u.Packet_Measurement_Order); break; } case MT_PACKET_NEIGHBOUR_CELL_DATA: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Neighbour_Cell_Data_t), vector, readIndex, &data->u.Packet_Neighbour_Cell_Data); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Neighbour_Cell_Data_t), vector, readIndex, &data->u.Packet_Neighbour_Cell_Data); break; } case MT_PACKET_SERVING_CELL_DATA: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Serving_Cell_Data_t), vector, readIndex, &data->u.Packet_Serving_Cell_Data); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Serving_Cell_Data_t), vector, readIndex, &data->u.Packet_Serving_Cell_Data); break; } case MT_PACKET_PAGING_REQUEST: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Paging_Request_t), vector, readIndex, &data->u.Packet_Paging_Request); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Paging_Request_t), vector, readIndex, &data->u.Packet_Paging_Request); break; } case MT_PACKET_PDCH_RELEASE: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_PDCH_Release_t), vector, readIndex, &data->u.Packet_PDCH_Release); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PDCH_Release_t), vector, readIndex, &data->u.Packet_PDCH_Release); break; } case MT_PACKET_POLLING_REQ: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Polling_Request_t), vector, readIndex, &data->u.Packet_Polling_Request); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Polling_Request_t), vector, readIndex, &data->u.Packet_Polling_Request); break; } case MT_PACKET_POWER_CONTROL_TIMING_ADVANCE: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Power_Control_Timing_Advance_t), vector, readIndex, &data->u.Packet_Power_Control_Timing_Advance); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Power_Control_Timing_Advance_t), vector, readIndex, &data->u.Packet_Power_Control_Timing_Advance); break; } case MT_PACKET_PRACH_PARAMETERS: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_PRACH_Parameters_t), vector, readIndex, &data->u.Packet_PRACH_Parameters); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PRACH_Parameters_t), vector, readIndex, &data->u.Packet_PRACH_Parameters); break; } case MT_PACKET_QUEUEING_NOTIFICATION: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Queueing_Notification_t), vector, readIndex, &data->u.Packet_Queueing_Notification); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Queueing_Notification_t), vector, readIndex, &data->u.Packet_Queueing_Notification); break; } case MT_PACKET_TIMESLOT_RECONFIGURE: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Timeslot_Reconfigure_t), vector, readIndex, &data->u.Packet_Timeslot_Reconfigure); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Timeslot_Reconfigure_t), vector, readIndex, &data->u.Packet_Timeslot_Reconfigure); break; } case MT_PACKET_TBF_RELEASE: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_TBF_Release_t), vector, readIndex, &data->u.Packet_TBF_Release); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_TBF_Release_t), vector, readIndex, &data->u.Packet_TBF_Release); break; } case MT_PACKET_UPLINK_ACK_NACK: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Ack_Nack_t), vector, readIndex, &data->u.Packet_Uplink_Ack_Nack); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Ack_Nack_t), vector, readIndex, &data->u.Packet_Uplink_Ack_Nack); break; } case MT_PACKET_UPLINK_ASSIGNMENT: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Assignment_t), vector, readIndex, &data->u.Packet_Uplink_Assignment); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Assignment_t), vector, readIndex, &data->u.Packet_Uplink_Assignment); break; } case MT_PACKET_HANDOVER_COMMAND: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Handover_Command_t), vector, readIndex, &data->u.Packet_Handover_Command); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Handover_Command_t), vector, readIndex, &data->u.Packet_Handover_Command); break; } case MT_PACKET_PHYSICAL_INFORMATION: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_PhysicalInformation_t), vector, readIndex, &data->u.Packet_Handover_Command); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PhysicalInformation_t), vector, readIndex, &data->u.Packet_Handover_Command); break; } case MT_PACKET_DOWNLINK_DUMMY_CONTROL_BLOCK: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Dummy_Control_Block_t), vector, readIndex, &data->u.Packet_Downlink_Dummy_Control_Block); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Dummy_Control_Block_t), vector, readIndex, &data->u.Packet_Downlink_Dummy_Control_Block); break; } case MT_PACKET_SYSTEM_INFO_1: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(PSI1_t), vector, readIndex, &data->u.PSI1); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI1_t), vector, readIndex, &data->u.PSI1); break; } case MT_PACKET_SYSTEM_INFO_2: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(PSI2_t), vector, readIndex, &data->u.PSI2); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI2_t), vector, readIndex, &data->u.PSI2); break; } case MT_PACKET_SYSTEM_INFO_3: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(PSI3_t), vector, readIndex, &data->u.PSI3); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI3_t), vector, readIndex, &data->u.PSI3); break; } case MT_PACKET_SYSTEM_INFO_5: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(PSI5_t), vector, readIndex, &data->u.PSI5); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI5_t), vector, readIndex, &data->u.PSI5); break; } case MT_PACKET_SYSTEM_INFO_13: { - /*ret =*/ csnStreamDecoder(&ar, CSNDESCR(PSI13_t), vector, readIndex, &data->u.PSI13); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI13_t), vector, readIndex, &data->u.PSI13); break; } default: - /*ret = -1;*/ + ret = CSN_ERROR_GENERAL; break; } + + if (ret > 0) { + LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by decoder at the end of bitvec\n", ret); + ret = 0; + } + + return ret; } -void encode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data) +/* Returns 0 on success, negative on error. */ +int encode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data) { csnStream_t ar; unsigned writeIndex = 0; + int ret; + data->NrOfBits = 23 * 8; csnStreamInit(&ar, 0, data->NrOfBits); writeIndex = 0; @@ -5120,85 +5142,93 @@ * CSNDESCR is an array that holds the different element types * ar is the csn context holding the bitcount, offset and output */ - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Failure_t), vector, writeIndex, &data->u.Packet_Cell_Change_Failure); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Failure_t), vector, writeIndex, &data->u.Packet_Cell_Change_Failure); break; } case MT_PACKET_CONTROL_ACK: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Control_Acknowledgement_t), vector, writeIndex, &data->u.Packet_Control_Acknowledgement); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Control_Acknowledgement_t), vector, writeIndex, &data->u.Packet_Control_Acknowledgement); break; } case MT_PACKET_DOWNLINK_ACK_NACK: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Ack_Nack_t), vector, writeIndex, &data->u.Packet_Downlink_Ack_Nack); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Ack_Nack_t), vector, writeIndex, &data->u.Packet_Downlink_Ack_Nack); break; } case MT_PACKET_UPLINK_DUMMY_CONTROL_BLOCK: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Dummy_Control_Block_t), vector, writeIndex, &data->u.Packet_Uplink_Dummy_Control_Block); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Dummy_Control_Block_t), vector, writeIndex, &data->u.Packet_Uplink_Dummy_Control_Block); break; } case MT_PACKET_MEASUREMENT_REPORT: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Measurement_Report_t), vector, writeIndex, &data->u.Packet_Measurement_Report); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Measurement_Report_t), vector, writeIndex, &data->u.Packet_Measurement_Report); break; } case MT_PACKET_RESOURCE_REQUEST: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Resource_Request_t), vector, writeIndex, &data->u.Packet_Resource_Request); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Resource_Request_t), vector, writeIndex, &data->u.Packet_Resource_Request); break; } case MT_PACKET_MOBILE_TBF_STATUS: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Mobile_TBF_Status_t), vector, writeIndex, &data->u.Packet_Mobile_TBF_Status); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Mobile_TBF_Status_t), vector, writeIndex, &data->u.Packet_Mobile_TBF_Status); break; } case MT_PACKET_PSI_STATUS: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_PSI_Status_t), vector, writeIndex, &data->u.Packet_PSI_Status); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PSI_Status_t), vector, writeIndex, &data->u.Packet_PSI_Status); break; } case MT_EGPRS_PACKET_DOWNLINK_ACK_NACK: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(EGPRS_PD_AckNack_t), vector, writeIndex, &data->u.Egprs_Packet_Downlink_Ack_Nack); + ret = csnStreamEncoder(&ar, CSNDESCR(EGPRS_PD_AckNack_t), vector, writeIndex, &data->u.Egprs_Packet_Downlink_Ack_Nack); break; } case MT_PACKET_PAUSE: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Pause_t), vector, writeIndex, &data->u.Packet_Pause); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Pause_t), vector, writeIndex, &data->u.Packet_Pause); break; } case MT_PACKET_ENHANCED_MEASUREMENT_REPORT: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Enh_Measurement_Report_t), vector, writeIndex, &data->u.Packet_Enh_Measurement_Report); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Enh_Measurement_Report_t), vector, writeIndex, &data->u.Packet_Enh_Measurement_Report); break; } case MT_ADDITIONAL_MS_RAC: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Additional_MS_Rad_Access_Cap_t), vector, writeIndex, &data->u.Additional_MS_Rad_Access_Cap); + ret = csnStreamEncoder(&ar, CSNDESCR(Additional_MS_Rad_Access_Cap_t), vector, writeIndex, &data->u.Additional_MS_Rad_Access_Cap); break; } case MT_PACKET_CELL_CHANGE_NOTIFICATION: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Notification_t), vector, writeIndex, &data->u.Packet_Cell_Change_Notification); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Notification_t), vector, writeIndex, &data->u.Packet_Cell_Change_Notification); break; } case MT_PACKET_SI_STATUS: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_SI_Status_t), vector, writeIndex, &data->u.Packet_SI_Status); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_SI_Status_t), vector, writeIndex, &data->u.Packet_SI_Status); break; } default: - /*ret = -1;*/ + ret = CSN_ERROR_GENERAL; break; } + + if (ret > 0) { + LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by encoder at the end of bitvec\n", ret); + ret = 0; + } + + return ret; } -void encode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data) +/* Returns 0 on success, negative on error. */ +int encode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data) { csnStream_t ar; - + int ret; /* See RLC/MAC downlink control block structure in TS 44.060 / 10.3.1 */ gint bit_offset = 0; gint bit_length; @@ -5207,12 +5237,12 @@ if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_DATA) { LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); - return; + return CSN_ERROR_GENERAL; } else if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_RESERVED) { LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); - return; + return CSN_ERROR_GENERAL; } /* We can decode the message */ else @@ -5257,133 +5287,140 @@ { case MT_PACKET_ACCESS_REJECT: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Access_Reject_t), vector, writeIndex, &data->u.Packet_Access_Reject); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Access_Reject_t), vector, writeIndex, &data->u.Packet_Access_Reject); break; } case MT_PACKET_CELL_CHANGE_ORDER: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Order_t), vector, writeIndex, &data->u.Packet_Cell_Change_Order); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Order_t), vector, writeIndex, &data->u.Packet_Cell_Change_Order); break; } case MT_PACKET_CELL_CHANGE_CONTINUE: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Continue_t), vector, writeIndex, &data->u.Packet_Cell_Change_Continue); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Continue_t), vector, writeIndex, &data->u.Packet_Cell_Change_Continue); break; } case MT_PACKET_DOWNLINK_ASSIGNMENT: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Assignment_t), vector, writeIndex, &data->u.Packet_Downlink_Assignment); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Assignment_t), vector, writeIndex, &data->u.Packet_Downlink_Assignment); break; } case MT_PACKET_MEASUREMENT_ORDER: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Measurement_Order_t), vector, writeIndex, &data->u.Packet_Measurement_Order); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Measurement_Order_t), vector, writeIndex, &data->u.Packet_Measurement_Order); break; } case MT_PACKET_NEIGHBOUR_CELL_DATA: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Neighbour_Cell_Data_t), vector, writeIndex, &data->u.Packet_Neighbour_Cell_Data); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Neighbour_Cell_Data_t), vector, writeIndex, &data->u.Packet_Neighbour_Cell_Data); break; } case MT_PACKET_SERVING_CELL_DATA: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Serving_Cell_Data_t), vector, writeIndex, &data->u.Packet_Serving_Cell_Data); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Serving_Cell_Data_t), vector, writeIndex, &data->u.Packet_Serving_Cell_Data); break; } case MT_PACKET_PAGING_REQUEST: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Paging_Request_t), vector, writeIndex, &data->u.Packet_Paging_Request); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Paging_Request_t), vector, writeIndex, &data->u.Packet_Paging_Request); break; } case MT_PACKET_PDCH_RELEASE: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_PDCH_Release_t), vector, writeIndex, &data->u.Packet_PDCH_Release); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PDCH_Release_t), vector, writeIndex, &data->u.Packet_PDCH_Release); break; } case MT_PACKET_POLLING_REQ: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Polling_Request_t), vector, writeIndex, &data->u.Packet_Polling_Request); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Polling_Request_t), vector, writeIndex, &data->u.Packet_Polling_Request); break; } case MT_PACKET_POWER_CONTROL_TIMING_ADVANCE: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Power_Control_Timing_Advance_t), vector, writeIndex, &data->u.Packet_Power_Control_Timing_Advance); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Power_Control_Timing_Advance_t), vector, writeIndex, &data->u.Packet_Power_Control_Timing_Advance); break; } case MT_PACKET_PRACH_PARAMETERS: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_PRACH_Parameters_t), vector, writeIndex, &data->u.Packet_PRACH_Parameters); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PRACH_Parameters_t), vector, writeIndex, &data->u.Packet_PRACH_Parameters); break; } case MT_PACKET_QUEUEING_NOTIFICATION: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Queueing_Notification_t), vector, writeIndex, &data->u.Packet_Queueing_Notification); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Queueing_Notification_t), vector, writeIndex, &data->u.Packet_Queueing_Notification); break; } case MT_PACKET_TIMESLOT_RECONFIGURE: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Timeslot_Reconfigure_t), vector, writeIndex, &data->u.Packet_Timeslot_Reconfigure); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Timeslot_Reconfigure_t), vector, writeIndex, &data->u.Packet_Timeslot_Reconfigure); break; } case MT_PACKET_TBF_RELEASE: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_TBF_Release_t), vector, writeIndex, &data->u.Packet_TBF_Release); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_TBF_Release_t), vector, writeIndex, &data->u.Packet_TBF_Release); break; } case MT_PACKET_UPLINK_ACK_NACK: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Ack_Nack_t), vector, writeIndex, &data->u.Packet_Uplink_Ack_Nack); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Ack_Nack_t), vector, writeIndex, &data->u.Packet_Uplink_Ack_Nack); break; } case MT_PACKET_UPLINK_ASSIGNMENT: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Assignment_t), vector, writeIndex, &data->u.Packet_Uplink_Assignment); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Assignment_t), vector, writeIndex, &data->u.Packet_Uplink_Assignment); break; } case MT_PACKET_HANDOVER_COMMAND: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Handover_Command_t), vector, writeIndex, &data->u.Packet_Handover_Command); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Handover_Command_t), vector, writeIndex, &data->u.Packet_Handover_Command); break; } case MT_PACKET_PHYSICAL_INFORMATION: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_PhysicalInformation_t), vector, writeIndex, &data->u.Packet_Handover_Command); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PhysicalInformation_t), vector, writeIndex, &data->u.Packet_Handover_Command); break; } case MT_PACKET_DOWNLINK_DUMMY_CONTROL_BLOCK: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Dummy_Control_Block_t), vector, writeIndex, &data->u.Packet_Downlink_Dummy_Control_Block); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Dummy_Control_Block_t), vector, writeIndex, &data->u.Packet_Downlink_Dummy_Control_Block); break; } case MT_PACKET_SYSTEM_INFO_1: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(PSI1_t), vector, writeIndex, &data->u.PSI1); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI1_t), vector, writeIndex, &data->u.PSI1); break; } case MT_PACKET_SYSTEM_INFO_2: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(PSI2_t), vector, writeIndex, &data->u.PSI2); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI2_t), vector, writeIndex, &data->u.PSI2); break; } case MT_PACKET_SYSTEM_INFO_3: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(PSI3_t), vector, writeIndex, &data->u.PSI3); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI3_t), vector, writeIndex, &data->u.PSI3); break; } case MT_PACKET_SYSTEM_INFO_5: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(PSI5_t), vector, writeIndex, &data->u.PSI5); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI5_t), vector, writeIndex, &data->u.PSI5); break; } case MT_PACKET_SYSTEM_INFO_13: { - /*ret =*/ csnStreamEncoder(&ar, CSNDESCR(PSI13_t), vector, writeIndex, &data->u.PSI13); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI13_t), vector, writeIndex, &data->u.PSI13); break; } default: - /*ret = -1;*/ + ret = -1; break; } + + if (ret > 0) { + LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by encoder at the end of bitvec\n", ret); + ret = 0; + } + + return ret; } void decode_gsm_rlcmac_uplink_data(bitvec * vector, RlcMacUplinkDataBlock_t * data) @@ -5525,7 +5562,15 @@ int decode_gsm_ra_cap(bitvec * vector, MS_Radio_Access_capability_t *data) { csnStream_t ar; + int ret; unsigned readIndex = 0; + csnStreamInit(&ar, 0, 8 * vector->data_len); - return csnStreamDecoder(&ar, CSNDESCR(MS_Radio_Access_capability_t), vector, readIndex, data); + ret = csnStreamDecoder(&ar, CSNDESCR(MS_Radio_Access_capability_t), vector, readIndex, data); + + if (ret > 0) { + LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by decoder at the end of bitvec\n", ret); + ret = 0; + } + return ret; } diff --git a/src/gsm_rlcmac.h b/src/gsm_rlcmac.h index 461fda3..e9b355d 100644 --- a/src/gsm_rlcmac.h +++ b/src/gsm_rlcmac.h @@ -5154,10 +5154,10 @@ } EnhancedMeasurementReport_t; - void decode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data); - void decode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data); - void encode_gsm_rlcmac_downlink(bitvec * vector, RlcMacDownlink_t * data); - void encode_gsm_rlcmac_uplink(bitvec * vector, RlcMacUplink_t * data); + int decode_gsm_rlcmac_uplink(bitvec *vector, RlcMacUplink_t *data); + int decode_gsm_rlcmac_downlink(bitvec *vector, RlcMacDownlink_t *data); + int encode_gsm_rlcmac_downlink(bitvec *vector, RlcMacDownlink_t *data); + int encode_gsm_rlcmac_uplink(bitvec *vector, RlcMacUplink_t *data); void decode_gsm_rlcmac_uplink_data(bitvec * vector, RlcMacUplinkDataBlock_t * data); void encode_gsm_rlcmac_downlink_data(bitvec * vector, RlcMacDownlinkDataBlock_t * data); int decode_gsm_ra_cap(bitvec * vector, MS_Radio_Access_capability_t * data); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17085 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc Gerrit-Change-Number: 17085 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 12:36:56 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 12:36:56 +0000 Subject: Change in osmo-pcu[master]: Check return code of rlcmac decode/encode functions In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17086 ) Change subject: Check return code of rlcmac decode/encode functions ...................................................................... Check return code of rlcmac decode/encode functions Change-Id: Iabcb768bd714680aa768b35c786dea2015d1e451 --- M src/pdch.cpp M src/tbf.cpp M tests/rlcmac/RLCMACTest.cpp M tests/rlcmac/RLCMACTest.ok M tests/tbf/TbfTest.cpp 5 files changed, 115 insertions(+), 70 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/pdch.cpp b/src/pdch.cpp index e15af2c..f4544b2 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -175,8 +175,11 @@ struct msgb *gprs_rlcmac_pdch::packet_paging_request() { struct gprs_rlcmac_paging *pag; + RlcMacDownlink_t *mac_control_block; + bitvec *pag_vec; struct msgb *msg; unsigned wp = 0, len; + int rc; /* no paging, no message */ pag = dequeue_paging(); @@ -191,7 +194,7 @@ talloc_free(pag); return NULL; } - bitvec *pag_vec = bitvec_alloc(23, tall_pcu_ctx); + pag_vec = bitvec_alloc(23, tall_pcu_ctx); if (!pag_vec) { msgb_free(msg); talloc_free(pag); @@ -240,15 +243,23 @@ } bitvec_pack(pag_vec, msgb_put(msg, 23)); - RlcMacDownlink_t * mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t); + mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t); LOGP(DRLCMAC, LOGL_DEBUG, "+++++++++++++++++++++++++ TX : Packet Paging Request +++++++++++++++++++++++++\n"); - decode_gsm_rlcmac_downlink(pag_vec, mac_control_block); - LOGPC(DCSN1, LOGL_NOTICE, "\n"); + rc = decode_gsm_rlcmac_downlink(pag_vec, mac_control_block); + if (rc < 0) { + LOGP(DRLCMAC, LOGL_ERROR, "Decoding of Downlink Packet Paging Request failed (%d)\n", rc); + goto free_ret; + } LOGP(DRLCMAC, LOGL_DEBUG, "------------------------- TX : Packet Paging Request -------------------------\n"); bitvec_free(pag_vec); talloc_free(mac_control_block); - return msg; + +free_ret: + bitvec_free(pag_vec); + talloc_free(mac_control_block); + msgb_free(msg); + return NULL; } bool gprs_rlcmac_pdch::add_paging(uint8_t chan_needed, const uint8_t *mi, uint8_t mi_len) @@ -686,6 +697,7 @@ bitvec *rlc_block; RlcMacUplink_t *ul_control_block; unsigned len = cs.maxBytesUL(); + int rc; if (!(rlc_block = bitvec_alloc(len, tall_pcu_ctx))) return -ENOMEM; @@ -693,8 +705,12 @@ ul_control_block = (RlcMacUplink_t *)talloc_zero(tall_pcu_ctx, RlcMacUplink_t); LOGP(DRLCMAC, LOGL_DEBUG, "+++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++\n"); - decode_gsm_rlcmac_uplink(rlc_block, ul_control_block); - LOGPC(DCSN1, LOGL_NOTICE, "\n"); + rc = decode_gsm_rlcmac_uplink(rlc_block, ul_control_block); + if(rc < 0) { + LOGP(DRLCMACUL, LOGL_ERROR, "Dropping Uplink Control Block with invalid " + "content, decode failed: %d)\n", rc); + goto free_ret; + } LOGP(DRLCMAC, LOGL_DEBUG, "------------------------- RX : Uplink Control Block -------------------------\n"); if (ul_control_block->u.MESSAGE_TYPE == MT_PACKET_UPLINK_DUMMY_CONTROL_BLOCK) @@ -728,9 +744,10 @@ "RX: [PCU <- BTS] unknown control block(%d) received\n", ul_control_block->u.MESSAGE_TYPE); } +free_ret: talloc_free(ul_control_block); bitvec_free(rlc_block); - return 1; + return rc; } /* received RLC/MAC block from L1 */ diff --git a/src/tbf.cpp b/src/tbf.cpp index 61d8d58..b852cd2 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1201,6 +1201,8 @@ { struct msgb *msg; struct gprs_rlcmac_dl_tbf *new_dl_tbf = NULL; + RlcMacDownlink_t *mac_control_block = NULL; + bitvec *ass_vec = NULL; int poll_ass_dl = 1; unsigned int rrbp = 0; uint32_t new_poll_fn = 0; @@ -1264,27 +1266,26 @@ msg = msgb_alloc(23, "rlcmac_dl_ass"); if (!msg) return NULL; - bitvec *ass_vec = bitvec_alloc(23, tall_pcu_ctx); - if (!ass_vec) { - msgb_free(msg); - return NULL; - } + ass_vec = bitvec_alloc(23, tall_pcu_ctx); + if (!ass_vec) + goto free_ret; bitvec_unhex(ass_vec, DUMMY_VEC); LOGPTBF(new_dl_tbf, LOGL_INFO, "start Packet Downlink Assignment (PACCH)\n"); - RlcMacDownlink_t * mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t); + mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t); Encoding::write_packet_downlink_assignment(mac_control_block, old_tfi_is_valid, m_tfi, (direction == GPRS_RLCMAC_DL_TBF), new_dl_tbf, poll_ass_dl, rrbp, bts_data()->alpha, bts_data()->gamma, -1, 0, is_egprs_enabled()); LOGP(DTBF, LOGL_DEBUG, "+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++\n"); - encode_gsm_rlcmac_downlink(ass_vec, mac_control_block); - LOGPC(DCSN1, LOGL_NOTICE, "\n"); + rc = encode_gsm_rlcmac_downlink(ass_vec, mac_control_block); + if (rc < 0) { + LOGP(DTBF, LOGL_ERROR, "Decoding of Packet Downlink Ass failed (%d)\n", rc); + goto free_ret; + } LOGP(DTBF, LOGL_DEBUG, "------------------------- TX : Packet Downlink Assignment -------------------------\n"); bts->pkt_dl_assignemnt(); bitvec_pack(ass_vec, msgb_put(msg, 23)); - bitvec_free(ass_vec); - talloc_free(mac_control_block); if (poll_ass_dl) { set_polling(new_poll_fn, ts, GPRS_RLCMAC_POLL_DL_ASS); @@ -1297,7 +1298,15 @@ } + bitvec_free(ass_vec); + talloc_free(mac_control_block); return msg; + +free_ret: + bitvec_free(ass_vec); + talloc_free(mac_control_block); + msgb_free(msg); + return NULL; } struct msgb *gprs_rlcmac_tbf::create_packet_access_reject() @@ -1330,8 +1339,10 @@ struct msgb *gprs_rlcmac_tbf::create_ul_ass(uint32_t fn, uint8_t ts) { - struct msgb *msg; + struct msgb *msg = NULL; struct gprs_rlcmac_ul_tbf *new_tbf = NULL; + RlcMacDownlink_t *mac_control_block = NULL; + bitvec *ass_vec = NULL; int rc; unsigned int rrbp; uint32_t new_poll_fn; @@ -1360,29 +1371,37 @@ if (!msg) return NULL; LOGPTBF(new_tbf, LOGL_INFO, "start Packet Uplink Assignment (PACCH)\n"); - bitvec *ass_vec = bitvec_alloc(23, tall_pcu_ctx); - if (!ass_vec) { - msgb_free(msg); - return NULL; - } + ass_vec = bitvec_alloc(23, tall_pcu_ctx); + if (!ass_vec) + goto free_ret; bitvec_unhex(ass_vec, DUMMY_VEC); Encoding::write_packet_uplink_assignment(ass_vec, m_tfi, (direction == GPRS_RLCMAC_DL_TBF), tlli(), is_tlli_valid(), new_tbf, 1, rrbp, bts_data()->alpha, bts_data()->gamma, -1, is_egprs_enabled()); bitvec_pack(ass_vec, msgb_put(msg, 23)); - RlcMacDownlink_t * mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t); + + mac_control_block = (RlcMacDownlink_t *)talloc_zero(tall_pcu_ctx, RlcMacDownlink_t); LOGP(DTBF, LOGL_DEBUG, "+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++\n"); - decode_gsm_rlcmac_downlink(ass_vec, mac_control_block); - LOGPC(DCSN1, LOGL_NOTICE, "\n"); + rc = decode_gsm_rlcmac_downlink(ass_vec, mac_control_block); + if (rc < 0) { + LOGP(DTBF, LOGL_ERROR, "Decoding of Packet Uplink Ass failed (%d)\n", rc); + goto free_ret; + } LOGP(DTBF, LOGL_DEBUG, "------------------------- TX : Packet Uplink Assignment -------------------------\n"); bts->pkt_ul_assignment(); - bitvec_free(ass_vec); - talloc_free(mac_control_block); set_polling(new_poll_fn, ts, GPRS_RLCMAC_POLL_UL_ASS); + bitvec_free(ass_vec); + talloc_free(mac_control_block); return msg; + +free_ret: + bitvec_free(ass_vec); + talloc_free(mac_control_block); + msgb_free(msg); + return NULL; } void gprs_rlcmac_tbf::free_all(struct gprs_rlcmac_trx *trx) diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp index f911b09..04c06cf 100644 --- a/tests/rlcmac/RLCMACTest.cpp +++ b/tests/rlcmac/RLCMACTest.cpp @@ -93,6 +93,8 @@ void testRlcMacDownlink(void *test_ctx) { printf("*** %s ***\n", __func__); + + int rc; struct bitvec *resultVector = bitvec_alloc(23, test_ctx); bitvec_unhex(resultVector, DUMMY_VEC); @@ -121,11 +123,11 @@ RlcMacDownlink_t data; memset(&data, 0, sizeof(data)); cout << "=========Start DECODE===========" << endl; - decode_gsm_rlcmac_downlink(vector, &data); - cout << "+++++++++Finish DECODE++++++++++" << endl; + rc = decode_gsm_rlcmac_downlink(vector, &data); + cout << "+++++++++Finish DECODE ("<< rc <<")++++++++++" << endl; cout << "=========Start ENCODE=============" << endl; - encode_gsm_rlcmac_downlink(resultVector, &data); - cout << "+++++++++Finish ENCODE+++++++++++" << endl; + rc = encode_gsm_rlcmac_downlink(resultVector, &data); + cout << "+++++++++Finish ENCODE ("<< rc <<")+++++++++++" << endl; cout << "vector1 = " << osmo_hexdump(vector->data, 23) << endl; cout << "vector2 = " << osmo_hexdump(resultVector->data, 23) << endl; if (memcmp(vector->data, resultVector->data, 23) == 0) @@ -143,6 +145,8 @@ void testRlcMacUplink(void *test_ctx) { printf("*** %s ***\n", __func__); + + int rc; struct bitvec *resultVector = bitvec_alloc(23, test_ctx); bitvec_unhex(resultVector, DUMMY_VEC); @@ -167,11 +171,11 @@ RlcMacUplink_t data; memset(&data, 0, sizeof(data)); cout << "=========Start DECODE===========" << endl; - decode_gsm_rlcmac_uplink(vector, &data); - cout << "+++++++++Finish DECODE++++++++++" << endl; + rc = decode_gsm_rlcmac_uplink(vector, &data); + cout << "+++++++++Finish DECODE ("<< rc << ")++++++++++" << endl; cout << "=========Start ENCODE=============" << endl; - encode_gsm_rlcmac_uplink(resultVector, &data); - cout << "+++++++++Finish ENCODE+++++++++++" << endl; + rc = encode_gsm_rlcmac_uplink(resultVector, &data); + cout << "+++++++++Finish ENCODE ("<< rc <<")+++++++++++" << endl; cout << "vector1 = " << osmo_hexdump(vector->data, 23) << endl; cout << "vector2 = " << osmo_hexdump(resultVector->data, 23) << endl; if (memcmp(vector->data, resultVector->data, 23) == 0) @@ -188,9 +192,11 @@ void testCsnLeftAlignedVarBmpBounds(void *test_ctx) { printf("*** %s ***\n", __func__); + struct msgb *m = msgb_alloc(80, "test"); static uint8_t exp[] = { 0x7f, 0xff, 0xff, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; bitvec *vector = bitvec_alloc(23, test_ctx); + int rc; bitvec_unhex(vector, "40200bffd161003e0e519ffffffb800000000000000000"); RlcMacUplink_t data; @@ -198,7 +204,8 @@ EGPRS_AckNack_Desc_t *urbb = &data.u.Egprs_Packet_Downlink_Ack_Nack.EGPRS_AckNack.Desc; - decode_gsm_rlcmac_uplink(vector, &data); + rc = decode_gsm_rlcmac_uplink(vector, &data); + OSMO_ASSERT(rc == 0); memcpy(msgb_put(m, 13), urbb->URBB, 13); if (!msgb_eq_data_print(m, exp, 13)) diff --git a/tests/rlcmac/RLCMACTest.ok b/tests/rlcmac/RLCMACTest.ok index 5793d57..24ea4b7 100644 --- a/tests/rlcmac/RLCMACTest.ok +++ b/tests/rlcmac/RLCMACTest.ok @@ -2,81 +2,81 @@ DOWNLINK vector1 = 4e082500e3f1a81d080820800b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 4e 08 25 00 e3 f1 a8 1d 08 08 20 80 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 4e 08 25 00 e3 f1 a8 1d 08 08 20 80 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 48282407a6a07422720100032b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 48 28 24 07 a6 a0 74 22 72 01 00 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 48 28 24 07 a6 a0 74 22 72 01 00 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 47240c00400000000000000079eb2ac9402b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 47 24 0c 00 40 00 00 00 00 00 00 00 79 eb 2a c9 40 2b 2b 2b 2b 2b 2b vector2 = 47 24 0c 00 40 00 00 00 00 00 00 00 79 eb 2a c9 40 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 47283c367513ba333004242b2b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 47 28 3c 36 75 13 ba 33 30 04 24 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 47 28 3c 36 75 13 ba 33 30 04 24 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 400820001a3904df0680efb3300b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 08 20 00 1a 39 04 df 06 80 ef b3 30 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 40 08 20 00 1a 39 04 df 06 80 ef b3 30 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 40284f0000001009810c826f4406809dcecb2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 28 4f 00 00 00 10 09 81 0c 82 6f 44 06 80 9d ce cb 2b 2b 2b 2b 2b vector2 = 40 28 4f 00 00 00 10 09 81 0c 82 6f 44 06 80 9d ce cb 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 4024030f2f0000000087b0042b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 24 03 0f 2f 00 00 00 00 87 b0 04 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 40 24 03 0f 2f 00 00 00 00 87 b0 04 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 4913e00850884013a8048b2b2b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 49 13 e0 08 50 88 40 13 a8 04 8b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 49 13 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : FALSE vector1 = 412430007fffffffffffffffefd19c7ba12b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 41 24 30 00 7f ff ff ff ff ff ff ff ef d1 9c 7b a1 2b 2b 2b 2b 2b 2b vector2 = 41 24 30 00 7f ff ff ff ff ff ff ff ef d1 9c 7b a1 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 41942b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 41 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 41 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE @@ -84,41 +84,41 @@ UPLINK vector1 = 400e1e61d11d2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 0e 1e 61 d1 1d 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 40 0e 1e 61 d1 1d 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 400b8020000000000000002480e0032b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 0b 80 20 00 00 00 00 00 00 00 24 80 e0 03 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 40 0b 80 20 00 00 00 00 00 00 00 24 80 e0 03 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 4016713dc094270ca2ae57ef909006aa0fc0001f80222b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 16 71 3d c0 94 27 0c a2 ae 57 ef 90 90 06 aa 0f c0 00 1f 80 22 2b vector2 = 40 16 71 3d c0 94 27 0c a2 ae 57 ef 90 90 06 aa 0f c0 00 1f 80 22 2b vector1 == vector2 : TRUE vector1 = 40200ffc0021ec010b2b2b2b2b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 20 0f fc 00 21 ec 01 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 40 20 0f fc 00 21 ec 01 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE vector1 = 400a9020000000000000003010012a0800132b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= -+++++++++Finish ENCODE+++++++++++ ++++++++++Finish ENCODE (0)+++++++++++ vector1 = 40 0a 90 20 00 00 00 00 00 00 00 30 10 01 2a 08 00 13 2b 2b 2b 2b 2b vector2 = 40 0a 90 20 00 00 00 00 00 00 00 30 10 01 2a 08 00 13 2b 2b 2b 2b 2b vector1 == vector2 : TRUE diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index bdbc138..5edb544 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -615,7 +615,7 @@ rlc_block = bitvec_alloc(23, tall_pcu_ctx); - encode_gsm_rlcmac_uplink(rlc_block, ulreq); + OSMO_ASSERT(encode_gsm_rlcmac_uplink(rlc_block, ulreq) == 0); num_bytes = bitvec_pack(rlc_block, &buf[0]); OSMO_ASSERT(size_t(num_bytes) < sizeof(buf)); bitvec_free(rlc_block); @@ -2511,6 +2511,7 @@ RlcMacUplink_t ul_control_block; gprs_rlc_v_b *prlcmvb; gprs_rlc_dl_window *prlcdlwindow; + int rc; memset(&ul_control_block, 0, sizeof(RlcMacUplink_t)); @@ -2557,7 +2558,8 @@ bits.data_len = sizeof(bits_data); bits.cur_bit = 0; - decode_gsm_rlcmac_uplink(block, &ul_control_block); + rc = decode_gsm_rlcmac_uplink(block, &ul_control_block); + OSMO_ASSERT(rc == 0); ack_nack = &ul_control_block.u.Egprs_Packet_Downlink_Ack_Nack; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17086 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iabcb768bd714680aa768b35c786dea2015d1e451 Gerrit-Change-Number: 17086 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 12:36:57 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 12:36:57 +0000 Subject: Change in osmo-pcu[master]: rlcmac: Transform a few LOGPC messages to LOGP In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17087 ) Change subject: rlcmac: Transform a few LOGPC messages to LOGP ...................................................................... rlcmac: Transform a few LOGPC messages to LOGP Those messages are self contained and don't need LOGPC. Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 --- M src/gsm_rlcmac.cpp 1 file changed, 7 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index ae2b7e4..e594092 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -4817,12 +4817,12 @@ if (payload_type == PAYLOAD_TYPE_DATA) { - LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); + LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented\n"); return CSN_ERROR_GENERAL; } else if (payload_type == PAYLOAD_TYPE_RESERVED) { - LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); + LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)\n"); return CSN_ERROR_GENERAL; } data->NrOfBits = 23 * 8; @@ -4938,12 +4938,12 @@ if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_DATA) { - LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); + LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented\n"); return CSN_ERROR_GENERAL; } else if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_RESERVED) { - LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); + LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)\n"); return CSN_ERROR_GENERAL; } /* We can decode the message */ @@ -5236,12 +5236,12 @@ if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_DATA) { - LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented"); + LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: DATA (0), not implemented\n"); return CSN_ERROR_GENERAL; } else if (data->PAYLOAD_TYPE == PAYLOAD_TYPE_RESERVED) { - LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); + LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)\n"); return CSN_ERROR_GENERAL; } /* We can decode the message */ @@ -5496,7 +5496,7 @@ } else { - LOGPC(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)"); + LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)\n"); return; } } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17087 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307 Gerrit-Change-Number: 17087 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 12:37:55 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 12:37:55 +0000 Subject: Change in osmo-pcu[master]: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17088 ) Change subject: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17088/2/src/gsm_rlcmac.cpp File src/gsm_rlcmac.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17088/2/src/gsm_rlcmac.cpp at 4836 PS2, Line 4836: LOGL_INFO > Huh, all LOGPC statements I've ever seen use NOTICE for some reason. [?] I'll change those log levels in csn1.cpp in a later patch. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I50da7560939fac360b7545e2a6bfaf45ed0c4832 Gerrit-Change-Number: 17088 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 12:37:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 12:39:06 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 12:39:06 +0000 Subject: Change in osmo-pcu[master]: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17088 ) Change subject: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17088/2/src/gsm_rlcmac.cpp File src/gsm_rlcmac.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17088/2/src/gsm_rlcmac.cpp at 4828 PS2, Line 4828: > ws That ws is part of the patch since I'm adding new blocks of code and with that addition everything becomes more clear when reading it. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I50da7560939fac360b7545e2a6bfaf45ed0c4832 Gerrit-Change-Number: 17088 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 12:39:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 13:28:39 2020 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 6 Feb 2020 13:28:39 +0000 Subject: Change in libosmocore[master]: dtx: add functions to determine DTX frame types References: Message-ID: dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17095 ) Change subject: dtx: add functions to determine DTX frame types ...................................................................... dtx: add functions to determine DTX frame types gsm0503_coding contains AMR decoder functions for HR and FR. Those can only decode AMR payload frames but not amr DTX frames. Lets add some detector functionality to be able to detect AMR DTX frames so that the caller can be informed about this Related: OS#2978 Change-Id: I2bbdb39ea20461ca08b2e6f1a33532cb55cd5195 --- M include/Makefile.am A include/osmocom/coding/gsm0503_amr_dtx.h M include/osmocom/coding/gsm0503_coding.h M src/coding/Makefile.am A src/coding/gsm0503_amr_dtx.c M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M tests/Makefile.am A tests/dtx/dtx_gsm0503_test.c A tests/dtx/dtx_gsm0503_test.ok M tests/testsuite.at 11 files changed, 553 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/95/17095/1 diff --git a/include/Makefile.am b/include/Makefile.am index b341ee3..572c880 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -90,6 +90,7 @@ osmocom/coding/gsm0503_mapping.h \ osmocom/coding/gsm0503_interleaving.h \ osmocom/coding/gsm0503_coding.h \ + osmocom/coding/gsm0503_amr_dtx.h \ osmocom/gsm/gsm0808.h \ osmocom/gsm/gsm29205.h \ osmocom/gsm/gsm0808_utils.h \ diff --git a/include/osmocom/coding/gsm0503_amr_dtx.h b/include/osmocom/coding/gsm0503_amr_dtx.h new file mode 100644 index 0000000..7cf6857 --- /dev/null +++ b/include/osmocom/coding/gsm0503_amr_dtx.h @@ -0,0 +1,38 @@ +/*! \file gsm0503_amr_dtx.h + * GSM TS 05.03 coding + */ + +#pragma once + +#include + +#include +#include + +/*! \addtogroup coding + * @{ + * \file gsm0503_amr_dtx.h */ + +enum gsm0503_amr_dtx_frames { + AFS_SID_FIRST, + AFS_SID_UPDATE, + AFS_ONSET, + AHS_SID_UPDATE, + AHS_SID_FIRST_P1, + AHS_SID_FIRST_P2, + AHS_ONSET, + AHS_SID_FIRST_INH, + AHS_SID_UPDATE_INH, + AMR_OTHER, +}; + +extern const struct value_string gsm0503_amr_dtx_frame_names[]; +static inline const char *gsm0503_amr_dtx_frame_name(uint8_t frame) +{ + return get_value_string(gsm0503_amr_dtx_frame_names, frame); +} + +uint8_t gsm0503_detect_afs_dtx_frame(ubit_t * ubits); +uint8_t gsm0503_detect_ahs_dtx_frame(ubit_t * ubits); + +/*! @} */ diff --git a/include/osmocom/coding/gsm0503_coding.h b/include/osmocom/coding/gsm0503_coding.h index 98038f8..2afa049 100644 --- a/include/osmocom/coding/gsm0503_coding.h +++ b/include/osmocom/coding/gsm0503_coding.h @@ -58,12 +58,18 @@ int gsm0503_tch_afs_decode(uint8_t *tch_data, const sbit_t *bursts, int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, uint8_t *cmr, int *n_errors, int *n_bits_total); +int gsm0503_tch_afs_decode_dtx(uint8_t *tch_data, const sbit_t *bursts, + int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, + uint8_t *cmr, int *n_errors, int *n_bits_total, uint8_t *dtx); int gsm0503_tch_ahs_encode(ubit_t *bursts, const uint8_t *tch_data, int len, int codec_mode_req, uint8_t *codec, int codecs, uint8_t ft, uint8_t cmr); int gsm0503_tch_ahs_decode(uint8_t *tch_data, const sbit_t *bursts, int odd, int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, uint8_t *cmr, int *n_errors, int *n_bits_total); +int gsm0503_tch_ahs_decode_dtx(uint8_t *tch_data, const sbit_t *bursts, int odd, + int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, + uint8_t *cmr, int *n_errors, int *n_bits_total, uint8_t *dtx); int gsm0503_rach_ext_encode(ubit_t *burst, uint16_t ra, uint8_t bsic, bool is_11bit); int gsm0503_rach_encode(ubit_t *burst, const uint8_t *ra, uint8_t bsic) OSMO_DEPRECATED("Use gsm0503_rach_ext_encode() instead"); diff --git a/src/coding/Makefile.am b/src/coding/Makefile.am index f47fe45..b023668 100644 --- a/src/coding/Makefile.am +++ b/src/coding/Makefile.am @@ -20,7 +20,8 @@ gsm0503_mapping.c \ gsm0503_tables.c \ gsm0503_parity.c \ - gsm0503_coding.c + gsm0503_coding.c \ + gsm0503_amr_dtx.c libosmocoding_la_LDFLAGS = \ $(LTLDFLAGS_OSMOCODING) \ -version-info \ diff --git a/src/coding/gsm0503_amr_dtx.c b/src/coding/gsm0503_amr_dtx.c new file mode 100644 index 0000000..57aaf80 --- /dev/null +++ b/src/coding/gsm0503_amr_dtx.c @@ -0,0 +1,282 @@ +/* + * (C) 2016 by sysmocom - s.f.m.c. GmbH, Author: Philipp Maier + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include +#include + +#include +#include + +const struct value_string gsm0503_amr_dtx_frame_names[] = { + { AFS_SID_FIRST, "AFS_SID_FIRST" }, + { AFS_SID_UPDATE, "AFS_SID_UPDATE" }, + { AFS_ONSET, "AFS_ONSET" }, + { AHS_SID_UPDATE, "AHS_SID_UPDATE" }, + { AHS_SID_FIRST_P1, "AHS_SID_FIRST_P1" }, + { AHS_SID_FIRST_P2, "AHS_SID_FIRST_P2" }, + { AHS_ONSET, "AHS_ONSET" }, + { AHS_SID_FIRST_INH, "AHS_SID_FIRST_INH" }, + { AHS_SID_UPDATE_INH, "AHS_SID_UPDATE_INH" }, + { AMR_OTHER, "NON DTX FRAME (OTHER)" }, + { 0, NULL } +}; + +static bool detect_afs_id_marker(ubit_t * ubits, uint8_t offset, uint8_t count) +{ + unsigned int i, k; + ubit_t id_marker[] = { 0, 1, 0, 0, 1, 1, 1, 1, 0 }; + unsigned int id_bit_nr = 0; + unsigned int errors = 0; + + /* Override coded in-band data */ + ubits += offset; + + /* Check for identification marker bits */ + for (i = 0; i < count; i++) { + for (k = 0; k < 4; k++) { + if (id_marker[id_bit_nr % 9] != *ubits) + errors++; + id_bit_nr++; + ubits++; + } + ubits += 4; + } + + /* The identification marker bits are unprotected, so it is likely + * that some of them are errornous, we will tolerate up to 1/8 + * of errors in total */ + if (errors < count * 4 / 8) + return true; + return false; +} + +static bool detect_ahs_id_marker(ubit_t * ubits, ubit_t * id_marker) +{ + unsigned int i, k; + unsigned int errors = 0; + + /* Override coded in-band data */ + ubits += 16; + + /* Check for identification marker bits */ + for (i = 0; i < 23; i++) { + for (k = 0; k < 9; k++) { + if (id_marker[k] != *ubits) + errors++; + ubits++; + } + } + + /* Tolerate up to 1/8 errornous bits */ + if (errors < 23 * 8 / 8) + return true; + return false; +} + +static bool detect_interleaved_ahs_id_marker(ubit_t * ubits, ubit_t * id_marker) +{ + unsigned int i, k; + unsigned int errors = 0; + + /* Override coded in-band data */ + ubits += 16 * 2; + + /* Align to even bits */ + ubits++; + + /* Check for identification marker bits */ + for (i = 0; i < 23; i++) { + for (k = 0; k < 9; k++) { + if (id_marker[k] != *ubits) + errors++; + ubits += 2; + } + } + + /* Tolerate up to 1/8 errornous bits */ + if (errors < 23 * 8 / 8) + return true; + return false; +} + +static unsigned int check_afs_coded_inband_bits(ubit_t * ubits, uint8_t offset) +{ + unsigned int i, k; + unsigned int ones[4] = { 0, 0, 0, 0 }; + unsigned int error = 0; + + ubits += 4 + offset; + + for (i = 0; i < 14; i++) { + for (k = 0; k < 4; k++) { + ones[k] += ubits[k]; + } + + ubits += 32; + } + + for (k = 0; k < 4; k++) { + if (ones[k] > 7) + error += 14 - ones[k]; + else + error += ones[k]; + } + return error; +} + +static unsigned int check_ahs_coded_inband_bits(ubit_t * ubits, bool even_bits) +{ + unsigned int i, k; + unsigned int ones[16] = + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + unsigned int error = 0; + + if (even_bits) + ubits++; + + for (i = 0; i < 7; i++) { + for (k = 0; k < 16; k++) { + ones[k] += ubits[0]; + ubits += 2; + } + } + + for (k = 0; k < 16; k++) { + if (ones[k] > 3) + error += 7 - ones[k]; + else + error += ones[k]; + } + + return error; +} + +/* Detect a an FR AMR SID_FIRST frame by its identifcation marker */ +static inline bool detect_afs_sid_first(ubit_t * ubits) +{ + return detect_afs_id_marker(ubits, 32, 53); +} + +/* Detect an FR AMR SID_FIRST frame by its identification marker */ +static inline bool detect_afs_sid_update(ubit_t * ubits) +{ + return detect_afs_id_marker(ubits, 36, 36); +} + +/* Detect an FR AMR SID_FIRST frame by its repeating coded inband data */ +static inline bool detect_afs_onset(ubit_t * ubits) +{ + unsigned int error = 0; + + error += check_afs_coded_inband_bits(ubits, 0); + error += check_afs_coded_inband_bits(ubits, 8); + error += check_afs_coded_inband_bits(ubits, 16); + error += check_afs_coded_inband_bits(ubits, 24); + + if (error > 14 * 4 * 4 / 8) + return false; + return true; +} + +/* Detect an HR AMR SID UPDATE frame by its identification marker */ +static inline bool detect_ahs_sid_update(ubit_t * ubits) +{ + ubit_t id_marker[] = { 1, 0, 1, 1, 0, 0, 0, 0, 1 }; + return detect_ahs_id_marker(ubits, id_marker); +} + +/* Detect an HR AMR SID FIRST (part 1) frame by its identification marker */ +static inline bool detect_ahs_sid_first_p1(ubit_t * ubits) +{ + ubit_t id_marker[] = { 0, 1, 0, 0, 1, 1, 1, 1, 0 }; + return detect_ahs_id_marker(ubits, id_marker); +} + +/* Detect an HR AMR SID FIRST (part 2) frame by its repeating coded inband data */ +static inline bool detect_ahs_sid_first_p2(ubit_t * ubits) +{ + unsigned int error = 0; + error = check_ahs_coded_inband_bits(ubits, false); + if (error > 7 * 16 / 8) + return false; + return true; +} + +/* Detect an HR AMR ONSET frame by its repeating coded inband data */ +static inline bool detect_ahs_onset(ubit_t * ubits) +{ + unsigned int error = 0; + error = check_ahs_coded_inband_bits(ubits, true); + if (error > 7 * 16 / 8) + return false; + return true; +} + +/* Detect an HR AMR SID FIRST INHIBIT frame by its identification marker */ +static inline bool detect_ahs_sid_first_inh(ubit_t * ubits) +{ + ubit_t id_marker[] = { 1, 0, 1, 1, 0, 0, 0, 0, 1 }; + return detect_interleaved_ahs_id_marker(ubits, id_marker); +} + +/* Detect an HR AMR SID UPDATE INHIBIT frame by its identification marker */ +static inline bool detect_ahs_sid_update_inh(ubit_t * ubits) +{ + ubit_t id_marker[] = { 0, 1, 0, 0, 1, 1, 1, 1, 0 }; + return detect_interleaved_ahs_id_marker(ubits, id_marker); +} + +/*! Detect FR AMR DTX frame in unmapped, deinterleaved frame bits + * \param[in] ubits input bits (456 bit max) + * \returns dtx frame type */ +uint8_t gsm0503_detect_afs_dtx_frame(ubit_t * ubits) +{ + if (detect_afs_sid_first(ubits)) + return AFS_SID_FIRST; + if (detect_afs_sid_update(ubits)) + return AFS_SID_UPDATE; + if (detect_afs_onset(ubits)) + return AFS_ONSET; + return AMR_OTHER; +} + +/*! Detect HR AMR DTX frame in unmapped, deinterleaved frame bits + * \param[in] ubits input bits (456 bit max) + * \returns dtx frame type */ +uint8_t gsm0503_detect_ahs_dtx_frame(ubit_t * ubits) +{ + if (detect_ahs_sid_update(ubits)) + return AHS_SID_UPDATE; + if (detect_ahs_sid_first_inh(ubits)) + return AHS_SID_FIRST_INH; + if (detect_ahs_sid_update_inh(ubits)) + return AHS_SID_UPDATE_INH; + if (detect_ahs_sid_first_p1(ubits)) + return AHS_SID_FIRST_P1; + if (detect_ahs_sid_first_p2(ubits)) + return AHS_SID_FIRST_P2; + if (detect_ahs_onset(ubits)) + return AHS_ONSET; + + return AMR_OTHER; +} diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 7385d23..d95bcaf 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -47,6 +47,7 @@ #include #include #include +#include /*! \mainpage libosmocoding Documentation * @@ -2094,6 +2095,7 @@ * \param[out] cmr Output in \a codec_mode_req = 1 * \param[out] n_errors Number of detected bit errors * \param[out] n_bits_total Total number of bits + * \param[out] dtx DTX frame type * \returns (>=4) length of bytes used in \a tch_data output buffer; ([0,3]) * codec out of range; negative on error */ @@ -2101,9 +2103,33 @@ int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, uint8_t *cmr, int *n_errors, int *n_bits_total) { + return gsm0503_tch_afs_decode_dtx(tch_data, bursts, codec_mode_req, + codec, codecs, ft, cmr, n_errors, + n_bits_total, NULL); +} + +/*! Perform channel decoding of a TCH/AFS channel according TS 05.03 + * \param[out] tch_data Codec frame in RTP payload format + * \param[in] bursts buffer containing the symbols of 8 bursts + * \param[in] codec_mode_req is this CMR (1) or CMC (0) + * \param[in] codec array of active codecs (active codec set) + * \param[in] codecs number of codecs in \a codec + * \param ft Frame Type; Input if \a codec_mode_req = 1, Output * otherwise + * \param[out] cmr Output in \a codec_mode_req = 1 + * \param[out] n_errors Number of detected bit errors + * \param[out] n_bits_total Total number of bits + * \param[out] dtx DTX frame type + * \returns (>=4) length of bytes used in \a tch_data output buffer; ([0,3]) + * codec out of range; negative on error + */ +int gsm0503_tch_afs_decode_dtx(uint8_t *tch_data, const sbit_t *bursts, + int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, + uint8_t *cmr, int *n_errors, int *n_bits_total, uint8_t *dtx) +{ sbit_t iB[912], cB[456], h; ubit_t d[244], p[6], conv[250]; int i, j, k, best = 0, rv, len, steal = 0, id = 0; + ubit_t cBd[456]; *n_errors = 0; *n_bits_total = 0; for (i=0; i<8; i++) { @@ -2133,6 +2159,15 @@ } } + /* Determine the DTX frame type (SID_UPDATE, ONSET etc...) */ + if (dtx) { + osmo_sbit2ubit(cBd, cB, 456); + for (i = 0; i < 456; i++) + printf("%u", cBd[i]); + printf("\n"); + *dtx = gsm0503_detect_afs_dtx_frame(cBd); + } + /* Check if indicated codec fits into range of codecs */ if (id >= codecs) { /* Codec mode out of range, return id */ @@ -2480,9 +2515,34 @@ int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, uint8_t *cmr, int *n_errors, int *n_bits_total) { + return gsm0503_tch_ahs_decode_dtx(tch_data, bursts, odd, codec_mode_req, + codec, codecs, ft, cmr, n_errors, + n_bits_total, NULL); +} + +/*! Perform channel decoding of a TCH/AFS channel according TS 05.03 + * \param[out] tch_data Codec frame in RTP payload format + * \param[in] bursts buffer containing the symbols of 8 bursts + * \param[in] odd Is this an odd (1) or even (0) frame number? + * \param[in] codec_mode_req is this CMR (1) or CMC (0) + * \param[in] codec array of active codecs (active codec set) + * \param[in] codecs number of codecs in \a codec + * \param ft Frame Type; Input if \a codec_mode_req = 1, Output * otherwise + * \param[out] cmr Output in \a codec_mode_req = 1 + * \param[out] n_errors Number of detected bit errors + * \param[out] n_bits_total Total number of bits + * \param[out] dtx DTX frame type + * \returns (>=4) length of bytes used in \a tch_data output buffer; ([0,3]) + * codec out of range; negative on error + */ +int gsm0503_tch_ahs_decode_dtx(uint8_t *tch_data, const sbit_t *bursts, int odd, + int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft, + uint8_t *cmr, int *n_errors, int *n_bits_total, uint8_t *dtx) +{ sbit_t iB[912], cB[456], h; ubit_t d[244], p[6], conv[135]; int i, j, k, best = 0, rv, len, steal = 0, id = 0; + ubit_t cBd[456]; /* only unmap the stealing bits */ if (!odd) { @@ -2536,6 +2596,15 @@ } } + /* Determine the DTX frame type (SID_UPDATE, ONSET etc...) */ + if (dtx) { + osmo_sbit2ubit(cBd, cB, 456); + for (i = 0; i < 456; i++) + printf("%u", cBd[i]); + printf("\n"); + *dtx = gsm0503_detect_ahs_dtx_frame(cBd); + } + /* Check if indicated codec fits into range of codecs */ if (id >= codecs) { /* Codec mode out of range, return id */ diff --git a/src/coding/libosmocoding.map b/src/coding/libosmocoding.map index 87b3886..42f34e4 100644 --- a/src/coding/libosmocoding.map +++ b/src/coding/libosmocoding.map @@ -106,8 +106,10 @@ gsm0503_tch_hr_decode; gsm0503_tch_afs_encode; gsm0503_tch_afs_decode; +gsm0503_tch_afs_decode_dtx; gsm0503_tch_ahs_encode; gsm0503_tch_ahs_decode; +gsm0503_tch_ahs_decode_dtx; gsm0503_rach_ext_encode; gsm0503_rach_ext_decode; gsm0503_rach_ext_decode_ber; @@ -116,6 +118,10 @@ gsm0503_rach_decode_ber; gsm0503_sch_encode; gsm0503_sch_decode; +gsm0503_amr_dtx_frame_names; +gsm0503_amr_dtx_frame_name; +gsm0503_detect_afs_dtx_frame; +gsm0503_detect_ahs_dtx_frame; local: *; }; diff --git a/tests/Makefile.am b/tests/Makefile.am index bf7017b..0d0327a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -34,6 +34,7 @@ use_count/use_count_test \ context/context_test \ gsm0502/gsm0502_test \ + dtx/dtx_gsm0503_test \ $(NULL) if ENABLE_MSGFILE @@ -114,6 +115,10 @@ gsm0502_gsm0502_test_SOURCES = gsm0502/gsm0502_test.c gsm0502_gsm0502_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la +dtx_dtx_gsm0503_test_SOURCES = dtx/dtx_gsm0503_test.c +dtx_dtx_gsm0503_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la \ + $(top_builddir)/src/coding/libosmocoding.la + conv_conv_gsm0503_test_SOURCES = conv/conv_gsm0503_test.c conv/conv.c conv/gsm0503_test_vectors.c conv_conv_gsm0503_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libgsmint.la conv_conv_gsm0503_test_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/conv @@ -339,6 +344,7 @@ use_count/use_count_test.ok use_count/use_count_test.err \ context/context_test.ok \ gsm0502/gsm0502_test.ok \ + dtx/dtx_gsm0503_test.ok \ exec/exec_test.ok exec/exec_test.err \ $(NULL) diff --git a/tests/dtx/dtx_gsm0503_test.c b/tests/dtx/dtx_gsm0503_test.c new file mode 100644 index 0000000..7e634e2 --- /dev/null +++ b/tests/dtx/dtx_gsm0503_test.c @@ -0,0 +1,126 @@ +/* + * (C) 2019 by sysmocom s.f.m.c. GmbH + * Author: Philipp Maier + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include +#include +#include +#include + +char sample_afs_sid_frame[] = + { +"111111110000000011001100101010100100010011111111001000100111011110011001001100111100110010011001111011100100010011111111001000100111011110011001001100111100110010011001111011100100010011111111001000100111011110011001001100111100110010011001111011100100010011111111001000100111011110011001001100111100110010011001111011100100010011111111001000100111011110011001001100111100110010011001111011100100010011111111001000100111011110011001001100111100110010011001" +}; + +char sample_afs_sid_update_frame[] = + { +"111111110000000011001100101010100000010000001111111100101011011110001001000000110111110000001001011111101111010011001111100000101000011111001001111100110111110011111001001111101100010001001111000000100100011100111001100000111000110000111001010011101111010011111111010000101100011100111001111100110111110011111001110011101000010010001111110000100000011111001001011100110011110010111001101111100011010001111111001100100100011111111001000000110000110000001001" +}; + +char sample_afs_onset_frame[] = + { +"111111110000000011001100101010100000111100000000111111000100101000111111100000000111110010001010001111110100000011111100111110100100111111000000110011001011101001001111011100001011110000001010010011111100000000111100111110101000111110110000111111000000101011111111010000001100110000111010111111111000000010111100000010100100111100110000100011001000101000111111101100001011110000111010011111110011000010111100101110101100111111000000010011001111101000001111" +}; + +char sample_ahs_sid_update_frame[] = + { +"111100001100101010110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110000110110100011001000011010000000000000001111010010000000000001000000000010110000000011001000000000000000100000101000000000000000001010100000010010000000000010000111110001110110110011001101000000000100100011001000001010000100100000000011" +}; + +char sample_ahs_sid_first_p1_frame[] = + { +"111100001100101001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001111001001001011010110001101100101001110001111001110100110010000111101110110110000100100011111001001110000011110110001010010101100001010100000111101110110001010000111110001110110110011001101001111000011101001010011100011000111010110000011" +}; + +char sample_ahs_sid_first_p2_frame[] = + { +"111110100100000010100000110111001110101100000100101001011101100011101010010000001010010010001100101010100100010111110101110011011110101000010100111000001001110111101110010101001110000010001101101011110000000011100100110110011111100011001000001101100101001110001111001110100110010000111101110110110000100100011111001001110000011110110001010010101100001010100000111101110110001010000111110001110110110011001101001111000011101001010011100011000111010110000011" +}; + +char sample_ahs_onset_frame[] = + { +"111101011000101001010000111001000111011110000000011110001110010011011111100000101101101001101110011111010000000001010010110001101101110100000010011110101100010001011101101010000111100011101100111101011010100011110010110001001111100011001000011010000000000000001010010010000000000001000000000000100000000011001000000000000000100000101000000000000000010010000101010010000000000010101100111110101000110110011001000000000100100011001000001010000100100000001100" +}; + +char sample_sid_first_inh_frame[] = + { +"xBxBxBxBxBxBxBxBxBxBxBxBxBxBxBxBx1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0x0x0x0x1x1x0x1x1x0" +}; + +char sample_sid_update_inh_frame[] = + { +"xBxBxBxBxBxBxBxBxBxBxBxBxBxBxBxBx0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1" +}; + +unsigned int string_to_ubit(ubit_t * ubits, char *string) +{ + unsigned int len; + unsigned int i; + + len = strlen(string); + + for (i = 0; i < len; i++) { + ubits[i] = string[i] & 1; + } + + return len; +} + +void test_gsm0503_detect_afs_dtx_frame(char *string) +{ + ubit_t ubits[512]; + uint8_t dtx_frame_type; + + string_to_ubit(ubits, string); + dtx_frame_type = gsm0503_detect_afs_dtx_frame(ubits); + printf(" ==> %u, %s\n", dtx_frame_type, + gsm0503_amr_dtx_frame_name(dtx_frame_type)); +} + +void test_gsm0503_detect_ahs_dtx_frame(char *string) +{ + ubit_t ubits[512]; + uint8_t dtx_frame_type; + + string_to_ubit(ubits, string); + dtx_frame_type = gsm0503_detect_ahs_dtx_frame(ubits); + printf(" ==> %u, %s\n", dtx_frame_type, + gsm0503_amr_dtx_frame_name(dtx_frame_type)); +} + +int main(int argc, char **argv) +{ + printf("FR AMR DTX FRAMES:\n"); + test_gsm0503_detect_afs_dtx_frame(sample_afs_sid_frame); + test_gsm0503_detect_afs_dtx_frame(sample_afs_sid_update_frame); + test_gsm0503_detect_afs_dtx_frame(sample_afs_onset_frame); + printf("HR AMR DTX FRAMES:\n"); + test_gsm0503_detect_ahs_dtx_frame(sample_ahs_sid_update_frame); + test_gsm0503_detect_ahs_dtx_frame(sample_ahs_sid_first_p1_frame); + test_gsm0503_detect_ahs_dtx_frame(sample_ahs_sid_first_p2_frame); + test_gsm0503_detect_ahs_dtx_frame(sample_ahs_onset_frame); + test_gsm0503_detect_ahs_dtx_frame(sample_sid_first_inh_frame); + test_gsm0503_detect_ahs_dtx_frame(sample_sid_update_inh_frame); + + return EXIT_SUCCESS; +} diff --git a/tests/dtx/dtx_gsm0503_test.ok b/tests/dtx/dtx_gsm0503_test.ok new file mode 100644 index 0000000..4544043 --- /dev/null +++ b/tests/dtx/dtx_gsm0503_test.ok @@ -0,0 +1,11 @@ +FR AMR DTX FRAMES: + ==> 0, AFS_SID_FIRST + ==> 1, AFS_SID_UPDATE + ==> 2, AFS_ONSET +HR AMR DTX FRAMES: + ==> 3, AHS_SID_UPDATE + ==> 4, AHS_SID_FIRST_P1 + ==> 5, AHS_SID_FIRST_P2 + ==> 6, AHS_ONSET + ==> 7, AHS_SID_FIRST_INH + ==> 8, AHS_SID_UPDATE_INH diff --git a/tests/testsuite.at b/tests/testsuite.at index cb83ab9..bab5730 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -132,6 +132,12 @@ AT_CHECK([$abs_top_builddir/tests/gsm0502/gsm0502_test], [0], [expout], [ignore]) AT_CLEANUP +AT_SETUP([dtx]) +AT_KEYWORDS([dtx]) +cat $abs_srcdir/dtx/dtx_gsm0503_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/dtx/dtx_gsm0503_test], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([gsm0808]) AT_KEYWORDS([gsm0808]) cat $abs_srcdir/gsm0808/gsm0808_test.ok > expout -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17095 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2bbdb39ea20461ca08b2e6f1a33532cb55cd5195 Gerrit-Change-Number: 17095 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 13:28:55 2020 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 6 Feb 2020 13:28:55 +0000 Subject: Change in libosmocore[master]: dtx: add functions to determine DTX frame types In-Reply-To: References: Message-ID: dexter has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/libosmocore/+/17095 ) Change subject: dtx: add functions to determine DTX frame types ...................................................................... dtx: add functions to determine DTX frame types gsm0503_coding contains AMR decoder functions for HR and FR. Those can only decode AMR payload frames but not amr DTX frames. Lets add some detector functionality to be able to detect AMR DTX frames so that the caller can be informed about this Related: OS#2978 Change-Id: I2bbdb39ea20461ca08b2e6f1a33532cb55cd5195 --- M include/Makefile.am A include/osmocom/coding/gsm0503_amr_dtx.h M include/osmocom/coding/gsm0503_coding.h M src/coding/Makefile.am A src/coding/gsm0503_amr_dtx.c M src/coding/gsm0503_coding.c M src/coding/libosmocoding.map M tests/Makefile.am A tests/dtx/dtx_gsm0503_test.c A tests/dtx/dtx_gsm0503_test.ok M tests/testsuite.at 11 files changed, 553 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/95/17095/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17095 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2bbdb39ea20461ca08b2e6f1a33532cb55cd5195 Gerrit-Change-Number: 17095 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 13:58:48 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 13:58:48 +0000 Subject: Change in osmo-gsm-tester[master]: Introduce RemoteHost and refactor code to use it In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17065 ) Change subject: Introduce RemoteHost and refactor code to use it ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17065 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ifff5ded8fdb28e8ef267cebe6c5f30a910cae11a Gerrit-Change-Number: 17065 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 13:58:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 13:58:51 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 13:58:51 +0000 Subject: Change in osmo-gsm-tester[master]: Introduce RemoteHost and refactor code to use it In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17065 ) Change subject: Introduce RemoteHost and refactor code to use it ...................................................................... Introduce RemoteHost and refactor code to use it Let's move code related to coping stuff to remote hosts and managing remote processes under a class where relevant information is stored. This simplifies parameters being passed all over and allows to reuse more code. Change-Id: Ifff5ded8fdb28e8ef267cebe6c5f30a910cae11a --- M src/osmo_gsm_tester/bts_oc2g.py M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/bts_sysmo.py M src/osmo_gsm_tester/process.py A src/osmo_gsm_tester/remote.py 5 files changed, 170 insertions(+), 117 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_gsm_tester/bts_oc2g.py b/src/osmo_gsm_tester/bts_oc2g.py index ec4ed3d..7b46fc8 100644 --- a/src/osmo_gsm_tester/bts_oc2g.py +++ b/src/osmo_gsm_tester/bts_oc2g.py @@ -41,14 +41,6 @@ def _direct_pcu_enabled(self): return util.str2bool(self.conf.get('direct_pcu')) - def launch_remote(self, name, popen_args, remote_cwd=None, keepalive=False): - run_dir = self.run_dir.new_dir(name) - proc = process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr(), remote_cwd, - popen_args) - self.suite_run.remember_to_stop(proc, keepalive) - proc.launch() - return proc - def create_pcu(self): return pcu_oc2g.OsmoPcuOC2G(self.suite_run, self, self.conf) @@ -116,15 +108,19 @@ if not self.inst.isfile('bin', OsmoBtsOC2G.BTS_OC2G_BIN): raise log.Error('No osmo-bts-oc2g binary in', self.inst) - remote_run_dir = util.Dir(OsmoBtsOC2G.REMOTE_DIR) - - self.remote_inst = process.copy_inst_ssh(self.run_dir, self.inst, remote_run_dir, self.remote_user, - self.remote_addr(), OsmoBtsOC2G.BTS_OC2G_BIN, self.config_file) - + rem_host = remote.RemoteHost(self.run_dir, self.remote_user, self.remote_addr()) + remote_prefix_dir = util.Dir(OsmoBtsOC2G.REMOTE_DIR) + self.remote_inst = util.Dir(remote_prefix_dir.child(os.path.basename(str(self.inst)))) + remote_run_dir = util.Dir(remote_prefix_dir.child(OsmoBtsOC2G.BTS_OC2G_BIN)) remote_config_file = remote_run_dir.child(OsmoBtsOC2G.BTS_OC2G_CFG) - remote_lib = self.remote_inst.child('lib') - remote_binary = self.remote_inst.child('bin', 'osmo-bts-oc2g') + rem_host.recreate_remote_dir(self.remote_inst) + rem_host.scp('scp-inst-to-remote', str(self.inst), remote_prefix_dir) + rem_host.create_remote_dir(remote_run_dir) + rem_host.scp('scp-cfg-to-remote', self.config_file, remote_config_file) + + remote_lib = self.remote_inst.child('lib') + remote_binary = self.remote_inst.child('bin', OsmoBtsOC2G.BTS_OC2G_BIN) args = ('LD_LIBRARY_PATH=%s' % remote_lib, remote_binary, '-c', remote_config_file, '-r', '1', '-i', self.bsc.addr()) @@ -132,6 +128,7 @@ if self._direct_pcu_enabled(): args += ('-M',) - self.proc_bts = self.launch_remote('osmo-bts-oc2g', args, remote_cwd=remote_run_dir, keepalive=keepalive) - + proc = rem_host.RemoteProcess(OsmoBtsOC2G.BTS_OC2G_BIN, args) + self.suite_run.remember_to_stop(proc, keepalive) + proc.launch() # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 9110d8a..78c17cc 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -18,10 +18,9 @@ # along with this program. If not, see . import os -import stat import pprint from abc import ABCMeta, abstractmethod -from . import log, config, util, template, process, bts_osmo +from . import log, config, util, template, process, remote, bts_osmo from . import powersupply from .event_loop import MainLoop @@ -263,72 +262,41 @@ proc.launch() return proc - def launch_process_remote(self, name, popen_args, remote_cwd=None, keepalive=False): - run_dir = self.run_dir.new_dir(name) - proc = process.RemoteProcess(name, run_dir, self.remote_user, self.listen_ip, remote_cwd, - popen_args) - self.suite_run.remember_to_stop(proc, keepalive) - proc.launch() - return proc - - def generate_wrapper_script(self): - wrapper_script = self.run_dir.new_file(OsmoTrx.WRAPPER_SCRIPT) - with open(wrapper_script, 'w') as f: - r = """#!/bin/bash - mypid=0 - sign_handler() { - sig=$1 - echo "received signal handler $sig, killing $mypid" - kill $mypid - } - trap 'sign_handler SIGTERM' SIGTERM - trap 'sign_handler SIGINT' SIGINT - trap 'sign_handler SIGHUP' SIGHUP - "$@" & - mypid=$! - echo "waiting for $mypid" - wait $mypid - echo "process $mypid finished" - """ - f.write(r) - st = os.stat(wrapper_script) - os.chmod(wrapper_script, st.st_mode | stat.S_IEXEC) - return wrapper_script - - def inst_compatible_for_remote(self): - proc = process.run_remote_sync(self.run_dir, self.remote_user, self.listen_ip, 'uname-m', ('uname', '-m')) - if "x86_64" in (proc.get_stdout() or ''): - return True - return False - def start_remotely(self, keepalive): # Run remotely through ssh. We need to run osmo-trx under a wrapper # script since osmo-trx ignores SIGHUP and will keep running after # we close local ssh session. The wrapper script catches SIGHUP and # sends SIGINT to it. - remote_run_dir = util.Dir(OsmoTrx.REMOTE_DIR) + + rem_host = remote.RemoteHost(self.run_dir, self.remote_user, self.listen_ip) + + remote_prefix_dir = util.Dir(OsmoTrx.REMOTE_DIR) + remote_run_dir = util.Dir(remote_prefix_dir.child(self.binary_name())) remote_config_file = remote_run_dir.child(OsmoTrx.CONF_OSMO_TRX) - have_inst = self.inst_compatible_for_remote() + have_inst = rem_host.inst_compatible_for_remote() if have_inst: self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('osmo-trx'))) - # if self.inst is None, we still want to copy config file, create remote run dir, etc. - self.remote_inst = process.copy_inst_ssh(self.run_dir, self.inst, remote_run_dir, self.remote_user, - self.listen_ip, self.binary_name(), self.config_file) - - wrapper_script = self.generate_wrapper_script() - remote_wrapper_script = remote_run_dir.child(OsmoTrx.WRAPPER_SCRIPT) - process.scp(self.run_dir, self.remote_user, self.listen_ip, 'scp-wrapper-to-remote', wrapper_script, remote_wrapper_script) + rem_host.recreate_remote_dir(remote_prefix_dir) + if have_inst: + self.remote_inst = util.Dir(remote_prefix_dir.child(os.path.basename(str(self.inst)))) + rem_host.create_remote_dir(self.remote_inst) + rem_host.scp('scp-inst-to-remote', str(self.inst), remote_prefix_dir) + rem_host.create_remote_dir(remote_run_dir) + rem_host.scp('scp-cfg-to-remote', self.config_file, remote_config_file) if have_inst: remote_lib = self.remote_inst.child('lib') remote_binary = self.remote_inst.child('bin', self.binary_name()) - args = ('LD_LIBRARY_PATH=%s' % remote_lib, remote_wrapper_script, remote_binary, '-C', remote_config_file) + args = (remote_binary, '-C', remote_config_file) else: # Use whatever is available i nremote system PATH: - args = (remote_wrapper_script, self.binary_name(), '-C', remote_config_file) - - self.proc_trx = self.launch_process_remote(self.binary_name(), args, remote_cwd=remote_run_dir, keepalive=keepalive) + remote_lib = None + remote_binary = self.binary_name() + args = (remote_binary, '-C', remote_config_file) + self.proc_trx = rem_host.RemoteProcessFixIgnoreSIGHUP(self.binary_name(), remote_run_dir, args, prepend_ldlibpath=remote_lib) + self.suite_run.remember_to_stop(self.proc_trx, keepalive) + self.proc_trx.launch() ############## # PUBLIC (test API included) diff --git a/src/osmo_gsm_tester/bts_sysmo.py b/src/osmo_gsm_tester/bts_sysmo.py index 66d305a..d616e29 100644 --- a/src/osmo_gsm_tester/bts_sysmo.py +++ b/src/osmo_gsm_tester/bts_sysmo.py @@ -19,7 +19,7 @@ import os import pprint -from . import log, config, util, template, process, pcu_sysmo, bts_osmo +from . import log, config, util, template, process, remote, pcu_sysmo, bts_osmo class SysmoBts(bts_osmo.OsmoBts): ############## @@ -36,19 +36,12 @@ self.inst = None self.remote_inst = None self.remote_dir = None + self.proc_bts = None self.remote_user = 'root' def _direct_pcu_enabled(self): return util.str2bool(self.conf.get('direct_pcu')) - def launch_remote(self, name, popen_args, remote_cwd=None, keepalive=False): - run_dir = self.run_dir.new_dir(name) - proc = process.RemoteProcess(name, run_dir, self.remote_user, self.remote_addr(), remote_cwd, - popen_args) - self.suite_run.remember_to_stop(proc, keepalive) - proc.launch() - return proc - def create_pcu(self): return pcu_sysmo.OsmoPcuSysmo(self.suite_run, self, self.conf) @@ -110,17 +103,21 @@ if not self.inst.isfile('bin', SysmoBts.BTS_SYSMO_BIN): raise log.Error('No osmo-bts-sysmo binary in', self.inst) - remote_run_dir = util.Dir(SysmoBts.REMOTE_DIR) - - self.remote_inst = process.copy_inst_ssh(self.run_dir, self.inst, remote_run_dir, self.remote_user, - self.remote_addr(), SysmoBts.BTS_SYSMO_BIN, self.config_file) - process.run_remote_sync(self.run_dir, self.remote_user, self.remote_addr(), 'reload-dsp-firmware', - ('/bin/sh', '-c', '"cat /lib/firmware/sysmobts-v?.bit > /dev/fpgadl_par0 ; cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0"')) - + rem_host = remote.RemoteHost(self.run_dir, self.remote_user, self.remote_addr()) + remote_prefix_dir = util.Dir(SysmoBts.REMOTE_DIR) + self.remote_inst = util.Dir(remote_prefix_dir.child(os.path.basename(str(self.inst)))) + remote_run_dir = util.Dir(remote_prefix_dir.child(SysmoBts.BTS_SYSMO_BIN)) remote_config_file = remote_run_dir.child(SysmoBts.BTS_SYSMO_CFG) - remote_lib = self.remote_inst.child('lib') - remote_binary = self.remote_inst.child('bin', 'osmo-bts-sysmo') + rem_host.recreate_remote_dir(self.remote_inst) + rem_host.scp('scp-inst-to-remote', str(self.inst), remote_prefix_dir) + rem_host.create_remote_dir(remote_run_dir) + rem_host.scp('scp-cfg-to-remote', self.config_file, remote_config_file) + + rem_host.run_remote_sync('reload-dsp-firmware', ('/bin/sh', '-c', '"cat /lib/firmware/sysmobts-v?.bit > /dev/fpgadl_par0 ; cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0"')) + + remote_lib = self.remote_inst.child('lib') + remote_binary = self.remote_inst.child('bin', SysmoBts.BTS_SYSMO_BIN) args = ('LD_LIBRARY_PATH=%s' % remote_lib, remote_binary, '-c', remote_config_file, '-r', '1', '-i', self.bsc.addr()) @@ -128,6 +125,8 @@ if self._direct_pcu_enabled(): args += ('-M',) - self.proc_bts = self.launch_remote('osmo-bts-sysmo', args, remote_cwd=remote_run_dir, keepalive=keepalive) + self.proc_bts = rem_host.RemoteProcess(SysmoBts.BTS_SYSMO_BIN, args) + self.suite_run.remember_to_stop(self.proc_bts, keepalive) + self.proc_bts.launch() # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index 06da3bf..1c2f592 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -406,32 +406,4 @@ proc = NetNSProcess(name, run_dir, netns, popen_args) proc.launch_sync() return proc - -def run_remote_sync(run_dir, remote_user, remote_addr, name, popen_args, remote_cwd=None): - run_dir = run_dir.new_dir(name) - proc = RemoteProcess(name, run_dir, remote_user, remote_addr, remote_cwd, popen_args) - proc.launch_sync() - return proc - -def scp(run_dir, remote_user, remote_addr, name, local_path, remote_path): - run_local_sync(run_dir, name, ('scp', '-r', local_path, '%s@%s:%s' % (remote_user, remote_addr, remote_path))) - -# If no inst binaries copying is required (eg. because binary+libs is already available in distro), inst can be None. -def copy_inst_ssh(run_dir, inst, remote_dir, remote_user, remote_addr, remote_rundir_append, cfg_file_name): - remote_dir_str = str(remote_dir) - run_remote_sync(run_dir, remote_user, remote_addr, 'rm-remote-dir', ('test', '!', '-d', remote_dir_str, '||', 'rm', '-rf', remote_dir_str)) - run_remote_sync(run_dir, remote_user, remote_addr, 'mk-remote-dir', ('mkdir', '-p', remote_dir_str)) - if inst is not None: - remote_inst = Dir(remote_dir.child(os.path.basename(str(inst)))) - scp(run_dir, remote_user, remote_addr, 'scp-inst-to-remote', str(inst), remote_dir_str) - else: - remote_inst = None - - remote_run_dir = remote_dir.child(remote_rundir_append) - run_remote_sync(run_dir, remote_user, remote_addr, 'mk-remote-run-dir', ('mkdir', '-p', remote_run_dir)) - - remote_config_file = remote_dir.child(os.path.basename(cfg_file_name)) - scp(run_dir, remote_user, remote_addr, 'scp-cfg-to-remote', cfg_file_name, remote_config_file) - return remote_inst - # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py new file mode 100644 index 0000000..92dd113 --- /dev/null +++ b/src/osmo_gsm_tester/remote.py @@ -0,0 +1,117 @@ +# osmo_gsm_tester: specifics for remote nodes +# +# Copyright (C) 2020 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import stat +import os +import re +import pprint + +from . import log, util, config, template, process, osmo_ctrl, pcap_recorder + +class RemoteHost(log.Origin): + + WRAPPER_SCRIPT = 'ssh_sigkiller.sh' + + def __init__(self, run_dir, remote_user = 'root', remote_host = 'localhost', remote_cwd=None): + super().__init__(log.C_RUN, 'host-' + remote_user + '@' + remote_host) + self.run_dir = util.Dir(run_dir.new_dir(self.name())) + self.remote_user = remote_user + self.remote_host = remote_host + self.remote_cwd = remote_cwd + + def user(self): + return self.remote_user + + def host(self): + return self.remote_host + + def cwd(self): + return self.remote_cwd + + def RemoteProcess(self, name, popen_args, **popen_kwargs): + run_dir = self.run_dir.new_dir(name) + return process.RemoteProcess(name, run_dir, self.user(), self.host(), self.cwd(), popen_args, **popen_kwargs) + + def generate_wrapper_script(self): + wrapper_script = self.run_dir.new_file(RemoteHost.WRAPPER_SCRIPT) + with open(wrapper_script, 'w') as f: + r = """#!/bin/bash + mypid=0 + sign_handler() { + sig=$1 + echo "received signal handler $sig, killing $mypid" + kill $mypid + } + trap 'sign_handler SIGTERM' SIGTERM + trap 'sign_handler SIGINT' SIGINT + trap 'sign_handler SIGHUP' SIGHUP + $@ & + mypid=$! + echo "waiting for $mypid" + wait $mypid + echo "process $mypid finished" + """ + f.write(r) + st = os.stat(wrapper_script) + os.chmod(wrapper_script, st.st_mode | stat.S_IEXEC) + return wrapper_script + + def RemoteProcessFixIgnoreSIGHUP(self, name, remote_dir, popen_args, prepend_ldlibpath=None, **popen_kwargs): + # Run remotely through ssh. We need to run binary under a wrapper + # script since osmo-trx ignores SIGHUP and will keep running after + # we close local ssh session. The wrapper script catches SIGHUP and + # sends SIGINT to it. + self.create_remote_dir(remote_dir) + + wrapper_script = self.generate_wrapper_script() + remote_wrapper_script = remote_dir.child(RemoteHost.WRAPPER_SCRIPT) + self.scp('scp-wrapper-to-remote', wrapper_script, remote_wrapper_script) + + # Used fi to run stuff from an osmo-gsm-tester copied inst + if prepend_ldlibpath is not None: + args = ('LD_LIBRARY_PATH=%s' % prepend_ldlibpath, remote_wrapper_script,) + popen_args + else: + args = (remote_wrapper_script,) + popen_args + return self.RemoteProcess(name, args, **popen_kwargs) + + def run_remote_sync(self, name, popen_args): + proc = self.RemoteProcess(name, popen_args) + proc.launch_sync() + return proc + + def rm_remote_dir(self, remote_dir): + remote_dir_str = str(remote_dir) + self.run_remote_sync('rm-remote-dir', ('test', '!', '-d', remote_dir_str, '||', 'rm', '-rf', remote_dir_str)) + + def create_remote_dir(self, remote_dir): + remote_dir_str = str(remote_dir) + self.run_remote_sync('mk-remote-dir', ('mkdir', '-p', remote_dir_str)) + + def recreate_remote_dir(self, remote_dir): + self.rm_remote_dir(remote_dir) + self.create_remote_dir(remote_dir) + + def inst_compatible_for_remote(self): + proc = self.run_remote_sync('uname-m', ('uname', '-m')) + if "x86_64" in (proc.get_stdout() or ''): + return True + return False + + def scp(self, name, local_path, remote_path): + process.run_local_sync(self.run_dir, name, ('scp', '-r', local_path, '%s@%s:%s' % (self.user(), self.host(), remote_path))) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17065 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ifff5ded8fdb28e8ef267cebe6c5f30a910cae11a Gerrit-Change-Number: 17065 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:15:36 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:15:36 +0000 Subject: Change in osmo-pcu[master]: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17088 ) Change subject: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I50da7560939fac360b7545e2a6bfaf45ed0c4832 Gerrit-Change-Number: 17088 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 16:15:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:16:13 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:16:13 +0000 Subject: Change in osmo-pcu[master]: VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16347 ) Change subject: VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id7ce8c4e1ac43747ad40a06d01433c366da07b42 Gerrit-Change-Number: 16347 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 16:16:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:16:24 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:16:24 +0000 Subject: Change in osmo-pcu[master]: VTY: install talloc context introspection commands In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17092 ) Change subject: VTY: install talloc context introspection commands ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I2e1e26be1162b0fb695969e5ac265704adaf9d5c Gerrit-Change-Number: 17092 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 16:16:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:17:23 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:17:23 +0000 Subject: Change in osmo-pcu[master]: pcu_sock: cosmetic: fix typo in a comment message In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17094 ) Change subject: pcu_sock: cosmetic: fix typo in a comment message ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ia7e91d803152ac3f2af88f4552fced27f59d8270 Gerrit-Change-Number: 17094 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 16:17:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:18:34 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:18:34 +0000 Subject: Change in libosmocore[master]: tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17017 ) Change subject: tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ifb4c406c85d76a25fc53fc235484599aa87dc77c Gerrit-Change-Number: 17017 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 16:18:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:19:42 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:19:42 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17091 ) Change subject: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_field() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ia331048db9f790ca407fd341ced01df12d10a233 Gerrit-Change-Number: 17091 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 16:19:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:19:42 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 6 Feb 2020 16:19:42 +0000 Subject: Change in libosmocore[master]: tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17017 ) Change subject: tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() ...................................................................... tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() Some osmo-* applications may need to use their own VTY node as a parent for the timer configuration commands. Therefore it makes more sense to use 'unsigned int' instead of 'enum node_type'. Let's also clarify that osmo_tdef_vty_groups_init() accepts parent node for configuration commands only: 'parent_node' -> 'parent_cfg_node'. Change-Id: Ifb4c406c85d76a25fc53fc235484599aa87dc77c --- M include/osmocom/vty/tdef_vty.h M src/vty/tdef_vty.c 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/vty/tdef_vty.h b/include/osmocom/vty/tdef_vty.h index 6334d5b..800af7d 100644 --- a/include/osmocom/vty/tdef_vty.h +++ b/include/osmocom/vty/tdef_vty.h @@ -68,7 +68,7 @@ struct osmo_tdef *osmo_tdef_vty_parse_T_arg(struct vty *vty, struct osmo_tdef *tdefs, const char *osmo_tdef_str); unsigned long osmo_tdef_vty_parse_val_arg(const char *val_arg, unsigned long default_val); -void osmo_tdef_vty_groups_init(enum node_type parent_node, struct osmo_tdef_group *groups); +void osmo_tdef_vty_groups_init(unsigned int parent_cfg_node, struct osmo_tdef_group *groups); void osmo_tdef_vty_groups_write(struct vty *vty, const char *indent); /*! @} */ diff --git a/src/vty/tdef_vty.c b/src/vty/tdef_vty.c index 4549a61..fe6d48b 100644 --- a/src/vty/tdef_vty.c +++ b/src/vty/tdef_vty.c @@ -361,10 +361,10 @@ * The given timer definitions group is stored in a global pointer, so this can be done only once per main() scope. * It would also be possible to have distinct timer groups on separate VTY subnodes, with a "manual" implementation, but * not with this API. - * \param[in] parent_node VTY node id at which to add the timer group commands, e.g. CONFIG_NODE. + * \param[in] parent_cfg_node VTY node at which to add the timer configuration commands, e.g. CONFIG_NODE. * \param[in] groups Global timer groups definition. */ -void osmo_tdef_vty_groups_init(enum node_type parent_node, struct osmo_tdef_group *groups) +void osmo_tdef_vty_groups_init(unsigned int parent_cfg_node, struct osmo_tdef_group *groups) { struct osmo_tdef_group *g; OSMO_ASSERT(!global_tdef_groups); @@ -380,7 +380,7 @@ cfg_timer_cmd.doc = timer_doc_string("Configure or show timers\n", OSMO_TDEF_VTY_DOC_SET); install_element_ve(&show_timer_cmd); - install_element(parent_node, &cfg_timer_cmd); + install_element(parent_cfg_node, &cfg_timer_cmd); } /*! Write the global osmo_tdef_group configuration to VTY, as previously passed to osmo_tdef_vty_groups_init(). -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ifb4c406c85d76a25fc53fc235484599aa87dc77c Gerrit-Change-Number: 17017 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:19:47 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:19:47 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17091 ) Change subject: csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_field() ...................................................................... csn1: fix csnStreamDecoder(): avoid conditional calls to bitvec_read_field() As was discovered by pespin, changing logging level of DCSN1 makes the CSN.1 decoder behave differently (see OS#4375). In particular, this makes RLCMACTest (encode / decode test) fail. I did a quick investigation and noticed that some of the logging statements call bitvec_read_field(). By definition this function moves the internal pointer (current bit position) of a given vector and increments readIndex by a given amount of bits. The problem is that LOGPC would not evaluate its format string if the logging message is not going to be printed, e.g. if a given logging level is lower than the current one, or in case if logging is not enabled at all. The first two conditional calls to bitvec_read_field() are related to CSN_PADDING_BITS, so that's not critical because padding is always in the end of messages. The later two are related to CSN_RECURSIVE_ARRAY and CSN_RECURSIVE_TARRAY respectively. Let's use bitvec_get_uint() instead to keep readIndex unchanged. Change-Id: Ia331048db9f790ca407fd341ced01df12d10a233 Fixes: OS#4375 --- M src/csn1.cpp 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/csn1.cpp b/src/csn1.cpp index d358286..2f8bd03 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -1156,13 +1156,13 @@ guint bits_to_handle = remaining_bits_len%8; if (bits_to_handle > 0) { - LOGPC(DCSN1, LOGL_NOTICE, "%" PRIu64 "|", bitvec_read_field(vector, &readIndex, bits_to_handle)); + LOGPC(DCSN1, LOGL_NOTICE, "%d|", bitvec_get_uint(vector, bits_to_handle)); remaining_bits_len -= bits_to_handle; bit_offset += bits_to_handle; } else if (bits_to_handle == 0) { - LOGPC(DCSN1, LOGL_NOTICE, "%" PRIu64 "|", bitvec_read_field(vector, &readIndex, 8)); + LOGPC(DCSN1, LOGL_NOTICE, "%d|", bitvec_get_uint(vector, 8)); remaining_bits_len -= 8; bit_offset += 8; } @@ -1250,7 +1250,7 @@ bit_offset += no_of_bits; } - LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)bitvec_read_field(vector, &readIndex, 1)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , bitvec_get_uint(vector, 1)); /* existNextElement() returned FALSE, 1 bit consumed */ bit_offset++; remaining_bits_len--; @@ -1303,7 +1303,7 @@ } } - LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)bitvec_read_field(vector, &readIndex, 1)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , bitvec_get_uint(vector, 1)); /* existNextElement() returned FALSE, 1 bit consumed */ bit_offset++; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17091 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ia331048db9f790ca407fd341ced01df12d10a233 Gerrit-Change-Number: 17091 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:20:01 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:20:01 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 ) Change subject: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g ...................................................................... Patch Set 14: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 Gerrit-Change-Number: 15487 Gerrit-PatchSet: 14 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Thu, 06 Feb 2020 16:20:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:20:15 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:20:15 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm: Check for RAT change and ensure this only happens for RAU/ATT In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/17081 ) Change subject: gprs_gmm: Check for RAT change and ensure this only happens for RAU/ATT ...................................................................... gprs_gmm: Check for RAT change and ensure this only happens for RAU/ATT Change-Id: I38cb31907eddeade5350cdb648df179408d908d2 Related: OS#3727 --- M src/sgsn/gprs_gmm.c 1 file changed, 27 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve lynxis lazus: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index f62d0d1..c574dac 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -1099,6 +1099,16 @@ osmo_fsm_inst_dispatch(ctx->gmm_fsm, E_GMM_COMMON_PROC_INIT_REQ, NULL); } +/* Detect if RAT has changed */ +static bool mmctx_did_rat_change(struct sgsn_mm_ctx *mmctx, struct msgb *msg) +{ + if (MSG_IU_UE_CTX(msg) && mmctx->ran_type != MM_CTX_T_UTRAN_Iu) + return true; + if (!MSG_IU_UE_CTX(msg) && mmctx->ran_type != MM_CTX_T_GERAN_Gb) + return true; + return false; +} + /* 3GPP TS 24.008 ? 9.4.1 Attach request */ static int gsm48_rx_gmm_att_req(struct sgsn_mm_ctx *ctx, struct msgb *msg, struct gprs_llc_llme *llme) @@ -1944,6 +1954,23 @@ return rc; } + /* A RAT change is only expected/allowed for RAU/Attach Req */ + if (mmctx && mmctx_did_rat_change(mmctx, msg)) { + switch (gh->msg_type) { + case GSM48_MT_GMM_RA_UPD_REQ: + case GSM48_MT_GMM_ATTACH_REQ: + break; + default: + /* This shouldn't happen with other message types and + * we need to error out to prevent a crash */ + LOGMMCTXP(LOGL_NOTICE, mmctx, "Dropping GMM %s which was received on different " + "RAT (mmctx ran_type=%u, msg_iu_ue_ctx=%p\n", + get_value_string(gprs_msgt_gmm_names, gh->msg_type), + mmctx->ran_type, MSG_IU_UE_CTX(msg)); + return -EINVAL; + } + } + /* * For a few messages, mmctx may be NULL. For most, we want to ensure a * non-NULL mmctx. At the same time, we want to keep the message -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/17081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I38cb31907eddeade5350cdb648df179408d908d2 Gerrit-Change-Number: 17081 Gerrit-PatchSet: 2 Gerrit-Owner: daniel Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:20:16 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:20:16 +0000 Subject: Change in osmo-sgsn[master]: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 ) Change subject: gprs_gmm_fsm.c: Implement RAT change between 2g and 3g ...................................................................... gprs_gmm_fsm.c: Implement RAT change between 2g and 3g Related: OS#2737 Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 --- M include/osmocom/sgsn/gprs_gmm_fsm.h M src/sgsn/gprs_gmm.c M src/sgsn/gprs_gmm_fsm.c 3 files changed, 63 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/sgsn/gprs_gmm_fsm.h b/include/osmocom/sgsn/gprs_gmm_fsm.h index fd5b4bf..f10851e 100644 --- a/include/osmocom/sgsn/gprs_gmm_fsm.h +++ b/include/osmocom/sgsn/gprs_gmm_fsm.h @@ -1,6 +1,8 @@ #pragma once #include +#include + /* 3GPP TS 24.008 ? 4.1.3.3 GMM mobility management states on the network side */ enum gmm_fsm_states { @@ -23,6 +25,12 @@ E_GMM_SUSPEND, E_GMM_RESUME, E_GMM_CLEANUP, + E_GMM_RAT_CHANGE, +}; + +struct gmm_rat_change_data { + enum sgsn_ran_type new_ran_type; + struct gprs_llc_llme *llme; }; static inline bool gmm_fsm_is_registered(struct osmo_fsm_inst *fi) diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index c574dac..03ff513 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -1109,6 +1109,23 @@ return false; } +/* Notify the FSM of a RAT change */ +static void mmctx_handle_rat_change(struct sgsn_mm_ctx *mmctx, struct msgb *msg, struct gprs_llc_llme *llme) +{ + struct gmm_rat_change_data rat_chg = { + .llme = llme + }; + + rat_chg.new_ran_type = MSG_IU_UE_CTX(msg) ? MM_CTX_T_UTRAN_Iu : MM_CTX_T_GERAN_Gb; + + if (rat_chg.new_ran_type != mmctx->ran_type) + osmo_fsm_inst_dispatch(mmctx->gmm_fsm, E_GMM_RAT_CHANGE, (void *) &rat_chg); + else + LOGMMCTXP(LOGL_ERROR, mmctx, "RAT didn't change or not implemented (ran_type=%u, " + "msg_iu_ue_ctx=%p\n", mmctx->ran_type, MSG_IU_UE_CTX(msg)); + +} + /* 3GPP TS 24.008 ? 9.4.1 Attach request */ static int gsm48_rx_gmm_att_req(struct sgsn_mm_ctx *ctx, struct msgb *msg, struct gprs_llc_llme *llme) @@ -1234,6 +1251,9 @@ goto rejected; } + if (mmctx_did_rat_change(ctx, msg)) + mmctx_handle_rat_change(ctx, msg, llme); + if (ctx->ran_type == MM_CTX_T_GERAN_Gb) { ctx->gb.tlli = msgb_tlli(msg); ctx->gb.llme = llme; @@ -1614,7 +1634,12 @@ mmctx->p_tmsi, mmctx->p_tmsi_old, mmctx->gb.tlli, mmctx->gb.tlli_new, osmo_rai_name(&mmctx->ra)); - osmo_fsm_inst_dispatch(mmctx->gmm_fsm, E_GMM_COMMON_PROC_INIT_REQ, NULL); + /* A RAT change will trigger the common procedure + * below after handling the RAT change. Protect it + * here from being called twice */ + if (!mmctx_did_rat_change(mmctx, msg)) + osmo_fsm_inst_dispatch(mmctx->gmm_fsm, E_GMM_COMMON_PROC_INIT_REQ, NULL); + } } else if (!gprs_ra_id_equals(&mmctx->ra, &old_ra_id) || mmctx->gmm_fsm->state == ST_GMM_DEREGISTERED) @@ -1646,6 +1671,11 @@ goto rejected; } + if (mmctx_did_rat_change(mmctx, msg)) { + mmctx_handle_rat_change(mmctx, msg, llme); + osmo_fsm_inst_dispatch(mmctx->gmm_fsm, E_GMM_COMMON_PROC_INIT_REQ, NULL); + } + /* Store new BVCI/NSEI in MM context (FIXME: delay until we ack?) */ msgid2mmctx(mmctx, msg); /* Bump the statistics of received signalling msgs for this MM context */ diff --git a/src/sgsn/gprs_gmm_fsm.c b/src/sgsn/gprs_gmm_fsm.c index 94ecb50..37ea904 100644 --- a/src/sgsn/gprs_gmm_fsm.c +++ b/src/sgsn/gprs_gmm_fsm.c @@ -1,6 +1,8 @@ #include #include +#include +#include #include #include @@ -149,11 +151,32 @@ /* OSMO_VALUE_STRING(E_GMM_DETACH_ACCEPTED), */ OSMO_VALUE_STRING(E_GMM_SUSPEND), OSMO_VALUE_STRING(E_GMM_CLEANUP), + OSMO_VALUE_STRING(E_GMM_RAT_CHANGE), { 0, NULL } }; void gmm_fsm_allstate_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct sgsn_mm_ctx *mmctx = fi->priv; + struct gmm_rat_change_data *rat_chg = (struct gmm_rat_change_data *)data; + switch (event) { + case E_GMM_RAT_CHANGE: + + switch (fi->state) { + case ST_GMM_COMMON_PROC_INIT: + gmm_fsm_state_chg(fi, ST_GMM_DEREGISTERED); + default: + if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) + osmo_fsm_inst_dispatch(mmctx->gb.mm_state_fsm, E_MM_IMPLICIT_DETACH, NULL); + else if (mmctx->ran_type == MM_CTX_T_UTRAN_Iu) { + osmo_fsm_inst_dispatch(mmctx->iu.mm_state_fsm, E_PMM_IMPLICIT_DETACH, NULL); + mmctx->gb.llme = rat_chg->llme; + } + + mmctx->ran_type = rat_chg->new_ran_type; + break; + } + case E_GMM_CLEANUP: switch (fi->state) { case ST_GMM_DEREGISTERED: @@ -175,7 +198,7 @@ .states = gmm_fsm_states, .num_states = ARRAY_SIZE(gmm_fsm_states), .event_names = gmm_fsm_event_names, - .allstate_event_mask = X(E_GMM_CLEANUP), + .allstate_event_mask = X(E_GMM_CLEANUP) | X(E_GMM_RAT_CHANGE), .allstate_action = gmm_fsm_allstate_action, .log_subsys = DMM, .timer_cb = gmm_fsm_timer_cb, -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15487 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I3fc614da6ba137e871ee0fe86ca22b6a4a354dd2 Gerrit-Change-Number: 15487 Gerrit-PatchSet: 14 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:01 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:01 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Add missing dep python3-setuptools In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17083 ) Change subject: ansible: gsm-tester: Add missing dep python3-setuptools ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I80785a4061e91126092a04080a2c9fdb288be49a Gerrit-Change-Number: 17083 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 06 Feb 2020 16:21:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:14 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:14 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_home In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17073 ) Change subject: hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_home ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17073 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: Id567989e4be7ac2d3857d3ea61a1ca3a2401a8dc Gerrit-Change-Number: 17073 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 06 Feb 2020 16:21:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:19 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:19 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add TC_MSLookup_GSUP_proxy In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17064 ) Change subject: hlr: add TC_MSLookup_GSUP_proxy ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17064 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: I945e651f1346e56dbe3c02d9d08ccd95cc8d6626 Gerrit-Change-Number: 17064 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-CC: neels Gerrit-Comment-Date: Thu, 06 Feb 2020 16:21:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:23 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:23 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/DNS_Helpers: add f_enc_IPv4 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17063 ) Change subject: library/DNS_Helpers: add f_enc_IPv4 ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17063 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: I8a5450988711680c93cfd657a34db759a56bc41e Gerrit-Change-Number: 17063 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 06 Feb 2020 16:21:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:29 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:29 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add emulated GSUP server (second HLR) In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17061 ) Change subject: hlr: add emulated GSUP server (second HLR) ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17061 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: Idbfe8a145c90a524145089a06d9bbefac4d7edd8 Gerrit-Change-Number: 17061 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 06 Feb 2020 16:21:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:34 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:34 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add TC_MSLookup_mDNS_service_other_home In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16914 ) Change subject: hlr: add TC_MSLookup_mDNS_service_other_home ...................................................................... Patch Set 10: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16914 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: Ia7f92d33691f910549353b16a7b0efc18e521719 Gerrit-Change-Number: 16914 Gerrit-PatchSet: 10 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 16:21:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:42 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:42 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_proxy In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17074 ) Change subject: hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_proxy ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17074 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: Ic42c909e6540b2294b1109dc19c1df348224457b Gerrit-Change-Number: 17074 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 06 Feb 2020 16:21:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:44 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:44 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add TC_MSLookup_mDNS_service_other_proxy In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17075 ) Change subject: hlr: add TC_MSLookup_mDNS_service_other_proxy ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17075 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: I2c956119783972b5e6828bed7554a8a79984d8a2 Gerrit-Change-Number: 17075 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 06 Feb 2020 16:21:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:47 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps: set titan.TestPorts.UDPasp_commit In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17060 ) Change subject: deps: set titan.TestPorts.UDPasp_commit ...................................................................... deps: set titan.TestPorts.UDPasp_commit Fixes: 7c5cb6eb8aa7 ("deps: use UDPasp from osmocom github fork") Change-Id: I141b906d2a5969afb5f6e27413fa1c18c54d5708 --- M deps/Makefile 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/deps/Makefile b/deps/Makefile index b04db9d..d896889 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -122,7 +122,7 @@ titan.TestPorts.SIPmsg_commit= R.15.A-1-ge4f9dd0 titan.TestPorts.TCPasp_commit= R.9.A-5-g2c91bc6 titan.TestPorts.TELNETasp_commit= R.9.A-3-g62f281b -titan.TestPorts.UDPasp_commit= R.8.B-3-gbf5e87b +titan.TestPorts.UDPasp_commit= c20d77a34f288dd70dd4aaa30e520778876e9336 titan.TestPorts.UNIX_DOMAIN_SOCKETasp_commit= R.2.A-8-g7ec4fe0 titan.TestPorts.USB_commit= master -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17060 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: I141b906d2a5969afb5f6e27413fa1c18c54d5708 Gerrit-Change-Number: 17060 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:49 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:49 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add TC_MSLookup_mDNS_service_other_home In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16914 ) Change subject: hlr: add TC_MSLookup_mDNS_service_other_home ...................................................................... hlr: add TC_MSLookup_mDNS_service_other_home Send an mslookup mDNS request to the home HLR, asking about a service that is not "gsup.hlr". Hence the "_other" in the test name, service "gsup.hlr" has different code paths, and related tests will be added in follow-up patches. This is the first test using MSLookup_mDNS_Emulation, so add related test infrastructure. Related: OS#4380 Depends: osmo-hlr I2fe453553c90e6ee527ed13a13089900efd488aa Change-Id: Ia7f92d33691f910549353b16a7b0efc18e521719 --- M hlr/HLR_Tests.cfg M hlr/HLR_Tests.default M hlr/HLR_Tests.ttcn M hlr/gen_links.sh M hlr/regen_makefile.sh A library/MSLookup_mDNS_Emulation.ttcn A library/MSLookup_mDNS_Templates.ttcn A library/MSLookup_mDNS_Types.ttcn 8 files changed, 275 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/hlr/HLR_Tests.cfg b/hlr/HLR_Tests.cfg index 7416362..1ab6e87 100644 --- a/hlr/HLR_Tests.cfg +++ b/hlr/HLR_Tests.cfg @@ -12,6 +12,7 @@ [MODULE_PARAMETERS] +HLR_Tests.mp_hlr_supports_dgsm := true [MAIN_CONTROLLER] diff --git a/hlr/HLR_Tests.default b/hlr/HLR_Tests.default index 84d4ff3..2e9aac6 100644 --- a/hlr/HLR_Tests.default +++ b/hlr/HLR_Tests.default @@ -11,6 +11,11 @@ *.VTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes" *.VTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes" *.VTY.PROMPT1 := "OsmoHLR> " +*.mDNS_UDP.debugging := "YES" +*.mDNS_UDP.localPort := "4266" +*.mDNS_UDP.localIPAddr := "239.192.23.42" +*.mDNS_UDP.broadcast := "enabled" +*.mDNS_UDP.reuseAddr := "enabled" [MODULE_PARAMETERS] Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoHLR"; diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index b59f86e..c1cc129 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -31,6 +31,10 @@ import from Osmocom_VTY_Functions all; import from TELNETasp_PortType all; +import from MSLookup_mDNS_Types all; +import from MSLookup_mDNS_Emulation all; +import from MSLookup_mDNS_Templates all; + type component test_CT extends CTRL_Adapter_CT { var IPA_Emulation_CT vc_IPA; var IPA_CCM_Parameters ccm_pars; @@ -43,6 +47,8 @@ port TELNETasp_PT VTY; + var MSLookup_mDNS_Emulation_CT vc_MSLookup_mDNS; + timer g_Tguard := 10.0; }; @@ -53,6 +59,9 @@ /* how many auth tuples are expected when IE ts_GSUP_IE_NUM_VECTORS_REQ is absent */ integer mp_default_num_auth_tuples := 5; + + /* drop after osmo-hlr release > 1.2.0 */ + boolean mp_hlr_supports_dgsm := true; }; type record HlrSubscrAud2G { @@ -80,6 +89,7 @@ timer g_Tguard := 10.0; var HLR_ConnHdlrPars g_pars; port TELNETasp_PT VTY; + port MSLookup_mDNS_PT mDNS; } type record HLR_ConnHdlrPars { @@ -116,6 +126,9 @@ map(self:VTY, system:VTY); f_vty_set_prompts(VTY); f_vty_transceive(VTY, "enable"); + if (mp_hlr_supports_dgsm) { + f_vty_config(VTY, "mslookup", "no mdns bind"); + } } private altstep as_Tguard() runs on test_CT { @@ -167,6 +180,11 @@ } } +function f_init_mslookup() runs on test_CT { + vc_MSLookup_mDNS := MSLookup_mDNS_Emulation_CT.create; + vc_MSLookup_mDNS.start(MSLookup_mDNS_Emulation.f_main()); +} + function f_init(boolean legacy := true) runs on test_CT { /* activate default guard timer to ensure all tests eventually terminate */ @@ -175,6 +193,7 @@ f_init_gsup("HLR_Test", legacy); f_init_vty(); + f_init_mslookup(); f_ipa_ctrl_start(mp_hlr_ip, mp_hlr_ctrl_port); } @@ -186,6 +205,7 @@ vc_conn := HLR_ConnHdlr.create(id); connect(vc_conn:GSUP, vc_GSUP:GSUP_CLIENT); connect(vc_conn:GSUP_PROC, vc_GSUP:GSUP_PROC); + connect(vc_conn:mDNS, vc_MSLookup_mDNS:mDNS); vc_conn.start(f_handler_init(fn, id, pars)); return vc_conn; @@ -1511,6 +1531,66 @@ vc_conn.done; } +/* Send an mslookup mDNS request to the home HLR, asking about a service that is not "gsup.hlr". (Hence the "_other" in + * the test name, service "gsup.hlr" has different code paths, see related tests). */ +private function f_TC_MSLookup_mDNS_service_other_home() runs on HLR_ConnHdlr { + timer T; + var MSLookup_mDNS vl_rmsg; + var integer id := f_rnd_int(65535); /* mDNS packet ID */ + var hexstring msisdn := '49161'H & f_rnd_hexstring(7, 9); + var charstring domain := "sip.voice." & hex2str(msisdn) & ".msisdn.mdns.osmocom.org"; + + /* Create subscriber */ + g_pars.sub.msisdn := msisdn; + f_vty_subscr_create(VTY, g_pars.sub); + + /* Send mDNS query, expect timeout */ + mDNS.send(ts_MSLookup_mDNS_query(id, domain)); + T.start(1.0); + alt { + [] mDNS.receive(tr_MSLookup_mDNS_result_IPv4(id, domain, '42424242'O, 5060)) { + setverdict(fail, "OsmoHLR answered to mDNS query before subscriber did LU"); + } + [] mDNS.receive(MSLookup_mDNS:?) -> value vl_rmsg { + repeat; + } + [] T.timeout { + } + } + + /* Location update */ + f_perform_UL(g_pars.sub.imsi, msisdn, dom := OSMO_GSUP_CN_DOMAIN_CS); + + /* Send mDNS query again, expect result */ + mDNS.send(ts_MSLookup_mDNS_query(id, domain)); + T.start(1.0); + alt { + [] mDNS.receive(tr_MSLookup_mDNS_result_IPv4(id, domain, '42424242'O, 5060)) { + setverdict(pass); + } + [] mDNS.receive(MSLookup_mDNS:?) -> value vl_rmsg { + repeat; + } + [] T.timeout { + setverdict(fail, "OsmoHLR did not answer to mDNS query"); + } + } + + f_vty_subscr_delete(VTY, g_pars.sub); +} +testcase TC_MSLookup_mDNS_service_other_home() runs on test_CT { + var hexstring imsi := f_rnd_imsi('26242'H); + var HLR_ConnHdlr vc_conn; + var HLR_ConnHdlrPars pars := valueof(t_Pars(imsi)); + + f_init(false); + f_vty_config(VTY, "mslookup", "mdns bind"); + f_vty_config2(VTY, {"mslookup", "server"}, "service sip.voice at 66.66.66.66 5060"); + + vc_conn := f_start_handler(refers(f_TC_MSLookup_mDNS_service_other_home), pars); + vc_conn.done; +} + /* TODO: * UL with ISD error * UL with ISD timeout @@ -1556,6 +1636,10 @@ execute( TC_subscr_create_on_demand_check_imei_early() ); execute( TC_subscr_create_on_demand_ul() ); execute( TC_subscr_create_on_demand_sai() ); + + if (mp_hlr_supports_dgsm) { + execute( TC_MSLookup_mDNS_service_other_home() ); + } }; }; diff --git a/hlr/gen_links.sh b/hlr/gen_links.sh index 872820d..14a3f8d 100755 --- a/hlr/gen_links.sh +++ b/hlr/gen_links.sh @@ -35,11 +35,20 @@ FILES+="SS_DataTypes.asn SS_Errors.asn SS_Operations.asn SS_PDU_Defs.asn SS_Protocol.asn SS_Types.ttcn SS_EncDec.cc" gen_links $DIR $FILES +DIR=$BASEDIR/titan.ProtocolModules.DNS/src +FILES="DNS_EncDec.cc DNS_Types.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.UDPasp/src +FILES="UDPasp_PT.cc UDPasp_PT.hh UDPasp_PortType.ttcn UDPasp_Types.ttcn" +gen_links $DIR $FILES + DIR=../library FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp GSUP_Types.ttcn GSUP_Emulation.ttcn " FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn " FILES+="Osmocom_VTY_Functions.ttcn " FILES+="SS_Templates.ttcn USSD_Helpers.ttcn " +FILES+="MSLookup_mDNS_Types.ttcn MSLookup_mDNS_Emulation.ttcn MSLookup_mDNS_Templates.ttcn" gen_links $DIR $FILES diff --git a/hlr/regen_makefile.sh b/hlr/regen_makefile.sh index 1a1d812..14b05da 100755 --- a/hlr/regen_makefile.sh +++ b/hlr/regen_makefile.sh @@ -2,7 +2,7 @@ MAIN="HLR_Tests.ttcn" -FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc TELNETasp_PT.cc TCCEncoding.cc SS_EncDec.cc MAP_EncDec.cc *.asn" +FILES="*.ttcn *.ttcnpp DNS_EncDec.cc IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc TELNETasp_PT.cc TCCEncoding.cc UDPasp_PT.cc SS_EncDec.cc MAP_EncDec.cc *.asn" export CPPFLAGS_TTCN3="-DIPA_EMULATION_GSUP -DIPA_EMULATION_CTRL" diff --git a/library/MSLookup_mDNS_Emulation.ttcn b/library/MSLookup_mDNS_Emulation.ttcn new file mode 100644 index 0000000..029091d --- /dev/null +++ b/library/MSLookup_mDNS_Emulation.ttcn @@ -0,0 +1,45 @@ +module MSLookup_mDNS_Emulation { + +/* (C) 2020 sysmocom s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +import from DNS_Types all; +import from UDPasp_Types all; +import from MSLookup_mDNS_Types all; + +/* Transcode between mDNS and UDP: + Wait for DNS packets on the mDNS port, encode them as UDP and forward them to the mDNS_UDP port. + Wait for UDP packets on mDNS_UDP port, decode them as DNS and forward them to the mDNS port. */ +function f_main() runs on MSLookup_mDNS_Emulation_CT +{ + var MSLookup_mDNS vl_dnsmsg; + var ASP_UDP vl_udpmsg; + map(self:mDNS_UDP, system:UDP); + alt { + [] mDNS_UDP.receive(ASP_UDP:?) -> value vl_udpmsg { + mDNS.send(MSLookup_mDNS: { + dec_PDU_DNS(vl_udpmsg.data), + vl_udpmsg.addressf, + vl_udpmsg.portf + }); + repeat; + } + [] mDNS.receive(MSLookup_mDNS:?) -> value vl_dnsmsg { + mDNS_UDP.send(ASP_UDP: { + enc_PDU_DNS(vl_dnsmsg.dnsMessage, false, true), + vl_dnsmsg.udpAddress, + vl_dnsmsg.udpPort + }); + repeat; + } + } + unmap(self:mDNS_UDP, system:UDP); +} + +} diff --git a/library/MSLookup_mDNS_Templates.ttcn b/library/MSLookup_mDNS_Templates.ttcn new file mode 100644 index 0000000..123ec16 --- /dev/null +++ b/library/MSLookup_mDNS_Templates.ttcn @@ -0,0 +1,99 @@ + +/* (C) 2020 by sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +module MSLookup_mDNS_Templates { + +import from DNS_Types all; +import from MSLookup_mDNS_Types all; + +template MSLookup_mDNS ts_MSLookup_mDNS_query(integer id, charstring domain) := { + dnsMessage := { + header := { + id := id, + qr := DNS_QUERY, + opCode := 0, + aa := false, + tc := false, + rd := false, + ra := false, + z := '000'B, + rCode := DNS_NO_ERROR, + qdCount := 1, + anCount := 0, + nsCount := 0, + arCount := 0 + }, + queries := { + { + qName := domain, + qType := 255, + qClass := DNS_IN + } + }, + answers := {}, + nameServerRecords := {}, + additionalRecords := {} + }, + udpAddress := "239.192.23.42", + udpPort := 4266 +} + +template MSLookup_mDNS tr_MSLookup_mDNS_result_IPv4(integer id, charstring domain, UInt32 ip_v4, integer port_v4) := { + dnsMessage := { + header := { + id := id, + qr := DNS_RESPONSE, + opCode := DNS_OP_QUERY, + aa := false, + tc := false, + rd := false, + ra := false, + z := '000'B, + rCode := DNS_NO_ERROR, + qdCount := 0, + anCount := 3, + nsCount := 0, + arCount := 0 + }, + queries := {}, + answers := { + { + name := domain, + rrType := DNS_TXT, + rrClass := DNS_IN, + ttl := ?, + rdLength := ?, + rData := {txt := {pattern "age=*"}} + }, + { + name := domain, + rrType := DNS_A, + rrClass := DNS_IN, + ttl := ?, + rdLength := ?, + rData := {a := ip_v4} + }, + { + name := domain, + rrType := DNS_TXT, + rrClass := DNS_IN, + ttl := ?, + rdLength := ?, + rData := {txt := {"port=" & int2str(port_v4)}} + } + }, + nameServerRecords := {}, + additionalRecords := {} + }, + udpAddress := ?, + udpPort := ? +} + +} diff --git a/library/MSLookup_mDNS_Types.ttcn b/library/MSLookup_mDNS_Types.ttcn new file mode 100644 index 0000000..dacbb2b --- /dev/null +++ b/library/MSLookup_mDNS_Types.ttcn @@ -0,0 +1,31 @@ +module MSLookup_mDNS_Types { + +/* (C) 2020 sysmocom s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +import from DNS_Types all; +import from UDPasp_Types all; +import from UDPasp_PortType all; + +type record MSLookup_mDNS { + PDU_DNS dnsMessage, + AddressType udpAddress, + PortType udpPort +} + +type port MSLookup_mDNS_PT message { + inout MSLookup_mDNS +} with { extension "internal" } + +type component MSLookup_mDNS_Emulation_CT { + port MSLookup_mDNS_PT mDNS; + port UDPasp_PT mDNS_UDP; +} + +} -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16914 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: Ia7f92d33691f910549353b16a7b0efc18e521719 Gerrit-Change-Number: 16914 Gerrit-PatchSet: 11 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:49 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:49 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add emulated GSUP server (second HLR) In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17061 ) Change subject: hlr: add emulated GSUP server (second HLR) ...................................................................... hlr: add emulated GSUP server (second HLR) Prepare for upcoming D-GSM test, which needs to emulate a GSUP server. Related: OS#4380 Change-Id: Idbfe8a145c90a524145089a06d9bbefac4d7edd8 --- M hlr/HLR_Tests.ttcn M library/GSUP_Emulation.ttcn 2 files changed, 73 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index c1cc129..5e9eea6 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -36,6 +36,7 @@ import from MSLookup_mDNS_Templates all; type component test_CT extends CTRL_Adapter_CT { + /* emulated GSUP client (MSC/SGSN) */ var IPA_Emulation_CT vc_IPA; var IPA_CCM_Parameters ccm_pars; /* legacy tests without ConnHdlr */ @@ -49,10 +50,15 @@ var MSLookup_mDNS_Emulation_CT vc_MSLookup_mDNS; + /* emulated GSUP server (second HLR) */ + var IPA_Emulation_CT vc_IPA_server; + var GSUP_Emulation_CT vc_GSUP_server; + timer g_Tguard := 10.0; }; modulepar { + /* OsmoHLR */ charstring mp_hlr_ip := "127.0.0.1"; integer mp_hlr_gsup_port := 4222; integer mp_hlr_ctrl_port := 4259; @@ -60,6 +66,10 @@ when IE ts_GSUP_IE_NUM_VECTORS_REQ is absent */ integer mp_default_num_auth_tuples := 5; + /* emulated GSUP server (second HLR) */ + charstring mp_hlr_ts_ip := "127.0.0.99"; + integer mp_hlr_ts_port := 4222; + /* drop after osmo-hlr release > 1.2.0 */ boolean mp_hlr_supports_dgsm := true; }; @@ -90,6 +100,11 @@ var HLR_ConnHdlrPars g_pars; port TELNETasp_PT VTY; port MSLookup_mDNS_PT mDNS; + + /* Pass from test_CT for explicit addressing */ + var GSUP_Emulation_CT vc_GSUP_server; + var GSUP_Emulation_CT vc_GSUP_client; + var IPA_CCM_Parameters ccm_pars_client; } type record HLR_ConnHdlrPars { @@ -138,6 +153,7 @@ } } +/* emulated GSUP client (MSC/SGSN) */ function f_init_gsup(charstring id, boolean legacy) runs on test_CT { id := id & "-GSUP"; var GsupOps ops := { @@ -180,12 +196,29 @@ } } +/* emulated GSUP server (second HLR) */ +function f_init_gsup_server(charstring id) runs on test_CT { + id := id & "-GSUP-server"; + var GsupOps ops := { + create_cb := refers(GSUP_Emulation.ExpectedCreateCallback) + } + + vc_GSUP_server := GSUP_Emulation_CT.create(id); + vc_IPA_server := IPA_Emulation_CT.create(id & "-IPA"); + + connect(vc_GSUP_server:GSUP, vc_IPA_server:IPA_GSUP_PORT); + map(vc_IPA_server:IPA_PORT, system:IPA_CODEC_PT); + + vc_GSUP_server.start(GSUP_Emulation.main(ops, id)); + vc_IPA_server.start(IPA_Emulation.main_server(mp_hlr_ts_ip, mp_hlr_ts_port)); +} + function f_init_mslookup() runs on test_CT { vc_MSLookup_mDNS := MSLookup_mDNS_Emulation_CT.create; vc_MSLookup_mDNS.start(MSLookup_mDNS_Emulation.f_main()); } -function f_init(boolean legacy := true) runs on test_CT { +function f_init(boolean legacy := true, boolean gsup_server := false) runs on test_CT { /* activate default guard timer to ensure all tests eventually terminate */ g_Tguard.start; @@ -195,10 +228,20 @@ f_init_vty(); f_init_mslookup(); + if (gsup_server) { + f_init_gsup_server("HLR_Test"); + } + f_ipa_ctrl_start(mp_hlr_ip, mp_hlr_ctrl_port); } -function f_start_handler(void_fn fn, HLR_ConnHdlrPars pars) runs on test_CT return HLR_ConnHdlr { +/*! Start HLR_ConnHdlr from testCT in a separate thread. + * \param void_fn function to run inside the thread. + * \param gsup_server if true, connect the emulated GSUP server ports to the new HLR_ConnHdlr. Then both the emulated + * GSUP client (MSC/SGSN) and server (second HLR) are connected. Explicit addressing with "to" and + * "from" must be used, i.e. 'GSUP.receive(tr_GSUP_UL_REQ(...)) from vc_GSUP_server'. */ +function f_start_handler(void_fn fn, HLR_ConnHdlrPars pars, boolean gsup_server := false) runs on test_CT +return HLR_ConnHdlr { var HLR_ConnHdlr vc_conn; var charstring id := testcasename(); @@ -207,7 +250,14 @@ connect(vc_conn:GSUP_PROC, vc_GSUP:GSUP_PROC); connect(vc_conn:mDNS, vc_MSLookup_mDNS:mDNS); - vc_conn.start(f_handler_init(fn, id, pars)); + if (gsup_server) { + connect(vc_conn:GSUP, vc_GSUP_server:GSUP_CLIENT); + connect(vc_conn:GSUP_PROC, vc_GSUP_server:GSUP_PROC); + vc_conn.start(f_handler_init(fn, id, vc_GSUP_server, vc_GSUP, ccm_pars, pars)); + } else { + vc_conn.start(f_handler_init(fn, id, omit, vc_GSUP, ccm_pars, pars)); + } + return vc_conn; } @@ -218,12 +268,23 @@ } /* first function inside ConnHdlr component; sets g_pars + starts function */ -function f_handler_init(void_fn fn, charstring id, template (omit) HLR_ConnHdlrPars pars := omit) +function f_handler_init(void_fn fn, charstring id, + template (omit) GSUP_Emulation_CT vc_GSUP_server_test_ct, + GSUP_Emulation_CT vc_GSUP_client_test_ct, + IPA_CCM_Parameters ccm_pars_client_test_ct, + template (omit) HLR_ConnHdlrPars pars := omit) runs on HLR_ConnHdlr { + /* Pass from test_CT for explicit addressing */ + if (isvalue(vc_GSUP_server_test_ct)) { + vc_GSUP_server := valueof(vc_GSUP_server_test_ct); + } + vc_GSUP_client := vc_GSUP_client_test_ct; + ccm_pars_client := ccm_pars_client_test_ct; + if (isvalue(pars)) { g_pars := valueof(pars); - f_create_gsup_expect(hex2str(g_pars.sub.imsi)); + f_create_gsup_expect_explicit(hex2str(g_pars.sub.imsi), vc_GSUP_client); } f_handler_init_vty(); fn.apply(); diff --git a/library/GSUP_Emulation.ttcn b/library/GSUP_Emulation.ttcn index 5695534..4a03359 100644 --- a/library/GSUP_Emulation.ttcn +++ b/library/GSUP_Emulation.ttcn @@ -295,4 +295,11 @@ } } +/* Same as f_create_gsup_expect, but with explicit addressing. Needed when connecting multiple ports to GSUP_PROC. */ +function f_create_gsup_expect_explicit(charstring imsi, GSUP_Emulation_CT ct) runs on GSUP_ConnHdlr { + GSUP_PROC.call(GSUPEM_register:{imsi, self}) to ct { + [] GSUP_PROC.getreply(GSUPEM_register:{?,?}) {}; + } +} + } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17061 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: Idbfe8a145c90a524145089a06d9bbefac4d7edd8 Gerrit-Change-Number: 17061 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:49 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:49 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/GSUP_Types: add dest name to some messages In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17062 ) Change subject: library/GSUP_Types: add dest name to some messages ...................................................................... library/GSUP_Types: add dest name to some messages Prepare for upcoming D-GSM test, that lets OsmoHLR act as proxy. It forwards the messages based on the destination name, so the testsuite must set it correctly. Related: OS#4380 Change-Id: I7623b7a7c7a18ba18a38d0834979d18ab0fbb961 --- M library/GSUP_Types.ttcn 1 file changed, 9 insertions(+), 6 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index 0f36d4d..fa912c1 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -502,8 +502,9 @@ template GSUP_PDU tr_GSUP_UL_REQ(template hexstring imsi) := tr_GSUP_IMSI(OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST, imsi); -template (value) GSUP_PDU ts_GSUP_UL_RES(hexstring imsi) := - ts_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT, { valueof(ts_GSUP_IE_IMSI(imsi)) }); +template (value) GSUP_PDU ts_GSUP_UL_RES(hexstring imsi, octetstring destination_name := ''O) := + ts_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT, { valueof(ts_GSUP_IE_IMSI(imsi)), + valueof(ts_GSUP_IE_Destination_Name(destination_name))}); template GSUP_PDU tr_GSUP_UL_RES(template hexstring imsi) := tr_GSUP_IMSI(OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT, imsi); @@ -516,17 +517,19 @@ tr_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR, { tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause) }); -template (value) GSUP_PDU ts_GSUP_ISD_REQ(hexstring imsi, hexstring msisdn) := +template (value) GSUP_PDU ts_GSUP_ISD_REQ(hexstring imsi, hexstring msisdn, octetstring destination_name := ''O) := ts_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_REQUEST, { - valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_MSISDN(msisdn)) }); + valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_MSISDN(msisdn)), + valueof(ts_GSUP_IE_Destination_Name(destination_name))}); template GSUP_PDU tr_GSUP_ISD_REQ(template hexstring imsi, template hexstring msisdn := ?) := tr_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_REQUEST, { tr_GSUP_IE_IMSI(imsi), *, tr_GSUP_IE_MSISDN(msisdn), * }); -template (value) GSUP_PDU ts_GSUP_ISD_RES(hexstring imsi) := +template (value) GSUP_PDU ts_GSUP_ISD_RES(hexstring imsi, octetstring destination_name := ''O) := ts_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_RESULT, { - valueof(ts_GSUP_IE_IMSI(imsi)) }); + valueof(ts_GSUP_IE_IMSI(imsi)), + valueof(ts_GSUP_IE_Destination_Name(destination_name))}); template GSUP_PDU tr_GSUP_ISD_RES(template hexstring imsi) := tr_GSUP_IMSI(OSMO_GSUP_MSGT_INSERT_DATA_RESULT, imsi); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17062 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: I7623b7a7c7a18ba18a38d0834979d18ab0fbb961 Gerrit-Change-Number: 17062 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: library/DNS_Helpers: add f_enc_IPv4 In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17063 ) Change subject: library/DNS_Helpers: add f_enc_IPv4 ...................................................................... library/DNS_Helpers: add f_enc_IPv4 Used by upcoming D-GSM test, to pass the IP of the emulated GSUP server. The code is based on f_enc_dns_hostname() in the same file. Related: OS#4380 Change-Id: I8a5450988711680c93cfd657a34db759a56bc41e --- M library/DNS_Helpers.ttcn 1 file changed, 23 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/DNS_Helpers.ttcn b/library/DNS_Helpers.ttcn index 122adff..85040fc 100644 --- a/library/DNS_Helpers.ttcn +++ b/library/DNS_Helpers.ttcn @@ -70,4 +70,27 @@ } +function f_enc_IPv4(charstring str) return octetstring { + var octetstring ret := ''O; + + while (lengthof(str) > 0) { + var integer dot_idx; + var charstring num; + + dot_idx := f_strchr(str, "."); + if (dot_idx >= 0) { + /* there is another dot */ + num := substr(str, 0, dot_idx); + str := substr(str, dot_idx+1, lengthof(str)-dot_idx-1); + } else { + /* no more dot */ + num := str; + str := ""; + } + ret := ret & int2oct(str2int(num), 1); + } + + return ret; +} + } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17063 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: I8a5450988711680c93cfd657a34db759a56bc41e Gerrit-Change-Number: 17063 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add TC_MSLookup_GSUP_proxy In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17064 ) Change subject: hlr: add TC_MSLookup_GSUP_proxy ...................................................................... hlr: add TC_MSLookup_GSUP_proxy Let OsmoHLR act as proxy between MSC and home HLR during Location update. Related: OS#4380 Change-Id: I945e651f1346e56dbe3c02d9d08ccd95cc8d6626 --- M hlr/HLR_Tests.ttcn M hlr/gen_links.sh M library/MSLookup_mDNS_Templates.ttcn 3 files changed, 148 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index 5e9eea6..82c74f4 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -34,6 +34,7 @@ import from MSLookup_mDNS_Types all; import from MSLookup_mDNS_Emulation all; import from MSLookup_mDNS_Templates all; +import from DNS_Helpers all; type component test_CT extends CTRL_Adapter_CT { /* emulated GSUP client (MSC/SGSN) */ @@ -578,6 +579,45 @@ return ret; } +/* Perform Location Update with IMSI that is unknown to OsmoHLR. Let it ask for the HLR that knows the IMSI via + * mslookup. The TTCN-3 testsuite pretends to be the home HLR, that knows the IMSI. The proxy HLR connects to the + * home HLR and forwards GSUP messages, until LU is complete. + * Make sure to let a timer run while calling this function (see TC_MSLookup_GSUP_proxy). */ +function f_perform_UL_proxy(hexstring imsi, hexstring msisdn, GSUP_CnDomain dom := OSMO_GSUP_CN_DOMAIN_PS) +runs on HLR_ConnHdlr { + var MSLookup_mDNS mdns_msg; + var integer id; + var charstring domain := "gsup.hlr." & hex2str(imsi) & ".imsi.mdns.osmocom.org"; + var octetstring destination_name := char2oct(ccm_pars_client.ser_nr) & '00'O; /* TS-MSC IPA name */ + + /* Testing the HLR as proxy. The MSC asking the proxy and the home HLR are both enacted by TTCN3 (TS). + * MSC=vc_GSUP_client <---> osmo-hlr as proxy <---> vc_GSUP_server=home HLR + * GSUP.send(..) to vc_GSUP_client ---> osmo-hlr ---> GSUP.receive(..) from vc_GSUP_server + * GSUP.receive(..) from vc_GSUP_client <--- osmo-hlr <--- GSUP.send(..) to vc_GSUP_server */ + + /* [GSUP] TS-MSC => HLR proxy: Update Location Request with unknown IMSI */ + GSUP.send(ts_GSUP_UL_REQ(imsi, dom)) to vc_GSUP_client; + + /* [GSUP] TS-HLR: expect GSUP messages with that IMSI */ + f_create_gsup_expect_explicit(hex2str(imsi), vc_GSUP_server); + + /* [mDNS] TS-HLR <= HLR proxy: query for GSUP server who knows the IMSI */ + mDNS.receive(tr_MSLookup_mDNS_query(domain)) -> value mdns_msg; + + /* [mDNS] TS-HLR => HLR proxy: result with IP/port of TS GSUP server */ + id := mdns_msg.dnsMessage.header.id; + mDNS.send(ts_MSLookup_mDNS_result_IPv4(id, domain, f_enc_IPv4(mp_hlr_ts_ip), mp_hlr_ts_port)); + + /* [GSUP] TS-HLR <=> HLR proxy <=> TS-MSC: finish up UL */ + GSUP.receive(tr_GSUP_UL_REQ(imsi)) from vc_GSUP_server; + GSUP.send(ts_GSUP_ISD_REQ(imsi, msisdn, destination_name)) to vc_GSUP_server; + GSUP.receive(tr_GSUP_ISD_REQ(imsi, g_pars.sub.msisdn)) from vc_GSUP_client; + GSUP.send(ts_GSUP_ISD_RES(imsi, destination_name)) to vc_GSUP_server; + GSUP.receive(tr_GSUP_ISD_RES(imsi)) from vc_GSUP_client; + GSUP.send(ts_GSUP_UL_RES(imsi, destination_name)) to vc_GSUP_server; + GSUP.receive(tr_GSUP_UL_RES(imsi)) from vc_GSUP_client; +} + /* perform PurgeMS for given imsi, return the GSUP response/error */ function f_perform_PURGE(hexstring imsi, GSUP_CnDomain cn_dom, template (omit) integer exp_err_cause := omit) @@ -1652,6 +1692,29 @@ vc_conn.done; } +/* Let OsmoHLR act as proxy between MSC and another HLR during UL */ +private function f_TC_MSLookup_GSUP_proxy() runs on HLR_ConnHdlr { + f_perform_UL_proxy(g_pars.sub.imsi, g_pars.sub.msisdn, OSMO_GSUP_CN_DOMAIN_CS); + setverdict(pass); +} +testcase TC_MSLookup_GSUP_proxy() runs on test_CT { + var hexstring imsi := f_rnd_imsi('26242'H); + var hexstring msisdn := '49161'H & f_rnd_hexstring(7, 9); + var HLR_ConnHdlr vc_conn; + var HLR_ConnHdlrPars pars := valueof(t_Pars(imsi, msisdn)); + + f_init(false, true); + f_vty_config(VTY, "mslookup", "mdns bind"); + vc_conn := f_start_handler(refers(f_TC_MSLookup_GSUP_proxy), pars, true); + + timer T := 3.0; + T.start; + alt { + [] vc_conn.done {} + [] T.timeout { setverdict(fail, "Timeout"); mtc.stop; }; + } +} + /* TODO: * UL with ISD error * UL with ISD timeout @@ -1700,6 +1763,7 @@ if (mp_hlr_supports_dgsm) { execute( TC_MSLookup_mDNS_service_other_home() ); + execute( TC_MSLookup_GSUP_proxy() ); } }; diff --git a/hlr/gen_links.sh b/hlr/gen_links.sh index 14a3f8d..c77920d 100755 --- a/hlr/gen_links.sh +++ b/hlr/gen_links.sh @@ -48,7 +48,7 @@ FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn " FILES+="Osmocom_VTY_Functions.ttcn " FILES+="SS_Templates.ttcn USSD_Helpers.ttcn " -FILES+="MSLookup_mDNS_Types.ttcn MSLookup_mDNS_Emulation.ttcn MSLookup_mDNS_Templates.ttcn" +FILES+="MSLookup_mDNS_Types.ttcn MSLookup_mDNS_Emulation.ttcn MSLookup_mDNS_Templates.ttcn DNS_Helpers.ttcn " gen_links $DIR $FILES diff --git a/library/MSLookup_mDNS_Templates.ttcn b/library/MSLookup_mDNS_Templates.ttcn index 123ec16..3d4fafe 100644 --- a/library/MSLookup_mDNS_Templates.ttcn +++ b/library/MSLookup_mDNS_Templates.ttcn @@ -45,6 +45,89 @@ udpPort := 4266 } +template MSLookup_mDNS tr_MSLookup_mDNS_query(charstring domain) := { + dnsMessage := { + header := { + id := ?, + qr := DNS_QUERY, + opCode := 0, + aa := false, + tc := false, + rd := false, + ra := false, + z := '000'B, + rCode := DNS_NO_ERROR, + qdCount := 1, + anCount := 0, + nsCount := 0, + arCount := 0 + }, + queries := { + { + qName := domain, + qType := 255, + qClass := DNS_IN + } + }, + answers := {}, + nameServerRecords := {}, + additionalRecords := {} + }, + udpAddress := ?, + udpPort := ? +} + +template MSLookup_mDNS ts_MSLookup_mDNS_result_IPv4(integer id, charstring domain, UInt32 ip_v4, integer port_v4) := { + dnsMessage := { + header := { + id := id, + qr := DNS_RESPONSE, + opCode := DNS_OP_QUERY, + aa := false, + tc := false, + rd := false, + ra := false, + z := '000'B, + rCode := DNS_NO_ERROR, + qdCount := 0, + anCount := 3, + nsCount := 0, + arCount := 0 + }, + queries := {}, + answers := { + { + name := domain, + rrType := DNS_TXT, + rrClass := DNS_IN, + ttl := '00000000'O, + rdLength := 6, + rData := {txt := {"age=0"}} + }, + { + name := domain, + rrType := DNS_A, + rrClass := DNS_IN, + ttl := '00000000'O, + rdLength := 4, + rData := {a := ip_v4} + }, + { + name := domain, + rrType := DNS_TXT, + rrClass := DNS_IN, + ttl := '00000000'O, + rdLength := 1 + lengthof("port=" & int2str(port_v4)), + rData := {txt := {"port=" & int2str(port_v4)}} + } + }, + nameServerRecords := {}, + additionalRecords := {} + }, + udpAddress := "239.192.23.42", + udpPort := 4266 +} + template MSLookup_mDNS tr_MSLookup_mDNS_result_IPv4(integer id, charstring domain, UInt32 ip_v4, integer port_v4) := { dnsMessage := { header := { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17064 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: I945e651f1346e56dbe3c02d9d08ccd95cc8d6626 Gerrit-Change-Number: 17064 Gerrit-PatchSet: 5 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-CC: neels Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:50 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_home In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17073 ) Change subject: hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_home ...................................................................... hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_home Request "gsup.hlr" service right after creating subscriber from the home HLR. "TC_MSLookup_mDNS_service_other_home" is similar, but does not query the "gsup.hlr" service. The "gsup.hlr" service has a different code path in OsmoHLR: - it exists without being explicitly configured and returns the IP and port of the HLR's own GSUP server - the request is answered, even if the subscriber is not attached to the HLR (for Location Update via proxy) Related: OS#4380 Change-Id: Id567989e4be7ac2d3857d3ea61a1ca3a2401a8dc --- M hlr/HLR_Tests.ttcn 1 file changed, 44 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index 82c74f4..c8c6712 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -1715,6 +1715,49 @@ } } +/* Request "gsup.hlr" service right after creating subscriber from the home HLR. "TC_MSLookup_mDNS_service_other_home" + * is similar, but does not query the "gsup.hlr" service. The "gsup.hlr" service has a different code path in OsmoHLR: + * - it exists without being explicitly configured and returns the IP and port of the HLR's own GSUP server + * - the request is answered, even if the subscriber is not attached to the HLR (for Location Update via proxy) */ +private function f_TC_MSLookup_mDNS_service_GSUP_HLR_home() runs on HLR_ConnHdlr { + timer T; + var MSLookup_mDNS vl_rmsg; + var integer id := f_rnd_int(65535); /* mDNS packet ID */ + var charstring domain := "gsup.hlr." & hex2str(g_pars.sub.imsi) & ".imsi.mdns.osmocom.org"; + + /* Create subscriber */ + g_pars.sub.msisdn := '133713381339'H; + f_vty_subscr_create(VTY, g_pars.sub); + + /* Send mDNS query, expect result */ + mDNS.send(ts_MSLookup_mDNS_query(id, domain)); + T.start(1.0); + alt { + [] mDNS.receive(tr_MSLookup_mDNS_result_IPv4(id, domain, f_enc_IPv4(mp_hlr_ip), mp_hlr_gsup_port)) { + setverdict(pass); + } + [] mDNS.receive(MSLookup_mDNS:?) -> value vl_rmsg { + repeat; + } + [] T.timeout { + setverdict(fail, "OsmoHLR did not answer to mDNS query"); + } + } + + f_vty_subscr_delete(VTY, g_pars.sub); +} +testcase TC_MSLookup_mDNS_service_GSUP_HLR_home() runs on test_CT { + var hexstring imsi := f_rnd_imsi('26242'H); + var HLR_ConnHdlr vc_conn; + var HLR_ConnHdlrPars pars := valueof(t_Pars(imsi)); + + f_init(false); + f_vty_config(VTY, "mslookup", "mdns bind"); + + vc_conn := f_start_handler(refers(f_TC_MSLookup_mDNS_service_GSUP_HLR_home), pars); + vc_conn.done; +} + /* TODO: * UL with ISD error * UL with ISD timeout @@ -1764,6 +1807,7 @@ if (mp_hlr_supports_dgsm) { execute( TC_MSLookup_mDNS_service_other_home() ); execute( TC_MSLookup_GSUP_proxy() ); + execute( TC_MSLookup_mDNS_service_GSUP_HLR_home() ); } }; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17073 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: Id567989e4be7ac2d3857d3ea61a1ca3a2401a8dc Gerrit-Change-Number: 17073 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:51 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_proxy In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17074 ) Change subject: hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_proxy ...................................................................... hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_proxy Ask proxy HLR about gsup.hlr service, and expect no answer. Related: OS#4380 Change-Id: Ic42c909e6540b2294b1109dc19c1df348224457b --- M hlr/HLR_Tests.ttcn 1 file changed, 42 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index c8c6712..e00bd8b 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -1758,6 +1758,47 @@ vc_conn.done; } +/* Ask proxy HLR about gsup.hlr service, and expect no answer. */ +private function f_TC_MSLookup_mDNS_service_GSUP_HLR_proxy() runs on HLR_ConnHdlr { + timer T; + var integer id := f_rnd_int(65535); /* mDNS packet ID */ + var charstring domain := "gsup.hlr." & hex2str(g_pars.sub.imsi) & ".imsi.mdns.osmocom.org"; + + f_perform_UL_proxy(g_pars.sub.imsi, g_pars.sub.msisdn, OSMO_GSUP_CN_DOMAIN_CS); + + /* Send mDNS query, expect timeout */ + mDNS.send(ts_MSLookup_mDNS_query(id, domain)); + T.start(1.0); + alt { + [] mDNS.receive(tr_MSLookup_mDNS_result_IPv4(id, domain, f_enc_IPv4(mp_hlr_ip), mp_hlr_gsup_port)) { + setverdict(fail, "mslookup result received from proxy HLR for gsup.hlr service"); + } + [] mDNS.receive(MSLookup_mDNS:?) { + repeat; + } + [] T.timeout { + setverdict(pass); + } + } +} +testcase TC_MSLookup_mDNS_service_GSUP_HLR_proxy() runs on test_CT { + var hexstring imsi := f_rnd_imsi('26242'H); + var hexstring msisdn := '49161'H & f_rnd_hexstring(7, 9); + var HLR_ConnHdlr vc_conn; + var HLR_ConnHdlrPars pars := valueof(t_Pars(imsi, msisdn)); + + f_init(false, true); + f_vty_config(VTY, "mslookup", "mdns bind"); + vc_conn := f_start_handler(refers(f_TC_MSLookup_mDNS_service_GSUP_HLR_proxy), pars, true); + + timer T := 3.0; + T.start; + alt { + [] vc_conn.done {} + [] T.timeout { setverdict(fail, "Timeout"); mtc.stop; }; + } +} + /* TODO: * UL with ISD error * UL with ISD timeout @@ -1808,6 +1849,7 @@ execute( TC_MSLookup_mDNS_service_other_home() ); execute( TC_MSLookup_GSUP_proxy() ); execute( TC_MSLookup_mDNS_service_GSUP_HLR_home() ); + execute( TC_MSLookup_mDNS_service_GSUP_HLR_proxy() ); } }; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17074 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: Ic42c909e6540b2294b1109dc19c1df348224457b Gerrit-Change-Number: 17074 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:21:51 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:21:51 +0000 Subject: Change in osmo-ttcn3-hacks[master]: hlr: add TC_MSLookup_mDNS_service_other_proxy In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17075 ) Change subject: hlr: add TC_MSLookup_mDNS_service_other_proxy ...................................................................... hlr: add TC_MSLookup_mDNS_service_other_proxy Ask proxy HLR about configured sip.voice service, and expect result. Related: OS#4380 Change-Id: I2c956119783972b5e6828bed7554a8a79984d8a2 --- M hlr/HLR_Tests.ttcn 1 file changed, 43 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index e00bd8b..0dd3cad 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -1799,6 +1799,48 @@ } } +/* Ask proxy HLR about configured sip.voice service, and expect result. */ +private function f_TC_MSLookup_mDNS_service_other_proxy() runs on HLR_ConnHdlr { + timer T; + var integer id := f_rnd_int(65535); /* mDNS packet ID */ + var charstring domain := "sip.voice." & hex2str(g_pars.sub.msisdn) & ".msisdn.mdns.osmocom.org"; + + f_perform_UL_proxy(g_pars.sub.imsi, g_pars.sub.msisdn, OSMO_GSUP_CN_DOMAIN_CS); + + /* Send mDNS query, expect result */ + mDNS.send(ts_MSLookup_mDNS_query(id, domain)); + T.start(1.0); + alt { + [] mDNS.receive(tr_MSLookup_mDNS_result_IPv4(id, domain, f_enc_IPv4("66.66.66.66"), 5060)) { + setverdict(pass); + } + [] mDNS.receive(MSLookup_mDNS:?) { + repeat; + } + [] T.timeout { + setverdict(fail, "Timeout"); + } + } +} +testcase TC_MSLookup_mDNS_service_other_proxy() runs on test_CT { + var hexstring imsi := f_rnd_imsi('26242'H); + var hexstring msisdn := '49161'H & f_rnd_hexstring(7, 9); + var HLR_ConnHdlr vc_conn; + var HLR_ConnHdlrPars pars := valueof(t_Pars(imsi, msisdn)); + + f_init(false, true); + f_vty_config(VTY, "mslookup", "mdns bind"); + f_vty_config2(VTY, {"mslookup", "server"}, "service sip.voice at 66.66.66.66 5060"); + vc_conn := f_start_handler(refers(f_TC_MSLookup_mDNS_service_other_proxy), pars, true); + + timer T := 3.0; + T.start; + alt { + [] vc_conn.done {} + [] T.timeout { setverdict(fail, "Timeout"); mtc.stop; }; + } +} + /* TODO: * UL with ISD error * UL with ISD timeout @@ -1850,6 +1892,7 @@ execute( TC_MSLookup_GSUP_proxy() ); execute( TC_MSLookup_mDNS_service_GSUP_HLR_home() ); execute( TC_MSLookup_mDNS_service_GSUP_HLR_proxy() ); + execute( TC_MSLookup_mDNS_service_other_proxy() ); } }; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17075 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: I2c956119783972b5e6828bed7554a8a79984d8a2 Gerrit-Change-Number: 17075 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:22:14 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 16:22:14 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Add missing dep python3-setuptools In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17083 ) Change subject: ansible: gsm-tester: Add missing dep python3-setuptools ...................................................................... ansible: gsm-tester: Add missing dep python3-setuptools That's required when building python modules with pip. Change-Id: I80785a4061e91126092a04080a2c9fdb288be49a --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 83b3db6..88f072e 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -137,6 +137,7 @@ - tcpdump - sqlite3 - python3 + - python3-setuptools - python3-yaml - python3-mako - python3-gi -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I80785a4061e91126092a04080a2c9fdb288be49a Gerrit-Change-Number: 17083 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:22:12 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 16:22:12 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Add missing dep python3-setuptools In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17083 ) Change subject: ansible: gsm-tester: Add missing dep python3-setuptools ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17083 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I80785a4061e91126092a04080a2c9fdb288be49a Gerrit-Change-Number: 17083 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 06 Feb 2020 16:22:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 16:22:32 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 6 Feb 2020 16:22:32 +0000 Subject: Change in osmo-ccid-firmware[master]: Implement serial number string descriptor in CTRL EP callback In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17055 ) Change subject: Implement serial number string descriptor in CTRL EP callback ...................................................................... Implement serial number string descriptor in CTRL EP callback Change-Id: I910eca1db4baa375bf604110301a0bde25ffcb26 --- M sysmoOCTSIM/main.c M sysmoOCTSIM/usb_descriptors.h M sysmoOCTSIM/usb_start.c 3 files changed, 77 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 07c5af8..3db67d9 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -436,11 +436,15 @@ //####################### #define NUM_OUT_BUF 16 +char sernr_buf[16*2+1]; +//unicode for descriptor +uint8_t sernr_buf_descr[1+1+16*2*2]; + + +char rstcause_buf[RSTCAUSE_STR_SIZE]; int main(void) { - char sernr_buf[16*2+1]; - char rstcause_buf[RSTCAUSE_STR_SIZE]; #if 0 CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk ; //| /* tracing*/ @@ -469,6 +473,11 @@ get_chip_unique_serial_str(sernr_buf, sizeof(sernr_buf)); get_rstcause_str(rstcause_buf); + sernr_buf_descr[0] = sizeof(sernr_buf_descr); + sernr_buf_descr[1] = 0x3; + for(int i= 2; i < sizeof(sernr_buf_descr); i+=2) + sernr_buf_descr[i] = sernr_buf[i >> 1]; + usb_start(); board_init(); diff --git a/sysmoOCTSIM/usb_descriptors.h b/sysmoOCTSIM/usb_descriptors.h index adf6405..df072c2 100644 --- a/sysmoOCTSIM/usb_descriptors.h +++ b/sysmoOCTSIM/usb_descriptors.h @@ -19,6 +19,8 @@ #ifndef USB_DESCRIPTORS_H_ #define USB_DESCRIPTORS_H_ +#include "ccid_device.h" + #define CCID_NUM_CLK_SUPPORTED 4 /* aggregate descriptors for the combined CDC-ACM + CCID device that we expose diff --git a/sysmoOCTSIM/usb_start.c b/sysmoOCTSIM/usb_start.c index c6d9fe9..08201cb 100644 --- a/sysmoOCTSIM/usb_start.c +++ b/sysmoOCTSIM/usb_start.c @@ -7,6 +7,7 @@ */ #include "atmel_start.h" #include "usb_start.h" +#include "usb_descriptors.h" #define CDCD_ECHO_BUF_SIZ CONF_USB_CDCD_ACM_DATA_BULKIN_MAXPKSZ @@ -58,6 +59,67 @@ extern const struct usbd_descriptors usb_descs[]; +/* transmit given string descriptor */ +static bool send_str_desc(uint8_t ep, const struct usb_req *req, enum usb_ctrl_stage stage, + const uint8_t *desc) +{ + uint16_t len_req = LE16(req->wLength); + uint16_t len_desc = desc[0]; + uint16_t len_tx; + bool need_zlp = !(len_req & (CONF_USB_CDCD_ACM_BMAXPKSZ0 - 1)); + + if (len_req <= len_desc) { + need_zlp = false; + len_tx = len_req; + } else { + len_tx = len_desc; + } + + if (ERR_NONE != usbdc_xfer(ep, (uint8_t *)desc, len_tx, need_zlp)) { + return true; + } + + return false; +} + +extern uint8_t sernr_buf_descr[]; +/* call-back for every control EP request */ +static int32_t string_req_cb(uint8_t ep, struct usb_req *req, enum usb_ctrl_stage stage) +{ + uint8_t index, type; + + if (stage != USB_SETUP_STAGE) + return ERR_NOT_FOUND; + + if ((req->bmRequestType & (USB_REQT_TYPE_MASK | USB_REQT_DIR_IN)) != + (USB_REQT_TYPE_STANDARD | USB_REQT_DIR_IN)) + return ERR_NOT_FOUND; + + /* abort if it's not a GET DESCRIPTOR request */ + if (req->bRequest != USB_REQ_GET_DESC) + return ERR_NOT_FOUND; + + /* abort if it's not about a string descriptor */ + type = req->wValue >> 8; + if (type != USB_DT_STRING) + return ERR_NOT_FOUND; +#if 0 + printf("ep=%02x, bmReqT=%04x, bReq=%02x, wValue=%04x, stage=%d\r\n", + ep, req->bmRequestType, req->bRequest, req->wValue, stage); +#endif + /* abort if it's not a standard GET request */ + index = req->wValue & 0x00FF; + switch (index) { + case STR_DESC_SERIAL: + return send_str_desc(ep, req, stage, sernr_buf_descr); + default: + return ERR_NOT_FOUND; + } +} + + +static struct usbdc_handler string_req_h = {NULL, (FUNC_PTR)string_req_cb}; + /** * \brief CDC ACM Init */ @@ -65,10 +127,12 @@ { /* usb stack init */ usbdc_init(ctrl_buffer); + usbdc_register_handler(USBDC_HDL_REQ, &string_req_h); /* usbdc_register_funcion inside */ cdcdf_acm_init(); + printf("usb_descs_size=%u\r\n", usb_descs[0].eod - usb_descs[0].sod); usbdc_start((struct usbd_descriptors *) usb_descs); usbdc_attach(); } @@ -87,7 +151,6 @@ void usb_init(void) { - cdc_device_acm_init(); ccid_df_init(); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17055 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I910eca1db4baa375bf604110301a0bde25ffcb26 Gerrit-Change-Number: 17055 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 17:09:33 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 17:09:33 +0000 Subject: Change in osmo-gsm-tester[master]: ttcn3: Allow changing TTCN3 test from within osmo-gsm-tester References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17096 ) Change subject: ttcn3: Allow changing TTCN3 test from within osmo-gsm-tester ...................................................................... ttcn3: Allow changing TTCN3 test from within osmo-gsm-tester Change-Id: I02bf406e310f5bbab7b2e0bca47fb120418e241c --- M ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl M ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/96/17096/1 diff --git a/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl b/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl index eae6063..9ad91fe 100644 --- a/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl +++ b/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl @@ -28,4 +28,4 @@ [MAIN_CONTROLLER] [EXECUTE] -BTS_Tests.control +${ttcn3_test_execute} diff --git a/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py b/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py index 2684bf7..4839052 100755 --- a/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py +++ b/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py @@ -4,6 +4,8 @@ from osmo_gsm_tester.testenv import * +ttcn3_test_execute="BTS_Tests.control" + hlr_dummy = suite.hlr() mgw_dummy = suite.mgw() stp_dummy = suite.stp() @@ -57,7 +59,7 @@ print('Creating template') mytemplate = Template(filename=bts_tmpl_file) -r = mytemplate.render(btsvty_ctrl_hostname=bts.remote_addr(), pcu_available=pcu_available) +r = mytemplate.render(btsvty_ctrl_hostname=bts.remote_addr(), pcu_available=pcu_available, ttcn3_test_execute=ttcn3_test_execute) with open(bts_cfg_file, 'w') as f: f.write(r) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17096 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I02bf406e310f5bbab7b2e0bca47fb120418e241c Gerrit-Change-Number: 17096 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 17:09:34 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 17:09:34 +0000 Subject: Change in osmo-gsm-tester[master]: ttcn3: Refactor ttcn3 launching bits into a testlib References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17097 ) Change subject: ttcn3: Refactor ttcn3 launching bits into a testlib ...................................................................... ttcn3: Refactor ttcn3 launching bits into a testlib This way new tests can be more easily created which run some specific TTCN3 test. Change-Id: Ic61c7b7db9cf3050dc4b101ef0fb181421577424 --- A ttcn3/suites/ttcn3_bts_tests/lib/testlib.py M ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py 2 files changed, 47 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/97/17097/1 diff --git a/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py b/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py new file mode 100644 index 0000000..9c673cd --- /dev/null +++ b/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 +import os +from mako.template import Template + +from osmo_gsm_tester.testenv import * + +def run_ttcn3(suite, test_obj, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute): + own_dir = testdir + script_file = os.path.join(testdir, 'scripts', 'run_ttcn3_docker.sh') + bts_tmpl_file = os.path.join(testdir, 'scripts', 'BTS_Tests.cfg.tmpl') + script_run_dir = test_obj.get_run_dir().new_dir('ttcn3') + bts_cfg_file = os.path.join(str(script_run_dir), 'BTS_Tests.cfg') + junit_ttcn3_dst_file = os.path.join(str(suite.trial.get_run_dir()), 'trial-') + test_obj.basename + '.xml' + if bts.bts_type() == 'osmo-bts-trx': + pcu_available = True + pcu_sk = bts.pcu_socket_path() + else: # PCU unix socket not available locally + pcu_available = False + pcu_sk = '' + docker_cmd = (script_file, str(script_run_dir), junit_ttcn3_dst_file, nat_rsl_ip, osmocon.l2_socket_path(), pcu_sk) + + print('Creating template') + mytemplate = Template(filename=bts_tmpl_file) + r = mytemplate.render(btsvty_ctrl_hostname=bts.remote_addr(), pcu_available=pcu_available, ttcn3_test_execute=ttcn3_test_execute) + with open(bts_cfg_file, 'w') as f: + f.write(r) + + + print('Starting TTCN3 tests') + proc = process.Process('ttcn3', script_run_dir, docker_cmd) + try: + proc.launch() + print('Starting TTCN3 launched, waiting until it finishes') + proc.wait(timeout=3600) + except Exception as e: + proc.terminate() + raise e + + if proc.result != 0: + raise RuntimeError("run_ttcn3_docker.sh exited with error code %d" % proc.result) + + print('Done') diff --git a/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py b/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py index 4839052..a34c847 100755 --- a/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py +++ b/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py @@ -1,8 +1,10 @@ #!/usr/bin/env python3 import os -from mako.template import Template from osmo_gsm_tester.testenv import * +import testlib +suite.test_import_modules_register_for_cleanup(testlib) +from testlib import run_ttcn3 ttcn3_test_execute="BTS_Tests.control" @@ -43,38 +45,5 @@ print('Starting osmocon') osmocon.start() -own_dir = os.path.dirname(os.path.realpath(__file__)) -script_file = os.path.join(own_dir, 'scripts', 'run_ttcn3_docker.sh') -bts_tmpl_file = os.path.join(own_dir, 'scripts', 'BTS_Tests.cfg.tmpl') -script_run_dir = test.get_run_dir().new_dir('ttcn3') -bts_cfg_file = os.path.join(str(script_run_dir), 'BTS_Tests.cfg') -junit_ttcn3_dst_file = os.path.join(str(suite.trial.get_run_dir()), 'trial-') + suite.name() + '.xml' -if bts.bts_type() == 'osmo-bts-trx': - pcu_available = True - pcu_sk = bts.pcu_socket_path() -else: # PCU unix socket not available locally - pcu_available = False - pcu_sk = '' -docker_cmd = (script_file, str(script_run_dir), junit_ttcn3_dst_file, nat_rsl_ip, osmocon.l2_socket_path(), pcu_sk) - -print('Creating template') -mytemplate = Template(filename=bts_tmpl_file) -r = mytemplate.render(btsvty_ctrl_hostname=bts.remote_addr(), pcu_available=pcu_available, ttcn3_test_execute=ttcn3_test_execute) -with open(bts_cfg_file, 'w') as f: - f.write(r) - - -print('Starting TTCN3 tests') -proc = process.Process('ttcn3', script_run_dir, docker_cmd) -try: - proc.launch() - print('Starting TTCN3 launched, waiting until it finishes') - proc.wait(timeout=3600) -except Exception as e: - proc.terminate() - raise e - -if proc.result != 0: - raise RuntimeError("run_ttcn3_docker.sh exited with error code %d" % proc.result) - -print('Done') +testdir = os.path.dirname(os.path.realpath(__file__)) +run_ttcn3(suite, test, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ic61c7b7db9cf3050dc4b101ef0fb181421577424 Gerrit-Change-Number: 17097 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 18:39:33 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 18:39:33 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Introduce new module for performance tests References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098 ) Change subject: bts: Introduce new module for performance tests ...................................................................... bts: Introduce new module for performance tests A new module is created since its tests are aimed at running against real HW set ups to check performance of the system under high loads. As a result, tests in here will usually require a specific config file. One first test is introduced to activate all TCH/H channels and see if the BTS (+BTS-TRX) can keep on going fine for a while. Related: OS#4365 Change-Id: I2d5f0043bdee1f8f5edcf46acce79ce547d1333d --- M bts/BTS_Tests.ttcn A bts/BTS_Tests_perf.ttcn 2 files changed, 103 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/98/17098/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 7fa1af6..46c9647 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -66,6 +66,7 @@ friend module BTS_Tests_SMSCB; friend module BTS_Tests_virtphy; friend module BTS_Tests_LAPDm; +friend module BTS_Tests_perf; /* The tests assume a BTS with the following timeslot configuration: * TS0 : Combined CCCH + SDCCH/4 diff --git a/bts/BTS_Tests_perf.ttcn b/bts/BTS_Tests_perf.ttcn new file mode 100644 index 0000000..db75cba --- /dev/null +++ b/bts/BTS_Tests_perf.ttcn @@ -0,0 +1,102 @@ +module BTS_Tests_perf { + +/* Performance Tests for OsmoBTS + * (C) 2020 by sysmocom s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This test suite tests performance of OsmoBTS under different heavy load scenarios. + */ + +import from Misc_Helpers all; +import from General_Types all; +import from Osmocom_Types all; +import from GSM_Types all; +import from L1CTL_PortType all; +import from L1CTL_Types all; +import from LAPDm_Types all; +import from IPA_Emulation all; +import from GSM_RR_Types all; + +import from RSL_Types all; +import from RSL_Emulation all; + +import from PCUIF_Types all; +import from PCUIF_CodecPort all; + +import from Osmocom_VTY_Functions all; + +import from BTS_Tests all; + +/*********************************************************************** + * Performance tests. Expect osmo-bts to be configured with all TRX as TCH/H. + ***********************************************************************/ + +modulepar { + float mp_wait_time := 10.0; +} + + +/* This test requires BTS with 1 TRX to be configured with following timeslots: TS[0]=CCCH+SDCCH4, TS[1..7]: TCH/H + * One can simply take the osmo-bsc.cfg in the same dir and change TS1..7, that's all needed. + * It will activate TS1..7 TCH/Hchannels (2 TCH/H per TS, that's 14 channels) + * and wait for requested time. This test is useful to bring the BTS (+BTS-TRX) + * into a high channel load state to check that the system it runs on can keep + * on with full load. + */ +function f_TC_highchanload_tchh(charstring id) runs on ConnHdlr { + var ChannelNrs chan_nr := { /* TS 1..7: TCH/H */ + valueof(ts_RslChanNr_Lm(1,0)), valueof(ts_RslChanNr_Lm(1,1)), + valueof(ts_RslChanNr_Lm(2,0)), valueof(ts_RslChanNr_Lm(2,1)), + valueof(ts_RslChanNr_Lm(3,0)), valueof(ts_RslChanNr_Lm(3,1)), + valueof(ts_RslChanNr_Lm(4,0)), valueof(ts_RslChanNr_Lm(4,1)), + valueof(ts_RslChanNr_Lm(5,0)), valueof(ts_RslChanNr_Lm(5,1)), + valueof(ts_RslChanNr_Lm(6,0)), valueof(ts_RslChanNr_Lm(6,1)), + valueof(ts_RslChanNr_Lm(7,0)), valueof(ts_RslChanNr_Lm(7,1)) + }; + + log("Started"); + for (var integer i := 0; i < sizeof(chan_nr); i := i+1) { + log("Registering ", chan_nr[i]); + f_rslem_register(0, chan_nr[i]); + } + log("Registered"); + for (var integer i := 0; i < sizeof(chan_nr); i := i+1) { + f_rsl_transceive(ts_RSL_CHAN_ACT(chan_nr[i], + ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3 /* AMR*/)), + tr_RSL_CHAN_ACT_ACK(chan_nr[i]), + log2str("RSL CHAN ACT [", i, "]")); + } + log("Activated, now waiting ", mp_wait_time, " seconds"); + + f_sleep(mp_wait_time); + log("sleep done, deactivating"); + + for (var integer i := 0; i < sizeof(chan_nr); i := i+1) { + f_rsl_transceive(ts_RSL_RF_CHAN_REL(chan_nr[i]), + tr_RSL_RF_CHAN_REL_ACK(chan_nr[i]), + log2str("RF CHAN REL [", i, "]"), + true); + } + setverdict(pass); +} +testcase TC_highchanload_tchh() runs on test_CT { + var ConnHdlr vc_conn; /* 1..7 * 2 */ + var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN, 60.0 + mp_wait_time)); + + f_init(); + + vc_conn := f_start_handler(refers(f_TC_pespin), pars); + vc_conn.done; +} + +control { + execute( TC_highchanload_tchh() ); +} + + +} -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098 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: I2d5f0043bdee1f8f5edcf46acce79ce547d1333d Gerrit-Change-Number: 17098 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 6 18:44:29 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 6 Feb 2020 18:44:29 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Introduce new module for performance tests In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098 to look at the new patch set (#2). Change subject: bts: Introduce new module for performance tests ...................................................................... bts: Introduce new module for performance tests A new module is created since its tests are aimed at running against real HW set ups to check performance of the system under high loads. As a result, tests in here will usually require a specific config file. One first test is introduced to activate all TCH/H channels and see if the BTS (+BTS-TRX) can keep on going fine for a while. Related: OS#4365 Change-Id: I2d5f0043bdee1f8f5edcf46acce79ce547d1333d --- M bts/BTS_Tests.ttcn A bts/BTS_Tests_perf.ttcn 2 files changed, 103 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/98/17098/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098 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: I2d5f0043bdee1f8f5edcf46acce79ce547d1333d Gerrit-Change-Number: 17098 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenkins at lists.osmocom.org Fri Feb 7 00:01:44 2020 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Fri, 7 Feb 2020 00:01:44 +0000 (UTC) Subject: =?UTF-8?Q?Build_failed_in_Jenkins:_master?= =?UTF-8?Q?-osmo-sip-connector_=C2=BB_a1=3Ddefaul?= =?UTF-8?Q?t,a2=3Ddefault,a3=3Ddefault,a4=3Ddefa?= =?UTF-8?Q?ult,osmocom-master-debian9_#2102?= Message-ID: <1086133325.2101.1581033704305.JavaMail.jenkins@jenkins.osmocom.org> See ------------------------------------------ [...truncated 210.33 KB...] Making install in tests make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' Making install in contrib make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' Making install in systemd make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[5]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[5]: Nothing to be done for 'install-exec-am'. /bin/mkdir -p '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst//lib/systemd/system' /usr/bin/install -c -m 644 ../../../../contrib/systemd/osmo-sip-connector.service '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst//lib/systemd/system' make[5]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' make[5]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' make[5]: Nothing to be done for 'install-exec-am'. make[5]: Nothing to be done for 'install-data-am'. make[5]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' Making install in doc make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' Making install in examples make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' make[5]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' make[5]: Nothing to be done for 'install-exec-am'. /bin/mkdir -p '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector/examples/osmo-sip-connector' /usr/bin/install -c -m 644 ../../../../doc/examples/osmo-sip-connector.cfg '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector/examples/osmo-sip-connector' /bin/mkdir -p '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/etc/osmocom' /usr/bin/install -c -m 644 ../../../../doc/examples/osmo-sip-connector.cfg '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/etc/osmocom' make[5]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' Making install in manuals make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[5]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[5]: Nothing to be done for 'install-exec-am'. make[5]: Nothing to be done for 'install-data-am'. make[5]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' if [ "" != "1" ]; then \ for i in osmosipconnector-usermanual.pdf osmosipconnector-vty-reference.pdf; do \ install -vDm644 "$i" "/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc/$i" || exit 1; \ done; \ fi install: creating directory '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc' 'osmosipconnector-usermanual.pdf' -> '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc/osmosipconnector-usermanual.pdf' 'osmosipconnector-vty-reference.pdf' -> '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc/osmosipconnector-vty-reference.pdf' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[5]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[5]: Nothing to be done for 'install-exec-am'. make[5]: Nothing to be done for 'install-data-am'. make[5]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' Making uninstall in src make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/src' ( cd '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/bin' && rm -f osmo-sip-connector ) make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/src' Making uninstall in tests make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' make[2]: Nothing to be done for 'uninstall'. make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' Making uninstall in contrib make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' Making uninstall in systemd make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' ( cd '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst//lib/systemd/system' && rm -f osmo-sip-connector.service ) make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' make[3]: Nothing to be done for 'uninstall-am'. make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' Making uninstall in doc make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' Making uninstall in examples make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' ( cd '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector/examples/osmo-sip-connector' && rm -f osmo-sip-connector.cfg ) ( cd '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/etc/osmocom' && rm -f osmo-sip-connector.cfg ) make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' Making uninstall in manuals make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' if [ "" != "1" ]; then \ for i in osmosipconnector-usermanual.pdf osmosipconnector-vty-reference.pdf; do \ rm -v "/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc/$i"; \ done; \ fi removed '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc/osmosipconnector-usermanual.pdf' removed '/tmp/am-dc-15083//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc/osmosipconnector-vty-reference.pdf' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[3]: Nothing to be done for 'uninstall-am'. make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[2]: Nothing to be done for 'uninstall-am'. make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' make dist-bzip2 dist-gzip am__post_remove_distdir='@:' make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' if test -d "osmo-sip-connector-1.4.0"; then find "osmo-sip-connector-1.4.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "osmo-sip-connector-1.4.0" || { sleep 5 && rm -rf "osmo-sip-connector-1.4.0"; }; else :; fi test -d "osmo-sip-connector-1.4.0" || mkdir "osmo-sip-connector-1.4.0" (cd src && make top_distdir=../osmo-sip-connector-1.4.0 distdir=../osmo-sip-connector-1.4.0/src \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/src' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/src' (cd tests && make top_distdir=../osmo-sip-connector-1.4.0 distdir=../osmo-sip-connector-1.4.0/tests \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' (cd contrib && make top_distdir=../osmo-sip-connector-1.4.0 distdir=../osmo-sip-connector-1.4.0/contrib \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' (cd systemd && make top_distdir=../../osmo-sip-connector-1.4.0 distdir=../../osmo-sip-connector-1.4.0/contrib/systemd \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' (cd doc && make top_distdir=../osmo-sip-connector-1.4.0 distdir=../osmo-sip-connector-1.4.0/doc \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' (cd examples && make top_distdir=../../osmo-sip-connector-1.4.0 distdir=../../osmo-sip-connector-1.4.0/doc/examples \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' (cd manuals && make top_distdir=../../osmo-sip-connector-1.4.0 distdir=../../osmo-sip-connector-1.4.0/doc/manuals \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make \ top_distdir="osmo-sip-connector-1.4.0" distdir="osmo-sip-connector-1.4.0" \ dist-hook make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' echo 1.4.0 > osmo-sip-connector-1.4.0/.tarball-version make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' test -n "" \ || find "osmo-sip-connector-1.4.0" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec /bin/bash /build/osmo-sip-connector-1.4.0/install-sh -c -m a+r {} {} \; \ || chmod -R a+r "osmo-sip-connector-1.4.0" tardir=osmo-sip-connector-1.4.0 && ${TAR-tar} chof - "$tardir" | BZIP2=${BZIP2--9} bzip2 -c >osmo-sip-connector-1.4.0.tar.bz2 tardir=osmo-sip-connector-1.4.0 && ${TAR-tar} chof - "$tardir" | GZIP=--best gzip -c >osmo-sip-connector-1.4.0.tar.gz make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' if test -d "osmo-sip-connector-1.4.0"; then find "osmo-sip-connector-1.4.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "osmo-sip-connector-1.4.0" || { sleep 5 && rm -rf "osmo-sip-connector-1.4.0"; }; else :; fi make[1]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' Making distclean in src make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/src' test -z "osmo-sip-connector" || rm -f osmo-sip-connector rm -f *.o rm -f *.tab.c test -z "" || rm -f test . = "../../../src" || test -z "" || rm -f rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags rm -rf ./.deps rm -f Makefile make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/src' Making distclean in tests make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' test -z "" || rm -f test . = "../../../tests" || test -z "" || rm -f rm -f Makefile make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' Making distclean in contrib make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' Making distclean in systemd make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' test -z "" || rm -f test . = "../../../../contrib/systemd" || test -z "" || rm -f rm -f Makefile make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' test -z "" || rm -f test . = "../../../contrib" || test -z "" || rm -f rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' rm -f Makefile make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' Making distclean in doc make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' Making distclean in examples make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' test -z "" || rm -f test . = "../../../../doc/examples" || test -z "" || rm -f rm -f Makefile make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' Making distclean in manuals make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' test -z "" || rm -f test . = "../../../../doc/manuals" || test -z "" || rm -f rm -rf osmosipconnector-usermanual__*.png osmosipconnector-usermanual__*.svg osmosipconnector-usermanual.check osmosipconnector-usermanual.pdf osmosipconnector-usermanual.html osmosipconnector-vty-reference.pdf osmosipconnector-vty-reference.lint generated common build rm -f Makefile make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' test -z "" || rm -f test . = "../../../doc" || test -z "" || rm -f rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' rm -f Makefile make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' test -z "" || rm -f test . = "../.." || test -z "" || rm -f rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags rm -f cscope.out cscope.in.out cscope.po.out cscope.files make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' rm -f config.status config.cache config.log configure.lineno config.status.lineno rm -f Makefile make[1]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' if test -d "osmo-sip-connector-1.4.0"; then find "osmo-sip-connector-1.4.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "osmo-sip-connector-1.4.0" || { sleep 5 && rm -rf "osmo-sip-connector-1.4.0"; }; else :; fi ========================================================== osmo-sip-connector-1.4.0 archives ready for distribution: osmo-sip-connector-1.4.0.tar.gz osmo-sip-connector-1.4.0.tar.bz2 ========================================================== + '[' 1 = 1 ']' + '[' 1 = 1 ']' + make -C /build/doc/manuals publish make: Entering directory '/build/doc/manuals' mkdir -p out cp *.pdf out rsync -avz -e "ssh -o 'UserKnownHostsFile=/build/deps/install/stow/osmo-gsm-manuals/share/osmo-gsm-manuals/build/known_hosts' -p 48" ./out/ docs at rita.osmocom.org:web-files/latest/ Warning: Permanently added the ECDSA host key for IP address '[144.76.43.76]:48' to the list of known hosts. Permission denied (publickey,keyboard-interactive). rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2] /build/deps/install/stow/osmo-gsm-manuals/share/osmo-gsm-manuals/build/Makefile.common.inc:31: recipe for target 'publish' failed make: Leaving directory '/build/doc/manuals' make: *** [publish] Error 255 Build step 'Execute shell' marked build as failure [WARNINGS]Skipping publisher since build result is FAILURE From jenkins at lists.osmocom.org Fri Feb 7 03:10:48 2020 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Fri, 7 Feb 2020 03:10:48 +0000 (UTC) Subject: =?UTF-8?Q?Jenkins_build_is_back_to_normal_:?= =?UTF-8?Q?_master-osmo-sip-connector_=C2=BB_a1=3Dde?= =?UTF-8?Q?fault,a2=3Ddefault,a3=3Ddefault,a4=3Dde?= =?UTF-8?Q?fault,osmocom-master-debian9_#2103?= In-Reply-To: <1086133325.2101.1581033704305.JavaMail.jenkins@jenkins.osmocom.org> References: <1086133325.2101.1581033704305.JavaMail.jenkins@jenkins.osmocom.org> Message-ID: <345447670.2141.1581045048002.JavaMail.jenkins@jenkins.osmocom.org> See From jenkins at lists.osmocom.org Fri Feb 7 05:20:15 2020 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Fri, 7 Feb 2020 05:20:15 +0000 (UTC) Subject: =?UTF-8?Q?Build_failed_in_Jenkins:_mast?= =?UTF-8?Q?er-osmo-asf4-dfu_=C2=BB_a1=3Ddefault,?= =?UTF-8?Q?a2=3Ddefault,a3=3Ddefault,a4=3Ddefau?= =?UTF-8?Q?lt,osmocom-master-debian9_#404?= Message-ID: <1739769390.2144.1581052815832.JavaMail.jenkins@jenkins.osmocom.org> See ------------------------------------------ [...truncated 48.67 KB...] -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_syscalls.d" -MT"hal/utils/src/utils_syscalls.d" -MT"hal/utils/src/utils_syscalls.o" -o "hal/utils/src/utils_syscalls.o" "../hal/utils/src/utils_syscalls.c" ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/dmac/hpl_dmac.d" -MT"hpl/dmac/hpl_dmac.d" -MT"hpl/dmac/hpl_dmac.o" -o "hpl/dmac/hpl_dmac.o" "../hpl/dmac/hpl_dmac.c" Building file: ../gcc/system_same54.c Building file: ../hpl/usb/hpl_usb.c ARM/GNU C Compiler ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/nvmctrl/hpl_nvmctrl.d" -MT"hpl/nvmctrl/hpl_nvmctrl.d" -MT"hpl/nvmctrl/hpl_nvmctrl.o" -o "hpl/nvmctrl/hpl_nvmctrl.o" "../hpl/nvmctrl/hpl_nvmctrl.c" "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "gcc/system_same54.d" -MT"gcc/system_same54.d" -MT"gcc/system_same54.o" -o "gcc/system_same54.o" "../gcc/system_same54.c" ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/usb/hpl_usb.d" -MT"hpl/usb/hpl_usb.d" -MT"hpl/usb/hpl_usb.o" -o "hpl/usb/hpl_usb.o" "../hpl/usb/hpl_usb.c" Finished building: ../hal/utils/src/utils_syscalls.c Building file: ../hal/src/hal_delay.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_delay.d" -MT"hal/src/hal_delay.d" -MT"hal/src/hal_delay.o" -o "hal/src/hal_delay.o" "../hal/src/hal_delay.c" Finished building: ../gcc/system_same54.c Building file: ../hpl/pm/hpl_pm.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/pm/hpl_pm.d" -MT"hpl/pm/hpl_pm.d" -MT"hpl/pm/hpl_pm.o" -o "hpl/pm/hpl_pm.o" "../hpl/pm/hpl_pm.c" Finished building: ../hal/src/hal_io.c Building file: ../hpl/core/hpl_init.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/core/hpl_init.d" -MT"hpl/core/hpl_init.d" -MT"hpl/core/hpl_init.o" -o "hpl/core/hpl_init.o" "../hpl/core/hpl_init.c" Finished building: ../hal/src/hal_delay.c Building file: ../hpl/gclk/hpl_gclk.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/gclk/hpl_gclk.d" -MT"hpl/gclk/hpl_gclk.d" -MT"hpl/gclk/hpl_gclk.o" -o "hpl/gclk/hpl_gclk.o" "../hpl/gclk/hpl_gclk.c" Finished building: ../hpl/core/hpl_core_m4.c Building file: ../hal/utils/src/utils_list.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_list.d" -MT"hal/utils/src/utils_list.d" -MT"hal/utils/src/utils_list.o" -o "hal/utils/src/utils_list.o" "../hal/utils/src/utils_list.c" Finished building: ../usb/class/dfu/device/dfudf.c Building file: ../hal/utils/src/utils_assert.c Finished building: ../hpl/dmac/hpl_dmac.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_assert.d" -MT"hal/utils/src/utils_assert.d" -MT"hal/utils/src/utils_assert.o" -o "hal/utils/src/utils_assert.o" "../hal/utils/src/utils_assert.c" Building file: ../usb_start.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb_start.d" -MT"usb_start.d" -MT"usb_start.o" -o "usb_start.o" "../usb_start.c" Finished building: ../hpl/nvmctrl/hpl_nvmctrl.c Building file: ../hpl/oscctrl/hpl_oscctrl.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/oscctrl/hpl_oscctrl.d" -MT"hpl/oscctrl/hpl_oscctrl.d" -MT"hpl/oscctrl/hpl_oscctrl.o" -o "hpl/oscctrl/hpl_oscctrl.o" "../hpl/oscctrl/hpl_oscctrl.c" Finished building: ../hpl/usb/hpl_usb.c Building file: ../hpl/mclk/hpl_mclk.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/mclk/hpl_mclk.d" -MT"hpl/mclk/hpl_mclk.d" -MT"hpl/mclk/hpl_mclk.o" -o "hpl/mclk/hpl_mclk.o" "../hpl/mclk/hpl_mclk.c" Finished building: ../hpl/pm/hpl_pm.c Building file: ../hpl/ramecc/hpl_ramecc.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/ramecc/hpl_ramecc.d" -MT"hpl/ramecc/hpl_ramecc.d" -MT"hpl/ramecc/hpl_ramecc.o" -o "hpl/ramecc/hpl_ramecc.o" "../hpl/ramecc/hpl_ramecc.c" Finished building: ../hpl/gclk/hpl_gclk.c Building file: ../usb/usb_protocol.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb/usb_protocol.d" -MT"usb/usb_protocol.d" -MT"usb/usb_protocol.o" -o "usb/usb_protocol.o" "../usb/usb_protocol.c" Finished building: ../hpl/core/hpl_init.c Building file: ../hal/src/hal_flash.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_flash.d" -MT"hal/src/hal_flash.d" -MT"hal/src/hal_flash.o" -o "hal/src/hal_flash.o" "../hal/src/hal_flash.c" Finished building: ../hal/utils/src/utils_assert.c Building file: ../hal/src/hal_init.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_init.d" -MT"hal/src/hal_init.d" -MT"hal/src/hal_init.o" -o "hal/src/hal_init.o" "../hal/src/hal_init.c" Finished building: ../hal/utils/src/utils_list.c Building file: ../gcc/gcc/startup_same54.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "gcc/gcc/startup_same54.d" -MT"gcc/gcc/startup_same54.d" -MT"gcc/gcc/startup_same54.o" -o "gcc/gcc/startup_same54.o" "../gcc/gcc/startup_same54.c" Finished building: ../usb_start.c Building file: ../hal/src/hal_usb_device.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_usb_device.d" -MT"hal/src/hal_usb_device.d" -MT"hal/src/hal_usb_device.o" -o "hal/src/hal_usb_device.o" "../hal/src/hal_usb_device.c" Finished building: ../hpl/oscctrl/hpl_oscctrl.c Building file: ../hpl/osc32kctrl/hpl_osc32kctrl.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/osc32kctrl/hpl_osc32kctrl.d" -MT"hpl/osc32kctrl/hpl_osc32kctrl.d" -MT"hpl/osc32kctrl/hpl_osc32kctrl.o" -o "hpl/osc32kctrl/hpl_osc32kctrl.o" "../hpl/osc32kctrl/hpl_osc32kctrl.c" Finished building: ../gcc/gcc/startup_same54.c Building file: ../driver_init.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "driver_init.d" -MT"driver_init.d" -MT"driver_init.o" -o "driver_init.o" "../driver_init.c" Finished building: ../hpl/mclk/hpl_mclk.c Building file: ../hal/src/hal_gpio.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_gpio.d" -MT"hal/src/hal_gpio.d" -MT"hal/src/hal_gpio.o" -o "hal/src/hal_gpio.o" "../hal/src/hal_gpio.c" Finished building: ../hpl/ramecc/hpl_ramecc.c Building file: ../hal/utils/src/utils_event.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_event.d" -MT"hal/utils/src/utils_event.d" -MT"hal/utils/src/utils_event.o" -o "hal/utils/src/utils_event.o" "../hal/utils/src/utils_event.c" Finished building: ../hal/src/hal_init.c Building file: ../hal/src/hal_sleep.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_sleep.d" -MT"hal/src/hal_sleep.d" -MT"hal/src/hal_sleep.o" -o "hal/src/hal_sleep.o" "../hal/src/hal_sleep.c" Finished building: ../usb/usb_protocol.c Building file: ../hal/src/hal_cache.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_cache.d" -MT"hal/src/hal_cache.d" -MT"hal/src/hal_cache.o" -o "hal/src/hal_cache.o" "../hal/src/hal_cache.c" Finished building: ../hal/src/hal_flash.c Building file: ../hpl/cmcc/hpl_cmcc.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/cmcc/hpl_cmcc.d" -MT"hpl/cmcc/hpl_cmcc.d" -MT"hpl/cmcc/hpl_cmcc.o" -o "hpl/cmcc/hpl_cmcc.o" "../hpl/cmcc/hpl_cmcc.c" Finished building: ../hpl/osc32kctrl/hpl_osc32kctrl.c Building file: ../atmel_start.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "atmel_start.d" -MT"atmel_start.d" -MT"atmel_start.o" -o "atmel_start.o" "../atmel_start.c" Finished building: ../hal/src/hal_usb_device.c Building file: ../usb_dfu_main.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb_dfu_main.d" -MT"usb_dfu_main.d" -MT"usb_dfu_main.o" -o "usb_dfu_main.o" "../usb_dfu_main.c" Finished building: ../hal/src/hal_gpio.c Building file: ../usb/device/usbdc.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb/device/usbdc.d" -MT"usb/device/usbdc.d" -MT"usb/device/usbdc.o" -o "usb/device/usbdc.o" "../usb/device/usbdc.c" Finished building: ../hal/utils/src/utils_event.c Building file: ../hal/src/hal_atomic.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_atomic.d" -MT"hal/src/hal_atomic.d" -MT"hal/src/hal_atomic.o" -o "hal/src/hal_atomic.o" "../hal/src/hal_atomic.c" Finished building: ../driver_init.c Finished building: ../hal/src/hal_sleep.c Finished building: ../hal/src/hal_cache.c Finished building: ../hpl/cmcc/hpl_cmcc.c Finished building: ../atmel_start.c Finished building: ../usb_dfu_main.c Finished building: ../hal/src/hal_atomic.c Finished building: ../usb/device/usbdc.c Building target: bootloader-sysmooctsim-0.1.7-b90f.elf Invoking: ARM/GNU Linker "arm-none-eabi-gcc" -o bootloader-sysmooctsim-0.1.7-b90f.elf "hal/src/hal_io.o" "hpl/core/hpl_core_m4.o" "usb/class/dfu/device/dfudf.o" "hal/utils/src/utils_syscalls.o" "hpl/dmac/hpl_dmac.o" "hpl/nvmctrl/hpl_nvmctrl.o" "gcc/system_same54.o" "hpl/usb/hpl_usb.o" "hal/src/hal_delay.o" "hpl/pm/hpl_pm.o" "hpl/core/hpl_init.o" "hpl/gclk/hpl_gclk.o" "hal/utils/src/utils_list.o" "hal/utils/src/utils_assert.o" "usb_start.o" "hpl/oscctrl/hpl_oscctrl.o" "hpl/mclk/hpl_mclk.o" "hpl/ramecc/hpl_ramecc.o" "usb/usb_protocol.o" "hal/src/hal_flash.o" "hal/src/hal_init.o" "gcc/gcc/startup_same54.o" "hal/src/hal_usb_device.o" "hpl/osc32kctrl/hpl_osc32kctrl.o" "driver_init.o" "hal/src/hal_gpio.o" "hal/utils/src/utils_event.o" "hal/src/hal_sleep.o" "hal/src/hal_cache.o" "hpl/cmcc/hpl_cmcc.o" "atmel_start.o" "usb_dfu_main.o" "usb/device/usbdc.o" "hal/src/hal_atomic.o" -Wl,--start-group -lm -Wl,--end-group -mthumb \ -Wl,-Map="bootloader-sysmooctsim-0.1.7-b90f.map" --specs=nano.specs -Wl,--gc-sections -mcpu=cortex-m4 \ \ -T"../gcc/gcc/same54p20a_flash.ld" \ -L"../gcc/gcc" Finished building target: bootloader-sysmooctsim-0.1.7-b90f.elf "arm-none-eabi-objcopy" -O binary "bootloader-sysmooctsim-0.1.7-b90f.elf" "bootloader-sysmooctsim-0.1.7-b90f.bin" "arm-none-eabi-objcopy" -O ihex -R .eeprom -R .fuse -R .lock -R .signature \ "bootloader-sysmooctsim-0.1.7-b90f.elf" "bootloader-sysmooctsim-0.1.7-b90f.hex" "arm-none-eabi-objcopy" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma \ .eeprom=0 --no-change-warnings -O binary "bootloader-sysmooctsim-0.1.7-b90f.elf" \ "bootloader-sysmooctsim-0.1.7-b90f.eep" || exit 0 "arm-none-eabi-objdump" -h -S "bootloader-sysmooctsim-0.1.7-b90f.elf" > "bootloader-sysmooctsim-0.1.7-b90f.lss" "arm-none-eabi-size" "bootloader-sysmooctsim-0.1.7-b90f.elf" text data bss dec hex filename 10816 252 66464 77532 12edc bootloader-sysmooctsim-0.1.7-b90f.elf ln -sf bootloader-sysmooctsim-0.1.7-b90f.bin bootloader-sysmooctsim.bin ln -sf bootloader-sysmooctsim-0.1.7-b90f.elf bootloader-sysmooctsim.elf + '[' x--publish = x--publish ']' + echo + echo '=============== UPLOAD BUILD ==============' =============== UPLOAD BUILD ============== + cat + SSH_COMMAND='ssh -o '\''UserKnownHostsFile=/build/known_hosts'\'' -p 48' + rsync --archive --copy-links --verbose --compress --delete --rsh 'ssh -o '\''UserKnownHostsFile=/build/known_hosts'\'' -p 48' /build/gcc/bootloader-sysmooctsim.bin /build/gcc/bootloader-sysmooctsim.elf binaries at rita.osmocom.org:web-files/osmo-asf4-dfu/latest/ Warning: Permanently added the ECDSA host key for IP address '[144.76.43.76]:48' to the list of known hosts. Permission denied (publickey,keyboard-interactive). rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2] Build step 'Execute shell' marked build as failure [WARNINGS]Skipping publisher since build result is FAILURE From jenkins at lists.osmocom.org Fri Feb 7 06:52:15 2020 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Fri, 7 Feb 2020 06:52:15 +0000 (UTC) Subject: =?UTF-8?Q?Build_failed_in_Jenkins:_mas?= =?UTF-8?Q?ter-simtrace2_=C2=BB_a1=3Ddefault,a2?= =?UTF-8?Q?=3Ddefault,a3=3Ddefault,a4=3Ddefaul?= =?UTF-8?Q?t,osmocom-master-debian9_#692?= Message-ID: <751597168.2160.1581058335745.JavaMail.jenkins@jenkins.osmocom.org> See ------------------------------------------ [...truncated 131.76 KB...] UART_RX(00) UART_RX(07) uart_enable(uart_chan=42, TX) -I- 0: send_tpdu_header: a0 d2 00 00 07 -I- 0: flush_rx_buffer (5) [L1]> 01 06 00 00 00 00 13 00 [L2]> 01 00 00 00 05 00 a0 d2 00 00 07 flags=1, data= a0 d2 00 00 07 UART_TX(d2) uart_enable(uart_chan=42, RX) UART_RX(00) UART_RX(01) UART_RX(02) UART_RX(03) UART_RX(04) UART_RX(05) UART_RX(06) -I- 0: flush_rx_buffer (7) [L1]> 01 06 00 00 00 00 15 00 [L2]> 02 00 00 00 07 00 00 01 02 03 04 05 06 flags=2, data= 00 01 02 03 04 05 06 UART_TX(90) UART_TX(00) uart_enable(uart_chan=42, RX) uart_enable(uart_chan=42, RX) -I- 0: CLK deactivated -I- 0: CLK activated ==> transmitting APDU (HDR + PB + card-TX) UART_RX(a0) UART_RX(b2) UART_RX(00) UART_RX(00) UART_RX(0a) uart_enable(uart_chan=42, TX) -I- 0: send_tpdu_header: a0 b2 00 00 0a -I- 0: flush_rx_buffer (5) [L1]> 01 06 00 00 00 00 13 00 [L2]> 01 00 00 00 05 00 a0 b2 00 00 0a flags=1, data= a0 b2 00 00 0a UART_TX(b2) UART_TX(00) UART_TX(01) UART_TX(02) UART_TX(03) UART_TX(04) UART_TX(05) UART_TX(06) UART_TX(07) UART_TX(08) UART_TX(09) UART_TX(90) UART_TX(00) uart_enable(uart_chan=42, RX) uart_enable(uart_chan=42, RX) -I- 0: CLK deactivated -I- 0: CLK activated =============== HOST START ============== aclocal: warning: couldn't open directory 'm4': No such file or directory libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'. libtoolize: copying file './ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am. configure.ac:20: installing './compile' configure.ac:22: installing './config.guess' configure.ac:22: installing './config.sub' configure.ac:8: installing './install-sh' configure.ac:8: installing './missing' lib/Makefile.am: installing './depcomp' checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking whether make sets $(MAKE)... (cached) yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... no checking if : is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for pkg-config... /usr/bin/pkg-config checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.20... yes checking if gcc supports -fvisibility=hidden... yes checking for LIBOSMOCORE... yes checking for LIBOSMOSIM... yes checking for LIBOSMOUSB... yes checking for LIBUSB... yes CFLAGS="-g -O2 -Wall -fsanitize=address -fsanitize=undefined -fsanitize=address -fsanitize=undefined -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=cpp" CPPFLAGS=" -Wall -fsanitize=address -fsanitize=undefined -fsanitize=address -fsanitize=undefined -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=cpp" checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating libosmo-simtrace2.pc config.status: creating include/Makefile config.status: creating src/Makefile config.status: creating lib/Makefile config.status: creating contrib/Makefile config.status: creating Makefile config.status: executing tests/atconfig commands config.status: executing depfiles commands config.status: executing libtool commands echo 0.7.0.49-baa6 > .version-t && mv .version-t .version make all-recursive make[1]: Entering directory '/build/host' Making all in include make[2]: Entering directory '/build/host/include' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/build/host/include' Making all in lib make[2]: Entering directory '/build/host/lib' CC apdu_dispatch.lo CC gsmtap.lo CC simtrace2_api.lo CC usb_util.lo CCLD libosmo-simtrace2.la ar: `u' modifier ignored since `D' is the default (see `U') make[2]: Leaving directory '/build/host/lib' Making all in src make[2]: Entering directory '/build/host/src' CC simtrace2-remsim.o CC usb2udp.o CC simtrace2_usb.o CC simtrace2-sniff.o CCLD simtrace2-list CCLD simtrace2-remsim-usb2udp CCLD simtrace2-sniff CCLD simtrace2-remsim make[2]: Leaving directory '/build/host/src' Making all in contrib make[2]: Entering directory '/build/host/contrib' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/build/host/contrib' make[2]: Entering directory '/build/host' make[2]: Nothing to be done for 'all-am'. make[2]: Leaving directory '/build/host' make[1]: Leaving directory '/build/host' make dist-bzip2 am__post_remove_distdir='@:' make[1]: Entering directory '/build/host' if test -d "simtrace2-0.7.0.49-baa6"; then find "simtrace2-0.7.0.49-baa6" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "simtrace2-0.7.0.49-baa6" || { sleep 5 && rm -rf "simtrace2-0.7.0.49-baa6"; }; else :; fi test -d "simtrace2-0.7.0.49-baa6" || mkdir "simtrace2-0.7.0.49-baa6" (cd include && make top_distdir=../simtrace2-0.7.0.49-baa6 distdir=../simtrace2-0.7.0.49-baa6/include \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/build/host/include' make[2]: Leaving directory '/build/host/include' (cd lib && make top_distdir=../simtrace2-0.7.0.49-baa6 distdir=../simtrace2-0.7.0.49-baa6/lib \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/build/host/lib' make[2]: Leaving directory '/build/host/lib' (cd src && make top_distdir=../simtrace2-0.7.0.49-baa6 distdir=../simtrace2-0.7.0.49-baa6/src \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/build/host/src' make[2]: Leaving directory '/build/host/src' (cd contrib && make top_distdir=../simtrace2-0.7.0.49-baa6 distdir=../simtrace2-0.7.0.49-baa6/contrib \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/build/host/contrib' make[2]: Leaving directory '/build/host/contrib' make \ top_distdir="simtrace2-0.7.0.49-baa6" distdir="simtrace2-0.7.0.49-baa6" \ dist-hook make[2]: Entering directory '/build/host' echo 0.7.0.49-baa6 > simtrace2-0.7.0.49-baa6/.tarball-version make[2]: Leaving directory '/build/host' test -n "" \ || find "simtrace2-0.7.0.49-baa6" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec /bin/bash /build/host/install-sh -c -m a+r {} {} \; \ || chmod -R a+r "simtrace2-0.7.0.49-baa6" tardir=simtrace2-0.7.0.49-baa6 && ${TAR-tar} chof - "$tardir" | BZIP2=${BZIP2--9} bzip2 -c >simtrace2-0.7.0.49-baa6.tar.bz2 make[1]: Leaving directory '/build/host' if test -d "simtrace2-0.7.0.49-baa6"; then find "simtrace2-0.7.0.49-baa6" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "simtrace2-0.7.0.49-baa6" || { sleep 5 && rm -rf "simtrace2-0.7.0.49-baa6"; }; else :; fi =============== UPLOAD BUILD ============== Warning: Permanently added the ECDSA host key for IP address '[144.76.43.76]:48' to the list of known hosts. Permission denied (publickey,keyboard-interactive). rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2] Build step 'Execute shell' marked build as failure [WARNINGS]Skipping publisher since build result is FAILURE From gerrit-no-reply at lists.osmocom.org Fri Feb 7 08:09:16 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 7 Feb 2020 08:09:16 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Introduce new module for performance tests In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098 ) Change subject: bts: Introduce new module for performance tests ...................................................................... Patch Set 2: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098/2/bts/BTS_Tests_perf.ttcn File bts/BTS_Tests_perf.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098/2/bts/BTS_Tests_perf.ttcn at 93 PS2, Line 93: f_start_handler How about as_Tguard? Wouldn't it interfere? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098 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: I2d5f0043bdee1f8f5edcf46acce79ce547d1333d Gerrit-Change-Number: 17098 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 07 Feb 2020 08:09:16 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 7 12:35:41 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 7 Feb 2020 12:35:41 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Introduce new module for performance tests In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098 ) Change subject: bts: Introduce new module for performance tests ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098/2/bts/BTS_Tests_perf.ttcn File bts/BTS_Tests_perf.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098/2/bts/BTS_Tests_perf.ttcn at 93 PS2, Line 93: f_start_handler > How about as_Tguard? Wouldn't it interfere? See line 89, variable pars contains the Tguard threshold set as 60 + mp_wait_time. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098 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: I2d5f0043bdee1f8f5edcf46acce79ce547d1333d Gerrit-Change-Number: 17098 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 07 Feb 2020 12:35:41 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 7 21:04:01 2020 From: gerrit-no-reply at lists.osmocom.org (roh) Date: Fri, 7 Feb 2020 21:04:01 +0000 Subject: Change in osmo-ccid-firmware[master]: Implement CI scripts for testing the resulting binary on hardware for... References: Message-ID: roh has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 ) Change subject: Implement CI scripts for testing the resulting binary on hardware for jenkins ...................................................................... Implement CI scripts for testing the resulting binary on hardware for jenkins Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 --- A tests/run-tests A tests/sysmo-octsim/01_check_rig.out A tests/sysmo-octsim/01_check_rig.sh A tests/sysmo-octsim/02_flash_dfu.out A tests/sysmo-octsim/02_flash_dfu.sh A tests/sysmo-octsim/03_check_lsusb.out A tests/sysmo-octsim/03_check_lsusb.sh A tests/sysmo-octsim/04_check_dfu_lsusb.out A tests/sysmo-octsim/04_check_dfu_lsusb.sh A tests/sysmo-octsim/README A tests/sysmo-octsim/ctl_reset_target.sh A tests/sysmo-octsim/ctl_reset_to_dfu.sh A tests/sysmo-octsim/fetch_image.sh A tests/sysmo-octsim/flash_octsim_dfu.sh A tests/sysmo-octsim/prepare A tests/sysmo-octsim/regen A tests/sysmo-octsim/run-tests A tests/sysmo-octsim/test-data 18 files changed, 312 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/99/17099/1 diff --git a/tests/run-tests b/tests/run-tests new file mode 100755 index 0000000..bfc942d --- /dev/null +++ b/tests/run-tests @@ -0,0 +1,14 @@ +#!/bin/sh +echo "==========================================================" +echo " EXECUTING TESTS FOR SYSMO-OCTSIM" +echo "==========================================================" +echo "" +cd ./sysmo-octsim +echo "Location $PWD" +echo "" +sh ./run-tests +cd .. +echo "" +echo "" +echo "" +echo "" diff --git a/tests/sysmo-octsim/01_check_rig.out b/tests/sysmo-octsim/01_check_rig.out new file mode 100644 index 0000000..1bd7d66 --- /dev/null +++ b/tests/sysmo-octsim/01_check_rig.out @@ -0,0 +1,90 @@ + +ID 04d8:ffee Microchip Technology, Inc. Devantech USB-ISS +Device Descriptor: + bLength 18 + bDescriptorType 1 + bcdUSB 2.00 + bDeviceClass 2 Communications + bDeviceSubClass 0 + bDeviceProtocol 0 + bMaxPacketSize0 8 + idVendor 0x04d8 Microchip Technology, Inc. + idProduct 0xffee Devantech USB-ISS + bcdDevice 1.00 + iManufacturer 1 Devantech Ltd. + iProduct 2 USB-RLY08 + iSerial 3 00021197 + bNumConfigurations 1 + Configuration Descriptor: + bLength 9 + bDescriptorType 2 + wTotalLength 0x0043 + bNumInterfaces 2 + bConfigurationValue 1 + iConfiguration 0 + bmAttributes 0xc0 + Self Powered + MaxPower 100mA + Interface Descriptor: + bLength 9 + bDescriptorType 4 + bInterfaceNumber 0 + bAlternateSetting 0 + bNumEndpoints 1 + bInterfaceClass 2 Communications + bInterfaceSubClass 2 Abstract (modem) + bInterfaceProtocol 1 AT-commands (v.25ter) + iInterface 0 + CDC Header: + bcdCDC 1.10 + CDC ACM: + bmCapabilities 0x02 + line coding and serial state + CDC Union: + bMasterInterface 0 + bSlaveInterface 1 + CDC Call Management: + bmCapabilities 0x00 + bDataInterface 1 + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x81 EP 1 IN + bmAttributes 3 + Transfer Type Interrupt + Synch Type None + Usage Type Data + wMaxPacketSize 0x0008 1x 8 bytes + bInterval 2 + Interface Descriptor: + bLength 9 + bDescriptorType 4 + bInterfaceNumber 1 + bAlternateSetting 0 + bNumEndpoints 2 + bInterfaceClass 10 CDC Data + bInterfaceSubClass 0 + bInterfaceProtocol 0 + iInterface 0 + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x02 EP 2 OUT + bmAttributes 2 + Transfer Type Bulk + Synch Type None + Usage Type Data + wMaxPacketSize 0x0040 1x 64 bytes + bInterval 0 + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x82 EP 2 IN + bmAttributes 2 + Transfer Type Bulk + Synch Type None + Usage Type Data + wMaxPacketSize 0x0040 1x 64 bytes + bInterval 0 +Device Status: 0x0001 + Self Powered diff --git a/tests/sysmo-octsim/01_check_rig.sh b/tests/sysmo-octsim/01_check_rig.sh new file mode 100755 index 0000000..3831fb6 --- /dev/null +++ b/tests/sysmo-octsim/01_check_rig.sh @@ -0,0 +1,4 @@ +#!/bin/sh +. ./test-data + +lsusb -d 04d8:ffee -v 2>/dev/null | sed -e "s/$Bus.*Device.*:\ ID/ID/g" diff --git a/tests/sysmo-octsim/02_flash_dfu.out b/tests/sysmo-octsim/02_flash_dfu.out new file mode 100644 index 0000000..eacc4d1 --- /dev/null +++ b/tests/sysmo-octsim/02_flash_dfu.out @@ -0,0 +1,23 @@ +fetch image +done +resetting target to dfu +done +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Opening DFU capable USB device... +ID 1d50:6141 +Run-time device DFU version 0110 +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 0110 +Device returned transfer size 512 +Copying data from PC to DFU device +Download done. +Resetting USB to switch back to runtime mode diff --git a/tests/sysmo-octsim/02_flash_dfu.sh b/tests/sysmo-octsim/02_flash_dfu.sh new file mode 100755 index 0000000..bee32f3 --- /dev/null +++ b/tests/sysmo-octsim/02_flash_dfu.sh @@ -0,0 +1,6 @@ +#!/bin/sh +. ./test-data + +./fetch_image.sh +./ctl_reset_to_dfu.sh +./flash_octsim_dfu.sh diff --git a/tests/sysmo-octsim/03_check_lsusb.out b/tests/sysmo-octsim/03_check_lsusb.out new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/sysmo-octsim/03_check_lsusb.out diff --git a/tests/sysmo-octsim/03_check_lsusb.sh b/tests/sysmo-octsim/03_check_lsusb.sh new file mode 100755 index 0000000..42ff134 --- /dev/null +++ b/tests/sysmo-octsim/03_check_lsusb.sh @@ -0,0 +1,4 @@ +#!/bin/sh +. ./test-data + +lsusb -d 1d50:6141 -v 2>/dev/null | sed -e "s/$Bus.*Device.*:\ ID/ID/g" diff --git a/tests/sysmo-octsim/04_check_dfu_lsusb.out b/tests/sysmo-octsim/04_check_dfu_lsusb.out new file mode 100644 index 0000000..4e8e136 --- /dev/null +++ b/tests/sysmo-octsim/04_check_dfu_lsusb.out @@ -0,0 +1,54 @@ +resetting target to dfu +done + +ID 1d50:6141 OpenMoko, Inc. +Device Descriptor: + bLength 18 + bDescriptorType 1 + bcdUSB 2.00 + bDeviceClass 0 + bDeviceSubClass 0 + bDeviceProtocol 0 + bMaxPacketSize0 64 + idVendor 0x1d50 OpenMoko, Inc. + idProduct 0x6141 + bcdDevice 0.00 + iManufacturer 1 sysmocom + iProduct 2 sysmoOCTSIM (osmo-ASF4-DFU) + iSerial 0 + bNumConfigurations 1 + Configuration Descriptor: + bLength 9 + bDescriptorType 2 + wTotalLength 0x001b + bNumInterfaces 1 + bConfigurationValue 1 + iConfiguration 0 + bmAttributes 0x80 + (Bus Powered) + MaxPower 100mA + Interface Descriptor: + bLength 9 + bDescriptorType 4 + bInterfaceNumber 0 + bAlternateSetting 0 + bNumEndpoints 0 + bInterfaceClass 254 Application Specific Interface + bInterfaceSubClass 1 Device Firmware Update + bInterfaceProtocol 2 + iInterface 3 SAM D5x/E5x DFU bootloader (DFU mode) + Device Firmware Upgrade Interface Descriptor: + bLength 9 + bDescriptorType 33 + bmAttributes 9 + Will Detach + Manifestation Intolerant + Upload Unsupported + Download Supported + wDetachTimeout 0 milliseconds + wTransferSize 512 bytes + bcdDFUVersion 1.10 +Device Status: 0x0000 + (Bus Powered) +resetting target +done diff --git a/tests/sysmo-octsim/04_check_dfu_lsusb.sh b/tests/sysmo-octsim/04_check_dfu_lsusb.sh new file mode 100755 index 0000000..eef2246 --- /dev/null +++ b/tests/sysmo-octsim/04_check_dfu_lsusb.sh @@ -0,0 +1,6 @@ +#!/bin/sh +. ./test-data + +./ctl_reset_to_dfu.sh +lsusb -d 1d50:6141 -v 2>/dev/null | sed -e "s/$Bus.*Device.*:\ ID/ID/g" +./ctl_reset_target.sh diff --git a/tests/sysmo-octsim/README b/tests/sysmo-octsim/README new file mode 100644 index 0000000..b3ac561 --- /dev/null +++ b/tests/sysmo-octsim/README @@ -0,0 +1,4 @@ +This testsuite assumes you have installed the following utilities: +- lsusb +- dfu-util +- wget diff --git a/tests/sysmo-octsim/ctl_reset_target.sh b/tests/sysmo-octsim/ctl_reset_target.sh new file mode 100755 index 0000000..6eed990 --- /dev/null +++ b/tests/sysmo-octsim/ctl_reset_target.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +#usb_rly08 serial +USB_RELAY="/dev/serial/by-id/usb-Devantech_Ltd._USB-RLY08_00021197-if00" + +#usb_rly08 +# relay1 = usbpower +# relay2 = dfu-btn + +#12 off +echo "resetting target" +echo -n "op" > $USB_RELAY +sleep 1 +# 1 on +echo -n "e" > $USB_RELAY +sleep 1 +echo "done" diff --git a/tests/sysmo-octsim/ctl_reset_to_dfu.sh b/tests/sysmo-octsim/ctl_reset_to_dfu.sh new file mode 100755 index 0000000..969ca0c --- /dev/null +++ b/tests/sysmo-octsim/ctl_reset_to_dfu.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +#usb_rly08 serial +USB_RELAY="/dev/serial/by-id/usb-Devantech_Ltd._USB-RLY08_00021197-if00" + +#usb_rly08 +# relay1 = usbpower +# relay2 = dfu-btn + +echo "resetting target to dfu" +#12 off +echo -n "op" > $USB_RELAY +sleep 1 +# 2 on +echo -n "f" > $USB_RELAY +sleep 1 +# 1 on +echo -n "e" > $USB_RELAY +sleep 1 +# 2 off +echo -n "p" > $USB_RELAY +sleep 1 +echo "done" diff --git a/tests/sysmo-octsim/fetch_image.sh b/tests/sysmo-octsim/fetch_image.sh new file mode 100755 index 0000000..c0a4f8f --- /dev/null +++ b/tests/sysmo-octsim/fetch_image.sh @@ -0,0 +1,6 @@ +#!/bin/sh +. ./test-data + +echo "fetch image" +wget -O dl/sysmoOCTSIM-latest.bin http://ftp.osmocom.org/binaries/osmo-ccid-firmware/latest/sysmoOCTSIM.bin -nv +echo "done" diff --git a/tests/sysmo-octsim/flash_octsim_dfu.sh b/tests/sysmo-octsim/flash_octsim_dfu.sh new file mode 100755 index 0000000..5b9c19a --- /dev/null +++ b/tests/sysmo-octsim/flash_octsim_dfu.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +dfu-util --device 1d50:6141 --alt 0 --reset --download dl/sysmoOCTSIM-latest.bin 2>/dev/null |grep -v "Download\t"|grep -v "\[" diff --git a/tests/sysmo-octsim/prepare b/tests/sysmo-octsim/prepare new file mode 100755 index 0000000..bb95e40 --- /dev/null +++ b/tests/sysmo-octsim/prepare @@ -0,0 +1,8 @@ +#!/bin/sh + +. ./test-data + +echo "================ PREPARING TEST RIG ================" +./ctl_reset_target.sh +echo "================ TEST RIG PREPARED =================" +echo "" diff --git a/tests/sysmo-octsim/regen b/tests/sysmo-octsim/regen new file mode 100755 index 0000000..7ed1fab --- /dev/null +++ b/tests/sysmo-octsim/regen @@ -0,0 +1,11 @@ +#!/bin/sh + +echo "Regenerating test output..." +./prepare +./01_check_rig.sh > ./01_check_rig.out +./02_flash_dfu.sh > ./02_flash_dfu.out +./03_check_lsusb.sh > ./03_check_lsusb.out +./04_check_dfu_lsusb.sh > ./04_check_dfu_lsusb.out +echo "Reference output regenerated!" +echo "" + diff --git a/tests/sysmo-octsim/run-tests b/tests/sysmo-octsim/run-tests new file mode 100755 index 0000000..b67c425 --- /dev/null +++ b/tests/sysmo-octsim/run-tests @@ -0,0 +1,39 @@ +#!/bin/sh + +# default: execute all tests +TESTS="01_check_rig.sh 02_flash_dfu.sh 03_check_lsusb.sh 04_check_dfu_lsusb.sh" + +# if command line specifies some specific tests, execute only those +if [ $# -ge 1 ]; then + TESTS=$* +fi + +TMP=`tempfile` +NUM_FAIL=0 + +# prepare test card +./prepare + +for T in $TESTS; do + echo "==> Executing Testcase $T" + EXPOUT=${T%%.sh}.out + rm $TMP + ./$T > $TMP + diff -u $EXPOUT $TMP + if [ $? -eq 0 ]; then + echo "Test $T passed" + else + echo "Test $T FAILED!" + NUM_FAIL=$((NUM_FAIL+1)) + fi +done + +echo +echo +echo "Summary: $NUM_FAIL Tests failed" + +if [ $NUM_FAIL -gt 0 ]; then + exit 1 +else + exit 0 +fi diff --git a/tests/sysmo-octsim/test-data b/tests/sysmo-octsim/test-data new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/sysmo-octsim/test-data -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 Gerrit-Change-Number: 17099 Gerrit-PatchSet: 1 Gerrit-Owner: roh Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 7 21:10:11 2020 From: gerrit-no-reply at lists.osmocom.org (roh) Date: Fri, 7 Feb 2020 21:10:11 +0000 Subject: Change in osmo-ccid-firmware[master]: Implement CI scripts for testing the resulting binary on hardware for... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 to look at the new patch set (#2). Change subject: Implement CI scripts for testing the resulting binary on hardware for jenkins ...................................................................... Implement CI scripts for testing the resulting binary on hardware for jenkins Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 --- A tests/run-tests A tests/sysmo-octsim/01_check_rig.out A tests/sysmo-octsim/01_check_rig.sh A tests/sysmo-octsim/02_flash_dfu.out A tests/sysmo-octsim/02_flash_dfu.sh A tests/sysmo-octsim/03_check_lsusb.out A tests/sysmo-octsim/03_check_lsusb.sh A tests/sysmo-octsim/04_check_dfu_lsusb.out A tests/sysmo-octsim/04_check_dfu_lsusb.sh A tests/sysmo-octsim/README A tests/sysmo-octsim/ctl_reset_target.sh A tests/sysmo-octsim/ctl_reset_to_dfu.sh A tests/sysmo-octsim/fetch_image.sh A tests/sysmo-octsim/flash_octsim_dfu.sh A tests/sysmo-octsim/prepare A tests/sysmo-octsim/regen A tests/sysmo-octsim/run-tests A tests/sysmo-octsim/test-data 18 files changed, 471 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/99/17099/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 Gerrit-Change-Number: 17099 Gerrit-PatchSet: 2 Gerrit-Owner: roh Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenkins at lists.osmocom.org Sat Feb 8 00:03:35 2020 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Sat, 8 Feb 2020 00:03:35 +0000 (UTC) Subject: =?UTF-8?Q?Build_failed_in_Jenkins:_master?= =?UTF-8?Q?-osmo-sip-connector_=C2=BB_a1=3Ddefaul?= =?UTF-8?Q?t,a2=3Ddefault,a3=3Ddefault,a4=3Ddefa?= =?UTF-8?Q?ult,osmocom-master-debian9_#2104?= Message-ID: <440637447.2190.1581120215129.JavaMail.jenkins@jenkins.osmocom.org> See ------------------------------------------ [...truncated 222.21 KB...] Making install in tests make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' Making install in contrib make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' Making install in systemd make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[5]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[5]: Nothing to be done for 'install-exec-am'. /bin/mkdir -p '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst//lib/systemd/system' /usr/bin/install -c -m 644 ../../../../contrib/systemd/osmo-sip-connector.service '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst//lib/systemd/system' make[5]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' make[5]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' make[5]: Nothing to be done for 'install-exec-am'. make[5]: Nothing to be done for 'install-data-am'. make[5]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' Making install in doc make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' Making install in examples make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' make[5]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' make[5]: Nothing to be done for 'install-exec-am'. /bin/mkdir -p '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector/examples/osmo-sip-connector' /usr/bin/install -c -m 644 ../../../../doc/examples/osmo-sip-connector.cfg '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector/examples/osmo-sip-connector' /bin/mkdir -p '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/etc/osmocom' /usr/bin/install -c -m 644 ../../../../doc/examples/osmo-sip-connector.cfg '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/etc/osmocom' make[5]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' Making install in manuals make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[5]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[5]: Nothing to be done for 'install-exec-am'. make[5]: Nothing to be done for 'install-data-am'. make[5]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' if [ "" != "1" ]; then \ for i in osmosipconnector-usermanual.pdf osmosipconnector-vty-reference.pdf; do \ install -vDm644 "$i" "/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc/$i" || exit 1; \ done; \ fi install: creating directory '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc' 'osmosipconnector-usermanual.pdf' -> '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc/osmosipconnector-usermanual.pdf' 'osmosipconnector-vty-reference.pdf' -> '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc/osmosipconnector-vty-reference.pdf' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[5]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[5]: Nothing to be done for 'install-exec-am'. make[5]: Nothing to be done for 'install-data-am'. make[5]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' Making uninstall in src make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/src' ( cd '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/bin' && rm -f osmo-sip-connector ) make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/src' Making uninstall in tests make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' make[2]: Nothing to be done for 'uninstall'. make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' Making uninstall in contrib make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' Making uninstall in systemd make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' ( cd '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst//lib/systemd/system' && rm -f osmo-sip-connector.service ) make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' make[3]: Nothing to be done for 'uninstall-am'. make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' Making uninstall in doc make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' Making uninstall in examples make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' ( cd '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector/examples/osmo-sip-connector' && rm -f osmo-sip-connector.cfg ) ( cd '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/etc/osmocom' && rm -f osmo-sip-connector.cfg ) make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' Making uninstall in manuals make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' if [ "" != "1" ]; then \ for i in osmosipconnector-usermanual.pdf osmosipconnector-vty-reference.pdf; do \ rm -v "/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc/$i"; \ done; \ fi removed '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc/osmosipconnector-usermanual.pdf' removed '/tmp/am-dc-15071//build/osmo-sip-connector-1.4.0/_inst/share/doc/osmo-sip-connector-doc/osmosipconnector-vty-reference.pdf' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[3]: Nothing to be done for 'uninstall-am'. make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[2]: Nothing to be done for 'uninstall-am'. make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' make dist-bzip2 dist-gzip am__post_remove_distdir='@:' make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' if test -d "osmo-sip-connector-1.4.0"; then find "osmo-sip-connector-1.4.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "osmo-sip-connector-1.4.0" || { sleep 5 && rm -rf "osmo-sip-connector-1.4.0"; }; else :; fi test -d "osmo-sip-connector-1.4.0" || mkdir "osmo-sip-connector-1.4.0" (cd src && make top_distdir=../osmo-sip-connector-1.4.0 distdir=../osmo-sip-connector-1.4.0/src \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/src' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/src' (cd tests && make top_distdir=../osmo-sip-connector-1.4.0 distdir=../osmo-sip-connector-1.4.0/tests \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' (cd contrib && make top_distdir=../osmo-sip-connector-1.4.0 distdir=../osmo-sip-connector-1.4.0/contrib \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' (cd systemd && make top_distdir=../../osmo-sip-connector-1.4.0 distdir=../../osmo-sip-connector-1.4.0/contrib/systemd \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' (cd doc && make top_distdir=../osmo-sip-connector-1.4.0 distdir=../osmo-sip-connector-1.4.0/doc \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' (cd examples && make top_distdir=../../osmo-sip-connector-1.4.0 distdir=../../osmo-sip-connector-1.4.0/doc/examples \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' (cd manuals && make top_distdir=../../osmo-sip-connector-1.4.0 distdir=../../osmo-sip-connector-1.4.0/doc/manuals \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[4]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[4]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make \ top_distdir="osmo-sip-connector-1.4.0" distdir="osmo-sip-connector-1.4.0" \ dist-hook make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' echo 1.4.0 > osmo-sip-connector-1.4.0/.tarball-version make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' test -n "" \ || find "osmo-sip-connector-1.4.0" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec /bin/bash /build/osmo-sip-connector-1.4.0/install-sh -c -m a+r {} {} \; \ || chmod -R a+r "osmo-sip-connector-1.4.0" tardir=osmo-sip-connector-1.4.0 && ${TAR-tar} chof - "$tardir" | BZIP2=${BZIP2--9} bzip2 -c >osmo-sip-connector-1.4.0.tar.bz2 tardir=osmo-sip-connector-1.4.0 && ${TAR-tar} chof - "$tardir" | GZIP=--best gzip -c >osmo-sip-connector-1.4.0.tar.gz make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' if test -d "osmo-sip-connector-1.4.0"; then find "osmo-sip-connector-1.4.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "osmo-sip-connector-1.4.0" || { sleep 5 && rm -rf "osmo-sip-connector-1.4.0"; }; else :; fi make[1]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' make[1]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' Making distclean in src make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/src' test -z "osmo-sip-connector" || rm -f osmo-sip-connector rm -f *.o rm -f *.tab.c test -z "" || rm -f test . = "../../../src" || test -z "" || rm -f rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags rm -rf ./.deps rm -f Makefile make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/src' Making distclean in tests make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' test -z "" || rm -f test . = "../../../tests" || test -z "" || rm -f rm -f Makefile make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/tests' Making distclean in contrib make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' Making distclean in systemd make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' test -z "" || rm -f test . = "../../../../contrib/systemd" || test -z "" || rm -f rm -f Makefile make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib/systemd' make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' test -z "" || rm -f test . = "../../../contrib" || test -z "" || rm -f rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' rm -f Makefile make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/contrib' Making distclean in doc make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' Making distclean in examples make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' test -z "" || rm -f test . = "../../../../doc/examples" || test -z "" || rm -f rm -f Makefile make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/examples' Making distclean in manuals make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' test -z "" || rm -f test . = "../../../../doc/manuals" || test -z "" || rm -f rm -rf osmosipconnector-usermanual__*.png osmosipconnector-usermanual__*.svg osmosipconnector-usermanual.check osmosipconnector-usermanual.pdf osmosipconnector-usermanual.html osmosipconnector-vty-reference.pdf osmosipconnector-vty-reference.lint generated common build rm -f Makefile make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc/manuals' make[3]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' test -z "" || rm -f test . = "../../../doc" || test -z "" || rm -f rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags make[3]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' rm -f Makefile make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub/doc' make[2]: Entering directory '/build/osmo-sip-connector-1.4.0/_build/sub' test -z "" || rm -f test . = "../.." || test -z "" || rm -f rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags rm -f cscope.out cscope.in.out cscope.po.out cscope.files make[2]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' rm -f config.status config.cache config.log configure.lineno config.status.lineno rm -f Makefile make[1]: Leaving directory '/build/osmo-sip-connector-1.4.0/_build/sub' if test -d "osmo-sip-connector-1.4.0"; then find "osmo-sip-connector-1.4.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "osmo-sip-connector-1.4.0" || { sleep 5 && rm -rf "osmo-sip-connector-1.4.0"; }; else :; fi ========================================================== osmo-sip-connector-1.4.0 archives ready for distribution: osmo-sip-connector-1.4.0.tar.gz osmo-sip-connector-1.4.0.tar.bz2 ========================================================== + '[' 1 = 1 ']' + '[' 1 = 1 ']' + make -C /build/doc/manuals publish make: Entering directory '/build/doc/manuals' mkdir -p out cp *.pdf out rsync -avz -e "ssh -o 'UserKnownHostsFile=/build/deps/install/stow/osmo-gsm-manuals/share/osmo-gsm-manuals/build/known_hosts' -p 48" ./out/ docs at rita.osmocom.org:web-files/latest/ Warning: Permanently added the ECDSA host key for IP address '[144.76.43.76]:48' to the list of known hosts. Permission denied (publickey,keyboard-interactive). rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2] make: *** [publish] Error 255 /build/deps/install/stow/osmo-gsm-manuals/share/osmo-gsm-manuals/build/Makefile.common.inc:31: recipe for target 'publish' failed make: Leaving directory '/build/doc/manuals' Build step 'Execute shell' marked build as failure [WARNINGS]Skipping publisher since build result is FAILURE From jenkins at lists.osmocom.org Sat Feb 8 03:10:45 2020 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Sat, 8 Feb 2020 03:10:45 +0000 (UTC) Subject: =?UTF-8?Q?Jenkins_build_is_back_to_normal_:?= =?UTF-8?Q?_master-osmo-sip-connector_=C2=BB_a1=3Dde?= =?UTF-8?Q?fault,a2=3Ddefault,a3=3Ddefault,a4=3Dde?= =?UTF-8?Q?fault,osmocom-master-debian9_#2105?= In-Reply-To: <440637447.2190.1581120215129.JavaMail.jenkins@jenkins.osmocom.org> References: <440637447.2190.1581120215129.JavaMail.jenkins@jenkins.osmocom.org> Message-ID: <1369641157.2217.1581131445962.JavaMail.jenkins@jenkins.osmocom.org> See From jenkins at lists.osmocom.org Sat Feb 8 05:20:16 2020 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Sat, 8 Feb 2020 05:20:16 +0000 (UTC) Subject: =?UTF-8?Q?Build_failed_in_Jenkins:_mast?= =?UTF-8?Q?er-osmo-asf4-dfu_=C2=BB_a1=3Ddefault,?= =?UTF-8?Q?a2=3Ddefault,a3=3Ddefault,a4=3Ddefau?= =?UTF-8?Q?lt,osmocom-master-debian9_#405?= In-Reply-To: <1739769390.2144.1581052815832.JavaMail.jenkins@jenkins.osmocom.org> References: <1739769390.2144.1581052815832.JavaMail.jenkins@jenkins.osmocom.org> Message-ID: <1144523326.2221.1581139216252.JavaMail.jenkins@jenkins.osmocom.org> See ------------------------------------------ [...truncated 48.94 KB...] "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_syscalls.d" -MT"hal/utils/src/utils_syscalls.d" -MT"hal/utils/src/utils_syscalls.o" -o "hal/utils/src/utils_syscalls.o" "../hal/utils/src/utils_syscalls.c" Building file: ../gcc/system_same54.c "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/dmac/hpl_dmac.d" -MT"hpl/dmac/hpl_dmac.d" -MT"hpl/dmac/hpl_dmac.o" -o "hpl/dmac/hpl_dmac.o" "../hpl/dmac/hpl_dmac.c" ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/nvmctrl/hpl_nvmctrl.d" -MT"hpl/nvmctrl/hpl_nvmctrl.d" -MT"hpl/nvmctrl/hpl_nvmctrl.o" -o "hpl/nvmctrl/hpl_nvmctrl.o" "../hpl/nvmctrl/hpl_nvmctrl.c" ARM/GNU C Compiler Building file: ../hpl/usb/hpl_usb.c "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "gcc/system_same54.d" -MT"gcc/system_same54.d" -MT"gcc/system_same54.o" -o "gcc/system_same54.o" "../gcc/system_same54.c" ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/usb/hpl_usb.d" -MT"hpl/usb/hpl_usb.d" -MT"hpl/usb/hpl_usb.o" -o "hpl/usb/hpl_usb.o" "../hpl/usb/hpl_usb.c" Finished building: ../hal/utils/src/utils_syscalls.c Building file: ../hal/src/hal_delay.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_delay.d" -MT"hal/src/hal_delay.d" -MT"hal/src/hal_delay.o" -o "hal/src/hal_delay.o" "../hal/src/hal_delay.c" Finished building: ../gcc/system_same54.c Building file: ../hpl/pm/hpl_pm.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/pm/hpl_pm.d" -MT"hpl/pm/hpl_pm.d" -MT"hpl/pm/hpl_pm.o" -o "hpl/pm/hpl_pm.o" "../hpl/pm/hpl_pm.c" Finished building: ../hal/src/hal_io.c Building file: ../hpl/core/hpl_init.c Finished building: ../hpl/dmac/hpl_dmac.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/core/hpl_init.d" -MT"hpl/core/hpl_init.d" -MT"hpl/core/hpl_init.o" -o "hpl/core/hpl_init.o" "../hpl/core/hpl_init.c" Building file: ../hpl/gclk/hpl_gclk.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/gclk/hpl_gclk.d" -MT"hpl/gclk/hpl_gclk.d" -MT"hpl/gclk/hpl_gclk.o" -o "hpl/gclk/hpl_gclk.o" "../hpl/gclk/hpl_gclk.c" Finished building: ../hal/src/hal_delay.c Building file: ../hal/utils/src/utils_list.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_list.d" -MT"hal/utils/src/utils_list.d" -MT"hal/utils/src/utils_list.o" -o "hal/utils/src/utils_list.o" "../hal/utils/src/utils_list.c" Finished building: ../hpl/core/hpl_core_m4.c Building file: ../hal/utils/src/utils_assert.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_assert.d" -MT"hal/utils/src/utils_assert.d" -MT"hal/utils/src/utils_assert.o" -o "hal/utils/src/utils_assert.o" "../hal/utils/src/utils_assert.c" Finished building: ../hpl/nvmctrl/hpl_nvmctrl.c Building file: ../usb_start.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb_start.d" -MT"usb_start.d" -MT"usb_start.o" -o "usb_start.o" "../usb_start.c" Finished building: ../usb/class/dfu/device/dfudf.c Building file: ../hpl/oscctrl/hpl_oscctrl.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/oscctrl/hpl_oscctrl.d" -MT"hpl/oscctrl/hpl_oscctrl.d" -MT"hpl/oscctrl/hpl_oscctrl.o" -o "hpl/oscctrl/hpl_oscctrl.o" "../hpl/oscctrl/hpl_oscctrl.c" Finished building: ../hpl/pm/hpl_pm.c Building file: ../hpl/mclk/hpl_mclk.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/mclk/hpl_mclk.d" -MT"hpl/mclk/hpl_mclk.d" -MT"hpl/mclk/hpl_mclk.o" -o "hpl/mclk/hpl_mclk.o" "../hpl/mclk/hpl_mclk.c" Finished building: ../hpl/usb/hpl_usb.c Building file: ../hpl/ramecc/hpl_ramecc.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/ramecc/hpl_ramecc.d" -MT"hpl/ramecc/hpl_ramecc.d" -MT"hpl/ramecc/hpl_ramecc.o" -o "hpl/ramecc/hpl_ramecc.o" "../hpl/ramecc/hpl_ramecc.c" Finished building: ../hpl/gclk/hpl_gclk.c Building file: ../usb/usb_protocol.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb/usb_protocol.d" -MT"usb/usb_protocol.d" -MT"usb/usb_protocol.o" -o "usb/usb_protocol.o" "../usb/usb_protocol.c" Finished building: ../hpl/core/hpl_init.c Building file: ../hal/src/hal_flash.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_flash.d" -MT"hal/src/hal_flash.d" -MT"hal/src/hal_flash.o" -o "hal/src/hal_flash.o" "../hal/src/hal_flash.c" Finished building: ../hal/utils/src/utils_list.c Building file: ../hal/src/hal_init.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_init.d" -MT"hal/src/hal_init.d" -MT"hal/src/hal_init.o" -o "hal/src/hal_init.o" "../hal/src/hal_init.c" Finished building: ../hpl/oscctrl/hpl_oscctrl.c Building file: ../gcc/gcc/startup_same54.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "gcc/gcc/startup_same54.d" -MT"gcc/gcc/startup_same54.d" -MT"gcc/gcc/startup_same54.o" -o "gcc/gcc/startup_same54.o" "../gcc/gcc/startup_same54.c" Finished building: ../usb_start.c Building file: ../hal/src/hal_usb_device.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_usb_device.d" -MT"hal/src/hal_usb_device.d" -MT"hal/src/hal_usb_device.o" -o "hal/src/hal_usb_device.o" "../hal/src/hal_usb_device.c" Finished building: ../hal/utils/src/utils_assert.c Building file: ../hpl/osc32kctrl/hpl_osc32kctrl.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/osc32kctrl/hpl_osc32kctrl.d" -MT"hpl/osc32kctrl/hpl_osc32kctrl.d" -MT"hpl/osc32kctrl/hpl_osc32kctrl.o" -o "hpl/osc32kctrl/hpl_osc32kctrl.o" "../hpl/osc32kctrl/hpl_osc32kctrl.c" Finished building: ../gcc/gcc/startup_same54.c Building file: ../driver_init.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "driver_init.d" -MT"driver_init.d" -MT"driver_init.o" -o "driver_init.o" "../driver_init.c" Finished building: ../hpl/mclk/hpl_mclk.c Building file: ../hal/src/hal_gpio.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_gpio.d" -MT"hal/src/hal_gpio.d" -MT"hal/src/hal_gpio.o" -o "hal/src/hal_gpio.o" "../hal/src/hal_gpio.c" Finished building: ../hpl/ramecc/hpl_ramecc.c Building file: ../hal/utils/src/utils_event.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/utils/src/utils_event.d" -MT"hal/utils/src/utils_event.d" -MT"hal/utils/src/utils_event.o" -o "hal/utils/src/utils_event.o" "../hal/utils/src/utils_event.c" Finished building: ../usb/usb_protocol.c Building file: ../hal/src/hal_sleep.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_sleep.d" -MT"hal/src/hal_sleep.d" -MT"hal/src/hal_sleep.o" -o "hal/src/hal_sleep.o" "../hal/src/hal_sleep.c" Finished building: ../hal/src/hal_flash.c Building file: ../hal/src/hal_cache.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_cache.d" -MT"hal/src/hal_cache.d" -MT"hal/src/hal_cache.o" -o "hal/src/hal_cache.o" "../hal/src/hal_cache.c" Finished building: ../hal/src/hal_init.c Building file: ../hpl/cmcc/hpl_cmcc.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hpl/cmcc/hpl_cmcc.d" -MT"hpl/cmcc/hpl_cmcc.d" -MT"hpl/cmcc/hpl_cmcc.o" -o "hpl/cmcc/hpl_cmcc.o" "../hpl/cmcc/hpl_cmcc.c" Finished building: ../hpl/osc32kctrl/hpl_osc32kctrl.c Building file: ../atmel_start.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "atmel_start.d" -MT"atmel_start.d" -MT"atmel_start.o" -o "atmel_start.o" "../atmel_start.c" Finished building: ../hal/src/hal_usb_device.c Building file: ../usb_dfu_main.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb_dfu_main.d" -MT"usb_dfu_main.d" -MT"usb_dfu_main.o" -o "usb_dfu_main.o" "../usb_dfu_main.c" Finished building: ../hal/src/hal_gpio.c Building file: ../usb/device/usbdc.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "usb/device/usbdc.d" -MT"usb/device/usbdc.d" -MT"usb/device/usbdc.o" -o "usb/device/usbdc.o" "../usb/device/usbdc.c" Finished building: ../driver_init.c Building file: ../hal/src/hal_atomic.c ARM/GNU C Compiler "arm-none-eabi-gcc" -x c -mthumb -DDEBUG -Os -ffunction-sections -mlong-calls -g3 -Wall -c -std=gnu99 \ -D__SAME54P20A__ -DSYSMOOCTSIM -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 \ -I"../" -I"../config" -I"../hal/include" -I"../hal/utils/include" -I"../hpl/cmcc" -I"../hpl/core" -I"../hpl/dmac" -I"../hpl/gclk" -I"../hpl/mclk" -I"../hpl/nvmctrl" -I"../hpl/osc32kctrl" -I"../hpl/oscctrl" -I"../hpl/pm" -I"../hpl/port" -I"../hpl/ramecc" -I"../hpl/usb" -I"../hri" -I"../" -I"../config" -I"../usb" -I"../usb/class/dfu" -I"../usb/class/dfu/device" -I"../usb/device" -I"../" -I"../CMSIS/Include" -I"../include" \ -MD -MP -MF "hal/src/hal_atomic.d" -MT"hal/src/hal_atomic.d" -MT"hal/src/hal_atomic.o" -o "hal/src/hal_atomic.o" "../hal/src/hal_atomic.c" Finished building: ../hal/utils/src/utils_event.c Finished building: ../hal/src/hal_cache.c Finished building: ../hal/src/hal_sleep.c Finished building: ../atmel_start.c Finished building: ../hpl/cmcc/hpl_cmcc.c Finished building: ../usb_dfu_main.c Finished building: ../hal/src/hal_atomic.c Finished building: ../usb/device/usbdc.c Building target: bootloader-sysmooctsim-0.1.7-b90f.elf Invoking: ARM/GNU Linker "arm-none-eabi-gcc" -o bootloader-sysmooctsim-0.1.7-b90f.elf "hal/src/hal_io.o" "hpl/core/hpl_core_m4.o" "usb/class/dfu/device/dfudf.o" "hal/utils/src/utils_syscalls.o" "hpl/dmac/hpl_dmac.o" "hpl/nvmctrl/hpl_nvmctrl.o" "gcc/system_same54.o" "hpl/usb/hpl_usb.o" "hal/src/hal_delay.o" "hpl/pm/hpl_pm.o" "hpl/core/hpl_init.o" "hpl/gclk/hpl_gclk.o" "hal/utils/src/utils_list.o" "hal/utils/src/utils_assert.o" "usb_start.o" "hpl/oscctrl/hpl_oscctrl.o" "hpl/mclk/hpl_mclk.o" "hpl/ramecc/hpl_ramecc.o" "usb/usb_protocol.o" "hal/src/hal_flash.o" "hal/src/hal_init.o" "gcc/gcc/startup_same54.o" "hal/src/hal_usb_device.o" "hpl/osc32kctrl/hpl_osc32kctrl.o" "driver_init.o" "hal/src/hal_gpio.o" "hal/utils/src/utils_event.o" "hal/src/hal_sleep.o" "hal/src/hal_cache.o" "hpl/cmcc/hpl_cmcc.o" "atmel_start.o" "usb_dfu_main.o" "usb/device/usbdc.o" "hal/src/hal_atomic.o" -Wl,--start-group -lm -Wl,--end-group -mthumb \ -Wl,-Map="bootloader-sysmooctsim-0.1.7-b90f.map" --specs=nano.specs -Wl,--gc-sections -mcpu=cortex-m4 \ \ -T"../gcc/gcc/same54p20a_flash.ld" \ -L"../gcc/gcc" Finished building target: bootloader-sysmooctsim-0.1.7-b90f.elf "arm-none-eabi-objcopy" -O binary "bootloader-sysmooctsim-0.1.7-b90f.elf" "bootloader-sysmooctsim-0.1.7-b90f.bin" "arm-none-eabi-objcopy" -O ihex -R .eeprom -R .fuse -R .lock -R .signature \ "bootloader-sysmooctsim-0.1.7-b90f.elf" "bootloader-sysmooctsim-0.1.7-b90f.hex" "arm-none-eabi-objcopy" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma \ .eeprom=0 --no-change-warnings -O binary "bootloader-sysmooctsim-0.1.7-b90f.elf" \ "bootloader-sysmooctsim-0.1.7-b90f.eep" || exit 0 "arm-none-eabi-objdump" -h -S "bootloader-sysmooctsim-0.1.7-b90f.elf" > "bootloader-sysmooctsim-0.1.7-b90f.lss" "arm-none-eabi-size" "bootloader-sysmooctsim-0.1.7-b90f.elf" text data bss dec hex filename 10816 252 66464 77532 12edc bootloader-sysmooctsim-0.1.7-b90f.elf ln -sf bootloader-sysmooctsim-0.1.7-b90f.bin bootloader-sysmooctsim.bin ln -sf bootloader-sysmooctsim-0.1.7-b90f.elf bootloader-sysmooctsim.elf + '[' x--publish = x--publish ']' + echo + echo '=============== UPLOAD BUILD ==============' =============== UPLOAD BUILD ============== + cat + SSH_COMMAND='ssh -o '\''UserKnownHostsFile=/build/known_hosts'\'' -p 48' + rsync --archive --copy-links --verbose --compress --delete --rsh 'ssh -o '\''UserKnownHostsFile=/build/known_hosts'\'' -p 48' /build/gcc/bootloader-sysmooctsim.bin /build/gcc/bootloader-sysmooctsim.elf binaries at rita.osmocom.org:web-files/osmo-asf4-dfu/latest/ Warning: Permanently added the ECDSA host key for IP address '[144.76.43.76]:48' to the list of known hosts. Permission denied (publickey,keyboard-interactive). rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2] Build step 'Execute shell' marked build as failure [WARNINGS]Skipping publisher since build result is FAILURE From jenkins at lists.osmocom.org Sat Feb 8 06:52:15 2020 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Sat, 8 Feb 2020 06:52:15 +0000 (UTC) Subject: =?UTF-8?Q?Build_failed_in_Jenkins:_mas?= =?UTF-8?Q?ter-simtrace2_=C2=BB_a1=3Ddefault,a2?= =?UTF-8?Q?=3Ddefault,a3=3Ddefault,a4=3Ddefaul?= =?UTF-8?Q?t,osmocom-master-debian9_#693?= In-Reply-To: <751597168.2160.1581058335745.JavaMail.jenkins@jenkins.osmocom.org> References: <751597168.2160.1581058335745.JavaMail.jenkins@jenkins.osmocom.org> Message-ID: <876673893.2232.1581144735045.JavaMail.jenkins@jenkins.osmocom.org> See ------------------------------------------ [...truncated 141.75 KB...] UART_RX(00) UART_RX(07) uart_enable(uart_chan=42, TX) -I- 0: send_tpdu_header: a0 d2 00 00 07 -I- 0: flush_rx_buffer (5) [L1]> 01 06 00 00 00 00 13 00 [L2]> 01 00 00 00 05 00 a0 d2 00 00 07 flags=1, data= a0 d2 00 00 07 UART_TX(d2) uart_enable(uart_chan=42, RX) UART_RX(00) UART_RX(01) UART_RX(02) UART_RX(03) UART_RX(04) UART_RX(05) UART_RX(06) -I- 0: flush_rx_buffer (7) [L1]> 01 06 00 00 00 00 15 00 [L2]> 02 00 00 00 07 00 00 01 02 03 04 05 06 flags=2, data= 00 01 02 03 04 05 06 UART_TX(90) UART_TX(00) uart_enable(uart_chan=42, RX) uart_enable(uart_chan=42, RX) -I- 0: CLK deactivated -I- 0: CLK activated ==> transmitting APDU (HDR + PB + card-TX) UART_RX(a0) UART_RX(b2) UART_RX(00) UART_RX(00) UART_RX(0a) uart_enable(uart_chan=42, TX) -I- 0: send_tpdu_header: a0 b2 00 00 0a -I- 0: flush_rx_buffer (5) [L1]> 01 06 00 00 00 00 13 00 [L2]> 01 00 00 00 05 00 a0 b2 00 00 0a flags=1, data= a0 b2 00 00 0a UART_TX(b2) UART_TX(00) UART_TX(01) UART_TX(02) UART_TX(03) UART_TX(04) UART_TX(05) UART_TX(06) UART_TX(07) UART_TX(08) UART_TX(09) UART_TX(90) UART_TX(00) uart_enable(uart_chan=42, RX) uart_enable(uart_chan=42, RX) -I- 0: CLK deactivated -I- 0: CLK activated =============== HOST START ============== aclocal: warning: couldn't open directory 'm4': No such file or directory libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'. libtoolize: copying file './ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am. configure.ac:20: installing './compile' configure.ac:22: installing './config.guess' configure.ac:22: installing './config.sub' configure.ac:8: installing './install-sh' configure.ac:8: installing './missing' lib/Makefile.am: installing './depcomp' checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking whether make sets $(MAKE)... (cached) yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking how to print strings... printf checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... no checking if : is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for pkg-config... /usr/bin/pkg-config checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.20... yes checking if gcc supports -fvisibility=hidden... yes checking for LIBOSMOCORE... yes checking for LIBOSMOSIM... yes checking for LIBOSMOUSB... yes checking for LIBUSB... yes CFLAGS="-g -O2 -Wall -fsanitize=address -fsanitize=undefined -fsanitize=address -fsanitize=undefined -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=cpp" CPPFLAGS=" -Wall -fsanitize=address -fsanitize=undefined -fsanitize=address -fsanitize=undefined -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=cpp" checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating libosmo-simtrace2.pc config.status: creating include/Makefile config.status: creating src/Makefile config.status: creating lib/Makefile config.status: creating contrib/Makefile config.status: creating Makefile config.status: executing tests/atconfig commands config.status: executing depfiles commands config.status: executing libtool commands echo 0.7.0.49-baa6 > .version-t && mv .version-t .version make all-recursive make[1]: Entering directory '/build/host' Making all in include make[2]: Entering directory '/build/host/include' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/build/host/include' Making all in lib make[2]: Entering directory '/build/host/lib' CC apdu_dispatch.lo CC simtrace2_api.lo CC gsmtap.lo CC usb_util.lo CCLD libosmo-simtrace2.la ar: `u' modifier ignored since `D' is the default (see `U') make[2]: Leaving directory '/build/host/lib' Making all in src make[2]: Entering directory '/build/host/src' CC simtrace2-remsim.o CC usb2udp.o CC simtrace2_usb.o CC simtrace2-sniff.o CCLD simtrace2-list CCLD simtrace2-remsim-usb2udp CCLD simtrace2-remsim CCLD simtrace2-sniff make[2]: Leaving directory '/build/host/src' Making all in contrib make[2]: Entering directory '/build/host/contrib' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/build/host/contrib' make[2]: Entering directory '/build/host' make[2]: Nothing to be done for 'all-am'. make[2]: Leaving directory '/build/host' make[1]: Leaving directory '/build/host' make dist-bzip2 am__post_remove_distdir='@:' make[1]: Entering directory '/build/host' if test -d "simtrace2-0.7.0.49-baa6"; then find "simtrace2-0.7.0.49-baa6" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "simtrace2-0.7.0.49-baa6" || { sleep 5 && rm -rf "simtrace2-0.7.0.49-baa6"; }; else :; fi test -d "simtrace2-0.7.0.49-baa6" || mkdir "simtrace2-0.7.0.49-baa6" (cd include && make top_distdir=../simtrace2-0.7.0.49-baa6 distdir=../simtrace2-0.7.0.49-baa6/include \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/build/host/include' make[2]: Leaving directory '/build/host/include' (cd lib && make top_distdir=../simtrace2-0.7.0.49-baa6 distdir=../simtrace2-0.7.0.49-baa6/lib \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/build/host/lib' make[2]: Leaving directory '/build/host/lib' (cd src && make top_distdir=../simtrace2-0.7.0.49-baa6 distdir=../simtrace2-0.7.0.49-baa6/src \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/build/host/src' make[2]: Leaving directory '/build/host/src' (cd contrib && make top_distdir=../simtrace2-0.7.0.49-baa6 distdir=../simtrace2-0.7.0.49-baa6/contrib \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/build/host/contrib' make[2]: Leaving directory '/build/host/contrib' make \ top_distdir="simtrace2-0.7.0.49-baa6" distdir="simtrace2-0.7.0.49-baa6" \ dist-hook make[2]: Entering directory '/build/host' echo 0.7.0.49-baa6 > simtrace2-0.7.0.49-baa6/.tarball-version make[2]: Leaving directory '/build/host' test -n "" \ || find "simtrace2-0.7.0.49-baa6" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec /bin/bash /build/host/install-sh -c -m a+r {} {} \; \ || chmod -R a+r "simtrace2-0.7.0.49-baa6" tardir=simtrace2-0.7.0.49-baa6 && ${TAR-tar} chof - "$tardir" | BZIP2=${BZIP2--9} bzip2 -c >simtrace2-0.7.0.49-baa6.tar.bz2 make[1]: Leaving directory '/build/host' if test -d "simtrace2-0.7.0.49-baa6"; then find "simtrace2-0.7.0.49-baa6" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "simtrace2-0.7.0.49-baa6" || { sleep 5 && rm -rf "simtrace2-0.7.0.49-baa6"; }; else :; fi =============== UPLOAD BUILD ============== Warning: Permanently added the ECDSA host key for IP address '[144.76.43.76]:48' to the list of known hosts. Permission denied (publickey,keyboard-interactive). rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2] Build step 'Execute shell' marked build as failure [WARNINGS]Skipping publisher since build result is FAILURE From gerrit-no-reply at lists.osmocom.org Sat Feb 8 07:36:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 07:36:20 +0000 Subject: Change in osmo-pcu[master]: pcu_sock: fix memleak, allocate pcu_sock_state on stack In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17093 to look at the new patch set (#2). Change subject: pcu_sock: fix memleak, allocate pcu_sock_state on stack ...................................................................... pcu_sock: fix memleak, allocate pcu_sock_state on stack It was noticed that OsmoPCU leaks memory when trying to reconnect to the BTS. It could be easily fixed, but we don't really need to allocate the PCU socket state on heap as we never have more than one connection. Change-Id: Iea8930f443caa16f522f7c5375e0004e4e2315cb --- M src/osmobts_sock.cpp 1 file changed, 26 insertions(+), 52 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/93/17093/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea8930f443caa16f522f7c5375e0004e4e2315cb Gerrit-Change-Number: 17093 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 11:00:54 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 11:00:54 +0000 Subject: Change in osmo-pcu[master]: VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16347 ) Change subject: VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id7ce8c4e1ac43747ad40a06d01433c366da07b42 Gerrit-Change-Number: 16347 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 08 Feb 2020 11:00:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 11:02:27 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 11:02:27 +0000 Subject: Change in osmo-pcu[master]: pcu_sock: fix memleak, allocate pcu_sock_state on stack In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17093 ) Change subject: pcu_sock: fix memleak, allocate pcu_sock_state on stack ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea8930f443caa16f522f7c5375e0004e4e2315cb Gerrit-Change-Number: 17093 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 08 Feb 2020 11:02:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 11:02:34 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 11:02:34 +0000 Subject: Change in osmo-pcu[master]: pcu_sock: cosmetic: fix typo in a comment message In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17094 ) Change subject: pcu_sock: cosmetic: fix typo in a comment message ...................................................................... pcu_sock: cosmetic: fix typo in a comment message Change-Id: Ia7e91d803152ac3f2af88f4552fced27f59d8270 --- M src/osmobts_sock.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/osmobts_sock.cpp b/src/osmobts_sock.cpp index 2b2f4de..a139011 100644 --- a/src/osmobts_sock.cpp +++ b/src/osmobts_sock.cpp @@ -50,7 +50,7 @@ */ static struct { - struct osmo_fd conn_bfd; /* fd for connection to lcr */ + struct osmo_fd conn_bfd; /* fd for connection to the BTS */ struct osmo_timer_list timer; /* socket connect retry timer */ struct llist_head upqueue; /* queue for sending messages */ } pcu_sock_state; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17094 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ia7e91d803152ac3f2af88f4552fced27f59d8270 Gerrit-Change-Number: 17094 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 11:02:32 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 11:02:32 +0000 Subject: Change in osmo-pcu[master]: VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/16347 ) Change subject: VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() ...................................................................... VTY: get rid of pcu_vty_go_parent() / pcu_vty_is_config_node() Since I2b32b4fe20732728db6e9cdac7e484d96ab86dc5, go_parent_cb() is completely optional. It no longer has the task to determine the correct parent node. The is_config_node() callback is no longer needed too. Get rid of them. Since Ic5e69a396df659933fd4d50298b9925e837a6861 we depend on 1.3.0. Change-Id: Id7ce8c4e1ac43747ad40a06d01433c366da07b42 --- M src/pcu_vty.c 1 file changed, 0 insertions(+), 31 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 26d0b18..94215d7 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -91,35 +91,6 @@ return CMD_SUCCESS; } - -int pcu_vty_go_parent(struct vty *vty) -{ - switch (vty->node) { -#if 0 - case TRX_NODE: - vty->node = PCU_NODE; - { - struct gsm_bts_trx *trx = vty->index; - vty->index = trx->bts; - } - break; -#endif - default: - vty->node = CONFIG_NODE; - } - return (enum node_type) vty->node; -} - -int pcu_vty_is_config_node(struct vty *vty, int node) -{ - switch (node) { - case PCU_NODE: - return 1; - default: - return 0; - } -} - static struct cmd_node pcu_node = { (enum node_type) PCU_NODE, "%s(config-pcu)# ", @@ -1218,8 +1189,6 @@ .name = "OsmoPCU", .version = PACKAGE_VERSION, .copyright = pcu_copyright, - .go_parent_cb = pcu_vty_go_parent, - .is_config_node = pcu_vty_is_config_node, }; int pcu_vty_init(void) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/16347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id7ce8c4e1ac43747ad40a06d01433c366da07b42 Gerrit-Change-Number: 16347 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 11:02:32 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 11:02:32 +0000 Subject: Change in osmo-pcu[master]: VTY: install talloc context introspection commands In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17092 ) Change subject: VTY: install talloc context introspection commands ...................................................................... VTY: install talloc context introspection commands Change-Id: I2e1e26be1162b0fb695969e5ac265704adaf9d5c --- M src/pcu_main.cpp M src/pcu_vty.c 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp index 9b1319c..a33b655 100644 --- a/src/pcu_main.cpp +++ b/src/pcu_main.cpp @@ -269,6 +269,7 @@ gprs_ns_set_log_ss(DNS); bssgp_set_log_ss(DBSSGP); + pcu_vty_info.tall_ctx = tall_pcu_ctx; vty_init(&pcu_vty_info); pcu_vty_init(); diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 94215d7..9cae777 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -1210,6 +1210,7 @@ logging_vty_add_cmds(); osmo_stats_vty_add_cmds(); + osmo_talloc_vty_add_cmds(); install_node(&pcu_node, config_write_pcu); install_element(CONFIG_NODE, &cfg_pcu_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I2e1e26be1162b0fb695969e5ac265704adaf9d5c Gerrit-Change-Number: 17092 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 11:02:33 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 11:02:33 +0000 Subject: Change in osmo-pcu[master]: pcu_sock: fix memleak, allocate pcu_sock_state on stack In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17093 ) Change subject: pcu_sock: fix memleak, allocate pcu_sock_state on stack ...................................................................... pcu_sock: fix memleak, allocate pcu_sock_state on stack It was noticed that OsmoPCU leaks memory when trying to reconnect to the BTS. It could be easily fixed, but we don't really need to allocate the PCU socket state on heap as we never have more than one connection. Change-Id: Iea8930f443caa16f522f7c5375e0004e4e2315cb --- M src/osmobts_sock.cpp 1 file changed, 26 insertions(+), 52 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/osmobts_sock.cpp b/src/osmobts_sock.cpp index 20fb174..2b2f4de 100644 --- a/src/osmobts_sock.cpp +++ b/src/osmobts_sock.cpp @@ -26,7 +26,6 @@ #include #include extern "C" { -#include #include #include #include @@ -42,8 +41,6 @@ #include #include -extern void *tall_pcu_ctx; - extern "C" { int l1if_close_pdch(void *obj); } @@ -52,11 +49,11 @@ * osmo-bts PCU socket functions */ -struct pcu_sock_state { +static struct { struct osmo_fd conn_bfd; /* fd for connection to lcr */ struct osmo_timer_list timer; /* socket connect retry timer */ struct llist_head upqueue; /* queue for sending messages */ -} *pcu_sock_state = NULL; +} pcu_sock_state; static void pcu_sock_timeout(void *_priv) { @@ -66,40 +63,33 @@ static void pcu_tx_txt_retry(void *_priv) { struct gprs_rlcmac_bts *bts = bts_main_data(); - struct pcu_sock_state *state = pcu_sock_state; if (bts->active) return; pcu_tx_txt_ind(PCU_VERSION, "%s", PACKAGE_VERSION); - osmo_timer_schedule(&state->timer, 5, 0); + osmo_timer_schedule(&pcu_sock_state.timer, 5, 0); } int pcu_sock_send(struct msgb *msg) { - struct pcu_sock_state *state = pcu_sock_state; struct osmo_fd *conn_bfd; - if (!state) { - LOGP(DL1IF, LOGL_NOTICE, "PCU socket not created, dropping " - "message\n"); - return -EINVAL; - } - conn_bfd = &state->conn_bfd; + conn_bfd = &pcu_sock_state.conn_bfd; if (conn_bfd->fd <= 0) { LOGP(DL1IF, LOGL_NOTICE, "PCU socket not connected, dropping " "message\n"); return -EIO; } - msgb_enqueue(&state->upqueue, msg); + msgb_enqueue(&pcu_sock_state.upqueue, msg); conn_bfd->when |= BSC_FD_WRITE; return 0; } -static void pcu_sock_close(struct pcu_sock_state *state, int lost) +static void pcu_sock_close(int lost) { - struct osmo_fd *bfd = &state->conn_bfd; + struct osmo_fd *bfd = &pcu_sock_state.conn_bfd; struct gprs_rlcmac_bts *bts = bts_main_data(); uint8_t trx, ts; @@ -111,8 +101,8 @@ osmo_fd_unregister(bfd); /* flush the queue */ - while (!llist_empty(&state->upqueue)) { - struct msgb *msg = msgb_dequeue(&state->upqueue); + while (!llist_empty(&pcu_sock_state.upqueue)) { + struct msgb *msg = msgb_dequeue(&pcu_sock_state.upqueue); msgb_free(msg); } @@ -137,7 +127,6 @@ static int pcu_sock_read(struct osmo_fd *bfd) { - struct pcu_sock_state *state = (struct pcu_sock_state *)bfd->data; struct gsm_pcu_if pcu_prim; int rc; @@ -145,7 +134,7 @@ if (rc < 0 && errno == EAGAIN) return 0; /* Try again later */ if (rc <= 0) { - pcu_sock_close(state, 1); + pcu_sock_close(1); return -EIO; } @@ -154,15 +143,14 @@ static int pcu_sock_write(struct osmo_fd *bfd) { - struct pcu_sock_state *state = (struct pcu_sock_state *)bfd->data; int rc; - while (!llist_empty(&state->upqueue)) { + while (!llist_empty(&pcu_sock_state.upqueue)) { struct msgb *msg, *msg2; struct gsm_pcu_if *pcu_prim; /* peek at the beginning of the queue */ - msg = llist_entry(state->upqueue.next, struct msgb, list); + msg = llist_entry(pcu_sock_state.upqueue.next, struct msgb, list); pcu_prim = (struct gsm_pcu_if *)msg->data; bfd->when &= ~BSC_FD_WRITE; @@ -188,14 +176,14 @@ dontsend: /* _after_ we send it, we can deueue */ - msg2 = msgb_dequeue(&state->upqueue); + msg2 = msgb_dequeue(&pcu_sock_state.upqueue); assert(msg == msg2); msgb_free(msg); } return 0; close: - pcu_sock_close(state, 1); + pcu_sock_close(1); return -1; } @@ -217,60 +205,46 @@ int pcu_l1if_open(void) { - struct pcu_sock_state *state; int rc; struct gprs_rlcmac_bts *bts = bts_main_data(); LOGP(DL1IF, LOGL_INFO, "Opening OsmoPCU L1 interface to OsmoBTS\n"); - state = pcu_sock_state; - if (!state) { - state = talloc_zero(tall_pcu_ctx, struct pcu_sock_state); - if (!state) - return -ENOMEM; - INIT_LLIST_HEAD(&state->upqueue); - } + memset(&pcu_sock_state, 0x00, sizeof(pcu_sock_state)); + INIT_LLIST_HEAD(&pcu_sock_state.upqueue); - rc = osmo_sock_unix_init_ofd(&state->conn_bfd, SOCK_SEQPACKET, 0, + rc = osmo_sock_unix_init_ofd(&pcu_sock_state.conn_bfd, SOCK_SEQPACKET, 0, bts->pcu_sock_path, OSMO_SOCK_F_CONNECT); if (rc < 0) { LOGP(DL1IF, LOGL_ERROR, "Failed to connect to the BTS (%s). " "Retrying...\n", bts->pcu_sock_path); - osmo_timer_setup(&state->timer, pcu_sock_timeout, NULL); - osmo_timer_schedule(&state->timer, 5, 0); + osmo_timer_setup(&pcu_sock_state.timer, pcu_sock_timeout, NULL); + osmo_timer_schedule(&pcu_sock_state.timer, 5, 0); return 0; } - state->conn_bfd.cb = pcu_sock_cb; - state->conn_bfd.data = state; + pcu_sock_state.conn_bfd.cb = pcu_sock_cb; + pcu_sock_state.conn_bfd.data = NULL; LOGP(DL1IF, LOGL_NOTICE, "osmo-bts PCU socket %s has been connected\n", bts->pcu_sock_path); - pcu_sock_state = state; - pcu_tx_txt_ind(PCU_VERSION, "%s", PACKAGE_VERSION); /* Schedule a timer so we keep trying until the BTS becomes active. */ - osmo_timer_setup(&state->timer, pcu_tx_txt_retry, NULL); - osmo_timer_schedule(&state->timer, 5, 0); + osmo_timer_setup(&pcu_sock_state.timer, pcu_tx_txt_retry, NULL); + osmo_timer_schedule(&pcu_sock_state.timer, 5, 0); return 0; } void pcu_l1if_close(void) { - struct pcu_sock_state *state = pcu_sock_state; struct osmo_fd *bfd; - if (!state) - return; + osmo_timer_del(&pcu_sock_state.timer); - osmo_timer_del(&state->timer); - - bfd = &state->conn_bfd; + bfd = &pcu_sock_state.conn_bfd; if (bfd->fd > 0) - pcu_sock_close(state, 0); - talloc_free(state); - pcu_sock_state = NULL; + pcu_sock_close(0); } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17093 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iea8930f443caa16f522f7c5375e0004e4e2315cb Gerrit-Change-Number: 17093 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 11:03:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 11:03:07 +0000 Subject: Change in osmo-pcu[master]: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17088 ) Change subject: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I50da7560939fac360b7545e2a6bfaf45ed0c4832 Gerrit-Change-Number: 17088 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 08 Feb 2020 11:03:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 11:03:13 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 11:03:13 +0000 Subject: Change in osmo-pcu[master]: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17088 ) Change subject: Fix trailing newline mess with LOGP(C) in rlcmac/csn1 ...................................................................... Fix trailing newline mess with LOGP(C) in rlcmac/csn1 Output was incorrect before this patch. LOPC was being called without having any initial LOGP, and trailing newline was usually missing at the end. Since csnDecoder/encoder functions are recursive, it's difficult to handle logging state in a coherent way inside them. Let's better simply control start/end of logging related topics in the callers of those functions, and simply use LOGPC everywhere in csn1.cpp. Change-Id: I50da7560939fac360b7545e2a6bfaf45ed0c4832 --- M src/csn1.cpp M src/gsm_rlcmac.cpp 2 files changed, 38 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/csn1.cpp b/src/csn1.cpp index 2f8bd03..7e75972 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -114,8 +114,9 @@ static gint16 ProcessError_impl(const char *file, int line, unsigned readIndex, const char* sz, gint16 err, const CSN_DESCR* pDescr) { + /* Don't add trailing newline, top caller is responsible for appending it */ if (err != CSN_OK) - LOGPSRC(DCSN1, LOGL_ERROR, file, line, "%s: error %s (%d) at %s (idx %d)\n", + LOGPSRC(DCSN1, LOGL_ERROR, file, line, "%s: error %s (%d) at %s (idx %d)", sz, get_value_string(csn1_error_names, err), err, pDescr ? pDescr->sz : "-", readIndex); return err; diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index e594092..8d846a1 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -4825,11 +4825,15 @@ LOGP(DRLCMACDATA, LOGL_NOTICE, "Payload Type: RESERVED (3)\n"); return CSN_ERROR_GENERAL; } + data->NrOfBits = 23 * 8; csnStreamInit(&ar, 0, data->NrOfBits); readIndex += 6; data->u.MESSAGE_TYPE = bitvec_read_field(vector, &readIndex, 6); readIndex = 0; + + /* recursive csnStreamDecoder call uses LOGPC everywhere, so we need to start the log somewhere... */ + LOGP(DCSN1, LOGL_INFO, "csnStreamDecoder (type=%d): ", data->u.MESSAGE_TYPE); switch (data->u.MESSAGE_TYPE) { case MT_PACKET_CELL_CHANGE_FAILURE: @@ -4913,6 +4917,10 @@ break; } + /* recursive csnStreamDecoder call uses LOGPC everywhere without trailing + newline, so as a caller we are responisble for submitting it */ + LOGPC(DCSN1, LOGL_INFO, "\n"); + if (ret > 0) { LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by decoder at the end of bitvec\n", ret); ret = 0; @@ -4983,6 +4991,9 @@ csnStreamInit(&ar, bit_offset, bit_length); + /* recursive csnStreamDecoder call uses LOGPC everywhere, so we need to start the log somewhere... */ + LOGP(DCSN1, LOGL_INFO, "csnStreamDecoder (type=%d): ", data->u.MESSAGE_TYPE); + switch (data->u.MESSAGE_TYPE) { case MT_PACKET_ACCESS_REJECT: @@ -5115,6 +5126,10 @@ break; } + /* recursive csnStreamDecoder call uses LOGPC everywhere without trailing + newline, so as a caller we are responisble for submitting it */ + LOGPC(DCSN1, LOGL_INFO, "\n"); + if (ret > 0) { LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by decoder at the end of bitvec\n", ret); ret = 0; @@ -5133,6 +5148,9 @@ data->NrOfBits = 23 * 8; csnStreamInit(&ar, 0, data->NrOfBits); writeIndex = 0; + + /* recursive csnStreamEncoder call uses LOGPC everywhere, so we need to start the log somewhere... */ + LOGP(DCSN1, LOGL_INFO, "csnStreamEncoder (type=%d): ", data->u.MESSAGE_TYPE); switch (data->u.MESSAGE_TYPE) { case MT_PACKET_CELL_CHANGE_FAILURE: @@ -5216,6 +5234,10 @@ break; } + /* recursive csnStreamDecoder call uses LOGPC everywhere without trailing + newline, so as a caller we are responisble for submitting it */ + LOGPC(DCSN1, LOGL_INFO, "\n"); + if (ret > 0) { LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by encoder at the end of bitvec\n", ret); ret = 0; @@ -5283,6 +5305,9 @@ csnStreamInit(&ar, bit_offset, bit_length); + + /* recursive csnStreamEncoder call uses LOGPC everywhere, so we need to start the log somewhere... */ + LOGP(DCSN1, LOGL_INFO, "csnStreamEncoder (type=%d): ", data->u.MESSAGE_TYPE); switch (data->u.MESSAGE_TYPE) { case MT_PACKET_ACCESS_REJECT: @@ -5415,6 +5440,10 @@ break; } + /* recursive csnStreamDecoder call uses LOGPC everywhere without trailing + newline, so as a caller we are responisble for submitting it */ + LOGPC(DCSN1, LOGL_INFO, "\n"); + if (ret > 0) { LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by encoder at the end of bitvec\n", ret); ret = 0; @@ -5566,8 +5595,15 @@ unsigned readIndex = 0; csnStreamInit(&ar, 0, 8 * vector->data_len); + + /* recursive csnStreamEncoder call uses LOGPC everywhere, so we need to start the log somewhere... */ + LOGP(DCSN1, LOGL_INFO, "csnStreamEncoder (RAcap): "); ret = csnStreamDecoder(&ar, CSNDESCR(MS_Radio_Access_capability_t), vector, readIndex, data); + /* recursive csnStreamDecoder call uses LOGPC everywhere without trailing + newline, so as a caller we are responisble for submitting it */ + LOGPC(DCSN1, LOGL_INFO, "\n"); + if (ret > 0) { LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by decoder at the end of bitvec\n", ret); ret = 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17088 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I50da7560939fac360b7545e2a6bfaf45ed0c4832 Gerrit-Change-Number: 17088 Gerrit-PatchSet: 5 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 11:05:54 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 11:05:54 +0000 Subject: Change in pysim[master]: Fixed update_hplmn_act method In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16945 ) Change subject: Fixed update_hplmn_act method ...................................................................... Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I35848059d6082c379246c8d695cb094c20780d15 Gerrit-Change-Number: 16945 Gerrit-PatchSet: 7 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-Comment-Date: Sat, 08 Feb 2020 11:05:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 11:06:47 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 11:06:47 +0000 Subject: Change in osmo-gsm-tester[master]: ttcn3: Allow changing TTCN3 test from within osmo-gsm-tester In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17096 ) Change subject: ttcn3: Allow changing TTCN3 test from within osmo-gsm-tester ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17096 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I02bf406e310f5bbab7b2e0bca47fb120418e241c Gerrit-Change-Number: 17096 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 08 Feb 2020 11:06:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 11:08:24 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 11:08:24 +0000 Subject: Change in osmo-gsm-tester[master]: ttcn3: Refactor ttcn3 launching bits into a testlib In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17097 ) Change subject: ttcn3: Refactor ttcn3 launching bits into a testlib ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17097/1/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py File ttcn3/suites/ttcn3_bts_tests/lib/testlib.py: https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17097/1/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py at 33 PS1, Line 33: TTCN3 TTCN-3 is a programming language. What we started here is a TTCN3 test suite, or TITAN, but not TTCN3 itself... -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ic61c7b7db9cf3050dc4b101ef0fb181421577424 Gerrit-Change-Number: 17097 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Sat, 08 Feb 2020 11:08:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From jenkins at lists.osmocom.org Sat Feb 8 11:20:31 2020 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Sat, 8 Feb 2020 11:20:31 +0000 (UTC) Subject: =?UTF-8?Q?Jenkins_build_is_back_to_normal_?= =?UTF-8?Q?:_master-osmo-asf4-dfu_=C2=BB_a1=3Ddefa?= =?UTF-8?Q?ult,a2=3Ddefault,a3=3Ddefault,a4=3Ddef?= =?UTF-8?Q?ault,osmocom-master-debian9_#406?= In-Reply-To: <1144523326.2221.1581139216252.JavaMail.jenkins@jenkins.osmocom.org> References: <1144523326.2221.1581139216252.JavaMail.jenkins@jenkins.osmocom.org> Message-ID: <861839950.2243.1581160831079.JavaMail.jenkins@jenkins.osmocom.org> See From jenkins at lists.osmocom.org Sat Feb 8 11:57:27 2020 From: jenkins at lists.osmocom.org (jenkins at lists.osmocom.org) Date: Sat, 8 Feb 2020 11:57:27 +0000 (UTC) Subject: =?UTF-8?Q?Jenkins_build_is_back_to_normal?= =?UTF-8?Q?_:_master-simtrace2_=C2=BB_a1=3Ddefaul?= =?UTF-8?Q?t,a2=3Ddefault,a3=3Ddefault,a4=3Ddefa?= =?UTF-8?Q?ult,osmocom-master-debian9_#694?= In-Reply-To: <876673893.2232.1581144735045.JavaMail.jenkins@jenkins.osmocom.org> References: <876673893.2232.1581144735045.JavaMail.jenkins@jenkins.osmocom.org> Message-ID: <119209896.2248.1581163047119.JavaMail.jenkins@jenkins.osmocom.org> See From gerrit-no-reply at lists.osmocom.org Sat Feb 8 12:13:58 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 12:13:58 +0000 Subject: Change in osmo-ci[master]: upgrade coverity to 2019.03 References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17100 ) Change subject: upgrade coverity to 2019.03 ...................................................................... upgrade coverity to 2019.03 Change-Id: I0425b24a2afd979eb2a44dee512512746929770e --- M ansible/files/README.md M ansible/roles/install-coverity/defaults/main.yml 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/00/17100/1 diff --git a/ansible/files/README.md b/ansible/files/README.md index c3c631d..1112caa 100644 --- a/ansible/files/README.md +++ b/ansible/files/README.md @@ -12,9 +12,9 @@ # role: install-coverity The filename depends on the variable `coverity_version`. -`coverity_version: 2017.07` +`coverity_version: 2019.03` -E.g: `./cov-analysis-linux64-2017.07.tar.gz` +E.g: `./cov-analysis-linux64-2019.03.tar.gz` # role: install-poky-sdk diff --git a/ansible/roles/install-coverity/defaults/main.yml b/ansible/roles/install-coverity/defaults/main.yml index 66b33f9..6b97781 100644 --- a/ansible/roles/install-coverity/defaults/main.yml +++ b/ansible/roles/install-coverity/defaults/main.yml @@ -1,4 +1,4 @@ --- -coverity_version: 2017.07 +coverity_version: 2019.03 coverity_installer_file: "cov-analysis-linux64-{{ coverity_version }}.tar.gz" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17100 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0425b24a2afd979eb2a44dee512512746929770e Gerrit-Change-Number: 17100 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 12:30:36 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 12:30:36 +0000 Subject: Change in osmo-ci[master]: coverity: Our coverity job needs curl; install it References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17101 ) Change subject: coverity: Our coverity job needs curl; install it ...................................................................... coverity: Our coverity job needs curl; install it curl \ --form token="$token" \ --form email=holger at freyther.de --form file=@Osmocom.tgz \ --form version=Version --form description=AutoUpload \ https://scan.coverity.com/builds?project=Osmocom ./jenkins.sh: line 39: curl: command not found Change-Id: Ibf4a40860fe6c8424a60672dc4758b9f17c532a3 --- M ansible/roles/install-coverity/tasks/main.yml 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/01/17101/1 diff --git a/ansible/roles/install-coverity/tasks/main.yml b/ansible/roles/install-coverity/tasks/main.yml index 886dda2..55fa77f 100644 --- a/ansible/roles/install-coverity/tasks/main.yml +++ b/ansible/roles/install-coverity/tasks/main.yml @@ -1,4 +1,10 @@ --- +- name: install coverity-required debian packages + apt: + name: "{{ item }}" + with_items: + - curl + - name: copy coverity installer copy: src: "{{ coverity_installer_file }}" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17101 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibf4a40860fe6c8424a60672dc4758b9f17c532a3 Gerrit-Change-Number: 17101 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 12:48:09 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 12:48:09 +0000 Subject: Change in osmo-ci[master]: upgrade coverity to 2019.03 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17100 ) Change subject: upgrade coverity to 2019.03 ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17100 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0425b24a2afd979eb2a44dee512512746929770e Gerrit-Change-Number: 17100 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 08 Feb 2020 12:48:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 12:48:18 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 12:48:18 +0000 Subject: Change in osmo-ci[master]: coverity: Our coverity job needs curl; install it In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17101 ) Change subject: coverity: Our coverity job needs curl; install it ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17101 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibf4a40860fe6c8424a60672dc4758b9f17c532a3 Gerrit-Change-Number: 17101 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 08 Feb 2020 12:48:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 12:48:22 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 12:48:22 +0000 Subject: Change in osmo-ci[master]: upgrade coverity to 2019.03 In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17100 ) Change subject: upgrade coverity to 2019.03 ...................................................................... upgrade coverity to 2019.03 Change-Id: I0425b24a2afd979eb2a44dee512512746929770e --- M ansible/files/README.md M ansible/roles/install-coverity/defaults/main.yml 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ansible/files/README.md b/ansible/files/README.md index c3c631d..1112caa 100644 --- a/ansible/files/README.md +++ b/ansible/files/README.md @@ -12,9 +12,9 @@ # role: install-coverity The filename depends on the variable `coverity_version`. -`coverity_version: 2017.07` +`coverity_version: 2019.03` -E.g: `./cov-analysis-linux64-2017.07.tar.gz` +E.g: `./cov-analysis-linux64-2019.03.tar.gz` # role: install-poky-sdk diff --git a/ansible/roles/install-coverity/defaults/main.yml b/ansible/roles/install-coverity/defaults/main.yml index 66b33f9..6b97781 100644 --- a/ansible/roles/install-coverity/defaults/main.yml +++ b/ansible/roles/install-coverity/defaults/main.yml @@ -1,4 +1,4 @@ --- -coverity_version: 2017.07 +coverity_version: 2019.03 coverity_installer_file: "cov-analysis-linux64-{{ coverity_version }}.tar.gz" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17100 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0425b24a2afd979eb2a44dee512512746929770e Gerrit-Change-Number: 17100 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 12:48:22 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 12:48:22 +0000 Subject: Change in osmo-ci[master]: coverity: Our coverity job needs curl; install it In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17101 ) Change subject: coverity: Our coverity job needs curl; install it ...................................................................... coverity: Our coverity job needs curl; install it curl \ --form token="$token" \ --form email=holger at freyther.de --form file=@Osmocom.tgz \ --form version=Version --form description=AutoUpload \ https://scan.coverity.com/builds?project=Osmocom ./jenkins.sh: line 39: curl: command not found Change-Id: Ibf4a40860fe6c8424a60672dc4758b9f17c532a3 --- M ansible/roles/install-coverity/tasks/main.yml 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ansible/roles/install-coverity/tasks/main.yml b/ansible/roles/install-coverity/tasks/main.yml index 886dda2..55fa77f 100644 --- a/ansible/roles/install-coverity/tasks/main.yml +++ b/ansible/roles/install-coverity/tasks/main.yml @@ -1,4 +1,10 @@ --- +- name: install coverity-required debian packages + apt: + name: "{{ item }}" + with_items: + - curl + - name: copy coverity installer copy: src: "{{ coverity_installer_file }}" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17101 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibf4a40860fe6c8424a60672dc4758b9f17c532a3 Gerrit-Change-Number: 17101 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 13:03:38 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 13:03:38 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remove titan.TestPorts.GPIO module References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17102 ) Change subject: remove titan.TestPorts.GPIO module ...................................................................... remove titan.TestPorts.GPIO module We don't use it, and it suddenly disappeared from git.eclipse.org, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=559942 Change-Id: I5e5b9ab3dca9ff574980dad37616cdc981dd8607 --- M deps/Makefile 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/02/17102/1 diff --git a/deps/Makefile b/deps/Makefile index d896889..857b889 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -48,7 +48,6 @@ titan.ProtocolModules.SCTP \ titan.ProtocolModules.SUA \ titan.ProtocolModules.SDP \ - titan.TestPorts.GPIO \ titan.ProtocolModules.BSSAPP_v7.3.0 \ titan.ProtocolModules.BSSGP_v13.0.0 \ titan.ProtocolModules.GTP_v13.5.0 \ @@ -112,7 +111,6 @@ titan.ProtocolModules.UDP_commit= R.4.A-5-geea8aa3 titan.TestPorts.Common_Components.Socket-API_commit= R.6.A-6-gf4380d0 titan.TestPorts.Common_Components.Abstract_Socket_commit= R.9.B-4-gbd41994 -titan.TestPorts.GPIO_commit= R.2.A-8-g9728492 titan.TestPorts.HTTPmsg_commit= R.9.B-4-g9a0dfde titan.TestPorts.IPL4asp_commit= R.30.E titan.TestPorts.LANL2asp_commit= R.8.C-3-gb07c265 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17102 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: I5e5b9ab3dca9ff574980dad37616cdc981dd8607 Gerrit-Change-Number: 17102 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 13:04:18 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 13:04:18 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remove titan.TestPorts.GPIO module In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17102 ) Change subject: remove titan.TestPorts.GPIO module ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17102 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: I5e5b9ab3dca9ff574980dad37616cdc981dd8607 Gerrit-Change-Number: 17102 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 08 Feb 2020 13:04:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 13:04:22 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 13:04:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remove titan.TestPorts.GPIO module In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17102 ) Change subject: remove titan.TestPorts.GPIO module ...................................................................... remove titan.TestPorts.GPIO module We don't use it, and it suddenly disappeared from git.eclipse.org, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=559942 Change-Id: I5e5b9ab3dca9ff574980dad37616cdc981dd8607 --- M deps/Makefile 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/deps/Makefile b/deps/Makefile index d896889..857b889 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -48,7 +48,6 @@ titan.ProtocolModules.SCTP \ titan.ProtocolModules.SUA \ titan.ProtocolModules.SDP \ - titan.TestPorts.GPIO \ titan.ProtocolModules.BSSAPP_v7.3.0 \ titan.ProtocolModules.BSSGP_v13.0.0 \ titan.ProtocolModules.GTP_v13.5.0 \ @@ -112,7 +111,6 @@ titan.ProtocolModules.UDP_commit= R.4.A-5-geea8aa3 titan.TestPorts.Common_Components.Socket-API_commit= R.6.A-6-gf4380d0 titan.TestPorts.Common_Components.Abstract_Socket_commit= R.9.B-4-gbd41994 -titan.TestPorts.GPIO_commit= R.2.A-8-g9728492 titan.TestPorts.HTTPmsg_commit= R.9.B-4-g9a0dfde titan.TestPorts.IPL4asp_commit= R.30.E titan.TestPorts.LANL2asp_commit= R.8.C-3-gb07c265 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17102 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: I5e5b9ab3dca9ff574980dad37616cdc981dd8607 Gerrit-Change-Number: 17102 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 13:19:58 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 13:19:58 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps: Work around disappearing eclipse.org git repositories References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17103 ) Change subject: deps: Work around disappearing eclipse.org git repositories ...................................................................... deps: Work around disappearing eclipse.org git repositories See https://bugs.eclipse.org/bugs/show_bug.cgi?id=559943 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=559944 Change-Id: I8942e71e674d46dda7fb81d2076fa189ee31eecd --- M deps/Makefile 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/03/17103/1 diff --git a/deps/Makefile b/deps/Makefile index 857b889..91636af 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -53,8 +53,6 @@ titan.ProtocolModules.GTP_v13.5.0 \ titan.ProtocolModules.GTPv2_v13.7.0 \ titan.ProtocolModules.ISUP_Q.762 \ - titan.ProtocolModules.LLC_v7.1.0 \ - titan.ProtocolModules.MobileL3_v13.4.0 \ titan.ProtocolModules.NAS_EPS_15.2.0.1 \ titan.ProtocolModules.NS_v7.3.0 \ titan.ProtocolModules.SGsAP_13.2.0 \ @@ -64,7 +62,9 @@ titan.TestPorts.MTP3asp \ titan.TestPorts.UDPasp \ titan.ProtocolEmulations.M3UA \ - titan.ProtocolEmulations.SCCP + titan.ProtocolEmulations.SCCP \ + titan.ProtocolModules.LLC_v7.1.0 \ + titan.ProtocolModules.MobileL3_v13.4.0 OSMOGIT_REPOS= titan.ProtocolModules.MAP \ titan.ProtocolModules.BSSMAP \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17103 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: I8942e71e674d46dda7fb81d2076fa189ee31eecd Gerrit-Change-Number: 17103 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 13:21:18 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 13:21:18 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps: Work around disappearing eclipse.org git repositories In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17103 ) Change subject: deps: Work around disappearing eclipse.org git repositories ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17103 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: I8942e71e674d46dda7fb81d2076fa189ee31eecd Gerrit-Change-Number: 17103 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 08 Feb 2020 13:21:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 13:21:22 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 8 Feb 2020 13:21:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps: Work around disappearing eclipse.org git repositories In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17103 ) Change subject: deps: Work around disappearing eclipse.org git repositories ...................................................................... deps: Work around disappearing eclipse.org git repositories See https://bugs.eclipse.org/bugs/show_bug.cgi?id=559943 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=559944 Change-Id: I8942e71e674d46dda7fb81d2076fa189ee31eecd --- M deps/Makefile 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/deps/Makefile b/deps/Makefile index 857b889..91636af 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -53,8 +53,6 @@ titan.ProtocolModules.GTP_v13.5.0 \ titan.ProtocolModules.GTPv2_v13.7.0 \ titan.ProtocolModules.ISUP_Q.762 \ - titan.ProtocolModules.LLC_v7.1.0 \ - titan.ProtocolModules.MobileL3_v13.4.0 \ titan.ProtocolModules.NAS_EPS_15.2.0.1 \ titan.ProtocolModules.NS_v7.3.0 \ titan.ProtocolModules.SGsAP_13.2.0 \ @@ -64,7 +62,9 @@ titan.TestPorts.MTP3asp \ titan.TestPorts.UDPasp \ titan.ProtocolEmulations.M3UA \ - titan.ProtocolEmulations.SCCP + titan.ProtocolEmulations.SCCP \ + titan.ProtocolModules.LLC_v7.1.0 \ + titan.ProtocolModules.MobileL3_v13.4.0 OSMOGIT_REPOS= titan.ProtocolModules.MAP \ titan.ProtocolModules.BSSMAP \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17103 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: I8942e71e674d46dda7fb81d2076fa189ee31eecd Gerrit-Change-Number: 17103 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 20:40:11 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 20:40:11 +0000 Subject: Change in osmo-pcu[master]: tbf: cosmetic: fix spacing in gprs_rlcmac_tbf::create_ul_ass() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17104 ) Change subject: tbf: cosmetic: fix spacing in gprs_rlcmac_tbf::create_ul_ass() ...................................................................... tbf: cosmetic: fix spacing in gprs_rlcmac_tbf::create_ul_ass() Change-Id: Ice4c4db20551753fa4219e7a216309229f7a2ab5 --- M src/tbf.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/04/17104/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index b852cd2..2f79a98 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1351,7 +1351,7 @@ ul_ass_state == GPRS_RLCMAC_UL_ASS_WAIT_ACK) { LOGPTBFUL(this, LOGL_DEBUG, "Polling is already scheduled, so we must wait for the uplink assignment...\n"); - return NULL; + return NULL; } rc = check_polling(fn, ts, &new_poll_fn, &rrbp); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ice4c4db20551753fa4219e7a216309229f7a2ab5 Gerrit-Change-Number: 17104 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 20:40:12 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 20:40:12 +0000 Subject: Change in osmo-pcu[master]: tbf: fix NULL-pointer dereference in gprs_rlcmac_tbf::create_ul_ass() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17105 ) Change subject: tbf: fix NULL-pointer dereference in gprs_rlcmac_tbf::create_ul_ass() ...................................................................... tbf: fix NULL-pointer dereference in gprs_rlcmac_tbf::create_ul_ass() The problem is that bitvec_free() is not NULL safe. Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Fixes: CID#208181 --- M src/tbf.cpp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/05/17105/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 2f79a98..9b7ade9 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1398,7 +1398,8 @@ return msg; free_ret: - bitvec_free(ass_vec); + if (ass_vec != NULL) + bitvec_free(ass_vec); talloc_free(mac_control_block); msgb_free(msg); return NULL; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Gerrit-Change-Number: 17105 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 20:41:19 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 20:41:19 +0000 Subject: Change in osmo-pcu[master]: tbf: fix NULL pointer dereference in gprs_rlcmac_tbf::create_ul_ass() In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-pcu/+/17105 ) Change subject: tbf: fix NULL pointer dereference in gprs_rlcmac_tbf::create_ul_ass() ...................................................................... tbf: fix NULL pointer dereference in gprs_rlcmac_tbf::create_ul_ass() The problem is that bitvec_free() is not NULL-safe. Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Fixes: CID#208181 --- M src/tbf.cpp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/05/17105/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Gerrit-Change-Number: 17105 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 20:56:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 20:56:20 +0000 Subject: Change in osmo-pcu[master]: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17105 to look at the new patch set (#3). Change subject: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() ...................................................................... tbf: fix NULL pointer dereference in create_[ul|dl]_ass() The problem is that bitvec_free() is not NULL-safe. Ideally we should start using the OTC_SELECT for such allocations and get rid of that alloc() / free() mess, but let's just make Coverity happy for now. Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Fixes: CID#208181, CID#208179 --- M src/tbf.cpp 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/05/17105/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Gerrit-Change-Number: 17105 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 21:00:23 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 21:00:23 +0000 Subject: Change in osmo-pcu[master]: encoding: assert return value of bitvec_set_u64() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17106 ) Change subject: encoding: assert return value of bitvec_set_u64() ...................................................................... encoding: assert return value of bitvec_set_u64() Change-Id: Ic0de3ae34f06e41aacacb917f5a0214623259bdc Fixes: OS#182120 --- M src/encoding.cpp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/06/17106/1 diff --git a/src/encoding.cpp b/src/encoding.cpp index 23b35bd..a4a14dd 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -162,7 +162,8 @@ { dest->cur_bit = *write_index; - bitvec_set_u64(dest, enc_ws(ws), 5, false); + int rc = bitvec_set_u64(dest, enc_ws(ws), 5, false); + OSMO_ASSERT(rc == 0); *write_index += 5; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17106 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic0de3ae34f06e41aacacb917f5a0214623259bdc Gerrit-Change-Number: 17106 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 21:05:30 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 21:05:30 +0000 Subject: Change in osmo-msc[master]: libmsc/sdp: cosmetic: fix less-than-zero comparison of an unsigned value References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/17107 ) Change subject: libmsc/sdp: cosmetic: fix less-than-zero comparison of an unsigned value ...................................................................... libmsc/sdp: cosmetic: fix less-than-zero comparison of an unsigned value Change-Id: I57ed17d8457ada69a3c22233f30339d2c0f65bce Fixes: CID#206075 --- M src/libmsc/sdp_msg.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/07/17107/1 diff --git a/src/libmsc/sdp_msg.c b/src/libmsc/sdp_msg.c index 7880978..cc54249 100644 --- a/src/libmsc/sdp_msg.c +++ b/src/libmsc/sdp_msg.c @@ -321,7 +321,7 @@ if (sscanf(src, "audio %u RTP/AVP", &port) < 1) return -ENOTSUP; - if (port < 0 || port > 0xffff) + if (port > 0xffff) return -EINVAL; sdp->rtp.port = port; -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/17107 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I57ed17d8457ada69a3c22233f30339d2c0f65bce Gerrit-Change-Number: 17107 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 21:14:09 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 21:14:09 +0000 Subject: Change in libosmocore[master]: conv: prevent theoretical NULL pointer dereference in osmo_conv_encode() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17108 ) Change subject: conv: prevent theoretical NULL pointer dereference in osmo_conv_encode() ...................................................................... conv: prevent theoretical NULL pointer dereference in osmo_conv_encode() A caller shall never pass NULL to osmo_conv_encode(). Change-Id: Ice0050cd7c7e3fcbf57c2c73682ca28843a92d8b Fixes: CID#208174 --- M src/conv.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/08/17108/1 diff --git a/src/conv.c b/src/conv.c index a2c13de..9b8df73 100644 --- a/src/conv.c +++ b/src/conv.c @@ -87,6 +87,7 @@ const struct osmo_conv_code *code) { memset(encoder, 0x00, sizeof(struct osmo_conv_encoder)); + OSMO_ASSERT(code != NULL); encoder->code = code; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ice0050cd7c7e3fcbf57c2c73682ca28843a92d8b Gerrit-Change-Number: 17108 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 21:21:26 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 21:21:26 +0000 Subject: Change in libosmocore[master]: osmo_libusb: check return value of osmo_fd_register() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17109 ) Change subject: osmo_libusb: check return value of osmo_fd_register() ...................................................................... osmo_libusb: check return value of osmo_fd_register() Most likely, we should not assert() here, but let's at least log an error message in case if osmo_fd_register() fails. Change-Id: Ia20755ec12ee9fb0eba8322551642a96e68e1570 Related: CID#206572 --- M src/usb/osmo_libusb.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/09/17109/1 diff --git a/src/usb/osmo_libusb.c b/src/usb/osmo_libusb.c index 7a13a7e..3c8a22a 100644 --- a/src/usb/osmo_libusb.c +++ b/src/usb/osmo_libusb.c @@ -86,6 +86,7 @@ struct osmo_fd *ofd = talloc_zero(OTC_GLOBAL, struct osmo_fd); libusb_context *luctx = user_data; unsigned int when = 0; + int rc; if (events & POLLIN) when |= OSMO_FD_READ; @@ -93,7 +94,9 @@ when |= OSMO_FD_WRITE; osmo_fd_setup(ofd, fd, when, osmo_usb_fd_cb, luctx, 0); - osmo_fd_register(ofd); + rc = osmo_fd_register(ofd); + if (rc) + LOGP(DLUSB, LOGL_ERROR, "osmo_fd_register() failed with rc=%d\n", rc); } /* called by libusb if it wants to remove a file-descriptor */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17109 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia20755ec12ee9fb0eba8322551642a96e68e1570 Gerrit-Change-Number: 17109 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 22:07:03 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 22:07:03 +0000 Subject: Change in libosmocore[master]: conv: prevent theoretical NULL pointer dereference in osmo_conv_encode() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/17108 to look at the new patch set (#2). Change subject: conv: prevent theoretical NULL pointer dereference in osmo_conv_encode() ...................................................................... conv: prevent theoretical NULL pointer dereference in osmo_conv_encode() A caller shall never pass NULL to osmo_conv_encode(). Change-Id: Ice0050cd7c7e3fcbf57c2c73682ca28843a92d8b Fixes: CID#208174 --- M src/conv.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/08/17108/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ice0050cd7c7e3fcbf57c2c73682ca28843a92d8b Gerrit-Change-Number: 17108 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 22:07:05 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 22:07:05 +0000 Subject: Change in libosmocore[master]: exec: prevent uninitialized memory access in osmo_system_nowait() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17110 ) Change subject: exec: prevent uninitialized memory access in osmo_system_nowait() ...................................................................... exec: prevent uninitialized memory access in osmo_system_nowait() If (!env_whitelist && addl_env), osmo_environment_append() would access uninitialized memory. If both are false, execle() would also deal with garbage values. Let's ensure that at least the first element of new_env[] is initialized. Change-Id: Id3901de4692ef44e9e9c67b1804e027fc4ce7c18 Fixes: CID#206571 --- M src/exec.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/10/17110/1 diff --git a/src/exec.c b/src/exec.c index a9d8ce0..b806ad5 100644 --- a/src/exec.c +++ b/src/exec.c @@ -217,6 +217,9 @@ /* close all file descriptors above stdio */ osmo_close_all_fds_above(2); + /* man execle: "an array of pointers *must* be terminated by a null pointer" */ + new_env[0] = NULL; + /* build the new environment */ if (env_whitelist) osmo_environment_filter(new_env, ARRAY_SIZE(new_env), environ, env_whitelist); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17110 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id3901de4692ef44e9e9c67b1804e027fc4ce7c18 Gerrit-Change-Number: 17110 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 22:07:08 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 22:07:08 +0000 Subject: Change in libosmocore[master]: exec: propogate errors from osmo_environment_[filter|append] References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17111 ) Change subject: exec: propogate errors from osmo_environment_[filter|append] ...................................................................... exec: propogate errors from osmo_environment_[filter|append] Change-Id: If7d6e0441f73092a4fb455340c076ba4dc60af3f --- M src/exec.c 1 file changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/11/17111/1 diff --git a/src/exec.c b/src/exec.c index b806ad5..62f5919 100644 --- a/src/exec.c +++ b/src/exec.c @@ -221,10 +221,16 @@ new_env[0] = NULL; /* build the new environment */ - if (env_whitelist) - osmo_environment_filter(new_env, ARRAY_SIZE(new_env), environ, env_whitelist); - if (addl_env) - osmo_environment_append(new_env, ARRAY_SIZE(new_env), addl_env); + if (env_whitelist) { + rc = osmo_environment_filter(new_env, ARRAY_SIZE(new_env), environ, env_whitelist); + if (rc < 0) + return rc; + } + if (addl_env) { + rc = osmo_environment_append(new_env, ARRAY_SIZE(new_env), addl_env); + if (rc < 0) + return rc; + } /* if we want to behave like system(3), we must go via the shell */ execle("/bin/sh", "sh", "-c", command, (char *) NULL, new_env); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17111 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If7d6e0441f73092a4fb455340c076ba4dc60af3f Gerrit-Change-Number: 17111 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 22:34:26 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 22:34:26 +0000 Subject: Change in osmo-hlr[master]: db: fix possible SQLite3 allocated memory leak in db_open() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/17112 ) Change subject: db: fix possible SQLite3 allocated memory leak in db_open() ...................................................................... db: fix possible SQLite3 allocated memory leak in db_open() >From https://sqlite.org/c3ref/exec.html: To avoid memory leaks, the application should invoke sqlite3_free() on error message strings returned through the 5th parameter of sqlite3_exec() after the error message string is no longer needed. If the 5th parameter to sqlite3_exec() is not NULL and no errors occur, then sqlite3_exec() sets the pointer in its 5th parameter to NULL before returning. Change-Id: Ic9ed9bad3165bc4a637fe963f51e923f012e19ac Fixes: CID#208182 --- M src/db.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/12/17112/1 diff --git a/src/db.c b/src/db.c index 5e5ad35..9d0c621 100644 --- a/src/db.c +++ b/src/db.c @@ -535,9 +535,11 @@ char *err_msg; rc = sqlite3_exec(dbc->db, "PRAGMA journal_mode=WAL; PRAGMA synchonous = NORMAL;", 0, 0, &err_msg); - if (rc != SQLITE_OK) + if (rc != SQLITE_OK) { LOGP(DDB, LOGL_ERROR, "Unable to set Write-Ahead Logging: %s\n", err_msg); + sqlite3_free(err_msg); + } version = db_get_user_version(dbc); if (version < 0) { -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/17112 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ic9ed9bad3165bc4a637fe963f51e923f012e19ac Gerrit-Change-Number: 17112 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 8 22:50:35 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 8 Feb 2020 22:50:35 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: improve dissection of Packet Resource Request message In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17050 ) Change subject: gsm_rlcmac: improve dissection of Packet Resource Request message ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17050/1/src/gsm_rlcmac.cpp File src/gsm_rlcmac.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17050/1/src/gsm_rlcmac.cpp at 1175 PS1, Line 1175: I_LEVEL_TN This change is unrelated, please submit separately. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ibb4cbd3f5865415fd547e95fc24ff31df1aed4c0 Gerrit-Change-Number: 17050 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-Comment-Date: Sat, 08 Feb 2020 22:50:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Sun Feb 9 01:30:37 2020 From: admin at opensuse.org (OBS Notification) Date: Sun, 09 Feb 2020 01:30:37 +0000 Subject: Build failure of network:osmocom:latest/eclipse-titan in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5e3f60db32b45_19422b03b455c5fc107094e@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/eclipse-titan/Raspbian_10/armv7l Package network:osmocom:latest/eclipse-titan failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:latest eclipse-titan Last lines of build log: [ 781s] -h: generate TTCN-3 code allowing type substitution [ 781s] -m: generate only the UsefulTtcn3Types and XSD predefined modules [ 781s] -o: generate all definitions into one module (called XSD_Definitions) [ 781s] -p: do not generate the UsefulTtcn3Types and XSD predefined modules [ 781s] -q: quiet mode - disable the issue of status messages [ 781s] -s: parse and validate only - no TTCN-3 module generation [ 781s] -t: disable the generation of timing information in TTCN-3 modules [ 781s] -v: show version information [ 781s] -w: suppress warnings [ 781s] -x: disable schema validation but generate TTCN-3 modules [ 781s] -z: zap URI scheme from module name [ 781s] make[4]: *** [Makefile:284: TitanLoggerApi.ttcn] Error 1 [ 781s] make[4]: Leaving directory '/usr/src/packages/BUILD/core' [ 781s] make[3]: *** [../../Makefile.genrules:60: ../../core/RInt.o] Error 2 [ 781s] make[3]: Leaving directory '/usr/src/packages/BUILD/mctr2/mctr' [ 781s] make[2]: *** [Makefile:32: all] Error 2 [ 781s] make[2]: Leaving directory '/usr/src/packages/BUILD/mctr2' [ 781s] make[1]: *** [Makefile:65: all] Error 2 [ 781s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 781s] dh_auto_build: make -j1 returned exit code 2 [ 781s] make: *** [debian/rules:6: build] Error 2 [ 781s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 781s] [ 781s] obs-arm-5 failed "build eclipse-titan_6.5.0-1.dsc" at Sun Feb 9 01:30:23 UTC 2020. [ 781s] [ 781s] ### VM INTERACTION START ### [ 784s] [ 762.838075] sysrq: SysRq : Power Off [ 784s] [ 762.851899] reboot: Power down [ 786s] ### VM INTERACTION END ### -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Feb 9 01:31:28 2020 From: admin at opensuse.org (OBS Notification) Date: Sun, 09 Feb 2020 01:31:28 +0000 Subject: Build failure of network:osmocom:nightly/limesuite in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5e3f60f6be1a5_19422b03b455c5fc10710c8@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/limesuite/Raspbian_10/armv7l Package network:osmocom:nightly/limesuite failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:nightly limesuite Last lines of build log: [ 261s] [ 40%] Linking CXX executable boardEmulator [ 261s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/boardEmulator.dir/link.txt --verbose=1 [ 261s] /usr/bin/c++ -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -Wl,-z,relro -rdynamic CMakeFiles/boardEmulator.dir/boardEmulator.cpp.o -o boardEmulator -Wl,-rpath,/usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src libLimeSuite.so.20.01.0 -pthread -lusb-1.0 [ 261s] /usr/bin/ld: libLimeSuite.so.20.01.0: undefined reference to `__atomic_load_8' [ 261s] /usr/bin/ld: libLimeSuite.so.20.01.0: undefined reference to `__atomic_store_8' [ 261s] collect2: error: ld returned 1 exit status [ 261s] make[3]: *** [src/CMakeFiles/boardEmulator.dir/build.make:89: src/boardEmulator] Error 1 [ 261s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 261s] make[2]: *** [CMakeFiles/Makefile2:216: src/CMakeFiles/boardEmulator.dir/all] Error 2 [ 265s] [ 40%] Linking CXX static library liboglGraph.a [ 265s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src/oglGraph && /usr/bin/cmake -P CMakeFiles/oglGraph.dir/cmake_clean_target.cmake [ 265s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src/oglGraph && /usr/bin/cmake -E cmake_link_script CMakeFiles/oglGraph.dir/link.txt --verbose=1 [ 265s] /usr/bin/ar qc liboglGraph.a CMakeFiles/oglGraph.dir/dlgMarkers.cpp.o CMakeFiles/oglGraph.dir/GLFont.cpp.o CMakeFiles/oglGraph.dir/OpenGLGraph.cpp.o CMakeFiles/oglGraph.dir/glew/glew.c.o [ 265s] /usr/bin/ranlib liboglGraph.a [ 266s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 266s] [ 40%] Built target oglGraph [ 266s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 266s] make[1]: *** [Makefile:133: all] Error 2 [ 266s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 266s] dh_auto_build: cd obj-arm-linux-gnueabihf && make -j4 returned exit code 2 [ 266s] make: *** [debian/rules:28: binary] Error 2 [ 266s] dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 [ 266s] [ 266s] armbuild04 failed "build limesuite_20.01.0-1.dsc" at Sun Feb 9 01:31:18 UTC 2020. [ 266s] [ 266s] ### VM INTERACTION START ### [ 269s] [ 245.138039] sysrq: SysRq : Power Off [ 269s] [ 245.150179] reboot: Power down [ 269s] ### VM INTERACTION END ### -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Feb 9 07:11:28 2020 From: admin at opensuse.org (OBS Notification) Date: Sun, 09 Feb 2020 07:11:28 +0000 Subject: Build failure of network:osmocom:latest/limesuite in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5e3fb0ace0ae6_19422b03b455c5fc10944d1@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/limesuite/Raspbian_10/armv7l Package network:osmocom:latest/limesuite failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:latest limesuite Last lines of build log: [ 694s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o -c /usr/src/packages/BUILD/src/boards_wxgui/pnlGPIO.cpp [ 701s] [ 77%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_gui.cpp.o [ 701s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_gui.cpp.o -c /usr/src/packages/BUILD/src/limeRFE/limeRFE_gui.cpp [ 703s] [ 77%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_wxgui.cpp.o [ 703s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_wxgui.cpp.o -c /usr/src/packages/BUILD/src/limeRFE/limeRFE_wxgui.cpp [ 715s] [ 78%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_cmd.cpp.o [ 715s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_cmd.cpp.o -c /usr/src/packages/BUILD/src/limeRFE/limeRFE_cmd.cpp [ 720s] [ 79%] Linking CXX executable ../bin/LimeSuiteGUI [ 720s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/LimeSuiteGUI.dir/link.txt --verbose=1 [ 720s] /usr/bin/c++ -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -Wl,-z,relro -rdynamic CMakeFiles/LimeSuiteGUI.dir/ADF4002/ADF4002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlXBUF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCalibrations_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTRF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCDS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLimeLightPAD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIST_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewIRAM.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_gui_utilities.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlSX_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgVCOfrequencies.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLDO_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlAFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlGains_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/CoefficientFileParser.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_mainPanel.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewSFR.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCLKGEN_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlMCU_BD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIAS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgGFIR_Coefficients.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlR3.cpp.o CMakeFiles/LimeSuiteGUI.dir/LMS_Programing/LMS_Programing_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgConnectionSettings.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/pnlMiniLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/pnlAPI.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/SPI_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgFullMessageLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgDeviceInfo.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/utilities_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteAppFrame.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/RFSpark_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/Si5351C/Si5351C_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp.cpp.o CMakeFiles/LimeSuiteGUI.dir/FPGAcontrols_wxgui/FPGAcontrols_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/dlgAbout.cpp.o CMakeFiles/LimeSuiteGUI.dir/numericSlider/numericSlider.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_frFFTviewer.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteEvents/lms7suiteEvents.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlBoardControls.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlQSpark.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnluLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlUltimateEVB.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlBuffers.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlCoreSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeNetMicro.cpp.o CMakeFiles/LimeSuiteGUI.dir/__/external/kissFFT/kiss_fft.c.o CMakeFiles/LimeSuiteGUI.dir/windowFunction.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_cmd.cpp.o -o ../bin/LimeSuiteGUI -Wl,-rpath,/usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src: libLimeSuite.so.20.01.0 oglGraph/liboglGraph.a -L/usr/lib/arm-linux-gnueabihf -pthread -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 -lusb-1.0 -lGL -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 [ 724s] /usr/bin/ld: libLimeSuite.so.20.01.0: undefined reference to `__atomic_store_8' [ 724s] /usr/bin/ld: libLimeSuite.so.20.01.0: undefined reference to `__atomic_load_8' [ 724s] collect2: error: ld returned 1 exit status [ 724s] make[3]: *** [src/CMakeFiles/LimeSuiteGUI.dir/build.make:990: bin/LimeSuiteGUI] Error 1 [ 724s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 724s] make[2]: *** [CMakeFiles/Makefile2:142: src/CMakeFiles/LimeSuiteGUI.dir/all] Error 2 [ 724s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 724s] make[1]: *** [Makefile:133: all] Error 2 [ 724s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 724s] dh_auto_build: cd obj-arm-linux-gnueabihf && make -j2 returned exit code 2 [ 724s] make: *** [debian/rules:28: binary] Error 2 [ 724s] dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 [ 724s] [ 724s] armbuild02 failed "build limesuite_20.01.0-1.dsc" at Sun Feb 9 07:11:21 UTC 2020. [ 724s] [ 724s] ### VM INTERACTION START ### [ 727s] [ 702.743056] sysrq: SysRq : Power Off [ 727s] [ 702.744685] reboot: Power down [ 727s] ### VM INTERACTION END ### -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From admin at opensuse.org Sun Feb 9 09:59:50 2020 From: admin at opensuse.org (OBS Notification) Date: Sun, 09 Feb 2020 09:59:50 +0000 Subject: Build failure of network:osmocom:latest/eclipse-titan in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5e3fd823dbef9_19422b03b455c5fc11069d8@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/eclipse-titan/Raspbian_10/armv7l Package network:osmocom:latest/eclipse-titan failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:latest eclipse-titan Last lines of build log: [ 794s] -h: generate TTCN-3 code allowing type substitution [ 794s] -m: generate only the UsefulTtcn3Types and XSD predefined modules [ 794s] -o: generate all definitions into one module (called XSD_Definitions) [ 794s] -p: do not generate the UsefulTtcn3Types and XSD predefined modules [ 794s] -q: quiet mode - disable the issue of status messages [ 794s] -s: parse and validate only - no TTCN-3 module generation [ 794s] -t: disable the generation of timing information in TTCN-3 modules [ 794s] -v: show version information [ 794s] -w: suppress warnings [ 794s] -x: disable schema validation but generate TTCN-3 modules [ 794s] -z: zap URI scheme from module name [ 794s] make[4]: *** [Makefile:284: TitanLoggerApi.ttcn] Error 1 [ 794s] make[4]: Leaving directory '/usr/src/packages/BUILD/core' [ 794s] make[3]: *** [../../Makefile.genrules:60: ../../core/RInt.o] Error 2 [ 794s] make[3]: Leaving directory '/usr/src/packages/BUILD/mctr2/mctr' [ 794s] make[2]: *** [Makefile:32: all] Error 2 [ 794s] make[2]: Leaving directory '/usr/src/packages/BUILD/mctr2' [ 794s] make[1]: *** [Makefile:65: all] Error 2 [ 794s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 794s] dh_auto_build: make -j1 returned exit code 2 [ 794s] make: *** [debian/rules:6: build] Error 2 [ 794s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 794s] [ 794s] obs-arm-5 failed "build eclipse-titan_6.5.0-1.dsc" at Sun Feb 9 09:59:33 UTC 2020. [ 794s] [ 794s] ### VM INTERACTION START ### [ 797s] [ 768.625114] sysrq: SysRq : Power Off [ 797s] [ 768.646143] reboot: Power down [ 798s] ### VM INTERACTION END ### -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Sun Feb 9 23:09:59 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 9 Feb 2020 23:09:59 +0000 Subject: Change in osmo-gsm-tester[master]: ttcn3: Allow changing TTCN3 test from within osmo-gsm-tester In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17096 ) Change subject: ttcn3: Allow changing TTCN3 test from within osmo-gsm-tester ...................................................................... ttcn3: Allow changing TTCN3 test from within osmo-gsm-tester Change-Id: I02bf406e310f5bbab7b2e0bca47fb120418e241c --- M ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl M ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl b/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl index eae6063..9ad91fe 100644 --- a/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl +++ b/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl @@ -28,4 +28,4 @@ [MAIN_CONTROLLER] [EXECUTE] -BTS_Tests.control +${ttcn3_test_execute} diff --git a/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py b/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py index 2684bf7..4839052 100755 --- a/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py +++ b/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py @@ -4,6 +4,8 @@ from osmo_gsm_tester.testenv import * +ttcn3_test_execute="BTS_Tests.control" + hlr_dummy = suite.hlr() mgw_dummy = suite.mgw() stp_dummy = suite.stp() @@ -57,7 +59,7 @@ print('Creating template') mytemplate = Template(filename=bts_tmpl_file) -r = mytemplate.render(btsvty_ctrl_hostname=bts.remote_addr(), pcu_available=pcu_available) +r = mytemplate.render(btsvty_ctrl_hostname=bts.remote_addr(), pcu_available=pcu_available, ttcn3_test_execute=ttcn3_test_execute) with open(bts_cfg_file, 'w') as f: f.write(r) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17096 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I02bf406e310f5bbab7b2e0bca47fb120418e241c Gerrit-Change-Number: 17096 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 9 23:10:50 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 9 Feb 2020 23:10:50 +0000 Subject: Change in osmo-pcu[master]: tbf: cosmetic: fix spacing in gprs_rlcmac_tbf::create_ul_ass() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17104 ) Change subject: tbf: cosmetic: fix spacing in gprs_rlcmac_tbf::create_ul_ass() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ice4c4db20551753fa4219e7a216309229f7a2ab5 Gerrit-Change-Number: 17104 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 09 Feb 2020 23:10:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 9 23:13:53 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 9 Feb 2020 23:13:53 +0000 Subject: Change in osmo-pcu[master]: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17105 ) Change subject: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() ...................................................................... Patch Set 3: (2 comments) Fine but IMO drop the OTC_SELECT stuff. https://gerrit.osmocom.org/c/osmo-pcu/+/17105/3/src/tbf.cpp File src/tbf.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17105/3/src/tbf.cpp at 1305 PS3, Line 1305: /* TODO: use OTC_SELECT for such allocations */ Let's please avoid OTC_SELECT on osmo-pcu. which may run in a resource constrained system which in turns is already running a heavy load like osmo-bts and possibly osmo-trx. https://gerrit.osmocom.org/c/osmo-pcu/+/17105/3/src/tbf.cpp at 1308 PS3, Line 1308: bitvec_free(ass_vec); Ideally bitve_free should be fixed to support NULL pointers, as most _free() APIs. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Gerrit-Change-Number: 17105 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin Gerrit-Comment-Date: Sun, 09 Feb 2020 23:13:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 9 23:14:35 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 9 Feb 2020 23:14:35 +0000 Subject: Change in osmo-pcu[master]: encoding: assert return value of bitvec_set_u64() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17106 ) Change subject: encoding: assert return value of bitvec_set_u64() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17106 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic0de3ae34f06e41aacacb917f5a0214623259bdc Gerrit-Change-Number: 17106 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 09 Feb 2020 23:14:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 9 23:14:59 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 9 Feb 2020 23:14:59 +0000 Subject: Change in osmo-msc[master]: libmsc/sdp: cosmetic: fix less-than-zero comparison of an unsigned value In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/17107 ) Change subject: libmsc/sdp: cosmetic: fix less-than-zero comparison of an unsigned value ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/17107 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I57ed17d8457ada69a3c22233f30339d2c0f65bce Gerrit-Change-Number: 17107 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 09 Feb 2020 23:14:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 9 23:15:46 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 9 Feb 2020 23:15:46 +0000 Subject: Change in libosmocore[master]: osmo_libusb: check return value of osmo_fd_register() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17109 ) Change subject: osmo_libusb: check return value of osmo_fd_register() ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17109 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia20755ec12ee9fb0eba8322551642a96e68e1570 Gerrit-Change-Number: 17109 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 09 Feb 2020 23:15:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 9 23:17:53 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 9 Feb 2020 23:17:53 +0000 Subject: Change in libosmocore[master]: conv: prevent theoretical NULL pointer dereference in osmo_conv_encode() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17108 ) Change subject: conv: prevent theoretical NULL pointer dereference in osmo_conv_encode() ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ice0050cd7c7e3fcbf57c2c73682ca28843a92d8b Gerrit-Change-Number: 17108 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 09 Feb 2020 23:17:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 9 23:20:18 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 9 Feb 2020 23:20:18 +0000 Subject: Change in libosmocore[master]: exec: prevent uninitialized memory access in osmo_system_nowait() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17110 ) Change subject: exec: prevent uninitialized memory access in osmo_system_nowait() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17110 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id3901de4692ef44e9e9c67b1804e027fc4ce7c18 Gerrit-Change-Number: 17110 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 09 Feb 2020 23:20:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 9 23:22:52 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 9 Feb 2020 23:22:52 +0000 Subject: Change in libosmocore[master]: exec: propogate errors from osmo_environment_[filter|append] In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17111 ) Change subject: exec: propogate errors from osmo_environment_[filter|append] ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17111 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If7d6e0441f73092a4fb455340c076ba4dc60af3f Gerrit-Change-Number: 17111 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 09 Feb 2020 23:22:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 9 23:23:51 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Sun, 9 Feb 2020 23:23:51 +0000 Subject: Change in osmo-hlr[master]: db: fix possible SQLite3 allocated memory leak in db_open() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/17112 ) Change subject: db: fix possible SQLite3 allocated memory leak in db_open() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/17112 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ic9ed9bad3165bc4a637fe963f51e923f012e19ac Gerrit-Change-Number: 17112 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 09 Feb 2020 23:23:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 07:22:04 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 10 Feb 2020 07:22:04 +0000 Subject: Change in docker-playground[master]: ttcn3-hlr-test: set mp_hlr_supports_dgsm In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16915 ) Change subject: ttcn3-hlr-test: set mp_hlr_supports_dgsm ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16915 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Iafdf267c6012264966857e41e855fa971f773023 Gerrit-Change-Number: 16915 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 07:22:04 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 07:22:09 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 10 Feb 2020 07:22:09 +0000 Subject: Change in docker-playground[master]: ttcn3-hlr-test: set mp_hlr_supports_dgsm In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/16915 ) Change subject: ttcn3-hlr-test: set mp_hlr_supports_dgsm ...................................................................... ttcn3-hlr-test: set mp_hlr_supports_dgsm Related: SYS#4618 Depends: osmo-ttcn3-hacks Ia7f92d33691f910549353b16a7b0efc18e521719 Change-Id: Iafdf267c6012264966857e41e855fa971f773023 --- M ttcn3-hlr-test/HLR_Tests.cfg M ttcn3-hlr-test/jenkins.sh 2 files changed, 7 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve osmith: Verified diff --git a/ttcn3-hlr-test/HLR_Tests.cfg b/ttcn3-hlr-test/HLR_Tests.cfg index b8aa886..9258cea 100644 --- a/ttcn3-hlr-test/HLR_Tests.cfg +++ b/ttcn3-hlr-test/HLR_Tests.cfg @@ -9,6 +9,7 @@ [MODULE_PARAMETERS] HLR_Tests.mp_hlr_ip := "172.18.10.20" +HLR_Tests.mp_hlr_supports_dgsm := true [MAIN_CONTROLLER] diff --git a/ttcn3-hlr-test/jenkins.sh b/ttcn3-hlr-test/jenkins.sh index 2bf1f98..74aa37f 100755 --- a/ttcn3-hlr-test/jenkins.sh +++ b/ttcn3-hlr-test/jenkins.sh @@ -13,6 +13,12 @@ mkdir $VOL_BASE_DIR/hlr-tester cp HLR_Tests.cfg $VOL_BASE_DIR/hlr-tester/ +# Disable D-GSM tests until osmo-hlr.git release > 1.2.0 is available +if [ "$IMAGE_SUFFIX" = "latest" ]; then + sed "s/HLR_Tests.mp_hlr_supports_dgsm := true/HLR_Tests.mp_hlr_supports_dgsm := false/g" -i \ + "$VOL_BASE_DIR/hlr-tester/HLR_Tests.cfg" +fi + mkdir $VOL_BASE_DIR/hlr cp osmo-hlr.cfg $VOL_BASE_DIR/hlr/ -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/16915 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Iafdf267c6012264966857e41e855fa971f773023 Gerrit-Change-Number: 16915 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 07:28:30 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 10 Feb 2020 07:28:30 +0000 Subject: Change in docker-playground[master]: ttcn3-hlr-test: mp_hlr_supports_dgsm := false References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/17113 ) Change subject: ttcn3-hlr-test: mp_hlr_supports_dgsm := false ...................................................................... ttcn3-hlr-test: mp_hlr_supports_dgsm := false Disable mp_hlr_supports_dgsm, until patches providing the VTY commands are merged to osmo-hlr.git. Related: OS#4380 Change-Id: I766d54c65ae9e7b6333f9bcfce49a70c588845d0 --- M ttcn3-hlr-test/HLR_Tests.cfg 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/13/17113/1 diff --git a/ttcn3-hlr-test/HLR_Tests.cfg b/ttcn3-hlr-test/HLR_Tests.cfg index 9258cea..ba6fe3f 100644 --- a/ttcn3-hlr-test/HLR_Tests.cfg +++ b/ttcn3-hlr-test/HLR_Tests.cfg @@ -9,7 +9,8 @@ [MODULE_PARAMETERS] HLR_Tests.mp_hlr_ip := "172.18.10.20" -HLR_Tests.mp_hlr_supports_dgsm := true +# Set to true after I2fe453553c90e6ee527ed13a13089900efd488aa is merged +HLR_Tests.mp_hlr_supports_dgsm := false [MAIN_CONTROLLER] -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17113 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I766d54c65ae9e7b6333f9bcfce49a70c588845d0 Gerrit-Change-Number: 17113 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 07:29:49 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 10 Feb 2020 07:29:49 +0000 Subject: Change in docker-playground[master]: ttcn3-hlr-test: mp_hlr_supports_dgsm := false In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/17113 ) Change subject: ttcn3-hlr-test: mp_hlr_supports_dgsm := false ...................................................................... Patch Set 1: Verified+1 Code-Review+2 Trivial and important fix, which prevents all TTCN-3 HLR tests from failing. Merging without review. -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17113 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I766d54c65ae9e7b6333f9bcfce49a70c588845d0 Gerrit-Change-Number: 17113 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 10 Feb 2020 07:29:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 07:29:53 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 10 Feb 2020 07:29:53 +0000 Subject: Change in docker-playground[master]: ttcn3-hlr-test: mp_hlr_supports_dgsm := false In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/17113 ) Change subject: ttcn3-hlr-test: mp_hlr_supports_dgsm := false ...................................................................... ttcn3-hlr-test: mp_hlr_supports_dgsm := false Disable mp_hlr_supports_dgsm, until patches providing the VTY commands are merged to osmo-hlr.git. Related: OS#4380 Change-Id: I766d54c65ae9e7b6333f9bcfce49a70c588845d0 --- M ttcn3-hlr-test/HLR_Tests.cfg 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: osmith: Looks good to me, approved; Verified diff --git a/ttcn3-hlr-test/HLR_Tests.cfg b/ttcn3-hlr-test/HLR_Tests.cfg index 9258cea..ba6fe3f 100644 --- a/ttcn3-hlr-test/HLR_Tests.cfg +++ b/ttcn3-hlr-test/HLR_Tests.cfg @@ -9,7 +9,8 @@ [MODULE_PARAMETERS] HLR_Tests.mp_hlr_ip := "172.18.10.20" -HLR_Tests.mp_hlr_supports_dgsm := true +# Set to true after I2fe453553c90e6ee527ed13a13089900efd488aa is merged +HLR_Tests.mp_hlr_supports_dgsm := false [MAIN_CONTROLLER] -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17113 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I766d54c65ae9e7b6333f9bcfce49a70c588845d0 Gerrit-Change-Number: 17113 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: osmith Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 07:45:00 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 10 Feb 2020 07:45:00 +0000 Subject: Change in libosmocore[master]: bitvec: make bitvec_free() safe against NULL References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17114 ) Change subject: bitvec: make bitvec_free() safe against NULL ...................................................................... bitvec: make bitvec_free() safe against NULL Change-Id: Ifafb65e9d0adc286e16104274db440f38a86d800 Related: CID#208181, CID#208179 --- M src/bitvec.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/14/17114/1 diff --git a/src/bitvec.c b/src/bitvec.c index ef8621c..5130705 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -418,6 +418,8 @@ * \param[in] bit vector to free */ void bitvec_free(struct bitvec *bv) { + if (bv == NULL) + return; talloc_free(bv->data); talloc_free(bv); } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17114 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ifafb65e9d0adc286e16104274db440f38a86d800 Gerrit-Change-Number: 17114 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 07:47:44 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 10 Feb 2020 07:47:44 +0000 Subject: Change in osmo-pcu[master]: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17105 ) Change subject: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() ...................................................................... Patch Set 3: (2 comments) https://gerrit.osmocom.org/c/osmo-pcu/+/17105/3/src/tbf.cpp File src/tbf.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17105/3/src/tbf.cpp at 1305 PS3, Line 1305: /* TODO: use OTC_SELECT for such allocations */ > Let's please avoid OTC_SELECT on osmo-pcu. [?] Right. I'll update this change. https://gerrit.osmocom.org/c/osmo-pcu/+/17105/3/src/tbf.cpp at 1308 PS3, Line 1308: bitvec_free(ass_vec); > Ideally bitve_free should be fixed to support NULL pointers, as most _free() APIs. ACK. Please see https://gerrit.osmocom.org/c/libosmocore/+/17114. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Gerrit-Change-Number: 17105 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 07:47:44 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 07:52:48 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 10 Feb 2020 07:52:48 +0000 Subject: Change in osmo-pcu[master]: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17105 to look at the new patch set (#4). Change subject: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() ...................................................................... tbf: fix NULL pointer dereference in create_[ul|dl]_ass() The problem is that bitvec_free() is not NULL-safe. Ideally we need to fix it in libosmocore [1], but let's also fix it here, so OsmoPCU can be safely used with older libosmocore versions. [1] https://gerrit.osmocom.org/c/libosmocore/+/17114 Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Fixes: CID#208181, CID#208179 --- M src/tbf.cpp 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/05/17105/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Gerrit-Change-Number: 17105 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 08:50:46 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 10 Feb 2020 08:50:46 +0000 Subject: Change in libosmocore[master]: bitvec: make bitvec_free() safe against NULL In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17114 ) Change subject: bitvec: make bitvec_free() safe against NULL ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/17114/1/src/bitvec.c File src/bitvec.c: https://gerrit.osmocom.org/c/libosmocore/+/17114/1/src/bitvec.c at 421 PS1, Line 421: if (bv == NULL) did I already tell you how much I hate this java-like syntax when comparing against null? :P -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17114 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ifafb65e9d0adc286e16104274db440f38a86d800 Gerrit-Change-Number: 17114 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 08:50:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 08:51:30 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 10 Feb 2020 08:51:30 +0000 Subject: Change in osmo-pcu[master]: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17105 ) Change subject: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Gerrit-Change-Number: 17105 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 08:51:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 08:57:16 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 10 Feb 2020 08:57:16 +0000 Subject: Change in osmo-gsm-tester[master]: ttcn3: Allow passing ttcn3 extra module params from osmo-gsm-tester References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17115 ) Change subject: ttcn3: Allow passing ttcn3 extra module params from osmo-gsm-tester ...................................................................... ttcn3: Allow passing ttcn3 extra module params from osmo-gsm-tester Change-Id: Iaa2a5647801b4f152f72bf4b40ac79f18608df87 --- M ttcn3/suites/ttcn3_bts_tests/lib/testlib.py M ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/15/17115/1 diff --git a/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py b/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py index 9c673cd..7e7e874 100644 --- a/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py +++ b/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py @@ -4,7 +4,7 @@ from osmo_gsm_tester.testenv import * -def run_ttcn3(suite, test_obj, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute): +def run_ttcn3(suite, test_obj, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute, ttcn3_test_extra_module_params=""): own_dir = testdir script_file = os.path.join(testdir, 'scripts', 'run_ttcn3_docker.sh') bts_tmpl_file = os.path.join(testdir, 'scripts', 'BTS_Tests.cfg.tmpl') @@ -21,7 +21,7 @@ print('Creating template') mytemplate = Template(filename=bts_tmpl_file) - r = mytemplate.render(btsvty_ctrl_hostname=bts.remote_addr(), pcu_available=pcu_available, ttcn3_test_execute=ttcn3_test_execute) + r = mytemplate.render(btsvty_ctrl_hostname=bts.remote_addr(), pcu_available=pcu_available, ttcn3_test_execute=ttcn3_test_execute, ttcn3_test_extra_module_params=ttcn3_test_extra_module_params) with open(bts_cfg_file, 'w') as f: f.write(r) diff --git a/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl b/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl index 9ad91fe..510234e 100644 --- a/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl +++ b/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl @@ -24,6 +24,7 @@ BTS_Tests.mp_trx0_arfcn := 868 BTS_Tests.mp_ipa_up_timeout := 30.0 BTS_Tests.mp_ipa_up_delay := 3.0 +${ttcn3_test_extra_module_params} [MAIN_CONTROLLER] -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17115 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iaa2a5647801b4f152f72bf4b40ac79f18608df87 Gerrit-Change-Number: 17115 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 08:57:17 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 10 Feb 2020 08:57:17 +0000 Subject: Change in osmo-gsm-tester[master]: WIP: ttcn3: Add test to reproduce high channel load References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17116 ) Change subject: WIP: ttcn3: Add test to reproduce high channel load ...................................................................... WIP: ttcn3: Add test to reproduce high channel load Change-Id: I42d6bd0f8b3ce63e15cc186e53e04dad6f1bc5c2 --- A ttcn3/suites/ttcn3_bts_tests/highchanload_tchh.py M ttcn3/suites/ttcn3_bts_tests/lib/testlib.py 2 files changed, 52 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/16/17116/1 diff --git a/ttcn3/suites/ttcn3_bts_tests/highchanload_tchh.py b/ttcn3/suites/ttcn3_bts_tests/highchanload_tchh.py new file mode 100755 index 0000000..6ec4767 --- /dev/null +++ b/ttcn3/suites/ttcn3_bts_tests/highchanload_tchh.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 +import os + +from osmo_gsm_tester.testenv import * +import testlib +suite.test_import_modules_register_for_cleanup(testlib) +from testlib import run_ttcn3 + +ttcn3_test_execute="BTS_Tests_perf.TC_pespin" +ttcn3_test_extra_module_params="BTS_Tests_perf.mp_wait_time := 11.0" + +hlr_dummy = suite.hlr() +mgw_dummy = suite.mgw() +stp_dummy = suite.stp() +msc_dummy = suite.msc(hlr_dummy, mgw_dummy, stp_dummy) +ggsn_dummy = suite.ggsn() +sgsn_dummy = suite.sgsn(hlr_dummy, ggsn_dummy) +bsc = suite.bsc(msc_dummy, mgw_dummy, stp_dummy) +bts = suite.bts() +osmocon = suite.osmocon() + +bts.set_num_trx(1) +bts.set_trx_phy_channel(0, 0, 'CCCH+SDCCH4') +bts.set_trx_phy_channel(0, 1, 'TCH/H') +bts.set_trx_phy_channel(0, 2, 'TCH/H') +bts.set_trx_phy_channel(0, 3, 'TCH/H') +bts.set_trx_phy_channel(0, 4, 'TCH/H') +bts.set_trx_phy_channel(0, 5, 'TCH/H') +bts.set_trx_phy_channel(0, 6, 'TCH/H') +bts.set_trx_phy_channel(0, 7, 'TCH/H') + +print('Starting CNI') +hlr_dummy.start() +stp_dummy.start() +msc_dummy.start() +mgw_dummy.start() + +nat_rsl_ip = suite.ip_address().get('addr') +bsc.set_rsl_ip(nat_rsl_ip) +bsc.bts_add(bts) +sgsn_dummy.bts_add(bts) + +bsc.start() +bts.start(keepalive=True) + +print('Starting osmocon') +osmocon.start() + +testdir = os.path.dirname(os.path.realpath(__file__)) +run_ttcn3(suite, test, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute, ttcn3_test_extra_module_params) diff --git a/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py b/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py index 7e7e874..288450f 100644 --- a/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py +++ b/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py @@ -26,11 +26,11 @@ f.write(r) - print('Starting TTCN3 tests') + print('Starting TTCN3 test suite') proc = process.Process('ttcn3', script_run_dir, docker_cmd) try: proc.launch() - print('Starting TTCN3 launched, waiting until it finishes') + print('TTCN3 test suite launched, waiting until it finishes') proc.wait(timeout=3600) except Exception as e: proc.terminate() -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17116 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I42d6bd0f8b3ce63e15cc186e53e04dad6f1bc5c2 Gerrit-Change-Number: 17116 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 09:54:25 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 09:54:25 +0000 Subject: Change in osmo-msc[master]: libmsc/sdp: cosmetic: fix less-than-zero comparison of an unsigned value In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/17107 ) Change subject: libmsc/sdp: cosmetic: fix less-than-zero comparison of an unsigned value ...................................................................... libmsc/sdp: cosmetic: fix less-than-zero comparison of an unsigned value Change-Id: I57ed17d8457ada69a3c22233f30339d2c0f65bce Fixes: CID#206075 --- M src/libmsc/sdp_msg.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/libmsc/sdp_msg.c b/src/libmsc/sdp_msg.c index 7880978..cc54249 100644 --- a/src/libmsc/sdp_msg.c +++ b/src/libmsc/sdp_msg.c @@ -321,7 +321,7 @@ if (sscanf(src, "audio %u RTP/AVP", &port) < 1) return -ENOTSUP; - if (port < 0 || port > 0xffff) + if (port > 0xffff) return -EINVAL; sdp->rtp.port = port; -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/17107 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I57ed17d8457ada69a3c22233f30339d2c0f65bce Gerrit-Change-Number: 17107 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 09:56:41 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 09:56:41 +0000 Subject: Change in libosmocore[master]: conv: prevent theoretical NULL pointer dereference in osmo_conv_encode() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17108 ) Change subject: conv: prevent theoretical NULL pointer dereference in osmo_conv_encode() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ice0050cd7c7e3fcbf57c2c73682ca28843a92d8b Gerrit-Change-Number: 17108 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 09:56:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 09:57:06 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 09:57:06 +0000 Subject: Change in libosmocore[master]: osmo_libusb: check return value of osmo_fd_register() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17109 ) Change subject: osmo_libusb: check return value of osmo_fd_register() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17109 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia20755ec12ee9fb0eba8322551642a96e68e1570 Gerrit-Change-Number: 17109 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 09:57:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 09:58:00 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 09:58:00 +0000 Subject: Change in libosmocore[master]: exec: prevent uninitialized memory access in osmo_system_nowait() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17110 ) Change subject: exec: prevent uninitialized memory access in osmo_system_nowait() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17110 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id3901de4692ef44e9e9c67b1804e027fc4ce7c18 Gerrit-Change-Number: 17110 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 09:58:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 09:58:34 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 09:58:34 +0000 Subject: Change in libosmocore[master]: exec: propogate errors from osmo_environment_[filter|append] In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17111 ) Change subject: exec: propogate errors from osmo_environment_[filter|append] ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17111 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If7d6e0441f73092a4fb455340c076ba4dc60af3f Gerrit-Change-Number: 17111 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 09:58:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 09:58:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 09:58:59 +0000 Subject: Change in libosmocore[master]: conv: prevent theoretical NULL pointer dereference in osmo_conv_encode() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17108 ) Change subject: conv: prevent theoretical NULL pointer dereference in osmo_conv_encode() ...................................................................... conv: prevent theoretical NULL pointer dereference in osmo_conv_encode() A caller shall never pass NULL to osmo_conv_encode(). Change-Id: Ice0050cd7c7e3fcbf57c2c73682ca28843a92d8b Fixes: CID#208174 --- M src/conv.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/conv.c b/src/conv.c index a2c13de..06c4299 100644 --- a/src/conv.c +++ b/src/conv.c @@ -36,6 +36,7 @@ #include #include +#include #include #include @@ -87,6 +88,7 @@ const struct osmo_conv_code *code) { memset(encoder, 0x00, sizeof(struct osmo_conv_encoder)); + OSMO_ASSERT(code != NULL); encoder->code = code; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ice0050cd7c7e3fcbf57c2c73682ca28843a92d8b Gerrit-Change-Number: 17108 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 09:58:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 09:58:59 +0000 Subject: Change in libosmocore[master]: osmo_libusb: check return value of osmo_fd_register() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17109 ) Change subject: osmo_libusb: check return value of osmo_fd_register() ...................................................................... osmo_libusb: check return value of osmo_fd_register() Most likely, we should not assert() here, but let's at least log an error message in case if osmo_fd_register() fails. Change-Id: Ia20755ec12ee9fb0eba8322551642a96e68e1570 Related: CID#206572 --- M src/usb/osmo_libusb.c 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/usb/osmo_libusb.c b/src/usb/osmo_libusb.c index 7a13a7e..3c8a22a 100644 --- a/src/usb/osmo_libusb.c +++ b/src/usb/osmo_libusb.c @@ -86,6 +86,7 @@ struct osmo_fd *ofd = talloc_zero(OTC_GLOBAL, struct osmo_fd); libusb_context *luctx = user_data; unsigned int when = 0; + int rc; if (events & POLLIN) when |= OSMO_FD_READ; @@ -93,7 +94,9 @@ when |= OSMO_FD_WRITE; osmo_fd_setup(ofd, fd, when, osmo_usb_fd_cb, luctx, 0); - osmo_fd_register(ofd); + rc = osmo_fd_register(ofd); + if (rc) + LOGP(DLUSB, LOGL_ERROR, "osmo_fd_register() failed with rc=%d\n", rc); } /* called by libusb if it wants to remove a file-descriptor */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17109 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia20755ec12ee9fb0eba8322551642a96e68e1570 Gerrit-Change-Number: 17109 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 09:59:00 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 09:59:00 +0000 Subject: Change in libosmocore[master]: exec: prevent uninitialized memory access in osmo_system_nowait() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17110 ) Change subject: exec: prevent uninitialized memory access in osmo_system_nowait() ...................................................................... exec: prevent uninitialized memory access in osmo_system_nowait() If (!env_whitelist && addl_env), osmo_environment_append() would access uninitialized memory. If both are false, execle() would also deal with garbage values. Let's ensure that at least the first element of new_env[] is initialized. Change-Id: Id3901de4692ef44e9e9c67b1804e027fc4ce7c18 Fixes: CID#206571 --- M src/exec.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/exec.c b/src/exec.c index a9d8ce0..b806ad5 100644 --- a/src/exec.c +++ b/src/exec.c @@ -217,6 +217,9 @@ /* close all file descriptors above stdio */ osmo_close_all_fds_above(2); + /* man execle: "an array of pointers *must* be terminated by a null pointer" */ + new_env[0] = NULL; + /* build the new environment */ if (env_whitelist) osmo_environment_filter(new_env, ARRAY_SIZE(new_env), environ, env_whitelist); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17110 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id3901de4692ef44e9e9c67b1804e027fc4ce7c18 Gerrit-Change-Number: 17110 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 09:59:00 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 09:59:00 +0000 Subject: Change in libosmocore[master]: exec: propogate errors from osmo_environment_[filter|append] In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17111 ) Change subject: exec: propogate errors from osmo_environment_[filter|append] ...................................................................... exec: propogate errors from osmo_environment_[filter|append] Change-Id: If7d6e0441f73092a4fb455340c076ba4dc60af3f --- M src/exec.c 1 file changed, 10 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/exec.c b/src/exec.c index b806ad5..62f5919 100644 --- a/src/exec.c +++ b/src/exec.c @@ -221,10 +221,16 @@ new_env[0] = NULL; /* build the new environment */ - if (env_whitelist) - osmo_environment_filter(new_env, ARRAY_SIZE(new_env), environ, env_whitelist); - if (addl_env) - osmo_environment_append(new_env, ARRAY_SIZE(new_env), addl_env); + if (env_whitelist) { + rc = osmo_environment_filter(new_env, ARRAY_SIZE(new_env), environ, env_whitelist); + if (rc < 0) + return rc; + } + if (addl_env) { + rc = osmo_environment_append(new_env, ARRAY_SIZE(new_env), addl_env); + if (rc < 0) + return rc; + } /* if we want to behave like system(3), we must go via the shell */ execle("/bin/sh", "sh", "-c", command, (char *) NULL, new_env); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17111 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If7d6e0441f73092a4fb455340c076ba4dc60af3f Gerrit-Change-Number: 17111 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:00:35 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 10 Feb 2020 10:00:35 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps/Makefile: fix ECLIPSEGIT2 clone URL References: Message-ID: osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 ) Change subject: deps/Makefile: fix ECLIPSEGIT2 clone URL ...................................................................... deps/Makefile: fix ECLIPSEGIT2 clone URL Switch to working clone URL, after more repositories stopped working with the old URL. Related: https://bugs.eclipse.org/bugs/show_bug.cgi?id=559943 Change-Id: I04b690a262765f60b671225e1a5425e2750d093f --- M deps/Makefile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/17/17117/1 diff --git a/deps/Makefile b/deps/Makefile index 91636af..cd5c038 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -14,7 +14,7 @@ # limitations under the License. ECLIPSEGIT:=https://github.com/eclipse -ECLIPSEGIT2:=git://git.eclipse.org/gitroot/titan +ECLIPSEGIT2:=https://git.eclipse.org/r/titan OSMOGITHUB:=https://github.com/osmocom OSMOGIT:=git://git.osmocom.org -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 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: I04b690a262765f60b671225e1a5425e2750d093f Gerrit-Change-Number: 17117 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:02:22 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 10 Feb 2020 10:02:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps/Makefile: fix ECLIPSEGIT2 clone URL In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 ) Change subject: deps/Makefile: fix ECLIPSEGIT2 clone URL ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 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: I04b690a262765f60b671225e1a5425e2750d093f Gerrit-Change-Number: 17117 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 10:02:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:02:36 2020 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Mon, 10 Feb 2020 10:02:36 +0000 Subject: Change in osmo-ccid-firmware[master]: Add DFU runtime descriptor In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17033 to look at the new patch set (#4). Change subject: Add DFU runtime descriptor ...................................................................... Add DFU runtime descriptor Change-Id: I031c2353248873735698c845f591537779eee995 --- A sysmoOCTSIM/dfu_descriptors.h M sysmoOCTSIM/usb_descriptors.c M sysmoOCTSIM/usb_descriptors.h A sysmoOCTSIM/usb_dfu.h 4 files changed, 133 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/33/17033/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I031c2353248873735698c845f591537779eee995 Gerrit-Change-Number: 17033 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:09:17 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 10:09:17 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps/Makefile: fix ECLIPSEGIT2 clone URL In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 ) Change subject: deps/Makefile: fix ECLIPSEGIT2 clone URL ...................................................................... Patch Set 1: Code-Review+1 please also revert the workaround commit at the same time (https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17103) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 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: I04b690a262765f60b671225e1a5425e2750d093f Gerrit-Change-Number: 17117 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 10:09:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:25:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 10:25:07 +0000 Subject: Change in osmo-ccid-firmware[master]: Add DFU runtime descriptor In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17033 ) Change subject: Add DFU runtime descriptor ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I031c2353248873735698c845f591537779eee995 Gerrit-Change-Number: 17033 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 10 Feb 2020 10:25:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:25:44 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 10:25:44 +0000 Subject: Change in osmo-ccid-firmware[master]: Add DFU runtime descriptor In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17033 ) Change subject: Add DFU runtime descriptor ...................................................................... Add DFU runtime descriptor Change-Id: I031c2353248873735698c845f591537779eee995 --- A sysmoOCTSIM/dfu_descriptors.h M sysmoOCTSIM/usb_descriptors.c M sysmoOCTSIM/usb_descriptors.h A sysmoOCTSIM/usb_dfu.h 4 files changed, 133 insertions(+), 4 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/sysmoOCTSIM/dfu_descriptors.h b/sysmoOCTSIM/dfu_descriptors.h new file mode 100644 index 0000000..8cbaf23 --- /dev/null +++ b/sysmoOCTSIM/dfu_descriptors.h @@ -0,0 +1,44 @@ +#ifndef _USB_DEV_DFU_H +#define _USB_DEV_DFU_H + +#include + +#include "usb_protocol.h" +#include "usb_dfu.h" + +/* USB DFU functional descriptor */ +#define DFU_FUNC_DESC { \ + .bLength = USB_DT_DFU_SIZE, \ + .bDescriptorType = USB_DT_DFU, \ + .bmAttributes = USB_DFU_CAN_UPLOAD | USB_DFU_CAN_DOWNLOAD, \ + .wDetachTimeOut = 5000, \ + .wTransferSize = FLASH_PAGE_SIZE, \ + .bcdDFUVersion = 0x0100, \ +} + +/* Number of DFU interface during runtime mode */ +#define DFURT_NUM_IF 1 + +/* to be used by the runtime as part of its USB descriptor structure + * declaration */ +#define DFURT_IF_DESCRIPTOR_STRUCT \ + struct usb_iface_desc dfu_rt; \ + struct usb_dfu_func_descriptor func_dfu; + +/* to be used by the runtime as part of its USB Dsecriptor structure + * definition */ +#define DFURT_IF_DESCRIPTOR(dfuIF, dfuSTR) \ + .dfu_rt = { \ + .bLength = sizeof(struct usb_iface_desc), \ + .bDescriptorType = USB_DT_INTERFACE, \ + .bInterfaceNumber = dfuIF, \ + .bAlternateSetting = 0, \ + .bNumEndpoints = 0, \ + .bInterfaceClass = 0xFE, \ + .bInterfaceSubClass = 0x01, \ + .bInterfaceProtocol = 0x01, \ + .iInterface = dfuSTR, \ + }, \ + .func_dfu = DFU_FUNC_DESC \ + +#endif diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c index 2b41390..00d2007 100644 --- a/sysmoOCTSIM/usb_descriptors.c +++ b/sysmoOCTSIM/usb_descriptors.c @@ -47,8 +47,10 @@ .bDescriptorType = USB_DT_CONFIG, .wTotalLength = sizeof(usb_fs_descs.cfg) + sizeof(usb_fs_descs.cdc) + - sizeof(usb_fs_descs.ccid), - .bNumInterfaces = 3, + sizeof(usb_fs_descs.ccid) + + sizeof(usb_fs_descs.dfu_rt) + + sizeof(usb_fs_descs.func_dfu), + .bNumInterfaces = 4, .bConfigurationValue = CONF_USB_CDCD_ACM_BCONFIGVAL, .iConfiguration = STR_DESC_CONFIG, .bmAttributes = CONF_USB_CDCD_ACM_BMATTRI, @@ -206,7 +208,7 @@ }, }, }, - //DFURT_IF_DESCRIPTOR, + DFURT_IF_DESCRIPTOR(3, STR_DESC_INTF_DFURT), .str = { #if 0 CDCD_ACM_STR_DESCES @@ -219,6 +221,7 @@ 22, 3, 'd',0, 'e',0, 'b',0, 'u',0, 'g',0, ' ',0, 'U',0, 'A',0, 'R',0, 'T',0, 10, 3, 'C',0, 'C',0, 'I',0, 'D',0, 12, 3, 'F',0, 'I',0, 'X',0, 'M',0, 'E',0, + 28, 3, 'D',0, 'F',0, 'U',0, ' ',0, '(',0, 'R',0, 'u',0, 'n',0, 't',0, 'i',0, 'm',0, 'e',0 ,')',0, #endif } }; diff --git a/sysmoOCTSIM/usb_descriptors.h b/sysmoOCTSIM/usb_descriptors.h index df072c2..ea47d07 100644 --- a/sysmoOCTSIM/usb_descriptors.h +++ b/sysmoOCTSIM/usb_descriptors.h @@ -20,6 +20,7 @@ #define USB_DESCRIPTORS_H_ #include "ccid_device.h" +#include "dfu_descriptors.h" #define CCID_NUM_CLK_SUPPORTED 4 @@ -34,6 +35,7 @@ STR_DESC_INTF_ACM_DATA, STR_DESC_INTF_CCID, STR_DESC_SERIAL, + STR_DESC_INTF_DFURT, }; /* a struct of structs representing the concatenated collection of USB descriptors */ @@ -63,7 +65,8 @@ struct usb_ccid_class_descriptor class; struct usb_ep_desc ep[3]; } ccid; - uint8_t str[148]; + DFURT_IF_DESCRIPTOR_STRUCT + uint8_t str[176]; } __attribute__((packed)); #endif /* USB_DESCRIPTORS_H_ */ diff --git a/sysmoOCTSIM/usb_dfu.h b/sysmoOCTSIM/usb_dfu.h new file mode 100644 index 0000000..b447c7c --- /dev/null +++ b/sysmoOCTSIM/usb_dfu.h @@ -0,0 +1,79 @@ +#ifndef _USB_DFU_H +#define _USB_DFU_H +/* USB Device Firmware Update Implementation for OpenPCD + * (C) 2006 by Harald Welte + * + * Protocol definitions for USB DFU + * + * This ought to be compliant to the USB DFU Spec 1.0 as available from + * http://www.usb.org/developers/devclass_docs/usbdfu10.pdf + * + */ + +#include + +#define USB_DT_DFU 0x21 + +struct usb_dfu_func_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bmAttributes; +#define USB_DFU_CAN_DOWNLOAD (1 << 0) +#define USB_DFU_CAN_UPLOAD (1 << 1) +#define USB_DFU_MANIFEST_TOL (1 << 2) +#define USB_DFU_WILL_DETACH (1 << 3) + uint16_t wDetachTimeOut; + uint16_t wTransferSize; + uint16_t bcdDFUVersion; +} __attribute__ ((packed)); + +#define USB_DT_DFU_SIZE 9 + +/* DFU class-specific requests (Section 3, DFU Rev 1.1) */ +#define USB_REQ_DFU_DETACH 0x00 +#define USB_REQ_DFU_DNLOAD 0x01 +#define USB_REQ_DFU_UPLOAD 0x02 +#define USB_REQ_DFU_GETSTATUS 0x03 +#define USB_REQ_DFU_CLRSTATUS 0x04 +#define USB_REQ_DFU_GETSTATE 0x05 +#define USB_REQ_DFU_ABORT 0x06 + +struct dfu_status { + uint8_t bStatus; + uint8_t bwPollTimeout[3]; + uint8_t bState; + uint8_t iString; +} __attribute__((packed)); + +#define DFU_STATUS_OK 0x00 +#define DFU_STATUS_errTARGET 0x01 +#define DFU_STATUS_errFILE 0x02 +#define DFU_STATUS_errWRITE 0x03 +#define DFU_STATUS_errERASE 0x04 +#define DFU_STATUS_errCHECK_ERASED 0x05 +#define DFU_STATUS_errPROG 0x06 +#define DFU_STATUS_errVERIFY 0x07 +#define DFU_STATUS_errADDRESS 0x08 +#define DFU_STATUS_errNOTDONE 0x09 +#define DFU_STATUS_errFIRMWARE 0x0a +#define DFU_STATUS_errVENDOR 0x0b +#define DFU_STATUS_errUSBR 0x0c +#define DFU_STATUS_errPOR 0x0d +#define DFU_STATUS_errUNKNOWN 0x0e +#define DFU_STATUS_errSTALLEDPKT 0x0f + +enum dfu_state { + DFU_STATE_appIDLE = 0, + DFU_STATE_appDETACH = 1, + DFU_STATE_dfuIDLE = 2, + DFU_STATE_dfuDNLOAD_SYNC = 3, + DFU_STATE_dfuDNBUSY = 4, + DFU_STATE_dfuDNLOAD_IDLE = 5, + DFU_STATE_dfuMANIFEST_SYNC = 6, + DFU_STATE_dfuMANIFEST = 7, + DFU_STATE_dfuMANIFEST_WAIT_RST = 8, + DFU_STATE_dfuUPLOAD_IDLE = 9, + DFU_STATE_dfuERROR = 10, +}; + +#endif /* _USB_DFU_H */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I031c2353248873735698c845f591537779eee995 Gerrit-Change-Number: 17033 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:26:22 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 10 Feb 2020 10:26:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps/Makefile: fix ECLIPSEGIT2 clone URL In-Reply-To: References: Message-ID: Hello pespin, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 to look at the new patch set (#2). Change subject: deps/Makefile: fix ECLIPSEGIT2 clone URL ...................................................................... deps/Makefile: fix ECLIPSEGIT2 clone URL Switch to working clone URL, after more repositories stopped working with the old URL. Revert 865ba37553609a07f714aadfa54b91b5e6771680 ("deps: Work around disappearing eclipse.org git repositories"). Related: https://bugs.eclipse.org/bugs/show_bug.cgi?id=559943 Change-Id: I04b690a262765f60b671225e1a5425e2750d093f --- M deps/Makefile 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/17/17117/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 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: I04b690a262765f60b671225e1a5425e2750d093f Gerrit-Change-Number: 17117 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:27:02 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Mon, 10 Feb 2020 10:27:02 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps/Makefile: fix ECLIPSEGIT2 clone URL In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 ) Change subject: deps/Makefile: fix ECLIPSEGIT2 clone URL ...................................................................... Patch Set 2: > Patch Set 1: Code-Review+1 > > please also revert the workaround commit at the same time (https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17103) done -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 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: I04b690a262765f60b671225e1a5425e2750d093f Gerrit-Change-Number: 17117 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 10:27:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:27:31 2020 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Mon, 10 Feb 2020 10:27:31 +0000 Subject: Change in osmo-ccid-firmware[master]: support DFU detach to switch from fw to bootloader In-Reply-To: References: Message-ID: Hoernchen has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17034 ) Change subject: support DFU detach to switch from fw to bootloader ...................................................................... support DFU detach to switch from fw to bootloader This makes flashing a bit more convenient, because pushing the button is not required. It can be disabled using make DISABLE_DFU_DETACH=1. Change-Id: I04d05054d1c0e3988b8eafd93c6524f4a0489cb7 --- M sysmoOCTSIM/dfu_descriptors.h M sysmoOCTSIM/gcc/Makefile A sysmoOCTSIM/usb/class/dfu/device/dfudf.c A sysmoOCTSIM/usb/class/dfu/device/dfudf.h A sysmoOCTSIM/usb/class/dfu/device/dfudf_desc.h A sysmoOCTSIM/usb/class/dfu/usb_protocol_dfu.h M sysmoOCTSIM/usb_start.c M sysmoOCTSIM/usb_start.h 8 files changed, 658 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/dfu_descriptors.h b/sysmoOCTSIM/dfu_descriptors.h index 8cbaf23..7ef8cc9 100644 --- a/sysmoOCTSIM/dfu_descriptors.h +++ b/sysmoOCTSIM/dfu_descriptors.h @@ -5,13 +5,18 @@ #include "usb_protocol.h" #include "usb_dfu.h" +#if (DISABLE_DFU_DETACH != 0) +#define BMATT 0 +#else +#define BMATT USB_DFU_WILL_DETACH +#endif /* USB DFU functional descriptor */ #define DFU_FUNC_DESC { \ .bLength = USB_DT_DFU_SIZE, \ .bDescriptorType = USB_DT_DFU, \ - .bmAttributes = USB_DFU_CAN_UPLOAD | USB_DFU_CAN_DOWNLOAD, \ - .wDetachTimeOut = 5000, \ + .bmAttributes = BMATT, \ + .wDetachTimeOut = 0, \ .wTransferSize = FLASH_PAGE_SIZE, \ .bcdDFUVersion = 0x0100, \ } diff --git a/sysmoOCTSIM/gcc/Makefile b/sysmoOCTSIM/gcc/Makefile index 6c0974f..9df0c01 100644 --- a/sysmoOCTSIM/gcc/Makefile +++ b/sysmoOCTSIM/gcc/Makefile @@ -7,9 +7,11 @@ EXTRA_CFLAGS=-I$(SYSTEM_PREFIX)/include -I../../ccid_common CROSS_COMPILE= arm-none-eabi- +DISABLE_DFU_DETACH ?= 0 + CFLAGS_CPU=-D__SAME54N19A__ -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 CFLAGS=-x c -mthumb -DDEBUG -Os -ffunction-sections -fdata-sections -mlong-calls \ - -g3 -Wall -c -std=gnu99 $(CFLAGS_CPU) -DOCTSIMFWBUILD + -g3 -Wall -c -std=gnu99 $(CFLAGS_CPU) -DOCTSIMFWBUILD -DDISABLE_DFU_DETACH=$(DISABLE_DFU_DETACH) CC = $(CROSS_COMPILE)gcc LD = $(CROSS_COMPILE)ld @@ -75,6 +77,8 @@ -I"../usb/class/ccid/device" \ -I"../usb/class/cdc" \ -I"../usb/class/cdc/device" \ + -I"../usb/class/dfu" \ + -I"../usb/class/dfu/device" \ -I"../usb/device" \ $(NULL) @@ -135,6 +139,7 @@ talloc.o \ usb/class/ccid/device/ccid_df.o \ usb/class/cdc/device/cdcdf_acm.o \ + usb/class/dfu/device/dfudf.o \ usb/device/usbdc.o \ usb/usb_protocol.o \ usb_descriptors.o \ diff --git a/sysmoOCTSIM/usb/class/dfu/device/dfudf.c b/sysmoOCTSIM/usb/class/dfu/device/dfudf.c new file mode 100644 index 0000000..2b11fb4 --- /dev/null +++ b/sysmoOCTSIM/usb/class/dfu/device/dfudf.c @@ -0,0 +1,300 @@ +/** + * \file + * + * \brief USB Device Stack DFU Function Implementation. + * + * Copyright (c) 2018 sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "dfudf.h" +#include "usb_protocol_dfu.h" +#include "dfudf_desc.h" + +/** USB Device DFU Function Specific Data */ +struct dfudf_func_data { + /** DFU Interface information */ + uint8_t func_iface; + /** DFU Enable Flag */ + bool enabled; +}; + +static struct usbdf_driver _dfudf; +static struct dfudf_func_data _dfudf_funcd; + +/** USB DFU functional descriptor (with DFU attributes) */ +static const uint8_t usb_dfu_func_desc_bytes[] = {DFUD_IFACE_DESCB}; +static const usb_dfu_func_desc_t* usb_dfu_func_desc = (usb_dfu_func_desc_t*)&usb_dfu_func_desc_bytes; + +enum usb_dfu_state dfu_state = USB_DFU_STATE_APP_IDLE; +enum usb_dfu_status dfu_status = USB_DFU_STATUS_OK; + +uint8_t dfu_download_data[512]; +uint16_t dfu_download_length = 0; +size_t dfu_download_offset = 0; +bool dfu_manifestation_complete = false; + +/** + * \brief Enable DFU Function + * \param[in] drv Pointer to USB device function driver + * \param[in] desc Pointer to USB interface descriptor + * \return Operation status. + */ +static int32_t dfudf_enable(struct usbdf_driver *drv, struct usbd_descriptors *desc) +{ + struct dfudf_func_data *func_data = (struct dfudf_func_data *)(drv->func_data); + + usb_iface_desc_t ifc_desc; + uint8_t * ifc; + + ifc = desc->sod; + if (NULL == ifc) { + return ERR_NOT_FOUND; + } + + ifc_desc.bInterfaceNumber = ifc[2]; + ifc_desc.bInterfaceClass = ifc[5]; + + if (USB_DFU_CLASS == ifc_desc.bInterfaceClass) { + if (func_data->func_iface == ifc_desc.bInterfaceNumber) { // Initialized + return ERR_ALREADY_INITIALIZED; + } else if (func_data->func_iface != 0xFF) { // Occupied + return ERR_NO_RESOURCE; + } else { + func_data->func_iface = ifc_desc.bInterfaceNumber; + } + } else { // Not supported by this function driver + return ERR_NOT_FOUND; + } + + // there are no endpoint to install since DFU uses only the control endpoint + + ifc = usb_find_desc(usb_desc_next(desc->sod), desc->eod, USB_DT_INTERFACE); + + // Installed + _dfudf_funcd.enabled = true; + return ERR_NONE; +} + +/** + * \brief Disable DFU Function + * \param[in] drv Pointer to USB device function driver + * \param[in] desc Pointer to USB device descriptor + * \return Operation status. + */ +static int32_t dfudf_disable(struct usbdf_driver *drv, struct usbd_descriptors *desc) +{ + struct dfudf_func_data *func_data = (struct dfudf_func_data *)(drv->func_data); + + usb_iface_desc_t ifc_desc; + + if (desc) { + ifc_desc.bInterfaceClass = desc->sod[5]; + // Check interface + if (ifc_desc.bInterfaceClass != USB_DFU_CLASS) { + return ERR_NOT_FOUND; + } + } + + func_data->func_iface = 0xFF; + + _dfudf_funcd.enabled = false; + return ERR_NONE; +} + +/** + * \brief DFU Control Function + * \param[in] drv Pointer to USB device function driver + * \param[in] ctrl USB device general function control type + * \param[in] param Parameter pointer + * \return Operation status. + */ +static int32_t dfudf_ctrl(struct usbdf_driver *drv, enum usbdf_control ctrl, void *param) +{ + switch (ctrl) { + case USBDF_ENABLE: + return dfudf_enable(drv, (struct usbd_descriptors *)param); + + case USBDF_DISABLE: + return dfudf_disable(drv, (struct usbd_descriptors *)param); + + case USBDF_GET_IFACE: + return ERR_UNSUPPORTED_OP; + + default: + return ERR_INVALID_ARG; + } +} + +/** + * \brief Process the DFU IN request + * \param[in] ep Endpoint address. + * \param[in] req Pointer to the request. + * \param[in] stage Stage of the request. + * \return Operation status. + */ +static int32_t dfudf_in_req(uint8_t ep, struct usb_req *req, enum usb_ctrl_stage stage) +{ + if (USB_DATA_STAGE == stage) { // the data stage is only for IN data, which we sent + return ERR_NONE; // send the IN data + } + + int32_t to_return = ERR_NONE; + uint8_t response[6]; // buffer for the response to this request + switch (req->bRequest) { + case USB_DFU_UPLOAD: // upload firmware from flash not supported + dfu_state = USB_DFU_STATE_DFU_ERROR; // unsupported class request + to_return = ERR_UNSUPPORTED_OP; // stall control pipe (don't reply to the request) + break; + case USB_DFU_GETSTATUS: // get status + response[0] = dfu_status; // set status + response[1] = 10; // set poll timeout (24 bits, in milliseconds) to small value for periodical poll + response[2] = 0; // set poll timeout (24 bits, in milliseconds) to small value for periodical poll + response[3] = 0; // set poll timeout (24 bits, in milliseconds) to small value for periodical poll + response[4] = dfu_state; // set state + response[5] = 0; // string not used + to_return = usbdc_xfer(ep, response, 6, false); // send back status + if (USB_DFU_STATE_DFU_DNLOAD_SYNC == dfu_state) { // download has not completed + dfu_state = USB_DFU_STATE_DFU_DNBUSY; // switch to busy state + } else if (USB_DFU_STATE_DFU_MANIFEST_SYNC == dfu_state) { + if (!dfu_manifestation_complete) { + dfu_state = USB_DFU_STATE_DFU_MANIFEST; // go to manifest mode + } else if (usb_dfu_func_desc->bmAttributes & USB_DFU_ATTRIBUTES_MANIFEST_TOLERANT) { + dfu_state = USB_DFU_STATE_DFU_IDLE; // go back to idle mode + } else { // this should not happen (after manifestation the state should be dfuMANIFEST-WAIT-RESET if we are not manifest tolerant) + dfu_state = USB_DFU_STATE_DFU_MANIFEST_WAIT_RESET; // wait for reset + } + } + break; + case USB_DFU_GETSTATE: // get state + response[0] = dfu_state; // return state + to_return = usbdc_xfer(ep, response, 1, false); // send back state + break; + default: // all other DFU class IN request + dfu_state = USB_DFU_STATE_DFU_ERROR; // unknown or unsupported class request + to_return = ERR_INVALID_ARG; // stall control pipe (don't reply to the request) + break; + } + + return to_return; +} + +/** + * \brief Process the DFU OUT request + * \param[in] ep Endpoint address. + * \param[in] req Pointer to the request. + * \param[in] stage Stage of the request. + * \return Operation status. + */ +static int32_t dfudf_out_req(uint8_t ep, struct usb_req *req, enum usb_ctrl_stage stage) +{ + int32_t to_return = ERR_NONE; + switch (req->bRequest) { + case USB_DFU_DETACH: // detach makes only sense in DFU run-time/application mode +#if (DISABLE_DFU_DETACH != 0) + dfu_state = USB_DFU_STATE_DFU_ERROR; // unsupported class request + to_return = ERR_UNSUPPORTED_OP; // stall control pipe (don't reply to the request) +#else + to_return = usbdc_xfer(ep, NULL, 0, false); + *(uint32_t*)HSRAM_ADDR = 0x44465521; + __disable_irq(); + delay_us(10000); + usbdc_detach(); + delay_us(100000); + NVIC_SystemReset(); +#endif + break; + case USB_DFU_CLRSTATUS: // clear status + if (USB_DFU_STATE_DFU_ERROR == dfu_state || USB_DFU_STATUS_OK != dfu_status) { // only clear in case there is an error + dfu_status = USB_DFU_STATUS_OK; // clear error status + dfu_state = USB_DFU_STATE_DFU_IDLE; // put back in idle state + } + to_return = usbdc_xfer(ep, NULL, 0, false); // send ACK + break; + case USB_DFU_ABORT: // abort current operation + dfu_download_offset = 0; // reset download progress + dfu_state = USB_DFU_STATE_DFU_IDLE; // put back in idle state (nothing else to do) + to_return = usbdc_xfer(ep, NULL, 0, false); // send ACK + break; + default: // all other DFU class OUT request + dfu_state = USB_DFU_STATE_DFU_ERROR; // unknown class request + to_return = ERR_INVALID_ARG; // stall control pipe (don't reply to the request) + break; + } + + return to_return; +} + +/** + * \brief Process the CDC class request + * \param[in] ep Endpoint address. + * \param[in] req Pointer to the request. + * \param[in] stage Stage of the request. + * \return Operation status. + */ +static int32_t dfudf_req(uint8_t ep, struct usb_req *req, enum usb_ctrl_stage stage) +{ + if (0x01 != ((req->bmRequestType >> 5) & 0x03)) { // class request + return ERR_NOT_FOUND; + } + + if ((req->wIndex == _dfudf_funcd.func_iface)) { + if (req->bmRequestType & USB_EP_DIR_IN) { + return dfudf_in_req(ep, req, stage); + } else { + return dfudf_out_req(ep, req, stage); + } + } else { + return ERR_NOT_FOUND; + } + return ERR_NOT_FOUND; +} + +/** USB Device DFU Handler Struct */ +static struct usbdc_handler dfudf_req_h = {NULL, (FUNC_PTR)dfudf_req}; + +/** + * \brief Initialize the USB DFU Function Driver + */ +int32_t dfudf_init(void) +{ + if (usbdc_get_state() > USBD_S_POWER) { + return ERR_DENIED; + } + + _dfudf.ctrl = dfudf_ctrl; + _dfudf.func_data = &_dfudf_funcd; + + usbdc_register_function(&_dfudf); + usbdc_register_handler(USBDC_HDL_REQ, &dfudf_req_h); + + return ERR_NONE; +} + +/** + * \brief De-initialize the USB DFU Function Driver + */ +void dfudf_deinit(void) +{ +} + +/** + * \brief Check whether DFU Function is enabled + */ +bool dfudf_is_enabled(void) +{ + return _dfudf_funcd.enabled; +} diff --git a/sysmoOCTSIM/usb/class/dfu/device/dfudf.h b/sysmoOCTSIM/usb/class/dfu/device/dfudf.h new file mode 100644 index 0000000..cee5845 --- /dev/null +++ b/sysmoOCTSIM/usb/class/dfu/device/dfudf.h @@ -0,0 +1,77 @@ +/** + * \file + * + * \brief USB Device Stack DFU Function Definition. + * + * Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries. + * Copyright (c) 2018 sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * \asf_license_start + * + * \page License + * + * Subject to your compliance with these terms, you may use Microchip + * software and any derivatives exclusively with Microchip products. + * It is your responsibility to comply with third party license terms applicable + * to your use of third party software (including open source software) that + * may accompany Microchip software. + * + * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, + * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, + * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, + * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE + * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL + * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE + * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE + * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT + * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY + * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + * \asf_license_stop + */ + +#ifndef USBDF_DFU_H_ +#define USBDF_DFU_H_ + +#include "usbdc.h" +#include "usb_protocol_dfu.h" + +/** Current DFU state */ +extern enum usb_dfu_state dfu_state; +/**< Current DFU status */ +extern enum usb_dfu_status dfu_status; + +/** Downloaded data to be programmed in flash + * + * 512 is the flash page size of the SAM D5x/E5x + */ +extern uint8_t dfu_download_data[512]; +/** Length of downloaded data in bytes */ +extern uint16_t dfu_download_length; +/** Offset of where the downloaded data should be flashed in bytes */ +extern size_t dfu_download_offset; +/** If manifestation (firmware flash and check) is complete */ +extern bool dfu_manifestation_complete; + +/** + * \brief Initialize the USB DFU Function Driver + * \return Operation status. + */ +int32_t dfudf_init(void); + +/** + * \brief Deinitialize the USB DFU Function Driver + * \return Operation status. + */ +void dfudf_deinit(void); + +/** + * \brief Check whether DFU Function is enabled + * \return Operation status. + * \return true DFU Function is enabled + * \return false DFU Function is disabled + */ +bool dfudf_is_enabled(void); + +#endif /* USBDF_DFU_H_ */ diff --git a/sysmoOCTSIM/usb/class/dfu/device/dfudf_desc.h b/sysmoOCTSIM/usb/class/dfu/device/dfudf_desc.h new file mode 100644 index 0000000..50a79e4 --- /dev/null +++ b/sysmoOCTSIM/usb/class/dfu/device/dfudf_desc.h @@ -0,0 +1,114 @@ +/** + * \file + * + * \brief USB Device Stack DFU Function Descriptor Setting. + * + * Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries. + * Copyright (c) 2018 sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * \asf_license_start + * + * \page License + * + * Subject to your compliance with these terms, you may use Microchip + * software and any derivatives exclusively with Microchip products. + * It is your responsibility to comply with third party license terms applicable + * to your use of third party software (including open source software) that + * may accompany Microchip software. + * + * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, + * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, + * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, + * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE + * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL + * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE + * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE + * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT + * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY + * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + * \asf_license_stop + */ + +#ifndef USBDF_DFU_DESC_H_ +#define USBDF_DFU_DESC_H_ + +#include "usb_protocol.h" +#include "usbd_config.h" +#include "usb_protocol_dfu.h" + +#define DFUD_DEV_DESC \ + USB_DEV_DESC_BYTES(CONF_USB_DFUD_BCDUSB, \ + CONF_USB_DFUD_BDEVICECLASS, \ + CONF_USB_DFUD_BDEVICESUBCLASS, \ + CONF_USB_DFUD_BDEVICEPROTOCOL, \ + CONF_USB_DFUD_BMAXPKSZ0, \ + CONF_USB_OPENMOKO_IDVENDOR, \ + CONF_USB_OSMOASF4DFU_IDPRODUCT, \ + CONF_USB_DFUD_BCDDEVICE, \ + CONF_USB_DFUD_IMANUFACT, \ + CONF_USB_DFUD_IPRODUCT, \ + CONF_USB_DFUD_ISERIALNUM, \ + CONF_USB_DFUD_BNUMCONFIG) + +#define DFUD_DEV_QUAL_DESC \ + USB_DEV_QUAL_DESC_BYTES(CONF_USB_DFUD_BCDUSB, \ + CONF_USB_DFUD_BDEVICECLASS, \ + CONF_USB_DFUD_BDEVICESUBCLASS, \ + CONF_USB_DFUD_BMAXPKSZ0, \ + CONF_USB_DFUD_BNUMCONFIG) + +#define DFUD_CFG_DESC \ + USB_CONFIG_DESC_BYTES(CONF_USB_DFUD_WTOTALLENGTH, \ + CONF_USB_DFUD_BNUMINTERFACES, \ + CONF_USB_DFUD_BCONFIGVAL, \ + CONF_USB_DFUD_ICONFIG, \ + CONF_USB_DFUD_BMATTRI, \ + CONF_USB_DFUD_BMAXPOWER) + +#define DFUD_OTH_SPD_CFG_DESC \ + USB_OTH_SPD_CFG_DESC_BYTES(CONF_USB_DFUD_WTOTALLENGTH, \ + CONF_USB_DFUD_BNUMINTERFACES, \ + CONF_USB_DFUD_BCONFIGVAL, \ + CONF_USB_DFUD_ICONFIG, \ + CONF_USB_DFUD_BMATTRI, \ + CONF_USB_DFUD_BMAXPOWER) + +#define DFUD_IFACE_DESCB USB_DFU_FUNC_DESC_BYTES(USB_DFU_ATTRIBUTES_CAN_DOWNLOAD | USB_DFU_ATTRIBUTES_WILL_DETACH, \ + 0, /**< detaching makes only sense in run-time mode */ \ + 512, /**< transfer size corresponds to page size for optimal flash writing */ \ + 0x0110 /**< DFU specification version 1.1 used */ ) + +#define DFUD_IFACE_DESCES \ + USB_IFACE_DESC_BYTES(CONF_USB_DFUD_BIFCNUM, \ + CONF_USB_DFUD_BALTSET, \ + CONF_USB_DFUD_BNUMEP, \ + USB_DFU_CLASS, \ + USB_DFU_SUBCLASS, \ + USB_DFU_PROTOCOL_DFU, \ + CONF_USB_DFUD_IINTERFACE), \ + DFUD_IFACE_DESCB + +#define DFUD_STR_DESCES \ + CONF_USB_DFUD_LANGID_DESC \ + CONF_USB_DFUD_IMANUFACT_STR_DESC \ + CONF_USB_DFUD_IPRODUCT_STR_DESC \ + CONF_USB_DFUD_ISERIALNUM_STR_DESC \ + CONF_USB_DFUD_ICONFIG_STR_DESC \ + CONF_USB_DFUD_IINTERFACE_STR_DESC + +/** USB Device descriptors and configuration descriptors */ +#define DFUD_DESCES_LS_FS \ + DFUD_DEV_DESC, DFUD_CFG_DESC, DFUD_IFACE_DESCES, DFUD_STR_DESCES + +#define DFUD_HS_DESCES_LS_FS \ + DFUD_DEV_DESC, DFUD_DEV_QUAL_DESC, DFUD_CFG_DESC, DFUD_M_IFACE_DESCES, \ + DFUD_IFACE_DESCES, DFUD_OTH_SPD_CFG_DESC, \ + DFUD_IFACE_DESCES_HS, DFUD_STR_DESCES + +#define DFUD_HS_DESCES_HS \ + DFUD_CFG_DESC, DFUD_IFACE_DESCES, DFUD_IFACE_DESCES_HS, DFUD_OTH_SPD_CFG_DESC, \ + DFUD_IFACE_DESCES + +#endif /* USBDF_DFU_DESC_H_ */ diff --git a/sysmoOCTSIM/usb/class/dfu/usb_protocol_dfu.h b/sysmoOCTSIM/usb/class/dfu/usb_protocol_dfu.h new file mode 100644 index 0000000..7f82743 --- /dev/null +++ b/sysmoOCTSIM/usb/class/dfu/usb_protocol_dfu.h @@ -0,0 +1,150 @@ +/** + * \file + * + * \brief USB Device Firmware Upgrade (DFU) protocol definitions + * + * Copyright (c) 2018 sysmocom -s.f.m.c. GmbH, Author: Kevin Redon + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef _USB_PROTOCOL_DFU_H_ +#define _USB_PROTOCOL_DFU_H_ + +#include "usb_includes.h" + +/* + * \ingroup usb_protocol_group + * \defgroup dfu_protocol_group Device Firmware Upgrade Definitions + * \implements USB Device Firmware Upgrade Specification, Revision 1.1 + * @{ + */ + +/** + * \name USB DFU Subclass IDs + */ +//@{ +#define USB_DFU_CLASS 0xFE //!< Application Specific Class Code +//@} + +//! \name USB DFU Subclass IDs +//@{ +#define USB_DFU_SUBCLASS 0x01 //!< Device Firmware Upgrade Code +//@} + +//! \name USB DFU Protocol IDs +//@{ +#define USB_DFU_PROTOCOL_RUNTIME 0x01 //!< Runtime protocol +#define USB_DFU_PROTOCOL_DFU 0x02 //!< DFU mode protocol +//@} + +//! \name USB DFU Attributes bits mask +//@{ +#define USB_DFU_ATTRIBUTES_CAN_DOWNLOAD 0x01 +#define USB_DFU_ATTRIBUTES_CAN_UPLOAD 0x02 +#define USB_DFU_ATTRIBUTES_MANIFEST_TOLERANT 0x04 +#define USB_DFU_ATTRIBUTES_WILL_DETACH 0x08 +//@} + +//! \name USB DFU Request IDs +//@{ +#define USB_REQ_DFU_DETACH 0x00 +#define USB_REQ_DFU_DNLOAD 0x01 +#define USB_REQ_DFU_UPLOAD 0x02 +#define USB_REQ_DFU_GETSTATUS 0x03 +#define USB_REQ_DFU_CLRSTATUS 0x04 +#define USB_REQ_DFU_GETSTATE 0x05 +#define USB_REQ_DFU_ABORT 0x06 +//@} + +/* + * Need to pack structures tightly, or the compiler might insert padding + * and violate the spec-mandated layout. + */ +COMPILER_PACK_SET(1) + +//! \name USB DFU Descriptors +//@{ + +//! DFU Functional Descriptor +typedef struct usb_dfu_func_desc { + uint8_t bFunctionLength; /**< Size of this descriptor, in bytes (always 9) */ + uint8_t bDescriptorType; /**< DFU FUNCTIONAL descriptor type (always 0x21) */ + uint8_t bmAttributes; /**< DFU attributes bit mask */ + le16_t wDetachTimeOut; /**< Time, in milliseconds, that the device will wait after receipt of the DFU_DETACH request */ + le16_t wTransferSize; /**< Maximum number of bytes that the device can accept per control-write transaction */ + le16_t bcdDFUVersion; /**< Numeric expression identifying the version of the DFU Specification release */ +} usb_dfu_func_desc_t; + +#define USB_DFU_FUNC_DESC_LEN 9 +#define USB_DFU_FUNC_DESC_TYPE 0x21 +#define USB_DFU_FUNC_DESC_BYTES(bmAttributes, wDetachTimeOut, wTransferSize, bcdDFUVersion) \ + USB_DFU_FUNC_DESC_LEN, /* bFunctionLength */ \ + USB_DFU_FUNC_DESC_TYPE, /* bDescriptorType */ \ + bmAttributes, \ + LE_BYTE0(wDetachTimeOut), LE_BYTE1(wDetachTimeOut), \ + LE_BYTE0(wTransferSize), LE_BYTE1(wTransferSize), \ + LE_BYTE0(bcdDFUVersion), LE_BYTE1(bcdDFUVersion) + +COMPILER_PACK_RESET() + +//! @} + +//! USB DFU Request IDs +enum usb_dfu_req { + USB_DFU_DETACH, + USB_DFU_DNLOAD, + USB_DFU_UPLOAD, + USB_DFU_GETSTATUS, + USB_DFU_CLRSTATUS, + USB_DFU_GETSTATE, + USB_DFU_ABORT, +}; + +//! USB DFU Device Status IDs +enum usb_dfu_status { + USB_DFU_STATUS_OK, + USB_DFU_STATUS_ERR_TARGET, + USB_DFU_STATUS_ERR_FILE, + USB_DFU_STATUS_ERR_WRITE, + USB_DFU_STATUS_ERR_ERASE, + USB_DFU_STATUS_ERR_CHECK_ERASED, + USB_DFU_STATUS_ERR_PROG, + USB_DFU_STATUS_ERR_VERIFY, + USB_DFU_STATUS_ERR_ADDRESS, + USB_DFU_STATUS_ERR_NOTDONE, + USB_DFU_STATUS_ERR_FIRMWARE, + USB_DFU_STATUS_ERR_VENDOR, + USB_DFU_STATUS_ERR_USBR, + USB_DFU_STATUS_ERR_POR, + USB_DFU_STATUS_ERR_UNKNOWN, + USB_DFU_STATUS_ERR_STALLEDPKT, +}; + +//! USB DFU Device State IDs +enum usb_dfu_state { + USB_DFU_STATE_APP_IDLE, + USB_DFU_STATE_APP_DETACH, + USB_DFU_STATE_DFU_IDLE, + USB_DFU_STATE_DFU_DNLOAD_SYNC, + USB_DFU_STATE_DFU_DNBUSY, + USB_DFU_STATE_DFU_DNLOAD_IDLE, + USB_DFU_STATE_DFU_MANIFEST_SYNC, + USB_DFU_STATE_DFU_MANIFEST, + USB_DFU_STATE_DFU_MANIFEST_WAIT_RESET, + USB_DFU_STATE_DFU_UPLOAD_IDLE, + USB_DFU_STATE_DFU_ERROR, +}; + +#endif // _USB_PROTOCOL_DFU_H_ diff --git a/sysmoOCTSIM/usb_start.c b/sysmoOCTSIM/usb_start.c index 08201cb..b87e79e 100644 --- a/sysmoOCTSIM/usb_start.c +++ b/sysmoOCTSIM/usb_start.c @@ -132,6 +132,8 @@ /* usbdc_register_funcion inside */ cdcdf_acm_init(); + dfudf_init(); + printf("usb_descs_size=%u\r\n", usb_descs[0].eod - usb_descs[0].sod); usbdc_start((struct usbd_descriptors *) usb_descs); usbdc_attach(); diff --git a/sysmoOCTSIM/usb_start.h b/sysmoOCTSIM/usb_start.h index a99d1ad..089c58d 100644 --- a/sysmoOCTSIM/usb_start.h +++ b/sysmoOCTSIM/usb_start.h @@ -15,6 +15,8 @@ #include "cdcdf_acm.h" #include "cdcdf_acm_desc.h" #include "ccid_df.h" +#include "dfudf.h" +#include "dfudf_desc.h" void usb_start(void); void cdc_device_acm_init(void); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17034 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I04d05054d1c0e3988b8eafd93c6524f4a0489cb7 Gerrit-Change-Number: 17034 Gerrit-PatchSet: 5 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:27:32 2020 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Mon, 10 Feb 2020 10:27:32 +0000 Subject: Change in osmo-ccid-firmware[master]: git version appended to the product usb string descriptor In-Reply-To: References: Message-ID: Hoernchen has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17035 ) Change subject: git version appended to the product usb string descriptor ...................................................................... git version appended to the product usb string descriptor Change-Id: I4a9d010c9025cf8c14ebaf42de048b9a172c7786 --- M sysmoOCTSIM/main.c M sysmoOCTSIM/usb_start.c 2 files changed, 26 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 3db67d9..08f38ec 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -365,6 +365,19 @@ return 0; } +static int str_to_usb_desc(char* in, uint8_t in_sz, uint8_t* out, uint8_t out_sz){ + if (2+in_sz*2 < out_sz) + return -1; + + memset(out, 0, out_sz); + out[0] = out_sz; + out[1] = 0x3; + for (int i= 2; i < out_sz; i+=2) + out[i] = in[(i >> 1) - 1]; + return 0; +} + + #define RSTCAUSE_STR_SIZE 64 static void get_rstcause_str(char *out) { @@ -436,13 +449,16 @@ //####################### #define NUM_OUT_BUF 16 -char sernr_buf[16*2+1]; -//unicode for descriptor -uint8_t sernr_buf_descr[1+1+16*2*2]; +char sernr_buf[16*2+1]; +char product_buf[] = "sysmoOCTSIM "GIT_VERSION; +//len, type, 2 byte per hex char * 2 for unicode +uint8_t sernr_buf_descr[1+1+16*2*2]; +uint8_t product_buf_descr[1+1+sizeof(product_buf)*2]; char rstcause_buf[RSTCAUSE_STR_SIZE]; + int main(void) { @@ -471,12 +487,12 @@ atmel_start_init(); get_chip_unique_serial_str(sernr_buf, sizeof(sernr_buf)); + str_to_usb_desc(sernr_buf, sizeof(sernr_buf), sernr_buf_descr, sizeof(sernr_buf_descr)); + + str_to_usb_desc(product_buf, sizeof(product_buf), product_buf_descr, sizeof(product_buf_descr)); get_rstcause_str(rstcause_buf); - sernr_buf_descr[0] = sizeof(sernr_buf_descr); - sernr_buf_descr[1] = 0x3; - for(int i= 2; i < sizeof(sernr_buf_descr); i+=2) - sernr_buf_descr[i] = sernr_buf[i >> 1]; + usb_start(); diff --git a/sysmoOCTSIM/usb_start.c b/sysmoOCTSIM/usb_start.c index b87e79e..a4b787e 100644 --- a/sysmoOCTSIM/usb_start.c +++ b/sysmoOCTSIM/usb_start.c @@ -83,6 +83,7 @@ } extern uint8_t sernr_buf_descr[]; +extern uint8_t product_buf_descr[]; /* call-back for every control EP request */ static int32_t string_req_cb(uint8_t ep, struct usb_req *req, enum usb_ctrl_stage stage) { @@ -112,6 +113,8 @@ switch (index) { case STR_DESC_SERIAL: return send_str_desc(ep, req, stage, sernr_buf_descr); + case STR_DESC_PRODUCT: + return send_str_desc(ep, req, stage, product_buf_descr); default: return ERR_NOT_FOUND; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17035 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I4a9d010c9025cf8c14ebaf42de048b9a172c7786 Gerrit-Change-Number: 17035 Gerrit-PatchSet: 5 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:27:33 2020 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Mon, 10 Feb 2020 10:27:33 +0000 Subject: Change in osmo-ccid-firmware[master]: usb dfu header cleanup In-Reply-To: References: Message-ID: Hoernchen has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17037 ) Change subject: usb dfu header cleanup ...................................................................... usb dfu header cleanup Let's stick to one set of headers, the hand-crafted usb descriptor structs are prettier than the asf define galore. Change-Id: I689d7122872b28444b6c5343df3bac0c30f23b1d --- M sysmoOCTSIM/usb/class/dfu/device/dfudf.c M sysmoOCTSIM/usb/class/dfu/device/dfudf.h D sysmoOCTSIM/usb/class/dfu/device/dfudf_desc.h D sysmoOCTSIM/usb/class/dfu/usb_protocol_dfu.h M sysmoOCTSIM/usb_dfu.h M sysmoOCTSIM/usb_start.h 6 files changed, 44 insertions(+), 317 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/usb/class/dfu/device/dfudf.c b/sysmoOCTSIM/usb/class/dfu/device/dfudf.c index 2b11fb4..5e5db89 100644 --- a/sysmoOCTSIM/usb/class/dfu/device/dfudf.c +++ b/sysmoOCTSIM/usb/class/dfu/device/dfudf.c @@ -21,8 +21,8 @@ */ #include "dfudf.h" -#include "usb_protocol_dfu.h" -#include "dfudf_desc.h" +#include "usb_dfu.h" + /** USB Device DFU Function Specific Data */ struct dfudf_func_data { @@ -35,12 +35,8 @@ static struct usbdf_driver _dfudf; static struct dfudf_func_data _dfudf_funcd; -/** USB DFU functional descriptor (with DFU attributes) */ -static const uint8_t usb_dfu_func_desc_bytes[] = {DFUD_IFACE_DESCB}; -static const usb_dfu_func_desc_t* usb_dfu_func_desc = (usb_dfu_func_desc_t*)&usb_dfu_func_desc_bytes; - -enum usb_dfu_state dfu_state = USB_DFU_STATE_APP_IDLE; -enum usb_dfu_status dfu_status = USB_DFU_STATUS_OK; +enum dfu_state dfu_state = DFU_STATE_appIDLE; +enum usb_dfu_status dfu_status = DFU_STATUS_OK; uint8_t dfu_download_data[512]; uint16_t dfu_download_length = 0; @@ -156,7 +152,7 @@ uint8_t response[6]; // buffer for the response to this request switch (req->bRequest) { case USB_DFU_UPLOAD: // upload firmware from flash not supported - dfu_state = USB_DFU_STATE_DFU_ERROR; // unsupported class request + dfu_state = DFU_STATE_dfuERROR; // unsupported class request to_return = ERR_UNSUPPORTED_OP; // stall control pipe (don't reply to the request) break; case USB_DFU_GETSTATUS: // get status @@ -167,24 +163,13 @@ response[4] = dfu_state; // set state response[5] = 0; // string not used to_return = usbdc_xfer(ep, response, 6, false); // send back status - if (USB_DFU_STATE_DFU_DNLOAD_SYNC == dfu_state) { // download has not completed - dfu_state = USB_DFU_STATE_DFU_DNBUSY; // switch to busy state - } else if (USB_DFU_STATE_DFU_MANIFEST_SYNC == dfu_state) { - if (!dfu_manifestation_complete) { - dfu_state = USB_DFU_STATE_DFU_MANIFEST; // go to manifest mode - } else if (usb_dfu_func_desc->bmAttributes & USB_DFU_ATTRIBUTES_MANIFEST_TOLERANT) { - dfu_state = USB_DFU_STATE_DFU_IDLE; // go back to idle mode - } else { // this should not happen (after manifestation the state should be dfuMANIFEST-WAIT-RESET if we are not manifest tolerant) - dfu_state = USB_DFU_STATE_DFU_MANIFEST_WAIT_RESET; // wait for reset - } - } break; case USB_DFU_GETSTATE: // get state response[0] = dfu_state; // return state to_return = usbdc_xfer(ep, response, 1, false); // send back state break; default: // all other DFU class IN request - dfu_state = USB_DFU_STATE_DFU_ERROR; // unknown or unsupported class request + dfu_state = DFU_STATE_dfuERROR; // unknown or unsupported class request to_return = ERR_INVALID_ARG; // stall control pipe (don't reply to the request) break; } @@ -205,7 +190,7 @@ switch (req->bRequest) { case USB_DFU_DETACH: // detach makes only sense in DFU run-time/application mode #if (DISABLE_DFU_DETACH != 0) - dfu_state = USB_DFU_STATE_DFU_ERROR; // unsupported class request + dfu_state = DFU_STATE_dfuERROR; // unsupported class request to_return = ERR_UNSUPPORTED_OP; // stall control pipe (don't reply to the request) #else to_return = usbdc_xfer(ep, NULL, 0, false); @@ -218,19 +203,19 @@ #endif break; case USB_DFU_CLRSTATUS: // clear status - if (USB_DFU_STATE_DFU_ERROR == dfu_state || USB_DFU_STATUS_OK != dfu_status) { // only clear in case there is an error - dfu_status = USB_DFU_STATUS_OK; // clear error status - dfu_state = USB_DFU_STATE_DFU_IDLE; // put back in idle state + if (DFU_STATE_dfuERROR == dfu_state || DFU_STATUS_OK != dfu_status) { // only clear in case there is an error + dfu_status = DFU_STATUS_OK; // clear error status + dfu_state = DFU_STATE_dfuIDLE; // put back in idle state } to_return = usbdc_xfer(ep, NULL, 0, false); // send ACK break; case USB_DFU_ABORT: // abort current operation dfu_download_offset = 0; // reset download progress - dfu_state = USB_DFU_STATE_DFU_IDLE; // put back in idle state (nothing else to do) + dfu_state = DFU_STATE_dfuIDLE; // put back in idle state (nothing else to do) to_return = usbdc_xfer(ep, NULL, 0, false); // send ACK break; default: // all other DFU class OUT request - dfu_state = USB_DFU_STATE_DFU_ERROR; // unknown class request + dfu_state = DFU_STATE_dfuERROR; // unknown class request to_return = ERR_INVALID_ARG; // stall control pipe (don't reply to the request) break; } diff --git a/sysmoOCTSIM/usb/class/dfu/device/dfudf.h b/sysmoOCTSIM/usb/class/dfu/device/dfudf.h index cee5845..3a1be1e 100644 --- a/sysmoOCTSIM/usb/class/dfu/device/dfudf.h +++ b/sysmoOCTSIM/usb/class/dfu/device/dfudf.h @@ -35,10 +35,10 @@ #define USBDF_DFU_H_ #include "usbdc.h" -#include "usb_protocol_dfu.h" + /** Current DFU state */ -extern enum usb_dfu_state dfu_state; +extern enum dfu_state dfu_state; /**< Current DFU status */ extern enum usb_dfu_status dfu_status; diff --git a/sysmoOCTSIM/usb/class/dfu/device/dfudf_desc.h b/sysmoOCTSIM/usb/class/dfu/device/dfudf_desc.h deleted file mode 100644 index 50a79e4..0000000 --- a/sysmoOCTSIM/usb/class/dfu/device/dfudf_desc.h +++ /dev/null @@ -1,114 +0,0 @@ -/** - * \file - * - * \brief USB Device Stack DFU Function Descriptor Setting. - * - * Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries. - * Copyright (c) 2018 sysmocom -s.f.m.c. GmbH, Author: Kevin Redon - * - * \asf_license_start - * - * \page License - * - * Subject to your compliance with these terms, you may use Microchip - * software and any derivatives exclusively with Microchip products. - * It is your responsibility to comply with third party license terms applicable - * to your use of third party software (including open source software) that - * may accompany Microchip software. - * - * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, - * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, - * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, - * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE - * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL - * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE - * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE - * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT - * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY - * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, - * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. - * - * \asf_license_stop - */ - -#ifndef USBDF_DFU_DESC_H_ -#define USBDF_DFU_DESC_H_ - -#include "usb_protocol.h" -#include "usbd_config.h" -#include "usb_protocol_dfu.h" - -#define DFUD_DEV_DESC \ - USB_DEV_DESC_BYTES(CONF_USB_DFUD_BCDUSB, \ - CONF_USB_DFUD_BDEVICECLASS, \ - CONF_USB_DFUD_BDEVICESUBCLASS, \ - CONF_USB_DFUD_BDEVICEPROTOCOL, \ - CONF_USB_DFUD_BMAXPKSZ0, \ - CONF_USB_OPENMOKO_IDVENDOR, \ - CONF_USB_OSMOASF4DFU_IDPRODUCT, \ - CONF_USB_DFUD_BCDDEVICE, \ - CONF_USB_DFUD_IMANUFACT, \ - CONF_USB_DFUD_IPRODUCT, \ - CONF_USB_DFUD_ISERIALNUM, \ - CONF_USB_DFUD_BNUMCONFIG) - -#define DFUD_DEV_QUAL_DESC \ - USB_DEV_QUAL_DESC_BYTES(CONF_USB_DFUD_BCDUSB, \ - CONF_USB_DFUD_BDEVICECLASS, \ - CONF_USB_DFUD_BDEVICESUBCLASS, \ - CONF_USB_DFUD_BMAXPKSZ0, \ - CONF_USB_DFUD_BNUMCONFIG) - -#define DFUD_CFG_DESC \ - USB_CONFIG_DESC_BYTES(CONF_USB_DFUD_WTOTALLENGTH, \ - CONF_USB_DFUD_BNUMINTERFACES, \ - CONF_USB_DFUD_BCONFIGVAL, \ - CONF_USB_DFUD_ICONFIG, \ - CONF_USB_DFUD_BMATTRI, \ - CONF_USB_DFUD_BMAXPOWER) - -#define DFUD_OTH_SPD_CFG_DESC \ - USB_OTH_SPD_CFG_DESC_BYTES(CONF_USB_DFUD_WTOTALLENGTH, \ - CONF_USB_DFUD_BNUMINTERFACES, \ - CONF_USB_DFUD_BCONFIGVAL, \ - CONF_USB_DFUD_ICONFIG, \ - CONF_USB_DFUD_BMATTRI, \ - CONF_USB_DFUD_BMAXPOWER) - -#define DFUD_IFACE_DESCB USB_DFU_FUNC_DESC_BYTES(USB_DFU_ATTRIBUTES_CAN_DOWNLOAD | USB_DFU_ATTRIBUTES_WILL_DETACH, \ - 0, /**< detaching makes only sense in run-time mode */ \ - 512, /**< transfer size corresponds to page size for optimal flash writing */ \ - 0x0110 /**< DFU specification version 1.1 used */ ) - -#define DFUD_IFACE_DESCES \ - USB_IFACE_DESC_BYTES(CONF_USB_DFUD_BIFCNUM, \ - CONF_USB_DFUD_BALTSET, \ - CONF_USB_DFUD_BNUMEP, \ - USB_DFU_CLASS, \ - USB_DFU_SUBCLASS, \ - USB_DFU_PROTOCOL_DFU, \ - CONF_USB_DFUD_IINTERFACE), \ - DFUD_IFACE_DESCB - -#define DFUD_STR_DESCES \ - CONF_USB_DFUD_LANGID_DESC \ - CONF_USB_DFUD_IMANUFACT_STR_DESC \ - CONF_USB_DFUD_IPRODUCT_STR_DESC \ - CONF_USB_DFUD_ISERIALNUM_STR_DESC \ - CONF_USB_DFUD_ICONFIG_STR_DESC \ - CONF_USB_DFUD_IINTERFACE_STR_DESC - -/** USB Device descriptors and configuration descriptors */ -#define DFUD_DESCES_LS_FS \ - DFUD_DEV_DESC, DFUD_CFG_DESC, DFUD_IFACE_DESCES, DFUD_STR_DESCES - -#define DFUD_HS_DESCES_LS_FS \ - DFUD_DEV_DESC, DFUD_DEV_QUAL_DESC, DFUD_CFG_DESC, DFUD_M_IFACE_DESCES, \ - DFUD_IFACE_DESCES, DFUD_OTH_SPD_CFG_DESC, \ - DFUD_IFACE_DESCES_HS, DFUD_STR_DESCES - -#define DFUD_HS_DESCES_HS \ - DFUD_CFG_DESC, DFUD_IFACE_DESCES, DFUD_IFACE_DESCES_HS, DFUD_OTH_SPD_CFG_DESC, \ - DFUD_IFACE_DESCES - -#endif /* USBDF_DFU_DESC_H_ */ diff --git a/sysmoOCTSIM/usb/class/dfu/usb_protocol_dfu.h b/sysmoOCTSIM/usb/class/dfu/usb_protocol_dfu.h deleted file mode 100644 index 7f82743..0000000 --- a/sysmoOCTSIM/usb/class/dfu/usb_protocol_dfu.h +++ /dev/null @@ -1,150 +0,0 @@ -/** - * \file - * - * \brief USB Device Firmware Upgrade (DFU) protocol definitions - * - * Copyright (c) 2018 sysmocom -s.f.m.c. GmbH, Author: Kevin Redon - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ -#ifndef _USB_PROTOCOL_DFU_H_ -#define _USB_PROTOCOL_DFU_H_ - -#include "usb_includes.h" - -/* - * \ingroup usb_protocol_group - * \defgroup dfu_protocol_group Device Firmware Upgrade Definitions - * \implements USB Device Firmware Upgrade Specification, Revision 1.1 - * @{ - */ - -/** - * \name USB DFU Subclass IDs - */ -//@{ -#define USB_DFU_CLASS 0xFE //!< Application Specific Class Code -//@} - -//! \name USB DFU Subclass IDs -//@{ -#define USB_DFU_SUBCLASS 0x01 //!< Device Firmware Upgrade Code -//@} - -//! \name USB DFU Protocol IDs -//@{ -#define USB_DFU_PROTOCOL_RUNTIME 0x01 //!< Runtime protocol -#define USB_DFU_PROTOCOL_DFU 0x02 //!< DFU mode protocol -//@} - -//! \name USB DFU Attributes bits mask -//@{ -#define USB_DFU_ATTRIBUTES_CAN_DOWNLOAD 0x01 -#define USB_DFU_ATTRIBUTES_CAN_UPLOAD 0x02 -#define USB_DFU_ATTRIBUTES_MANIFEST_TOLERANT 0x04 -#define USB_DFU_ATTRIBUTES_WILL_DETACH 0x08 -//@} - -//! \name USB DFU Request IDs -//@{ -#define USB_REQ_DFU_DETACH 0x00 -#define USB_REQ_DFU_DNLOAD 0x01 -#define USB_REQ_DFU_UPLOAD 0x02 -#define USB_REQ_DFU_GETSTATUS 0x03 -#define USB_REQ_DFU_CLRSTATUS 0x04 -#define USB_REQ_DFU_GETSTATE 0x05 -#define USB_REQ_DFU_ABORT 0x06 -//@} - -/* - * Need to pack structures tightly, or the compiler might insert padding - * and violate the spec-mandated layout. - */ -COMPILER_PACK_SET(1) - -//! \name USB DFU Descriptors -//@{ - -//! DFU Functional Descriptor -typedef struct usb_dfu_func_desc { - uint8_t bFunctionLength; /**< Size of this descriptor, in bytes (always 9) */ - uint8_t bDescriptorType; /**< DFU FUNCTIONAL descriptor type (always 0x21) */ - uint8_t bmAttributes; /**< DFU attributes bit mask */ - le16_t wDetachTimeOut; /**< Time, in milliseconds, that the device will wait after receipt of the DFU_DETACH request */ - le16_t wTransferSize; /**< Maximum number of bytes that the device can accept per control-write transaction */ - le16_t bcdDFUVersion; /**< Numeric expression identifying the version of the DFU Specification release */ -} usb_dfu_func_desc_t; - -#define USB_DFU_FUNC_DESC_LEN 9 -#define USB_DFU_FUNC_DESC_TYPE 0x21 -#define USB_DFU_FUNC_DESC_BYTES(bmAttributes, wDetachTimeOut, wTransferSize, bcdDFUVersion) \ - USB_DFU_FUNC_DESC_LEN, /* bFunctionLength */ \ - USB_DFU_FUNC_DESC_TYPE, /* bDescriptorType */ \ - bmAttributes, \ - LE_BYTE0(wDetachTimeOut), LE_BYTE1(wDetachTimeOut), \ - LE_BYTE0(wTransferSize), LE_BYTE1(wTransferSize), \ - LE_BYTE0(bcdDFUVersion), LE_BYTE1(bcdDFUVersion) - -COMPILER_PACK_RESET() - -//! @} - -//! USB DFU Request IDs -enum usb_dfu_req { - USB_DFU_DETACH, - USB_DFU_DNLOAD, - USB_DFU_UPLOAD, - USB_DFU_GETSTATUS, - USB_DFU_CLRSTATUS, - USB_DFU_GETSTATE, - USB_DFU_ABORT, -}; - -//! USB DFU Device Status IDs -enum usb_dfu_status { - USB_DFU_STATUS_OK, - USB_DFU_STATUS_ERR_TARGET, - USB_DFU_STATUS_ERR_FILE, - USB_DFU_STATUS_ERR_WRITE, - USB_DFU_STATUS_ERR_ERASE, - USB_DFU_STATUS_ERR_CHECK_ERASED, - USB_DFU_STATUS_ERR_PROG, - USB_DFU_STATUS_ERR_VERIFY, - USB_DFU_STATUS_ERR_ADDRESS, - USB_DFU_STATUS_ERR_NOTDONE, - USB_DFU_STATUS_ERR_FIRMWARE, - USB_DFU_STATUS_ERR_VENDOR, - USB_DFU_STATUS_ERR_USBR, - USB_DFU_STATUS_ERR_POR, - USB_DFU_STATUS_ERR_UNKNOWN, - USB_DFU_STATUS_ERR_STALLEDPKT, -}; - -//! USB DFU Device State IDs -enum usb_dfu_state { - USB_DFU_STATE_APP_IDLE, - USB_DFU_STATE_APP_DETACH, - USB_DFU_STATE_DFU_IDLE, - USB_DFU_STATE_DFU_DNLOAD_SYNC, - USB_DFU_STATE_DFU_DNBUSY, - USB_DFU_STATE_DFU_DNLOAD_IDLE, - USB_DFU_STATE_DFU_MANIFEST_SYNC, - USB_DFU_STATE_DFU_MANIFEST, - USB_DFU_STATE_DFU_MANIFEST_WAIT_RESET, - USB_DFU_STATE_DFU_UPLOAD_IDLE, - USB_DFU_STATE_DFU_ERROR, -}; - -#endif // _USB_PROTOCOL_DFU_H_ diff --git a/sysmoOCTSIM/usb_dfu.h b/sysmoOCTSIM/usb_dfu.h index b447c7c..2e7e171 100644 --- a/sysmoOCTSIM/usb_dfu.h +++ b/sysmoOCTSIM/usb_dfu.h @@ -11,6 +11,7 @@ */ #include +#define USB_DFU_CLASS 0xfe #define USB_DT_DFU 0x21 @@ -30,13 +31,16 @@ #define USB_DT_DFU_SIZE 9 /* DFU class-specific requests (Section 3, DFU Rev 1.1) */ -#define USB_REQ_DFU_DETACH 0x00 -#define USB_REQ_DFU_DNLOAD 0x01 -#define USB_REQ_DFU_UPLOAD 0x02 -#define USB_REQ_DFU_GETSTATUS 0x03 -#define USB_REQ_DFU_CLRSTATUS 0x04 -#define USB_REQ_DFU_GETSTATE 0x05 -#define USB_REQ_DFU_ABORT 0x06 +enum usb_dfu_req { + USB_DFU_DETACH, + USB_DFU_DNLOAD, + USB_DFU_UPLOAD, + USB_DFU_GETSTATUS, + USB_DFU_CLRSTATUS, + USB_DFU_GETSTATE, + USB_DFU_ABORT, +}; + struct dfu_status { uint8_t bStatus; @@ -45,22 +49,24 @@ uint8_t iString; } __attribute__((packed)); -#define DFU_STATUS_OK 0x00 -#define DFU_STATUS_errTARGET 0x01 -#define DFU_STATUS_errFILE 0x02 -#define DFU_STATUS_errWRITE 0x03 -#define DFU_STATUS_errERASE 0x04 -#define DFU_STATUS_errCHECK_ERASED 0x05 -#define DFU_STATUS_errPROG 0x06 -#define DFU_STATUS_errVERIFY 0x07 -#define DFU_STATUS_errADDRESS 0x08 -#define DFU_STATUS_errNOTDONE 0x09 -#define DFU_STATUS_errFIRMWARE 0x0a -#define DFU_STATUS_errVENDOR 0x0b -#define DFU_STATUS_errUSBR 0x0c -#define DFU_STATUS_errPOR 0x0d -#define DFU_STATUS_errUNKNOWN 0x0e -#define DFU_STATUS_errSTALLEDPKT 0x0f +enum usb_dfu_status { + DFU_STATUS_OK =0x00, + DFU_STATUS_errTARGET =0x01, + DFU_STATUS_errFILE =0x02, + DFU_STATUS_errWRITE =0x03, + DFU_STATUS_errERASE =0x04, + DFU_STATUS_errCHECK_ERASED =0x05, + DFU_STATUS_errPROG =0x06, + DFU_STATUS_errVERIFY =0x07, + DFU_STATUS_errADDRESS =0x08, + DFU_STATUS_errNOTDONE =0x09, + DFU_STATUS_errFIRMWARE =0x0a, + DFU_STATUS_errVENDOR =0x0b, + DFU_STATUS_errUSBR =0x0c, + DFU_STATUS_errPOR =0x0d, + DFU_STATUS_errUNKNOWN =0x0e, + DFU_STATUS_errSTALLEDPKT =0x0f, +}; enum dfu_state { DFU_STATE_appIDLE = 0, diff --git a/sysmoOCTSIM/usb_start.h b/sysmoOCTSIM/usb_start.h index 089c58d..12537bb 100644 --- a/sysmoOCTSIM/usb_start.h +++ b/sysmoOCTSIM/usb_start.h @@ -16,7 +16,7 @@ #include "cdcdf_acm_desc.h" #include "ccid_df.h" #include "dfudf.h" -#include "dfudf_desc.h" + void usb_start(void); void cdc_device_acm_init(void); -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17037 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I689d7122872b28444b6c5343df3bac0c30f23b1d Gerrit-Change-Number: 17037 Gerrit-PatchSet: 5 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:27:34 2020 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Mon, 10 Feb 2020 10:27:34 +0000 Subject: Change in osmo-ccid-firmware[master]: dfu: proper product name for dfu runtime descriptor In-Reply-To: References: Message-ID: Hoernchen has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17056 ) Change subject: dfu: proper product name for dfu runtime descriptor ...................................................................... dfu: proper product name for dfu runtime descriptor dfu-util -l says Found Runtime: [1d50:60e3] ver=0002, devnum=72, cfg=1, intf=1, path="1-2", alt=0, name="UNKNOWN", serial="12345" Found Runtime: [1d50:6141] ver=0000, devnum=71, cfg=1, intf=3, path="1-3", alt=0, name="DFU (Runtime)", serial="6789" One is a simtrace2, one is the octsim - let's make flashing less exciting by at least telling the user which one is the octsim... Change-Id: Ifa37c63c97824ce42b3476f53626323cb40b879e --- M sysmoOCTSIM/usb_descriptors.c M sysmoOCTSIM/usb_descriptors.h 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/sysmoOCTSIM/usb_descriptors.c b/sysmoOCTSIM/usb_descriptors.c index 00d2007..7652bf6 100644 --- a/sysmoOCTSIM/usb_descriptors.c +++ b/sysmoOCTSIM/usb_descriptors.c @@ -221,7 +221,7 @@ 22, 3, 'd',0, 'e',0, 'b',0, 'u',0, 'g',0, ' ',0, 'U',0, 'A',0, 'R',0, 'T',0, 10, 3, 'C',0, 'C',0, 'I',0, 'D',0, 12, 3, 'F',0, 'I',0, 'X',0, 'M',0, 'E',0, - 28, 3, 'D',0, 'F',0, 'U',0, ' ',0, '(',0, 'R',0, 'u',0, 'n',0, 't',0, 'i',0, 'm',0, 'e',0 ,')',0, + 52, 3, 's',0, 'y',0, 's',0, 'm',0, 'o',0, 'O',0, 'C',0, 'T',0, 'S',0, 'I',0, 'M',0, ' ',0, 'D',0, 'F',0, 'U',0, ' ',0, '(',0, 'R',0, 'u',0, 'n',0, 't',0, 'i',0, 'm',0, 'e',0 ,')',0, #endif } }; diff --git a/sysmoOCTSIM/usb_descriptors.h b/sysmoOCTSIM/usb_descriptors.h index ea47d07..ba879f7 100644 --- a/sysmoOCTSIM/usb_descriptors.h +++ b/sysmoOCTSIM/usb_descriptors.h @@ -66,7 +66,7 @@ struct usb_ep_desc ep[3]; } ccid; DFURT_IF_DESCRIPTOR_STRUCT - uint8_t str[176]; + uint8_t str[200]; } __attribute__((packed)); #endif /* USB_DESCRIPTORS_H_ */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17056 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ifa37c63c97824ce42b3476f53626323cb40b879e Gerrit-Change-Number: 17056 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:28:41 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 10:28:41 +0000 Subject: Change in osmo-hlr[master]: db: fix possible SQLite3 allocated memory leak in db_open() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/17112 ) Change subject: db: fix possible SQLite3 allocated memory leak in db_open() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/17112 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ic9ed9bad3165bc4a637fe963f51e923f012e19ac Gerrit-Change-Number: 17112 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 10:28:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:28:44 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 10:28:44 +0000 Subject: Change in osmo-hlr[master]: db: fix possible SQLite3 allocated memory leak in db_open() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/17112 ) Change subject: db: fix possible SQLite3 allocated memory leak in db_open() ...................................................................... db: fix possible SQLite3 allocated memory leak in db_open() >From https://sqlite.org/c3ref/exec.html: To avoid memory leaks, the application should invoke sqlite3_free() on error message strings returned through the 5th parameter of sqlite3_exec() after the error message string is no longer needed. If the 5th parameter to sqlite3_exec() is not NULL and no errors occur, then sqlite3_exec() sets the pointer in its 5th parameter to NULL before returning. Change-Id: Ic9ed9bad3165bc4a637fe963f51e923f012e19ac Fixes: CID#208182 --- M src/db.c 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/db.c b/src/db.c index 5e5ad35..9d0c621 100644 --- a/src/db.c +++ b/src/db.c @@ -535,9 +535,11 @@ char *err_msg; rc = sqlite3_exec(dbc->db, "PRAGMA journal_mode=WAL; PRAGMA synchonous = NORMAL;", 0, 0, &err_msg); - if (rc != SQLITE_OK) + if (rc != SQLITE_OK) { LOGP(DDB, LOGL_ERROR, "Unable to set Write-Ahead Logging: %s\n", err_msg); + sqlite3_free(err_msg); + } version = db_get_user_version(dbc); if (version < 0) { -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/17112 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ic9ed9bad3165bc4a637fe963f51e923f012e19ac Gerrit-Change-Number: 17112 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:29:24 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 10:29:24 +0000 Subject: Change in osmo-pcu[master]: tbf: cosmetic: fix spacing in gprs_rlcmac_tbf::create_ul_ass() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17104 ) Change subject: tbf: cosmetic: fix spacing in gprs_rlcmac_tbf::create_ul_ass() ...................................................................... tbf: cosmetic: fix spacing in gprs_rlcmac_tbf::create_ul_ass() Change-Id: Ice4c4db20551753fa4219e7a216309229f7a2ab5 --- M src/tbf.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/tbf.cpp b/src/tbf.cpp index b852cd2..2f79a98 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1351,7 +1351,7 @@ ul_ass_state == GPRS_RLCMAC_UL_ASS_WAIT_ACK) { LOGPTBFUL(this, LOGL_DEBUG, "Polling is already scheduled, so we must wait for the uplink assignment...\n"); - return NULL; + return NULL; } rc = check_polling(fn, ts, &new_poll_fn, &rrbp); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ice4c4db20551753fa4219e7a216309229f7a2ab5 Gerrit-Change-Number: 17104 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:30:00 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 10:30:00 +0000 Subject: Change in osmo-pcu[master]: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17105 ) Change subject: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Gerrit-Change-Number: 17105 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 10:30:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:30:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 10:30:03 +0000 Subject: Change in osmo-pcu[master]: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17105 ) Change subject: tbf: fix NULL pointer dereference in create_[ul|dl]_ass() ...................................................................... tbf: fix NULL pointer dereference in create_[ul|dl]_ass() The problem is that bitvec_free() is not NULL-safe. Ideally we need to fix it in libosmocore [1], but let's also fix it here, so OsmoPCU can be safely used with older libosmocore versions. [1] https://gerrit.osmocom.org/c/libosmocore/+/17114 Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Fixes: CID#208181, CID#208179 --- M src/tbf.cpp 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/tbf.cpp b/src/tbf.cpp index 2f79a98..5e222ae 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1303,7 +1303,8 @@ return msg; free_ret: - bitvec_free(ass_vec); + if (ass_vec != NULL) + bitvec_free(ass_vec); talloc_free(mac_control_block); msgb_free(msg); return NULL; @@ -1398,7 +1399,8 @@ return msg; free_ret: - bitvec_free(ass_vec); + if (ass_vec != NULL) + bitvec_free(ass_vec); talloc_free(mac_control_block); msgb_free(msg); return NULL; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17105 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7647d17b3d03f8e193ef6e793a2d3c1967744eef Gerrit-Change-Number: 17105 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 10:30:22 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 10:30:22 +0000 Subject: Change in osmo-pcu[master]: encoding: assert return value of bitvec_set_u64() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17106 ) Change subject: encoding: assert return value of bitvec_set_u64() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17106 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic0de3ae34f06e41aacacb917f5a0214623259bdc Gerrit-Change-Number: 17106 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 10:30:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 11:25:40 2020 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 10 Feb 2020 11:25:40 +0000 Subject: Change in osmo-gsm-manuals[master]: fixup: ensure existence of $(abs_srcdir) References: Message-ID: neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/17118 ) Change subject: fixup: ensure existence of $(abs_srcdir) ...................................................................... fixup: ensure existence of $(abs_srcdir) Use $(abs_srcdir) if present, or use `realpath $(srcdir)` otherwise. Previous commit introduced using $(abs_srcdir) instead of $(srcdir), but in setups with static makefiles (osmo-nitb and osmocom-bb), there is no $(abs_srcdir) set, which in effect broke their manuals build. Change-Id: I1db85c9319c79171bbc6de2f4f8d3a9db3b11b57 --- M build/Makefile.asciidoc.inc 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/18/17118/1 diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 63c2bea..f8af7a7 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -37,7 +37,8 @@ CLEAN_FILES += $(ASCIIDOC_PDF) $(ASCIIDOC_NAME:%=%.html) UPLOAD_FILES += $(ASCIIDOC_PDF) -ASCIIDOC_OPTS := -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf -f $(BUILDDIR)/docinfo-releaseinfo.conf -a srcdir='$(abs_srcdir)' -a commondir='$(COMMONDIR)' +ABS_SRCDIR := $(or $(abs_srcdir),$(shell realpath -z $(srcdir))) +ASCIIDOC_OPTS := -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf -f $(BUILDDIR)/docinfo-releaseinfo.conf -a srcdir='$(ABS_SRCDIR)' -a commondir='$(COMMONDIR)' DBLATEX_OPTS := -s $(ASCIIDOCSTYLE) -P draft.mode=yes -P draft.watermark=0 ifeq (,$(BUILD_RELEASE)) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/17118 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I1db85c9319c79171bbc6de2f4f8d3a9db3b11b57 Gerrit-Change-Number: 17118 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 11:29:39 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 10 Feb 2020 11:29:39 +0000 Subject: Change in osmo-gsm-manuals[master]: fixup: ensure existence of $(abs_srcdir) In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/17118 ) Change subject: fixup: ensure existence of $(abs_srcdir) ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/17118 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I1db85c9319c79171bbc6de2f4f8d3a9db3b11b57 Gerrit-Change-Number: 17118 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 11:29:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 11:30:29 2020 From: gerrit-no-reply at lists.osmocom.org (neels) Date: Mon, 10 Feb 2020 11:30:29 +0000 Subject: Change in osmo-gsm-manuals[master]: fixup: ensure existence of $(abs_srcdir) In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/17118 to look at the new patch set (#2). Change subject: fixup: ensure existence of $(abs_srcdir) ...................................................................... fixup: ensure existence of $(abs_srcdir) Use $(abs_srcdir) if present, or use `realpath $(srcdir)` otherwise. Previous commit introduced using $(abs_srcdir) instead of $(srcdir), but in setups with static makefiles (osmo-nitb and osmocom-bb), there is no $(abs_srcdir) set, which in effect broke their manuals build. Change-Id: I1db85c9319c79171bbc6de2f4f8d3a9db3b11b57 --- M build/Makefile.asciidoc.inc 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/18/17118/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/17118 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I1db85c9319c79171bbc6de2f4f8d3a9db3b11b57 Gerrit-Change-Number: 17118 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 11:40:56 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 10 Feb 2020 11:40:56 +0000 Subject: Change in osmo-pcu[master]: encoding: assert return value of bitvec_set_u64() In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17106 ) Change subject: encoding: assert return value of bitvec_set_u64() ...................................................................... encoding: assert return value of bitvec_set_u64() Change-Id: Ic0de3ae34f06e41aacacb917f5a0214623259bdc Fixes: OS#182120 --- M src/encoding.cpp 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/encoding.cpp b/src/encoding.cpp index 23b35bd..a4a14dd 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -162,7 +162,8 @@ { dest->cur_bit = *write_index; - bitvec_set_u64(dest, enc_ws(ws), 5, false); + int rc = bitvec_set_u64(dest, enc_ws(ws), 5, false); + OSMO_ASSERT(rc == 0); *write_index += 5; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17106 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic0de3ae34f06e41aacacb917f5a0214623259bdc Gerrit-Change-Number: 17106 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 11:49:54 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 11:49:54 +0000 Subject: Change in osmo-gsm-manuals[master]: fixup: ensure existence of $(abs_srcdir) In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/17118 ) Change subject: fixup: ensure existence of $(abs_srcdir) ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/17118 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I1db85c9319c79171bbc6de2f4f8d3a9db3b11b57 Gerrit-Change-Number: 17118 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 11:49:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 11:49:56 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 11:49:56 +0000 Subject: Change in osmo-gsm-manuals[master]: fixup: ensure existence of $(abs_srcdir) In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/17118 ) Change subject: fixup: ensure existence of $(abs_srcdir) ...................................................................... fixup: ensure existence of $(abs_srcdir) Use $(abs_srcdir) if present, or use `realpath $(srcdir)` otherwise. Previous commit introduced using $(abs_srcdir) instead of $(srcdir), but in setups with static makefiles (osmo-nitb and osmocom-bb), there is no $(abs_srcdir) set, which in effect broke their manuals build. Change-Id: I1db85c9319c79171bbc6de2f4f8d3a9db3b11b57 --- M build/Makefile.asciidoc.inc 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 63c2bea..1b7375e 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -37,7 +37,8 @@ CLEAN_FILES += $(ASCIIDOC_PDF) $(ASCIIDOC_NAME:%=%.html) UPLOAD_FILES += $(ASCIIDOC_PDF) -ASCIIDOC_OPTS := -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf -f $(BUILDDIR)/docinfo-releaseinfo.conf -a srcdir='$(abs_srcdir)' -a commondir='$(COMMONDIR)' +ABS_SRCDIR := $(or $(abs_srcdir),$(shell realpath $(srcdir))) +ASCIIDOC_OPTS := -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf -f $(BUILDDIR)/docinfo-releaseinfo.conf -a srcdir='$(ABS_SRCDIR)' -a commondir='$(COMMONDIR)' DBLATEX_OPTS := -s $(ASCIIDOCSTYLE) -P draft.mode=yes -P draft.watermark=0 ifeq (,$(BUILD_RELEASE)) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/17118 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I1db85c9319c79171bbc6de2f4f8d3a9db3b11b57 Gerrit-Change-Number: 17118 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 11:50:27 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 11:50:27 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps/Makefile: fix ECLIPSEGIT2 clone URL In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 ) Change subject: deps/Makefile: fix ECLIPSEGIT2 clone URL ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 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: I04b690a262765f60b671225e1a5425e2750d093f Gerrit-Change-Number: 17117 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 10 Feb 2020 11:50:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 11:50:30 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 10 Feb 2020 11:50:30 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps/Makefile: fix ECLIPSEGIT2 clone URL In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 ) Change subject: deps/Makefile: fix ECLIPSEGIT2 clone URL ...................................................................... deps/Makefile: fix ECLIPSEGIT2 clone URL Switch to working clone URL, after more repositories stopped working with the old URL. Revert 865ba37553609a07f714aadfa54b91b5e6771680 ("deps: Work around disappearing eclipse.org git repositories"). Related: https://bugs.eclipse.org/bugs/show_bug.cgi?id=559943 Change-Id: I04b690a262765f60b671225e1a5425e2750d093f --- M deps/Makefile 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/deps/Makefile b/deps/Makefile index 91636af..1a13211 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -14,7 +14,7 @@ # limitations under the License. ECLIPSEGIT:=https://github.com/eclipse -ECLIPSEGIT2:=git://git.eclipse.org/gitroot/titan +ECLIPSEGIT2:=https://git.eclipse.org/r/titan OSMOGITHUB:=https://github.com/osmocom OSMOGIT:=git://git.osmocom.org @@ -53,6 +53,8 @@ titan.ProtocolModules.GTP_v13.5.0 \ titan.ProtocolModules.GTPv2_v13.7.0 \ titan.ProtocolModules.ISUP_Q.762 \ + titan.ProtocolModules.LLC_v7.1.0 \ + titan.ProtocolModules.MobileL3_v13.4.0 \ titan.ProtocolModules.NAS_EPS_15.2.0.1 \ titan.ProtocolModules.NS_v7.3.0 \ titan.ProtocolModules.SGsAP_13.2.0 \ @@ -62,9 +64,7 @@ titan.TestPorts.MTP3asp \ titan.TestPorts.UDPasp \ titan.ProtocolEmulations.M3UA \ - titan.ProtocolEmulations.SCCP \ - titan.ProtocolModules.LLC_v7.1.0 \ - titan.ProtocolModules.MobileL3_v13.4.0 + titan.ProtocolEmulations.SCCP OSMOGIT_REPOS= titan.ProtocolModules.MAP \ titan.ProtocolModules.BSSMAP \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17117 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: I04b690a262765f60b671225e1a5425e2750d093f Gerrit-Change-Number: 17117 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 23:48:52 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 10 Feb 2020 23:48:52 +0000 Subject: Change in osmo-pcu[master]: csn1: fix some mistaken CSN.1 error names References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17119 ) Change subject: csn1: fix some mistaken CSN.1 error names ...................................................................... csn1: fix some mistaken CSN.1 error names Change-Id: I3bd9954ee36212c94f0c4d91581da300c56fce60 --- M src/csn1.cpp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/19/17119/1 diff --git a/src/csn1.cpp b/src/csn1.cpp index 7e75972..01e3a43 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -103,8 +103,8 @@ { CSN_ERROR_IN_SCRIPT, "IN SCRIPT" }, { CSN_ERROR_INVALID_UNION_INDEX, "INVALID UNION INDEX" }, { CSN_ERROR_NEED_MORE_BITS_TO_UNPACK, "NEED_MORE BITS TO UNPACK" }, - { CSN_ERROR_NEED_MORE_BITS_TO_UNPACK, "ILLEGAL BIT VALUE" }, - { CSN_ERROR_ILLEGAL_BIT_VALUE, "Internal" }, + { CSN_ERROR_ILLEGAL_BIT_VALUE, "ILLEGAL BIT VALUE" }, + { CSN_ERROR_INTERNAL, "INTERNAL" }, { CSN_ERROR_STREAM_NOT_SUPPORTED, "STREAM_NOT_SUPPORTED" }, { CSN_ERROR_MESSAGE_TOO_LONG, "MESSAGE_TOO_LONG" }, { 0, NULL } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17119 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I3bd9954ee36212c94f0c4d91581da300c56fce60 Gerrit-Change-Number: 17119 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 23:48:52 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 10 Feb 2020 23:48:52 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): catch unknown CSN_CHOICE values References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17120 ) Change subject: csn1: fix csnStreamDecoder(): catch unknown CSN_CHOICE values ...................................................................... csn1: fix csnStreamDecoder(): catch unknown CSN_CHOICE values After the recent changes [1], it was noticed that one of the unit tests fails. In particular, a decode-encode cycle of Packet Polling Request produces a different vector: vector1 = 49 13 e0 08 50 88 40 13 a8 04 8b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 49 13 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : FALSE As it turns out, the original (input) vector itself is malformed because it contails no valid identity, and thus violates the specs. The CSN.1 decoder from Pycrate [2] throws an exception while trying to decode it. I believe we should do the same. Let's stop decoding the bit stream and return an error in case if neither of a given list of the choice items matched. [1] Ia0f8cc224a4c38e80699f834fd83d4c0d99322ea [2] https://github.com/P1sec/pycrate Change-Id: I420144773ed5e80372534e0f18db5e74cdb2999d Fixes: OS#4392 --- M src/csn1.cpp M tests/rlcmac/RLCMACTest.ok 2 files changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/20/17120/1 diff --git a/src/csn1.cpp b/src/csn1.cpp index 01e3a43..5928d69 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -495,6 +495,10 @@ guint8 i = 0; CSN_ChoiceElement_t* pChoice = (CSN_ChoiceElement_t*) pDescr->descr.ptr; + /* Make sure that the list of choice items is not empty */ + if (!count) + return ProcessError(readIndex, "csnStreamDecoder", CSN_ERROR_IN_SCRIPT, pDescr); + while (count > 0) { guint8 no_of_bits = pChoice->bits; @@ -537,6 +541,10 @@ i++; } + /* Neither of the choice items matched => unknown value */ + if (!count) + return ProcessError(readIndex, "csnStreamDecoder", CSN_ERROR_STREAM_NOT_SUPPORTED, pDescr); + pDescr++; break; } diff --git a/tests/rlcmac/RLCMACTest.ok b/tests/rlcmac/RLCMACTest.ok index 24ea4b7..2d27ca4 100644 --- a/tests/rlcmac/RLCMACTest.ok +++ b/tests/rlcmac/RLCMACTest.ok @@ -58,11 +58,11 @@ vector1 == vector2 : TRUE vector1 = 4913e00850884013a8048b2b2b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE (0)++++++++++ ++++++++++Finish DECODE (-8)++++++++++ =========Start ENCODE============= +++++++++Finish ENCODE (0)+++++++++++ vector1 = 49 13 e0 08 50 88 40 13 a8 04 8b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -vector2 = 49 13 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +vector2 = 49 13 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : FALSE vector1 = 412430007fffffffffffffffefd19c7ba12b2b2b2b2b2b =========Start DECODE=========== -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17120 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I420144773ed5e80372534e0f18db5e74cdb2999d Gerrit-Change-Number: 17120 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 23:48:53 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 10 Feb 2020 23:48:53 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: fix malformed test vector for Packet Polling Request References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17121 ) Change subject: tests/rlcmac: fix malformed test vector for Packet Polling Request ...................................................................... tests/rlcmac: fix malformed test vector for Packet Polling Request Change-Id: I663edfdaac0c065e08ab7b6dc50d2f18e433433c Related: OS#4392 --- M tests/rlcmac/RLCMACTest.cpp M tests/rlcmac/RLCMACTest.ok 2 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/21/17121/1 diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp index 04c06cf..6e54539 100644 --- a/tests/rlcmac/RLCMACTest.cpp +++ b/tests/rlcmac/RLCMACTest.cpp @@ -106,7 +106,7 @@ "400820001a3904df0680efb3300b2b2b2b2b2b2b2b2b2b", // Packet Downlink Assignment (EGPRS) "40284f0000001009810c826f4406809dcecb2b2b2b2b2b", // Packet Uplink Assignment (EGPRS) "4024030f2f0000000087b0042b2b2b2b2b2b2b2b2b2b2b", // Packet Uplink Ack Nack (EGPRS) - "4913e00850884013a8048b2b2b2b2b2b2b2b2b2b2b2b2b", // Polling Request? + "4913062b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b", // Polling Request? "412430007fffffffffffffffefd19c7ba12b2b2b2b2b2b", // Packet Uplink Ack Nack? "41942b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b", // System Info 13? }; diff --git a/tests/rlcmac/RLCMACTest.ok b/tests/rlcmac/RLCMACTest.ok index 2d27ca4..8529407 100644 --- a/tests/rlcmac/RLCMACTest.ok +++ b/tests/rlcmac/RLCMACTest.ok @@ -56,14 +56,14 @@ vector1 = 40 24 03 0f 2f 00 00 00 00 87 b0 04 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 40 24 03 0f 2f 00 00 00 00 87 b0 04 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : TRUE -vector1 = 4913e00850884013a8048b2b2b2b2b2b2b2b2b2b2b2b2b +vector1 = 4913062b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE (-8)++++++++++ ++++++++++Finish DECODE (0)++++++++++ =========Start ENCODE============= +++++++++Finish ENCODE (0)+++++++++++ -vector1 = 49 13 e0 08 50 88 40 13 a8 04 8b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -vector2 = 49 13 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -vector1 == vector2 : FALSE +vector1 = 49 13 06 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +vector2 = 49 13 06 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +vector1 == vector2 : TRUE vector1 = 412430007fffffffffffffffefd19c7ba12b2b2b2b2b2b =========Start DECODE=========== +++++++++Finish DECODE (0)++++++++++ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17121 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I663edfdaac0c065e08ab7b6dc50d2f18e433433c Gerrit-Change-Number: 17121 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 10 23:51:49 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 10 Feb 2020 23:51:49 +0000 Subject: Change in osmo-pcu[master]: csn1: fix some mistaken CSN.1 error names In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17119 ) Change subject: csn1: fix some mistaken CSN.1 error names ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17119 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I3bd9954ee36212c94f0c4d91581da300c56fce60 Gerrit-Change-Number: 17119 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Mon, 10 Feb 2020 23:51:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 07:26:13 2020 From: gerrit-no-reply at lists.osmocom.org (herlesupreeth) Date: Tue, 11 Feb 2020 07:26:13 +0000 Subject: Change in pysim[master]: Read USIM Service table from SIM In-Reply-To: References: Message-ID: herlesupreeth has abandoned this change. ( https://gerrit.osmocom.org/c/pysim/+/16943 ) Change subject: Read USIM Service table from SIM ...................................................................... Abandoned Parsing Service table will be addressed in another commit -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16943 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I9586f156dd43d724a73e989b4bac157d8eb8bc5d Gerrit-Change-Number: 16943 Gerrit-PatchSet: 10 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-CC: fixeria Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 07:32:08 2020 From: gerrit-no-reply at lists.osmocom.org (herlesupreeth) Date: Tue, 11 Feb 2020 07:32:08 +0000 Subject: Change in pysim[master]: Fixed MCC and MCC representation in the output of pySim-read In-Reply-To: References: Message-ID: herlesupreeth has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16944 ) Change subject: Fixed MCC and MCC representation in the output of pySim-read ...................................................................... Patch Set 6: (2 comments) https://gerrit.osmocom.org/c/pysim/+/16944/6/pySim/utils.py File pySim/utils.py: https://gerrit.osmocom.org/c/pysim/+/16944/6/pySim/utils.py at 225 PS6, Line 225: digit3 > This argument can be optional and set to 0x0f by default. i agree https://gerrit.osmocom.org/c/pysim/+/16944/6/pySim/utils.py at 230 PS6, Line 230: if digit3 == 0xF: > This condition is redundant, feel free to remove it. [?] i agree here as well. This way the number of if else condition will reduce. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16944 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie699c0a38d5ae90e4d6109e4574ce860e4044096 Gerrit-Change-Number: 16944 Gerrit-PatchSet: 6 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 11 Feb 2020 07:32:08 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 09:47:17 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 09:47:17 +0000 Subject: Change in osmo-pcu[master]: csn1: fix some mistaken CSN.1 error names In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17119 ) Change subject: csn1: fix some mistaken CSN.1 error names ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17119 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I3bd9954ee36212c94f0c4d91581da300c56fce60 Gerrit-Change-Number: 17119 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 09:47:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 09:47:51 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 09:47:51 +0000 Subject: Change in osmo-pcu[master]: csn1: fix some mistaken CSN.1 error names In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17119 ) Change subject: csn1: fix some mistaken CSN.1 error names ...................................................................... csn1: fix some mistaken CSN.1 error names Change-Id: I3bd9954ee36212c94f0c4d91581da300c56fce60 --- M src/csn1.cpp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved pespin: Looks good to me, approved diff --git a/src/csn1.cpp b/src/csn1.cpp index 7e75972..01e3a43 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -103,8 +103,8 @@ { CSN_ERROR_IN_SCRIPT, "IN SCRIPT" }, { CSN_ERROR_INVALID_UNION_INDEX, "INVALID UNION INDEX" }, { CSN_ERROR_NEED_MORE_BITS_TO_UNPACK, "NEED_MORE BITS TO UNPACK" }, - { CSN_ERROR_NEED_MORE_BITS_TO_UNPACK, "ILLEGAL BIT VALUE" }, - { CSN_ERROR_ILLEGAL_BIT_VALUE, "Internal" }, + { CSN_ERROR_ILLEGAL_BIT_VALUE, "ILLEGAL BIT VALUE" }, + { CSN_ERROR_INTERNAL, "INTERNAL" }, { CSN_ERROR_STREAM_NOT_SUPPORTED, "STREAM_NOT_SUPPORTED" }, { CSN_ERROR_MESSAGE_TOO_LONG, "MESSAGE_TOO_LONG" }, { 0, NULL } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17119 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I3bd9954ee36212c94f0c4d91581da300c56fce60 Gerrit-Change-Number: 17119 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 10:26:06 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 10:26:06 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): catch unknown CSN_CHOICE values In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17120 ) Change subject: csn1: fix csnStreamDecoder(): catch unknown CSN_CHOICE values ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17120 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I420144773ed5e80372534e0f18db5e74cdb2999d Gerrit-Change-Number: 17120 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 10:26:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 10:27:41 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 10:27:41 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: fix malformed test vector for Packet Polling Request In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17121 ) Change subject: tests/rlcmac: fix malformed test vector for Packet Polling Request ...................................................................... Patch Set 1: Code-Review-1 I think it makes sense to leave the old malformed one (marking it as so in the comment) and add the new one. You can see the old one was useful to find the issue :) You may need to move it to a new test though (one which simply tests it returns an error), since of course encoding7decoding is then gonna fail and is not correct. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17121 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I663edfdaac0c065e08ab7b6dc50d2f18e433433c Gerrit-Change-Number: 17121 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 10:27:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 10:38:56 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 10:38:56 +0000 Subject: Change in osmo-gsm-tester[master]: ttcn3: Refactor ttcn3 launching bits into a testlib In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17097 to look at the new patch set (#2). Change subject: ttcn3: Refactor ttcn3 launching bits into a testlib ...................................................................... ttcn3: Refactor ttcn3 launching bits into a testlib This way new tests can be more easily created which run some specific TTCN3 test. Change-Id: Ic61c7b7db9cf3050dc4b101ef0fb181421577424 --- A ttcn3/suites/ttcn3_bts_tests/lib/testlib.py M ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py 2 files changed, 47 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/97/17097/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ic61c7b7db9cf3050dc4b101ef0fb181421577424 Gerrit-Change-Number: 17097 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 10:41:56 2020 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 11 Feb 2020 10:41:56 +0000 Subject: Change in osmo-ccid-firmware[master]: WIP: enable timers References: Message-ID: Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17122 ) Change subject: WIP: enable timers ...................................................................... WIP: enable timers Timers are currently broken due to the wrong return value, and they are completely untested due to the octsims broken sim emu feature. Change-Id: Ib96fc5b5172c9ab9870c33545702368526d5a835 --- M sysmoOCTSIM/cuart_driver_asf4_usart_async.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/22/17122/1 diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c index 87f5123..0e83385 100644 --- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c +++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c @@ -419,7 +419,7 @@ return 20e6 / ncn8025_div_val[settings.clkdiv]; break; default: - return -EINVAL; + return 0; } return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17122 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ib96fc5b5172c9ab9870c33545702368526d5a835 Gerrit-Change-Number: 17122 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 10:56:25 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 10:56:25 +0000 Subject: Change in osmo-gsm-tester[master]: ttcn3: Refactor ttcn3 launching bits into a testlib In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17097 ) Change subject: ttcn3: Refactor ttcn3 launching bits into a testlib ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ic61c7b7db9cf3050dc4b101ef0fb181421577424 Gerrit-Change-Number: 17097 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Tue, 11 Feb 2020 10:56:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 10:56:29 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 10:56:29 +0000 Subject: Change in osmo-gsm-tester[master]: ttcn3: Allow passing ttcn3 extra module params from osmo-gsm-tester In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17115 ) Change subject: ttcn3: Allow passing ttcn3 extra module params from osmo-gsm-tester ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17115 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iaa2a5647801b4f152f72bf4b40ac79f18608df87 Gerrit-Change-Number: 17115 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 10:56:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 10:56:34 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 10:56:34 +0000 Subject: Change in osmo-gsm-tester[master]: ttcn3: Refactor ttcn3 launching bits into a testlib In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17097 ) Change subject: ttcn3: Refactor ttcn3 launching bits into a testlib ...................................................................... ttcn3: Refactor ttcn3 launching bits into a testlib This way new tests can be more easily created which run some specific TTCN3 test. Change-Id: Ic61c7b7db9cf3050dc4b101ef0fb181421577424 --- A ttcn3/suites/ttcn3_bts_tests/lib/testlib.py M ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py 2 files changed, 47 insertions(+), 36 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py b/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py new file mode 100644 index 0000000..6a2bbaa --- /dev/null +++ b/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 +import os +from mako.template import Template + +from osmo_gsm_tester.testenv import * + +def run_ttcn3(suite, test_obj, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute): + own_dir = testdir + script_file = os.path.join(testdir, 'scripts', 'run_ttcn3_docker.sh') + bts_tmpl_file = os.path.join(testdir, 'scripts', 'BTS_Tests.cfg.tmpl') + script_run_dir = test_obj.get_run_dir().new_dir('ttcn3') + bts_cfg_file = os.path.join(str(script_run_dir), 'BTS_Tests.cfg') + junit_ttcn3_dst_file = os.path.join(str(suite.trial.get_run_dir()), 'trial-') + test_obj.basename + '.xml' + if bts.bts_type() == 'osmo-bts-trx': + pcu_available = True + pcu_sk = bts.pcu_socket_path() + else: # PCU unix socket not available locally + pcu_available = False + pcu_sk = '' + docker_cmd = (script_file, str(script_run_dir), junit_ttcn3_dst_file, nat_rsl_ip, osmocon.l2_socket_path(), pcu_sk) + + print('Creating template') + mytemplate = Template(filename=bts_tmpl_file) + r = mytemplate.render(btsvty_ctrl_hostname=bts.remote_addr(), pcu_available=pcu_available, ttcn3_test_execute=ttcn3_test_execute) + with open(bts_cfg_file, 'w') as f: + f.write(r) + + + print('Starting TTCN3 test suite') + proc = process.Process('ttcn3', script_run_dir, docker_cmd) + try: + proc.launch() + print('TTCN3 test suite launched, waiting until it finishes') + proc.wait(timeout=3600) + except Exception as e: + proc.terminate() + raise e + + if proc.result != 0: + raise RuntimeError("run_ttcn3_docker.sh exited with error code %d" % proc.result) + + print('Done') diff --git a/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py b/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py index 4839052..a34c847 100755 --- a/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py +++ b/ttcn3/suites/ttcn3_bts_tests/ttcn3_bts_tests.py @@ -1,8 +1,10 @@ #!/usr/bin/env python3 import os -from mako.template import Template from osmo_gsm_tester.testenv import * +import testlib +suite.test_import_modules_register_for_cleanup(testlib) +from testlib import run_ttcn3 ttcn3_test_execute="BTS_Tests.control" @@ -43,38 +45,5 @@ print('Starting osmocon') osmocon.start() -own_dir = os.path.dirname(os.path.realpath(__file__)) -script_file = os.path.join(own_dir, 'scripts', 'run_ttcn3_docker.sh') -bts_tmpl_file = os.path.join(own_dir, 'scripts', 'BTS_Tests.cfg.tmpl') -script_run_dir = test.get_run_dir().new_dir('ttcn3') -bts_cfg_file = os.path.join(str(script_run_dir), 'BTS_Tests.cfg') -junit_ttcn3_dst_file = os.path.join(str(suite.trial.get_run_dir()), 'trial-') + suite.name() + '.xml' -if bts.bts_type() == 'osmo-bts-trx': - pcu_available = True - pcu_sk = bts.pcu_socket_path() -else: # PCU unix socket not available locally - pcu_available = False - pcu_sk = '' -docker_cmd = (script_file, str(script_run_dir), junit_ttcn3_dst_file, nat_rsl_ip, osmocon.l2_socket_path(), pcu_sk) - -print('Creating template') -mytemplate = Template(filename=bts_tmpl_file) -r = mytemplate.render(btsvty_ctrl_hostname=bts.remote_addr(), pcu_available=pcu_available, ttcn3_test_execute=ttcn3_test_execute) -with open(bts_cfg_file, 'w') as f: - f.write(r) - - -print('Starting TTCN3 tests') -proc = process.Process('ttcn3', script_run_dir, docker_cmd) -try: - proc.launch() - print('Starting TTCN3 launched, waiting until it finishes') - proc.wait(timeout=3600) -except Exception as e: - proc.terminate() - raise e - -if proc.result != 0: - raise RuntimeError("run_ttcn3_docker.sh exited with error code %d" % proc.result) - -print('Done') +testdir = os.path.dirname(os.path.realpath(__file__)) +run_ttcn3(suite, test, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ic61c7b7db9cf3050dc4b101ef0fb181421577424 Gerrit-Change-Number: 17097 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 10:56:35 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 10:56:35 +0000 Subject: Change in osmo-gsm-tester[master]: ttcn3: Allow passing ttcn3 extra module params from osmo-gsm-tester In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17115 ) Change subject: ttcn3: Allow passing ttcn3 extra module params from osmo-gsm-tester ...................................................................... ttcn3: Allow passing ttcn3 extra module params from osmo-gsm-tester Change-Id: Iaa2a5647801b4f152f72bf4b40ac79f18608df87 --- M ttcn3/suites/ttcn3_bts_tests/lib/testlib.py M ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl 2 files changed, 3 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py b/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py index 6a2bbaa..288450f 100644 --- a/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py +++ b/ttcn3/suites/ttcn3_bts_tests/lib/testlib.py @@ -4,7 +4,7 @@ from osmo_gsm_tester.testenv import * -def run_ttcn3(suite, test_obj, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute): +def run_ttcn3(suite, test_obj, testdir, bts, osmocon, nat_rsl_ip, ttcn3_test_execute, ttcn3_test_extra_module_params=""): own_dir = testdir script_file = os.path.join(testdir, 'scripts', 'run_ttcn3_docker.sh') bts_tmpl_file = os.path.join(testdir, 'scripts', 'BTS_Tests.cfg.tmpl') @@ -21,7 +21,7 @@ print('Creating template') mytemplate = Template(filename=bts_tmpl_file) - r = mytemplate.render(btsvty_ctrl_hostname=bts.remote_addr(), pcu_available=pcu_available, ttcn3_test_execute=ttcn3_test_execute) + r = mytemplate.render(btsvty_ctrl_hostname=bts.remote_addr(), pcu_available=pcu_available, ttcn3_test_execute=ttcn3_test_execute, ttcn3_test_extra_module_params=ttcn3_test_extra_module_params) with open(bts_cfg_file, 'w') as f: f.write(r) diff --git a/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl b/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl index 9ad91fe..510234e 100644 --- a/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl +++ b/ttcn3/suites/ttcn3_bts_tests/scripts/BTS_Tests.cfg.tmpl @@ -24,6 +24,7 @@ BTS_Tests.mp_trx0_arfcn := 868 BTS_Tests.mp_ipa_up_timeout := 30.0 BTS_Tests.mp_ipa_up_delay := 3.0 +${ttcn3_test_extra_module_params} [MAIN_CONTROLLER] -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17115 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iaa2a5647801b4f152f72bf4b40ac79f18608df87 Gerrit-Change-Number: 17115 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 13:47:53 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 13:47:53 +0000 Subject: Change in osmo-gsm-tester[master]: Allow passing remote env to process running in remote host References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17123 ) Change subject: Allow passing remote env to process running in remote host ...................................................................... Allow passing remote env to process running in remote host Change-Id: Icc0ae8d79ca30ed0a289b67546735251fc46cb10 --- M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/process.py M src/osmo_gsm_tester/remote.py 3 files changed, 23 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/23/17123/1 diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 78c17cc..1322a74 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -287,14 +287,14 @@ rem_host.scp('scp-cfg-to-remote', self.config_file, remote_config_file) if have_inst: - remote_lib = self.remote_inst.child('lib') + remote_env = { 'LD_LIBRARY_PATH': self.remote_inst.child('lib') } remote_binary = self.remote_inst.child('bin', self.binary_name()) args = (remote_binary, '-C', remote_config_file) else: # Use whatever is available i nremote system PATH: - remote_lib = None + remote_env = {} remote_binary = self.binary_name() args = (remote_binary, '-C', remote_config_file) - self.proc_trx = rem_host.RemoteProcessFixIgnoreSIGHUP(self.binary_name(), remote_run_dir, args, prepend_ldlibpath=remote_lib) + self.proc_trx = rem_host.RemoteProcessFixIgnoreSIGHUP(self.binary_name(), remote_run_dir, args, remote_env=remote_env) self.suite_run.remember_to_stop(self.proc_trx, keepalive) self.proc_trx.launch() diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index 1c2f592..3880630 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -353,26 +353,28 @@ class RemoteProcess(Process): - def __init__(self, name, run_dir, remote_user, remote_host, remote_cwd, popen_args, **popen_kwargs): + def __init__(self, name, run_dir, remote_user, remote_host, remote_cwd, popen_args, remote_env={}, **popen_kwargs): super().__init__(name, run_dir, popen_args, **popen_kwargs) self.remote_user = remote_user self.remote_host = remote_host self.remote_cwd = remote_cwd + self.remote_env = remote_env # hacky: instead of just prepending ssh, i.e. piping stdout and stderr # over the ssh link, we should probably run on the remote side, # monitoring the process remotely. if self.remote_cwd: - cd = 'cd "%s"; ' % self.remote_cwd + cd = 'cd "%s";' % self.remote_cwd else: cd = '' # We need double -t to force tty and be able to forward signals to # processes (SIGHUP) when we close ssh on the local side. As a result, # stderr seems to be merged into stdout in ssh client. self.popen_args = ['ssh', '-t', '-t', self.remote_user+'@'+self.remote_host, - '%s%s' % (cd, - ' '.join(self.popen_args))] - self.dbg(self.popen_args, dir=self.run_dir, conf=self.popen_kwargs) + '%s %s %s' % (cd, + ' '.join(['%s=%r'%(k,v) for k,v in self.remote_env.items()]), + ' '.join(self.popen_args))] + self.dbg(self.popen_args, dir=self.run_dir, conf=self.popen_kwargs, remote_env=self.remote_env) class NetNSProcess(Process): NETNS_EXEC_BIN = 'osmo-gsm-tester_netns_exec.sh' diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index 92dd113..6be0a5e 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -34,6 +34,7 @@ self.remote_user = remote_user self.remote_host = remote_host self.remote_cwd = remote_cwd + self.remote_env = {} def user(self): return self.remote_user @@ -44,9 +45,15 @@ def cwd(self): return self.remote_cwd - def RemoteProcess(self, name, popen_args, **popen_kwargs): + def set_remote_env(self, remote_env_dict): + self.remote_env = remote_env_dict + + def get_remote_env(self): + return self.remote_env + + def RemoteProcess(self, name, popen_args, remote_env={}, **popen_kwargs): run_dir = self.run_dir.new_dir(name) - return process.RemoteProcess(name, run_dir, self.user(), self.host(), self.cwd(), popen_args, **popen_kwargs) + return process.RemoteProcess(name, run_dir, self.user(), self.host(), self.cwd(), popen_args, remote_env=remote_env, **popen_kwargs) def generate_wrapper_script(self): wrapper_script = self.run_dir.new_file(RemoteHost.WRAPPER_SCRIPT) @@ -72,7 +79,7 @@ os.chmod(wrapper_script, st.st_mode | stat.S_IEXEC) return wrapper_script - def RemoteProcessFixIgnoreSIGHUP(self, name, remote_dir, popen_args, prepend_ldlibpath=None, **popen_kwargs): + def RemoteProcessFixIgnoreSIGHUP(self, name, remote_dir, popen_args, remote_env={}, **popen_kwargs): # Run remotely through ssh. We need to run binary under a wrapper # script since osmo-trx ignores SIGHUP and will keep running after # we close local ssh session. The wrapper script catches SIGHUP and @@ -83,15 +90,11 @@ remote_wrapper_script = remote_dir.child(RemoteHost.WRAPPER_SCRIPT) self.scp('scp-wrapper-to-remote', wrapper_script, remote_wrapper_script) - # Used fi to run stuff from an osmo-gsm-tester copied inst - if prepend_ldlibpath is not None: - args = ('LD_LIBRARY_PATH=%s' % prepend_ldlibpath, remote_wrapper_script,) + popen_args - else: - args = (remote_wrapper_script,) + popen_args - return self.RemoteProcess(name, args, **popen_kwargs) + args = (remote_wrapper_script,) + popen_args + return self.RemoteProcess(name, args, remote_env, **popen_kwargs) def run_remote_sync(self, name, popen_args): - proc = self.RemoteProcess(name, popen_args) + proc = self.RemoteProcess(name, popen_args, remote_env=self.remote_env) proc.launch_sync() return proc -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17123 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Icc0ae8d79ca30ed0a289b67546735251fc46cb10 Gerrit-Change-Number: 17123 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 13:47:59 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 13:47:59 +0000 Subject: Change in osmo-gsm-tester[master]: Add handlers to run process under a specific netns on a remote host References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17124 ) Change subject: Add handlers to run process under a specific netns on a remote host ...................................................................... Add handlers to run process under a specific netns on a remote host It will be used later to run iiperf3-cli connected to srsue on another host. Change-Id: I8d223fc302df42446f5876ba020cfbea94be09b9 --- M src/osmo_gsm_tester/process.py M src/osmo_gsm_tester/remote.py 2 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/24/17124/1 diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index 3880630..2735c6a 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -396,6 +396,12 @@ kill_cmd = ('kill', '-%d' % int(sig), str(self.process_obj.pid)) run_local_netns_sync(self.run_dir, self.name()+"-kill"+str(sig), self.netns, kill_cmd) +class RemoteNetNSProcess(RemoteProcess): + NETNS_EXEC_BIN = 'osmo-gsm-tester_netns_exec.sh' + def __init__(self, name, run_dir, remote_user, remote_host, remote_cwd, netns, popen_args, **popen_kwargs): + args = ['sudo', self.NETNS_EXEC_BIN, self.netns] + list(popen_args) + super().__init__(name, run_dir, remote_user, remote_host, remote_cwd, args, **popen_kwargs) + self.netns = netns def run_local_sync(run_dir, name, popen_args): run_dir =run_dir.new_dir(name) diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index 6be0a5e..771f2b8 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -93,6 +93,10 @@ args = (remote_wrapper_script,) + popen_args return self.RemoteProcess(name, args, remote_env, **popen_kwargs) + def RemoteNetNSProcess(self, name, netns, popen_args, **popen_kwargs): + run_dir = self.run_dir.new_dir(name) + return self.RemoteNetNSProcess(name, run_dir, self.user(), self.host(), self.cwd(), netns, popen_args, **popen_kwargs) + def run_remote_sync(self, name, popen_args): proc = self.RemoteProcess(name, popen_args, remote_env=self.remote_env) proc.launch_sync() -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17124 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I8d223fc302df42446f5876ba020cfbea94be09b9 Gerrit-Change-Number: 17124 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 13:47:59 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 13:47:59 +0000 Subject: Change in osmo-gsm-tester[master]: remote: Improve wrapper script handling proper exit of ssh-remote pro... References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17125 ) Change subject: remote: Improve wrapper script handling proper exit of ssh-remote processes ...................................................................... remote: Improve wrapper script handling proper exit of ssh-remote processes Improvements include: * Avoid race condition between receiving signal and process not yet started * Make sure process is killed with -9 if process is still alive a while after we killed it (SIGINT, SIGTERM). This is useful for processes which sometimes hang during shutdown like srsue in some conditions. Change-Id: I3c656b008a3c2b2bb453a59e51d338cb272fa50b --- M src/osmo_gsm_tester/remote.py 1 file changed, 41 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/25/17125/1 diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index 771f2b8..65c621e 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -59,20 +59,49 @@ wrapper_script = self.run_dir.new_file(RemoteHost.WRAPPER_SCRIPT) with open(wrapper_script, 'w') as f: r = """#!/bin/bash - mypid=0 - sign_handler() { - sig=$1 - echo "received signal handler $sig, killing $mypid" - kill $mypid + LOGFILE=/tmp/yes + kill_pid(){ + mypid=$1 + kill $mypid + if ! kill -0 $mypid; then + return + fi + echo "sleeping some time waiting for child to die..." >>$LOGFILE + sleep 5 + if ! kill -0 $mypid; then + return + fi + echo "kill -9 the process and wait!" >>$LOGFILE + kill -9 $mypid + wait $mypid } - trap 'sign_handler SIGTERM' SIGTERM - trap 'sign_handler SIGINT' SIGINT - trap 'sign_handler SIGHUP' SIGHUP + prep_sighandler() { + unset term_child_pid + unset term_kill_needed + trap 'sign_handler SIGTERM' SIGTERM + trap 'sign_handler SIGINT' SIGINT + trap 'sign_handler SIGHUP' SIGHUP + echo "script started, traps set" >$LOGFILE + } + sign_handler() { + sig=$1 + echo "$sig -> ${term_child_pid}" >>$LOGFILE + echo "received signal handler $sig, killing ${term_child_pid}" >>$LOGFILE + kill_pid ${term_child_pid} + } + wait_sighandler() + { + term_child_pid=$! + if [ "${term_kill_needed}" ]; then + kill_pid "${term_child_pid}" + fi + echo "waiting for ${term_child_pid}" >>$LOGFILE + wait ${term_child_pid} + echo "process ${term_child_pid} finished" >>$LOGFILE + } + prep_sighandler $@ & - mypid=$! - echo "waiting for $mypid" - wait $mypid - echo "process $mypid finished" + wait_sighandler """ f.write(r) st = os.stat(wrapper_script) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17125 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I3c656b008a3c2b2bb453a59e51d338cb272fa50b Gerrit-Change-Number: 17125 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 13:47:59 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 13:47:59 +0000 Subject: Change in osmo-gsm-tester[master]: jenkins-build-srslte: Temporarily Switch git repo to own-controlled one References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17126 ) Change subject: jenkins-build-srslte: Temporarily Switch git repo to own-controlled one ...................................................................... jenkins-build-srslte: Temporarily Switch git repo to own-controlled one During integration of the different srsLTE processes, some bugs or misbehaviors appear which require fixes in srsLTE. Let's use our own temporary fork until integration is complete and all patches are merged in upstream. Change-Id: I6414d9855cf9c004385cc280e5a60e82f8e4fbad --- M contrib/jenkins-build-srslte.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/26/17126/1 diff --git a/contrib/jenkins-build-srslte.sh b/contrib/jenkins-build-srslte.sh index 258354d..77d5bc4 100755 --- a/contrib/jenkins-build-srslte.sh +++ b/contrib/jenkins-build-srslte.sh @@ -3,7 +3,7 @@ base="$PWD" name="srslte" -git_url="https://github.com/srsLTE/" +git_url="${git_url-"https://github.com/pespin/"}" . "$(dirname "$0")/jenkins-build-common.sh" #TODO: make sure libconfig, zeroMQ is installed -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17126 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I6414d9855cf9c004385cc280e5a60e82f8e4fbad Gerrit-Change-Number: 17126 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 13:47:59 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 13:47:59 +0000 Subject: Change in osmo-gsm-tester[master]: remote: Add more helpers to operate on remote hosts References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17127 ) Change subject: remote: Add more helpers to operate on remote hosts ...................................................................... remote: Add more helpers to operate on remote hosts Change-Id: I034314839675038762e00750b069eee8fcb70a5c --- M src/osmo_gsm_tester/remote.py A utils/osmo-gsm-tester_setcap_netsys_admin.sh 2 files changed, 35 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/27/17127/1 diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index 65c621e..42a7981 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -151,3 +151,36 @@ def scp(self, name, local_path, remote_path): process.run_local_sync(self.run_dir, name, ('scp', '-r', local_path, '%s@%s:%s' % (self.user(), self.host(), remote_path))) + + def scpfrom(self, name, remote_path, local_path): + process.run_local_sync(self.run_dir, name, ('scp', '-r', '%s@%s:%s' % (self.user(), self.host(), remote_path), local_path)) + + def setcap_net_admin(self, binary_path): + ''' + This functionality requires specific setup on the host running + osmo-gsm-tester. See osmo-gsm-tester manual for more information. + ''' + SETCAP_NET_ADMIN_BIN = 'osmo-gsm-tester_setcap_net_admin.sh' + self.run_remote_sync('setcap-netadm', ('sudo', SETCAP_NET_ADMIN_BIN, binary_path)) + + def setcap_netsys_admin(self, binary_path): + ''' + This functionality requires specific setup on the host running + osmo-gsm-tester. See osmo-gsm-tester manual for more information. + ''' + SETCAP_NETSYS_ADMIN_BIN = 'osmo-gsm-tester_setcap_netsys_admin.sh' + self.run_remote_sync('setcap-netsysadm', ('sudo', SETCAP_NETSYS_ADMIN_BIN, binary_path)) + + def change_elf_rpath(self, binary_path, paths): + ''' + Change RPATH field in ELF executable binary. + This feature can be used to tell the loaded to load the trial libraries, as + LD_LIBRARY_PATH is disabled for paths with modified capabilities. + ''' + patchelf_bin = self.remote_env.get('PATCHELF_BIN', None) + if not patchelf_bin: + patchelf_bin = 'patchelf' + else: + self.dbg('Using specific patchelf from %s', patchelf_bin) + + self.run_remote_sync('patchelf', (patchelf_bin, '--set-rpath', paths, binary_path)) diff --git a/utils/osmo-gsm-tester_setcap_netsys_admin.sh b/utils/osmo-gsm-tester_setcap_netsys_admin.sh new file mode 100755 index 0000000..c432e1a --- /dev/null +++ b/utils/osmo-gsm-tester_setcap_netsys_admin.sh @@ -0,0 +1,2 @@ +#!/bin/sh +/sbin/setcap cap_net_admin,cap_sys_admin+ep "$1" -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17127 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I034314839675038762e00750b069eee8fcb70a5c Gerrit-Change-Number: 17127 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 14:25:47 2020 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 11 Feb 2020 14:25:47 +0000 Subject: Change in osmo-ccid-firmware[master]: Implement CI scripts for testing the resulting binary on hardware for... In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 ) Change subject: Implement CI scripts for testing the resulting binary on hardware for jenkins ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 Gerrit-Change-Number: 17099 Gerrit-PatchSet: 2 Gerrit-Owner: roh Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Tue, 11 Feb 2020 14:25:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 14:44:37 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 14:44:37 +0000 Subject: Change in osmo-ci[master]: gsm-tester: Manual build and install of patchelf v0.10 References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17128 ) Change subject: gsm-tester: Manual build and install of patchelf v0.10 ...................................................................... gsm-tester: Manual build and install of patchelf v0.10 Due to [1], we require both debian9 patchelf v0.9 and v0.10 to be available and used by osmo-gsm-teser depending on the binary to be patched. [1] https://github.com/NixOS/patchelf/issues/192 Related: OS#4389 Change-Id: I28825d723b85900fb51cc5b8a9d14c6ef346e667 --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 25 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/28/17128/1 diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 88f072e..0a5a838 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -129,6 +129,31 @@ tags: - ofono +# patchelf 0.9 available in debian has bugs with certain binaries. Version 0.10 +# fails on other binaries, so we need both 0.9 and 0.10 versions installed. +- name: setup patchelf v0.10 repository + git: + repo: 'https://github.com/NixOS/patchelf.git' + dest: /root/patchelf + version: "0.10" + clone: yes + update: no + tags: + - patchelf + +- name: build patchelf v0.10 + shell: | + autoreconf -fi && \ + ./configure --prefix=/opt && \ + make && \ + mkdir -p /opt/bin/ && \ + cp src/patchelf /opt/bin/patchelf-v0.10 + args: + chdir: /root/patchelf + creates: /opt/bin/patchelf-v0.10 + tags: + - patchelf + - name: install gsm tester dependencies apt: name: "{{ item }}" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17128 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I28825d723b85900fb51cc5b8a9d14c6ef346e667 Gerrit-Change-Number: 17128 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 14:48:13 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 11 Feb 2020 14:48:13 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: mark Packet Polling Request as malformed In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17121 to look at the new patch set (#2). Change subject: tests/rlcmac: mark Packet Polling Request as malformed ...................................................................... tests/rlcmac: mark Packet Polling Request as malformed It contails no valid identity, and thus violates the specs. Let's keep it 'as-is' to check that decoder actually fails. Change-Id: I663edfdaac0c065e08ab7b6dc50d2f18e433433c Related: OS#4392 --- M tests/rlcmac/RLCMACTest.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/21/17121/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17121 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I663edfdaac0c065e08ab7b6dc50d2f18e433433c Gerrit-Change-Number: 17121 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:04:53 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:04:53 +0000 Subject: Change in osmo-gsm-tester[master]: utils: Move shell script helpers to subdir References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17129 ) Change subject: utils: Move shell script helpers to subdir ...................................................................... utils: Move shell script helpers to subdir Change-Id: I86ed3b0bb779c50e57912cf6c2f1ee9fa6e5f557 --- R utils/bin/osmo-gsm-tester_netns_exec.sh R utils/bin/osmo-gsm-tester_netns_setup.sh R utils/bin/osmo-gsm-tester_setcap_net_admin.sh R utils/bin/osmo-gsm-tester_setcap_net_raw.sh R utils/bin/osmo-gsm-tester_setcap_netsys_admin.sh 5 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/29/17129/1 diff --git a/utils/osmo-gsm-tester_netns_exec.sh b/utils/bin/osmo-gsm-tester_netns_exec.sh similarity index 100% rename from utils/osmo-gsm-tester_netns_exec.sh rename to utils/bin/osmo-gsm-tester_netns_exec.sh diff --git a/utils/osmo-gsm-tester_netns_setup.sh b/utils/bin/osmo-gsm-tester_netns_setup.sh similarity index 100% rename from utils/osmo-gsm-tester_netns_setup.sh rename to utils/bin/osmo-gsm-tester_netns_setup.sh diff --git a/utils/osmo-gsm-tester_setcap_net_admin.sh b/utils/bin/osmo-gsm-tester_setcap_net_admin.sh similarity index 100% rename from utils/osmo-gsm-tester_setcap_net_admin.sh rename to utils/bin/osmo-gsm-tester_setcap_net_admin.sh diff --git a/utils/osmo-gsm-tester_setcap_net_raw.sh b/utils/bin/osmo-gsm-tester_setcap_net_raw.sh similarity index 100% rename from utils/osmo-gsm-tester_setcap_net_raw.sh rename to utils/bin/osmo-gsm-tester_setcap_net_raw.sh diff --git a/utils/osmo-gsm-tester_setcap_netsys_admin.sh b/utils/bin/osmo-gsm-tester_setcap_netsys_admin.sh similarity index 100% rename from utils/osmo-gsm-tester_setcap_netsys_admin.sh rename to utils/bin/osmo-gsm-tester_setcap_netsys_admin.sh -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17129 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I86ed3b0bb779c50e57912cf6c2f1ee9fa6e5f557 Gerrit-Change-Number: 17129 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:04:53 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:04:53 +0000 Subject: Change in osmo-gsm-tester[master]: util: Add sudoers.d/ example directory References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17130 ) Change subject: util: Add sudoers.d/ example directory ...................................................................... util: Add sudoers.d/ example directory Change-Id: Ib9ab4d88bf2fb94d04240169e0203b72616f58b0 --- A utils/sudoers.d/osmo-gsm-tester_netns_exec A utils/sudoers.d/osmo-gsm-tester_netns_setup A utils/sudoers.d/osmo-gsm-tester_setcap_net_admin A utils/sudoers.d/osmo-gsm-tester_setcap_net_raw A utils/sudoers.d/osmo-gsm-tester_setcap_netsys_admin 5 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/30/17130/1 diff --git a/utils/sudoers.d/osmo-gsm-tester_netns_exec b/utils/sudoers.d/osmo-gsm-tester_netns_exec new file mode 100644 index 0000000..6eac9f3 --- /dev/null +++ b/utils/sudoers.d/osmo-gsm-tester_netns_exec @@ -0,0 +1 @@ +%osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_netns_exec.sh diff --git a/utils/sudoers.d/osmo-gsm-tester_netns_setup b/utils/sudoers.d/osmo-gsm-tester_netns_setup new file mode 100644 index 0000000..6023d54 --- /dev/null +++ b/utils/sudoers.d/osmo-gsm-tester_netns_setup @@ -0,0 +1 @@ +%osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_netns_setup.sh diff --git a/utils/sudoers.d/osmo-gsm-tester_setcap_net_admin b/utils/sudoers.d/osmo-gsm-tester_setcap_net_admin new file mode 100644 index 0000000..5412bdd --- /dev/null +++ b/utils/sudoers.d/osmo-gsm-tester_setcap_net_admin @@ -0,0 +1 @@ +%osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_setcap_net_admin.sh diff --git a/utils/sudoers.d/osmo-gsm-tester_setcap_net_raw b/utils/sudoers.d/osmo-gsm-tester_setcap_net_raw new file mode 100644 index 0000000..2c503be --- /dev/null +++ b/utils/sudoers.d/osmo-gsm-tester_setcap_net_raw @@ -0,0 +1 @@ +%osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_setcap_net_raw.sh diff --git a/utils/sudoers.d/osmo-gsm-tester_setcap_netsys_admin b/utils/sudoers.d/osmo-gsm-tester_setcap_netsys_admin new file mode 100644 index 0000000..2f01f99 --- /dev/null +++ b/utils/sudoers.d/osmo-gsm-tester_setcap_netsys_admin @@ -0,0 +1 @@ +%osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_setcap_netsys_admin.sh -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17130 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ib9ab4d88bf2fb94d04240169e0203b72616f58b0 Gerrit-Change-Number: 17130 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:06:08 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:06:08 +0000 Subject: Change in osmo-ci[master]: gsm-tester: Install helper scripts and sudoers.d files from git repo References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17131 ) Change subject: gsm-tester: Install helper scripts and sudoers.d files from git repo ...................................................................... gsm-tester: Install helper scripts and sudoers.d files from git repo Let's avoid duplicating and having to add manually the files here every time a new helper is required by osmo-gsm-tester. Change-Id: Ibbdd291f4c3f7aecdd5118cc2b3b35edaddf7c09 --- D ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh D ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_setup.sh D ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_admin.sh D ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_raw.sh M ansible/roles/gsm-tester/tasks/main.yml 5 files changed, 27 insertions(+), 81 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/31/17131/1 diff --git a/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh b/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh deleted file mode 100755 index 336b746..0000000 --- a/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -netns="$1" -shift -#TODO: Later on I may want to call myself with specific ENV and calling sudo in order to run inside the netns but with dropped privileges -ip netns exec $netns "$@" diff --git a/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_setup.sh b/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_setup.sh deleted file mode 100755 index 1600c44..0000000 --- a/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_setup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -e - -ifname="$1" -netns="$2" -shift -shift - - - -if [ -f "/var/run/netns/${netns}" ]; then - echo "netns $netns already exists" -else - echo "Creating netns $netns" - ip netns add "$netns" -fi - -if [ -d "/sys/class/net/${ifname}" ]; then - echo "Moving iface $ifname to netns $netns" - ip link set $ifname netns $netns -else - ip netns exec $netns ls "/sys/class/net/${ifname}" >/dev/null && echo "iface $ifname already in netns $netns" -fi diff --git a/ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_admin.sh b/ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_admin.sh deleted file mode 100644 index 60e527a..0000000 --- a/ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_admin.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -/sbin/setcap cap_net_admin+ep "$1" diff --git a/ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_raw.sh b/ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_raw.sh deleted file mode 100755 index 1f3a727..0000000 --- a/ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_raw.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -/sbin/setcap cap_net_raw+ep "$1" diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 0a5a838..699102c 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -262,57 +262,35 @@ content: "@osmo-gsm-tester - rtprio 99" dest: /etc/security/limits.d/osmo-gsm-tester_rtprio.conf -- name: create a wrapper script to add CAP_NET_RAW - copy: - src: osmo-gsm-tester_setcap_net_raw.sh - dest: /usr/local/bin/osmo-gsm-tester_setcap_net_raw.sh - mode: 0755 +# patchelf 0.9 available in debian has bugs with certain binaries. Version 0.10 +# fails on other binaries, so we need both 0.9 and 0.10 versions installed. +- name: setup osmo-gsm-tester repository + git: + repo: 'https://github.com/NixOS/patchelf.git' + dest: /root/osmo-gsm-tester + version: master + clone: yes + update: no + tags: + - osmo-gsm-tester -- name: allow osmo-gsm-tester sudo osmo-gsm-tester_setcap_net_raw.sh - copy: - content: | - %osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_setcap_net_raw.sh - dest: /etc/sudoers.d/osmo-gsm-tester_setcap_net_raw - mode: 0440 +- name: Install osmo-gsm-tester script helpers to /usr/local/bin (PATH) + shell: | + mkdir -p /usr/local/bin/ && \ + cp utils/bin/*.sh /usr/local/bin/ + args: + chdir: /root/osmo-gsm-tester + tags: + - osmo-gsm-tester -- name: create a wrapper script to add CAP_NET_ADMIN - copy: - src: osmo-gsm-tester_setcap_net_admin.sh - dest: /usr/local/bin/osmo-gsm-tester_setcap_net_admin.sh - mode: 0755 - -- name: allow osmo-gsm-tester sudo osmo-gsm-tester_setcap_net_admin.sh - copy: - content: | - %osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_setcap_net_admin.sh - dest: /etc/sudoers.d/osmo-gsm-tester_setcap_net_admin - mode: 0440 - -- name: create a wrapper script to run processes on modem netns - copy: - src: osmo-gsm-tester_netns_exec.sh - dest: /usr/local/bin/osmo-gsm-tester_netns_exec.sh - mode: 0755 - -- name: allow osmo-gsm-tester sudo osmo-gsm-tester_netns_exec.sh - copy: - content: | - %osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_netns_exec.sh - dest: /etc/sudoers.d/osmo-gsm-tester_netns_exec - mode: 0440 - -- name: create a wrapper script to move modem net iface into its own netns - copy: - src: osmo-gsm-tester_netns_setup.sh - dest: /usr/local/bin/osmo-gsm-tester_netns_setup.sh - mode: 0755 - -- name: allow osmo-gsm-tester sudo osmo-gsm-tester_netns_setup.sh - copy: - content: | - %osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_netns_setup.sh - dest: /etc/sudoers.d/osmo-gsm-tester_netns_setup - mode: 0440 +- name: Install osmo-gsm-tester sudoers.d files to /etc/sudoers.d/ (PATH) + shell: | + mkdir -p /etc/sudoers.d/ && \ + cp utils/sudoers.d/* /etc/sudoers.d/ + args: + chdir: /root/osmo-gsm-tester + tags: + - osmo-gsm-tester - name: logrotate limit filesizes to 10M copy: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibbdd291f4c3f7aecdd5118cc2b3b35edaddf7c09 Gerrit-Change-Number: 17131 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:07:11 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:07:11 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: mark Packet Polling Request as malformed In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17121 ) Change subject: tests/rlcmac: mark Packet Polling Request as malformed ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17121 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I663edfdaac0c065e08ab7b6dc50d2f18e433433c Gerrit-Change-Number: 17121 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 15:07:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:08:19 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:08:19 +0000 Subject: Change in osmo-gsm-tester[master]: Allow passing remote env to process running in remote host In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17123 ) Change subject: Allow passing remote env to process running in remote host ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17123 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Icc0ae8d79ca30ed0a289b67546735251fc46cb10 Gerrit-Change-Number: 17123 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 15:08:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:08:22 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:08:22 +0000 Subject: Change in osmo-gsm-tester[master]: Add handlers to run process under a specific netns on a remote host In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17124 ) Change subject: Add handlers to run process under a specific netns on a remote host ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17124 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I8d223fc302df42446f5876ba020cfbea94be09b9 Gerrit-Change-Number: 17124 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 15:08:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:08:27 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:08:27 +0000 Subject: Change in osmo-gsm-tester[master]: remote: Improve wrapper script handling proper exit of ssh-remote pro... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17125 ) Change subject: remote: Improve wrapper script handling proper exit of ssh-remote processes ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17125 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I3c656b008a3c2b2bb453a59e51d338cb272fa50b Gerrit-Change-Number: 17125 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 15:08:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:08:31 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:08:31 +0000 Subject: Change in osmo-gsm-tester[master]: jenkins-build-srslte: Temporarily Switch git repo to own-controlled one In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17126 ) Change subject: jenkins-build-srslte: Temporarily Switch git repo to own-controlled one ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17126 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I6414d9855cf9c004385cc280e5a60e82f8e4fbad Gerrit-Change-Number: 17126 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 15:08:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:08:35 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:08:35 +0000 Subject: Change in osmo-gsm-tester[master]: remote: Add more helpers to operate on remote hosts In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17127 ) Change subject: remote: Add more helpers to operate on remote hosts ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17127 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I034314839675038762e00750b069eee8fcb70a5c Gerrit-Change-Number: 17127 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 15:08:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:08:41 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:08:41 +0000 Subject: Change in osmo-gsm-tester[master]: utils: Move shell script helpers to subdir In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17129 ) Change subject: utils: Move shell script helpers to subdir ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17129 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I86ed3b0bb779c50e57912cf6c2f1ee9fa6e5f557 Gerrit-Change-Number: 17129 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 11 Feb 2020 15:08:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:08:45 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:08:45 +0000 Subject: Change in osmo-gsm-tester[master]: util: Add sudoers.d/ example directory In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17130 ) Change subject: util: Add sudoers.d/ example directory ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17130 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ib9ab4d88bf2fb94d04240169e0203b72616f58b0 Gerrit-Change-Number: 17130 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 15:08:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:09:02 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:09:02 +0000 Subject: Change in osmo-gsm-tester[master]: Allow passing remote env to process running in remote host In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17123 ) Change subject: Allow passing remote env to process running in remote host ...................................................................... Allow passing remote env to process running in remote host Change-Id: Icc0ae8d79ca30ed0a289b67546735251fc46cb10 --- M src/osmo_gsm_tester/bts_osmotrx.py M src/osmo_gsm_tester/process.py M src/osmo_gsm_tester/remote.py 3 files changed, 23 insertions(+), 18 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/bts_osmotrx.py b/src/osmo_gsm_tester/bts_osmotrx.py index 78c17cc..1322a74 100644 --- a/src/osmo_gsm_tester/bts_osmotrx.py +++ b/src/osmo_gsm_tester/bts_osmotrx.py @@ -287,14 +287,14 @@ rem_host.scp('scp-cfg-to-remote', self.config_file, remote_config_file) if have_inst: - remote_lib = self.remote_inst.child('lib') + remote_env = { 'LD_LIBRARY_PATH': self.remote_inst.child('lib') } remote_binary = self.remote_inst.child('bin', self.binary_name()) args = (remote_binary, '-C', remote_config_file) else: # Use whatever is available i nremote system PATH: - remote_lib = None + remote_env = {} remote_binary = self.binary_name() args = (remote_binary, '-C', remote_config_file) - self.proc_trx = rem_host.RemoteProcessFixIgnoreSIGHUP(self.binary_name(), remote_run_dir, args, prepend_ldlibpath=remote_lib) + self.proc_trx = rem_host.RemoteProcessFixIgnoreSIGHUP(self.binary_name(), remote_run_dir, args, remote_env=remote_env) self.suite_run.remember_to_stop(self.proc_trx, keepalive) self.proc_trx.launch() diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index 1c2f592..3880630 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -353,26 +353,28 @@ class RemoteProcess(Process): - def __init__(self, name, run_dir, remote_user, remote_host, remote_cwd, popen_args, **popen_kwargs): + def __init__(self, name, run_dir, remote_user, remote_host, remote_cwd, popen_args, remote_env={}, **popen_kwargs): super().__init__(name, run_dir, popen_args, **popen_kwargs) self.remote_user = remote_user self.remote_host = remote_host self.remote_cwd = remote_cwd + self.remote_env = remote_env # hacky: instead of just prepending ssh, i.e. piping stdout and stderr # over the ssh link, we should probably run on the remote side, # monitoring the process remotely. if self.remote_cwd: - cd = 'cd "%s"; ' % self.remote_cwd + cd = 'cd "%s";' % self.remote_cwd else: cd = '' # We need double -t to force tty and be able to forward signals to # processes (SIGHUP) when we close ssh on the local side. As a result, # stderr seems to be merged into stdout in ssh client. self.popen_args = ['ssh', '-t', '-t', self.remote_user+'@'+self.remote_host, - '%s%s' % (cd, - ' '.join(self.popen_args))] - self.dbg(self.popen_args, dir=self.run_dir, conf=self.popen_kwargs) + '%s %s %s' % (cd, + ' '.join(['%s=%r'%(k,v) for k,v in self.remote_env.items()]), + ' '.join(self.popen_args))] + self.dbg(self.popen_args, dir=self.run_dir, conf=self.popen_kwargs, remote_env=self.remote_env) class NetNSProcess(Process): NETNS_EXEC_BIN = 'osmo-gsm-tester_netns_exec.sh' diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index 92dd113..6be0a5e 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -34,6 +34,7 @@ self.remote_user = remote_user self.remote_host = remote_host self.remote_cwd = remote_cwd + self.remote_env = {} def user(self): return self.remote_user @@ -44,9 +45,15 @@ def cwd(self): return self.remote_cwd - def RemoteProcess(self, name, popen_args, **popen_kwargs): + def set_remote_env(self, remote_env_dict): + self.remote_env = remote_env_dict + + def get_remote_env(self): + return self.remote_env + + def RemoteProcess(self, name, popen_args, remote_env={}, **popen_kwargs): run_dir = self.run_dir.new_dir(name) - return process.RemoteProcess(name, run_dir, self.user(), self.host(), self.cwd(), popen_args, **popen_kwargs) + return process.RemoteProcess(name, run_dir, self.user(), self.host(), self.cwd(), popen_args, remote_env=remote_env, **popen_kwargs) def generate_wrapper_script(self): wrapper_script = self.run_dir.new_file(RemoteHost.WRAPPER_SCRIPT) @@ -72,7 +79,7 @@ os.chmod(wrapper_script, st.st_mode | stat.S_IEXEC) return wrapper_script - def RemoteProcessFixIgnoreSIGHUP(self, name, remote_dir, popen_args, prepend_ldlibpath=None, **popen_kwargs): + def RemoteProcessFixIgnoreSIGHUP(self, name, remote_dir, popen_args, remote_env={}, **popen_kwargs): # Run remotely through ssh. We need to run binary under a wrapper # script since osmo-trx ignores SIGHUP and will keep running after # we close local ssh session. The wrapper script catches SIGHUP and @@ -83,15 +90,11 @@ remote_wrapper_script = remote_dir.child(RemoteHost.WRAPPER_SCRIPT) self.scp('scp-wrapper-to-remote', wrapper_script, remote_wrapper_script) - # Used fi to run stuff from an osmo-gsm-tester copied inst - if prepend_ldlibpath is not None: - args = ('LD_LIBRARY_PATH=%s' % prepend_ldlibpath, remote_wrapper_script,) + popen_args - else: - args = (remote_wrapper_script,) + popen_args - return self.RemoteProcess(name, args, **popen_kwargs) + args = (remote_wrapper_script,) + popen_args + return self.RemoteProcess(name, args, remote_env, **popen_kwargs) def run_remote_sync(self, name, popen_args): - proc = self.RemoteProcess(name, popen_args) + proc = self.RemoteProcess(name, popen_args, remote_env=self.remote_env) proc.launch_sync() return proc -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17123 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Icc0ae8d79ca30ed0a289b67546735251fc46cb10 Gerrit-Change-Number: 17123 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:09:02 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:09:02 +0000 Subject: Change in osmo-gsm-tester[master]: Add handlers to run process under a specific netns on a remote host In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17124 ) Change subject: Add handlers to run process under a specific netns on a remote host ...................................................................... Add handlers to run process under a specific netns on a remote host It will be used later to run iiperf3-cli connected to srsue on another host. Change-Id: I8d223fc302df42446f5876ba020cfbea94be09b9 --- M src/osmo_gsm_tester/process.py M src/osmo_gsm_tester/remote.py 2 files changed, 10 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index 3880630..2735c6a 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -396,6 +396,12 @@ kill_cmd = ('kill', '-%d' % int(sig), str(self.process_obj.pid)) run_local_netns_sync(self.run_dir, self.name()+"-kill"+str(sig), self.netns, kill_cmd) +class RemoteNetNSProcess(RemoteProcess): + NETNS_EXEC_BIN = 'osmo-gsm-tester_netns_exec.sh' + def __init__(self, name, run_dir, remote_user, remote_host, remote_cwd, netns, popen_args, **popen_kwargs): + args = ['sudo', self.NETNS_EXEC_BIN, self.netns] + list(popen_args) + super().__init__(name, run_dir, remote_user, remote_host, remote_cwd, args, **popen_kwargs) + self.netns = netns def run_local_sync(run_dir, name, popen_args): run_dir =run_dir.new_dir(name) diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index 6be0a5e..771f2b8 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -93,6 +93,10 @@ args = (remote_wrapper_script,) + popen_args return self.RemoteProcess(name, args, remote_env, **popen_kwargs) + def RemoteNetNSProcess(self, name, netns, popen_args, **popen_kwargs): + run_dir = self.run_dir.new_dir(name) + return self.RemoteNetNSProcess(name, run_dir, self.user(), self.host(), self.cwd(), netns, popen_args, **popen_kwargs) + def run_remote_sync(self, name, popen_args): proc = self.RemoteProcess(name, popen_args, remote_env=self.remote_env) proc.launch_sync() -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17124 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I8d223fc302df42446f5876ba020cfbea94be09b9 Gerrit-Change-Number: 17124 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:09:02 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:09:02 +0000 Subject: Change in osmo-gsm-tester[master]: remote: Improve wrapper script handling proper exit of ssh-remote pro... In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17125 ) Change subject: remote: Improve wrapper script handling proper exit of ssh-remote processes ...................................................................... remote: Improve wrapper script handling proper exit of ssh-remote processes Improvements include: * Avoid race condition between receiving signal and process not yet started * Make sure process is killed with -9 if process is still alive a while after we killed it (SIGINT, SIGTERM). This is useful for processes which sometimes hang during shutdown like srsue in some conditions. Change-Id: I3c656b008a3c2b2bb453a59e51d338cb272fa50b --- M src/osmo_gsm_tester/remote.py 1 file changed, 41 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index 771f2b8..65c621e 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -59,20 +59,49 @@ wrapper_script = self.run_dir.new_file(RemoteHost.WRAPPER_SCRIPT) with open(wrapper_script, 'w') as f: r = """#!/bin/bash - mypid=0 - sign_handler() { - sig=$1 - echo "received signal handler $sig, killing $mypid" - kill $mypid + LOGFILE=/tmp/yes + kill_pid(){ + mypid=$1 + kill $mypid + if ! kill -0 $mypid; then + return + fi + echo "sleeping some time waiting for child to die..." >>$LOGFILE + sleep 5 + if ! kill -0 $mypid; then + return + fi + echo "kill -9 the process and wait!" >>$LOGFILE + kill -9 $mypid + wait $mypid } - trap 'sign_handler SIGTERM' SIGTERM - trap 'sign_handler SIGINT' SIGINT - trap 'sign_handler SIGHUP' SIGHUP + prep_sighandler() { + unset term_child_pid + unset term_kill_needed + trap 'sign_handler SIGTERM' SIGTERM + trap 'sign_handler SIGINT' SIGINT + trap 'sign_handler SIGHUP' SIGHUP + echo "script started, traps set" >$LOGFILE + } + sign_handler() { + sig=$1 + echo "$sig -> ${term_child_pid}" >>$LOGFILE + echo "received signal handler $sig, killing ${term_child_pid}" >>$LOGFILE + kill_pid ${term_child_pid} + } + wait_sighandler() + { + term_child_pid=$! + if [ "${term_kill_needed}" ]; then + kill_pid "${term_child_pid}" + fi + echo "waiting for ${term_child_pid}" >>$LOGFILE + wait ${term_child_pid} + echo "process ${term_child_pid} finished" >>$LOGFILE + } + prep_sighandler $@ & - mypid=$! - echo "waiting for $mypid" - wait $mypid - echo "process $mypid finished" + wait_sighandler """ f.write(r) st = os.stat(wrapper_script) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17125 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I3c656b008a3c2b2bb453a59e51d338cb272fa50b Gerrit-Change-Number: 17125 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:09:04 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:09:04 +0000 Subject: Change in osmo-gsm-tester[master]: jenkins-build-srslte: Temporarily Switch git repo to own-controlled one In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17126 ) Change subject: jenkins-build-srslte: Temporarily Switch git repo to own-controlled one ...................................................................... jenkins-build-srslte: Temporarily Switch git repo to own-controlled one During integration of the different srsLTE processes, some bugs or misbehaviors appear which require fixes in srsLTE. Let's use our own temporary fork until integration is complete and all patches are merged in upstream. Change-Id: I6414d9855cf9c004385cc280e5a60e82f8e4fbad --- M contrib/jenkins-build-srslte.sh 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/contrib/jenkins-build-srslte.sh b/contrib/jenkins-build-srslte.sh index 258354d..77d5bc4 100755 --- a/contrib/jenkins-build-srslte.sh +++ b/contrib/jenkins-build-srslte.sh @@ -3,7 +3,7 @@ base="$PWD" name="srslte" -git_url="https://github.com/srsLTE/" +git_url="${git_url-"https://github.com/pespin/"}" . "$(dirname "$0")/jenkins-build-common.sh" #TODO: make sure libconfig, zeroMQ is installed -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17126 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I6414d9855cf9c004385cc280e5a60e82f8e4fbad Gerrit-Change-Number: 17126 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:09:04 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:09:04 +0000 Subject: Change in osmo-gsm-tester[master]: remote: Add more helpers to operate on remote hosts In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17127 ) Change subject: remote: Add more helpers to operate on remote hosts ...................................................................... remote: Add more helpers to operate on remote hosts Change-Id: I034314839675038762e00750b069eee8fcb70a5c --- M src/osmo_gsm_tester/remote.py A utils/osmo-gsm-tester_setcap_netsys_admin.sh 2 files changed, 35 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index 65c621e..42a7981 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -151,3 +151,36 @@ def scp(self, name, local_path, remote_path): process.run_local_sync(self.run_dir, name, ('scp', '-r', local_path, '%s@%s:%s' % (self.user(), self.host(), remote_path))) + + def scpfrom(self, name, remote_path, local_path): + process.run_local_sync(self.run_dir, name, ('scp', '-r', '%s@%s:%s' % (self.user(), self.host(), remote_path), local_path)) + + def setcap_net_admin(self, binary_path): + ''' + This functionality requires specific setup on the host running + osmo-gsm-tester. See osmo-gsm-tester manual for more information. + ''' + SETCAP_NET_ADMIN_BIN = 'osmo-gsm-tester_setcap_net_admin.sh' + self.run_remote_sync('setcap-netadm', ('sudo', SETCAP_NET_ADMIN_BIN, binary_path)) + + def setcap_netsys_admin(self, binary_path): + ''' + This functionality requires specific setup on the host running + osmo-gsm-tester. See osmo-gsm-tester manual for more information. + ''' + SETCAP_NETSYS_ADMIN_BIN = 'osmo-gsm-tester_setcap_netsys_admin.sh' + self.run_remote_sync('setcap-netsysadm', ('sudo', SETCAP_NETSYS_ADMIN_BIN, binary_path)) + + def change_elf_rpath(self, binary_path, paths): + ''' + Change RPATH field in ELF executable binary. + This feature can be used to tell the loaded to load the trial libraries, as + LD_LIBRARY_PATH is disabled for paths with modified capabilities. + ''' + patchelf_bin = self.remote_env.get('PATCHELF_BIN', None) + if not patchelf_bin: + patchelf_bin = 'patchelf' + else: + self.dbg('Using specific patchelf from %s', patchelf_bin) + + self.run_remote_sync('patchelf', (patchelf_bin, '--set-rpath', paths, binary_path)) diff --git a/utils/osmo-gsm-tester_setcap_netsys_admin.sh b/utils/osmo-gsm-tester_setcap_netsys_admin.sh new file mode 100755 index 0000000..c432e1a --- /dev/null +++ b/utils/osmo-gsm-tester_setcap_netsys_admin.sh @@ -0,0 +1,2 @@ +#!/bin/sh +/sbin/setcap cap_net_admin,cap_sys_admin+ep "$1" -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17127 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I034314839675038762e00750b069eee8fcb70a5c Gerrit-Change-Number: 17127 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:41:29 2020 From: gerrit-no-reply at lists.osmocom.org (roh) Date: Tue, 11 Feb 2020 15:41:29 +0000 Subject: Change in osmo-ccid-firmware[master]: Implement CI scripts for testing the resulting binary on hardware for... In-Reply-To: References: Message-ID: Hello Jenkins Builder, Hoernchen, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 to look at the new patch set (#3). Change subject: Implement CI scripts for testing the resulting binary on hardware for jenkins ...................................................................... Implement CI scripts for testing the resulting binary on hardware for jenkins Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 --- A tests/run-tests A tests/sysmo-octsim/01_check_rig.out A tests/sysmo-octsim/01_check_rig.sh A tests/sysmo-octsim/02_flash_dfu.out A tests/sysmo-octsim/02_flash_dfu.sh A tests/sysmo-octsim/03_check_lsusb.out A tests/sysmo-octsim/03_check_lsusb.sh A tests/sysmo-octsim/04_check_dfu_lsusb.out A tests/sysmo-octsim/04_check_dfu_lsusb.sh A tests/sysmo-octsim/README A tests/sysmo-octsim/ctl_reset_target.sh A tests/sysmo-octsim/ctl_reset_to_dfu.sh A tests/sysmo-octsim/fetch_image.sh A tests/sysmo-octsim/flash_octsim_dfu.sh A tests/sysmo-octsim/get_installed_version.sh A tests/sysmo-octsim/prepare A tests/sysmo-octsim/regen A tests/sysmo-octsim/run-tests A tests/sysmo-octsim/test-data 19 files changed, 499 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/99/17099/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 Gerrit-Change-Number: 17099 Gerrit-PatchSet: 3 Gerrit-Owner: roh Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:54:14 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:54:14 +0000 Subject: Change in osmo-gsm-tester[master]: utils: Move shell script helpers to subdir In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17129 ) Change subject: utils: Move shell script helpers to subdir ...................................................................... utils: Move shell script helpers to subdir Change-Id: I86ed3b0bb779c50e57912cf6c2f1ee9fa6e5f557 --- R utils/bin/osmo-gsm-tester_netns_exec.sh R utils/bin/osmo-gsm-tester_netns_setup.sh R utils/bin/osmo-gsm-tester_setcap_net_admin.sh R utils/bin/osmo-gsm-tester_setcap_net_raw.sh R utils/bin/osmo-gsm-tester_setcap_netsys_admin.sh 5 files changed, 0 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/utils/osmo-gsm-tester_netns_exec.sh b/utils/bin/osmo-gsm-tester_netns_exec.sh similarity index 100% rename from utils/osmo-gsm-tester_netns_exec.sh rename to utils/bin/osmo-gsm-tester_netns_exec.sh diff --git a/utils/osmo-gsm-tester_netns_setup.sh b/utils/bin/osmo-gsm-tester_netns_setup.sh similarity index 100% rename from utils/osmo-gsm-tester_netns_setup.sh rename to utils/bin/osmo-gsm-tester_netns_setup.sh diff --git a/utils/osmo-gsm-tester_setcap_net_admin.sh b/utils/bin/osmo-gsm-tester_setcap_net_admin.sh similarity index 100% rename from utils/osmo-gsm-tester_setcap_net_admin.sh rename to utils/bin/osmo-gsm-tester_setcap_net_admin.sh diff --git a/utils/osmo-gsm-tester_setcap_net_raw.sh b/utils/bin/osmo-gsm-tester_setcap_net_raw.sh similarity index 100% rename from utils/osmo-gsm-tester_setcap_net_raw.sh rename to utils/bin/osmo-gsm-tester_setcap_net_raw.sh diff --git a/utils/osmo-gsm-tester_setcap_netsys_admin.sh b/utils/bin/osmo-gsm-tester_setcap_netsys_admin.sh similarity index 100% rename from utils/osmo-gsm-tester_setcap_netsys_admin.sh rename to utils/bin/osmo-gsm-tester_setcap_netsys_admin.sh -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17129 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I86ed3b0bb779c50e57912cf6c2f1ee9fa6e5f557 Gerrit-Change-Number: 17129 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 15:54:15 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 15:54:15 +0000 Subject: Change in osmo-gsm-tester[master]: util: Add sudoers.d/ example directory In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17130 ) Change subject: util: Add sudoers.d/ example directory ...................................................................... util: Add sudoers.d/ example directory Change-Id: Ib9ab4d88bf2fb94d04240169e0203b72616f58b0 --- A utils/sudoers.d/osmo-gsm-tester_netns_exec A utils/sudoers.d/osmo-gsm-tester_netns_setup A utils/sudoers.d/osmo-gsm-tester_setcap_net_admin A utils/sudoers.d/osmo-gsm-tester_setcap_net_raw A utils/sudoers.d/osmo-gsm-tester_setcap_netsys_admin 5 files changed, 5 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/utils/sudoers.d/osmo-gsm-tester_netns_exec b/utils/sudoers.d/osmo-gsm-tester_netns_exec new file mode 100644 index 0000000..6eac9f3 --- /dev/null +++ b/utils/sudoers.d/osmo-gsm-tester_netns_exec @@ -0,0 +1 @@ +%osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_netns_exec.sh diff --git a/utils/sudoers.d/osmo-gsm-tester_netns_setup b/utils/sudoers.d/osmo-gsm-tester_netns_setup new file mode 100644 index 0000000..6023d54 --- /dev/null +++ b/utils/sudoers.d/osmo-gsm-tester_netns_setup @@ -0,0 +1 @@ +%osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_netns_setup.sh diff --git a/utils/sudoers.d/osmo-gsm-tester_setcap_net_admin b/utils/sudoers.d/osmo-gsm-tester_setcap_net_admin new file mode 100644 index 0000000..5412bdd --- /dev/null +++ b/utils/sudoers.d/osmo-gsm-tester_setcap_net_admin @@ -0,0 +1 @@ +%osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_setcap_net_admin.sh diff --git a/utils/sudoers.d/osmo-gsm-tester_setcap_net_raw b/utils/sudoers.d/osmo-gsm-tester_setcap_net_raw new file mode 100644 index 0000000..2c503be --- /dev/null +++ b/utils/sudoers.d/osmo-gsm-tester_setcap_net_raw @@ -0,0 +1 @@ +%osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_setcap_net_raw.sh diff --git a/utils/sudoers.d/osmo-gsm-tester_setcap_netsys_admin b/utils/sudoers.d/osmo-gsm-tester_setcap_netsys_admin new file mode 100644 index 0000000..2f01f99 --- /dev/null +++ b/utils/sudoers.d/osmo-gsm-tester_setcap_netsys_admin @@ -0,0 +1 @@ +%osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_setcap_netsys_admin.sh -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17130 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ib9ab4d88bf2fb94d04240169e0203b72616f58b0 Gerrit-Change-Number: 17130 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 16:35:34 2020 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 11 Feb 2020 16:35:34 +0000 Subject: Change in osmo-ccid-firmware[master]: Implement CI scripts for testing the resulting binary on hardware for... In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 ) Change subject: Implement CI scripts for testing the resulting binary on hardware for jenkins ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 Gerrit-Change-Number: 17099 Gerrit-PatchSet: 3 Gerrit-Owner: roh Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Tue, 11 Feb 2020 16:35:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 16:47:50 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 16:47:50 +0000 Subject: Change in osmo-gsm-tester[master]: Inroduce RunNode class References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17132 ) Change subject: Inroduce RunNode class ...................................................................... Inroduce RunNode class This class will be used to hold information for a run node, that is, a target system or environment were a process or task is run. It superseeds in functionality the old ip_address resource, which will eventually be droped in favor of RunNode. Change-Id: I647bedf116aa9a570d925a5281c9491c9032e343 --- M src/osmo_gsm_tester/resource.py A src/osmo_gsm_tester/run_node.py M src/osmo_gsm_tester/suite.py 3 files changed, 79 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/32/17132/1 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 992734d..0cdcb8a 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -40,14 +40,19 @@ RESERVED_RESOURCES_FILE = 'reserved_resources.state' R_IP_ADDRESS = 'ip_address' +R_RUN_NODE = 'run_node' R_BTS = 'bts' R_ARFCN = 'arfcn' R_MODEM = 'modem' R_OSMOCON = 'osmocon_phone' -R_ALL = (R_IP_ADDRESS, R_BTS, R_ARFCN, R_MODEM, R_OSMOCON) +R_ALL = (R_IP_ADDRESS, R_RUN_NODE, R_BTS, R_ARFCN, R_MODEM, R_OSMOCON) RESOURCES_SCHEMA = { 'ip_address[].addr': schema.IPV4, + 'run_node[].run_type': schema.STR, + 'run_node[].run_addr': schema.IPV4, + 'run_node[].ssh_user': schema.STR, + 'run_node[].ssh_addr': schema.IPV4, 'bts[].label': schema.STR, 'bts[].type': schema.STR, 'bts[].ipa_unit_id': schema.UINT, diff --git a/src/osmo_gsm_tester/run_node.py b/src/osmo_gsm_tester/run_node.py new file mode 100644 index 0000000..88555a6 --- /dev/null +++ b/src/osmo_gsm_tester/run_node.py @@ -0,0 +1,69 @@ +# osmo_gsm_tester: run_node: object holding information on a target env to run stuff. +# +# Copyright (C) 2020 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +from . import log + +class RunNode(log.Origin): + + T_LOCAL = 'local' + T_REM_SSH = 'ssh' + + def __init__(self, type=None, run_addr=None, ssh_user=None, ssh_addr=None): + super().__init__(log.C_RUN, 'runnode') + self._type = type + self._run_addr = run_addr + self._ssh_user = ssh_user + self._ssh_addr = ssh_addr + if not self._type: + raise log.Error('run_type not set') + if not self._run_addr: + raise log.Error('run_addr not set') + if self._type == RunNode.T_LOCAL and (self._ssh_user or self._ssh_addr): + raise log.Error('run_type=%s but ssh info set' % RunNode.T_LOCAL) + if self._type == RunNode.T_REM_SSH and not (self._ssh_user and self._ssh_addr): + raise log.Error('run_type=%s but ssh info NOT set' % RunNode.T_LOCAL) + + if self._type == RunNode.T_LOCAL: + self.set_name('run-' + self._run_addr) + else: + self.set_name('run-' + self._run_addr + "(" + self._ssh_user + '@' + self._ssh_addr + ")") + + @classmethod + def from_conf(cls, conf): + return cls(conf.get('run_type', None), conf.get('run_addr', None), conf.get('ssh_user', None), conf.get('ssh_addr', None)) + + def is_local(self): + return self._type == RunNode.T_LOCAL + + def __str__(self): + return self.name() + + def run_type(self): + return self._type + + def run_addr(self): + return self._run_addr + + def ssh_user(self): + return self._ssh_user + + def ssh_addr(self): + return self._ssh_addr + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 0738e96..457bfb3 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -24,6 +24,7 @@ from . import config, log, util, resource, test from .event_loop import MainLoop from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, osmo_sgsn, esme, osmocon, ms_driver, iperf3, process +from . import run_node class Timeout(Exception): pass @@ -358,6 +359,9 @@ self.register_for_cleanup(esme_obj) return esme_obj + def run_node(self, specifics=None): + return run_node.RunNode.from_conf(self.reserved_resources.get(resource.R_RUN_NODE, specifics=specifics)) + def osmocon(self, specifics=None): conf = self.reserved_resources.get(resource.R_OSMOCON, specifics=specifics) osmocon_obj = osmocon.Osmocon(self, conf=conf) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17132 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I647bedf116aa9a570d925a5281c9491c9032e343 Gerrit-Change-Number: 17132 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 16:47:51 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 16:47:51 +0000 Subject: Change in osmo-gsm-tester[master]: util: Add helper setcap_netsys_admin() References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17133 ) Change subject: util: Add helper setcap_netsys_admin() ...................................................................... util: Add helper setcap_netsys_admin() This API was already added for RemoteHost but forgot to add it too for local systems. It will be used by srsue once support for it is added. Change-Id: I734e910af90fd25bed27c24b60346064b5fde67e --- M src/osmo_gsm_tester/util.py 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/33/17133/1 diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index b0ce041..de37078 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -100,6 +100,16 @@ proc = Process(SETCAP_NET_ADMIN_BIN, run_dir, ['sudo', SETCAP_NET_ADMIN_BIN, binary]) proc.launch_sync() +def setcap_netsys_admin(self, binary, run_dir): + ''' + This functionality requires specific setup on the host running + osmo-gsm-tester. See osmo-gsm-tester manual for more information. + ''' + from .process import Process + SETCAP_NETSYS_ADMIN_BIN = 'osmo-gsm-tester_setcap_netsys_admin.sh' + proc = Process(SETCAP_NETSYS_ADMIN_BIN, run_dir, ['sudo', SETCAP_NETSYS_ADMIN_BIN, binary]) + proc.launch_sync() + def move_iface_to_netns(ifname, netns, run_dir): ''' Moves an iface to a netns. It creates the netns if it doesn't exist. -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17133 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I734e910af90fd25bed27c24b60346064b5fde67e Gerrit-Change-Number: 17133 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 16:47:52 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 16:47:52 +0000 Subject: Change in osmo-gsm-tester[master]: iperf3: Support running iperf3 remotely References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17134 ) Change subject: iperf3: Support running iperf3 remotely ...................................................................... iperf3: Support running iperf3 remotely The new RunNode class is used and ip_address support will be dropped eventually, replaced by the former. Change-Id: Ib803d7774cb502c7d07443d7720a7b013684faa8 --- M src/osmo_gsm_tester/iperf3.py 1 file changed, 103 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/34/17134/1 diff --git a/src/osmo_gsm_tester/iperf3.py b/src/osmo_gsm_tester/iperf3.py index 55cb546..2038daa 100644 --- a/src/osmo_gsm_tester/iperf3.py +++ b/src/osmo_gsm_tester/iperf3.py @@ -20,7 +20,7 @@ import os import json -from . import log, util, process, pcap_recorder +from . import log, util, process, pcap_recorder, run_node, remote def iperf3_result_to_json(file): with open(file) as f: @@ -35,32 +35,77 @@ class IPerf3Server(log.Origin): DEFAULT_SRV_PORT = 5003 + LOGFILE = 'iperf3_srv.json' + REMOTE_DIR = '/tmp' def __init__(self, suite_run, ip_address): super().__init__(log.C_RUN, 'iperf3-srv_%s' % ip_address.get('addr')) self.run_dir = None - self.config_file = None self.process = None + self._run_node = None self.suite_run = suite_run self.ip_address = ip_address self._port = IPerf3Server.DEFAULT_SRV_PORT + self.log_file = None + self.rem_host = None + self.remote_log_file = None + self.log_copied = False + + def cleanup(self): + if self.process is None: + return + if self.runs_locally(): + return + # copy back files (may not exist, for instance if there was an early error of process): + try: + self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file) + except Exception as e: + self.log(repr(e)) + + def runs_locally(self): + locally = not self._run_node or self._run_node.is_local() + return locally def start(self): self.log('Starting iperf3-srv') + self.log_copied = False self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.log_file = self.run_dir.new_file(IPerf3Server.LOGFILE) + if self.runs_locally(): + self.start_locally() + else: + self.start_remotely() + def start_remotely(self): + self.rem_host = remote.RemoteHost(self.run_dir, self._run_node.ssh_user(), self._run_node.ssh_addr()) + remote_prefix_dir = util.Dir(IPerf3Server.REMOTE_DIR) + remote_run_dir = util.Dir(remote_prefix_dir.child('srv-' + str(self))) + self.remote_log_file = remote_run_dir.child(IPerf3Server.LOGFILE) + + self.rem_host.recreate_remote_dir(remote_run_dir) + + args = ('iperf3', '-s', '-B', self.addr(), + '-p', str(self._port), '-J', + '--logfile', self.remote_log_file) + self.process = self.rem_host.RemoteProcess(self.name(), args) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def start_locally(self): pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) - self.log_file = self.run_dir.new_file('iperf3_srv.json') - self.process = process.Process(self.name(), self.run_dir, - ('iperf3', '-s', '-B', self.addr(), - '-p', str(self._port), '-J', - '--logfile', os.path.abspath(self.log_file)), - env={}) + args = ('iperf3', '-s', '-B', self.addr(), + '-p', str(self._port), '-J', + '--logfile', os.path.abspath(self.log_file)) + + self.process = process.Process(self.name(), self.run_dir, args, env={}) self.suite_run.remember_to_stop(self.process) self.process.launch() + def set_run_node(self, run_node): + self._run_node = run_node + def set_port(self, port): self._port = port @@ -68,6 +113,9 @@ self.suite_run.stop_process(self.process) def get_results(self): + if not self.runs_locally() and not self.log_copied: + self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file) + self.log_copied = True return iperf3_result_to_json(self.log_file) def addr(self): @@ -87,22 +135,57 @@ class IPerf3Client(log.Origin): + REMOTE_DIR = '/tmp' + LOGFILE = 'iperf3_cli.json' + def __init__(self, suite_run, iperf3srv): super().__init__(log.C_RUN, 'iperf3-cli_%s' % iperf3srv.addr()) self.run_dir = None - self.config_file = None self.process = None + self._run_node = None self.server = iperf3srv self.suite_run = suite_run + self.log_file = None + self.rem_host = None + self.remote_log_file = None + self.log_copied = False + + def runs_locally(self): + locally = not self._run_node or self._run_node.is_local() + return locally def prepare_test_proc(self, netns=None): self.log('Starting iperf3-client connecting to %s:%d' % (self.server.addr(), self.server.port())) + self.log_copied = False self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.log_file = self.run_dir.new_file(IPerf3Client.LOGFILE) + if self.runs_locally(): + return self.prepare_test_proc_locally() + else: + return self.prepare_test_proc_remotely() + def prepare_test_proc_remotely(self, netns=None): + self.rem_host = remote.RemoteHost(self.run_dir, self._run_node.ssh_user(), self._run_node.ssh_addr()) + + remote_prefix_dir = util.Dir(IPerf3Client.REMOTE_DIR) + remote_run_dir = util.Dir(remote_prefix_dir.child('cli-' + str(self))) + self.remote_log_file = remote_run_dir.child(IPerf3Client.LOGFILE) + + self.rem_host.recreate_remote_dir(remote_run_dir) + + popen_args = ('iperf3', '-c', self.server.addr(), + '-p', str(self.server.port()), '-J', + '--logfile', self.remote_log_file) + if netns: + self.process = self.rem_host.RemoteNetNSProcess(self.name(), netns, popen_args, env={}) + else: + self.process = self.rem_host.RemoteProcess(self.name(), popen_args, env={}) + return self.process + + def prepare_test_proc_locally(self, netns=None): pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.server.addr(), netns) - self.log_file = self.run_dir.new_file('iperf3_cli.json') popen_args = ('iperf3', '-c', self.server.addr(), '-p', str(self.server.port()), '-J', '--logfile', os.path.abspath(self.log_file)) @@ -118,6 +201,16 @@ return self.get_results() def get_results(self): + if not self.runs_locally() and not self.log_copied: + self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file) + self.log_copied = True return iperf3_result_to_json(self.log_file) + def set_run_node(self, run_node): + self._run_node = run_node + + def __str__(self): + # FIXME: somehow differentiate between several clients connected to same server? + return "%s:%u" %(self.server.addr(), self.server.port()) + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17134 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ib803d7774cb502c7d07443d7720a7b013684faa8 Gerrit-Change-Number: 17134 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 17:49:29 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 17:49:29 +0000 Subject: Change in osmo-gsm-tester[master]: Inroduce RunNode class In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17132 ) Change subject: Inroduce RunNode class ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17132 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I647bedf116aa9a570d925a5281c9491c9032e343 Gerrit-Change-Number: 17132 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 17:49:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 17:49:31 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 17:49:31 +0000 Subject: Change in osmo-gsm-tester[master]: util: Add helper setcap_netsys_admin() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17133 ) Change subject: util: Add helper setcap_netsys_admin() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17133 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I734e910af90fd25bed27c24b60346064b5fde67e Gerrit-Change-Number: 17133 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 17:49:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 17:49:32 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 17:49:32 +0000 Subject: Change in osmo-gsm-tester[master]: iperf3: Support running iperf3 remotely In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17134 ) Change subject: iperf3: Support running iperf3 remotely ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17134 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ib803d7774cb502c7d07443d7720a7b013684faa8 Gerrit-Change-Number: 17134 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 17:49:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 17:49:37 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 17:49:37 +0000 Subject: Change in osmo-gsm-tester[master]: Inroduce RunNode class In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17132 ) Change subject: Inroduce RunNode class ...................................................................... Inroduce RunNode class This class will be used to hold information for a run node, that is, a target system or environment were a process or task is run. It superseeds in functionality the old ip_address resource, which will eventually be droped in favor of RunNode. Change-Id: I647bedf116aa9a570d925a5281c9491c9032e343 --- M src/osmo_gsm_tester/resource.py A src/osmo_gsm_tester/run_node.py M src/osmo_gsm_tester/suite.py 3 files changed, 79 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 992734d..0cdcb8a 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -40,14 +40,19 @@ RESERVED_RESOURCES_FILE = 'reserved_resources.state' R_IP_ADDRESS = 'ip_address' +R_RUN_NODE = 'run_node' R_BTS = 'bts' R_ARFCN = 'arfcn' R_MODEM = 'modem' R_OSMOCON = 'osmocon_phone' -R_ALL = (R_IP_ADDRESS, R_BTS, R_ARFCN, R_MODEM, R_OSMOCON) +R_ALL = (R_IP_ADDRESS, R_RUN_NODE, R_BTS, R_ARFCN, R_MODEM, R_OSMOCON) RESOURCES_SCHEMA = { 'ip_address[].addr': schema.IPV4, + 'run_node[].run_type': schema.STR, + 'run_node[].run_addr': schema.IPV4, + 'run_node[].ssh_user': schema.STR, + 'run_node[].ssh_addr': schema.IPV4, 'bts[].label': schema.STR, 'bts[].type': schema.STR, 'bts[].ipa_unit_id': schema.UINT, diff --git a/src/osmo_gsm_tester/run_node.py b/src/osmo_gsm_tester/run_node.py new file mode 100644 index 0000000..88555a6 --- /dev/null +++ b/src/osmo_gsm_tester/run_node.py @@ -0,0 +1,69 @@ +# osmo_gsm_tester: run_node: object holding information on a target env to run stuff. +# +# Copyright (C) 2020 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +from . import log + +class RunNode(log.Origin): + + T_LOCAL = 'local' + T_REM_SSH = 'ssh' + + def __init__(self, type=None, run_addr=None, ssh_user=None, ssh_addr=None): + super().__init__(log.C_RUN, 'runnode') + self._type = type + self._run_addr = run_addr + self._ssh_user = ssh_user + self._ssh_addr = ssh_addr + if not self._type: + raise log.Error('run_type not set') + if not self._run_addr: + raise log.Error('run_addr not set') + if self._type == RunNode.T_LOCAL and (self._ssh_user or self._ssh_addr): + raise log.Error('run_type=%s but ssh info set' % RunNode.T_LOCAL) + if self._type == RunNode.T_REM_SSH and not (self._ssh_user and self._ssh_addr): + raise log.Error('run_type=%s but ssh info NOT set' % RunNode.T_LOCAL) + + if self._type == RunNode.T_LOCAL: + self.set_name('run-' + self._run_addr) + else: + self.set_name('run-' + self._run_addr + "(" + self._ssh_user + '@' + self._ssh_addr + ")") + + @classmethod + def from_conf(cls, conf): + return cls(conf.get('run_type', None), conf.get('run_addr', None), conf.get('ssh_user', None), conf.get('ssh_addr', None)) + + def is_local(self): + return self._type == RunNode.T_LOCAL + + def __str__(self): + return self.name() + + def run_type(self): + return self._type + + def run_addr(self): + return self._run_addr + + def ssh_user(self): + return self._ssh_user + + def ssh_addr(self): + return self._ssh_addr + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 0738e96..457bfb3 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -24,6 +24,7 @@ from . import config, log, util, resource, test from .event_loop import MainLoop from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, osmo_sgsn, esme, osmocon, ms_driver, iperf3, process +from . import run_node class Timeout(Exception): pass @@ -358,6 +359,9 @@ self.register_for_cleanup(esme_obj) return esme_obj + def run_node(self, specifics=None): + return run_node.RunNode.from_conf(self.reserved_resources.get(resource.R_RUN_NODE, specifics=specifics)) + def osmocon(self, specifics=None): conf = self.reserved_resources.get(resource.R_OSMOCON, specifics=specifics) osmocon_obj = osmocon.Osmocon(self, conf=conf) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17132 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I647bedf116aa9a570d925a5281c9491c9032e343 Gerrit-Change-Number: 17132 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 17:49:38 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 17:49:38 +0000 Subject: Change in osmo-gsm-tester[master]: util: Add helper setcap_netsys_admin() In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17133 ) Change subject: util: Add helper setcap_netsys_admin() ...................................................................... util: Add helper setcap_netsys_admin() This API was already added for RemoteHost but forgot to add it too for local systems. It will be used by srsue once support for it is added. Change-Id: I734e910af90fd25bed27c24b60346064b5fde67e --- M src/osmo_gsm_tester/util.py 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index b0ce041..de37078 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -100,6 +100,16 @@ proc = Process(SETCAP_NET_ADMIN_BIN, run_dir, ['sudo', SETCAP_NET_ADMIN_BIN, binary]) proc.launch_sync() +def setcap_netsys_admin(self, binary, run_dir): + ''' + This functionality requires specific setup on the host running + osmo-gsm-tester. See osmo-gsm-tester manual for more information. + ''' + from .process import Process + SETCAP_NETSYS_ADMIN_BIN = 'osmo-gsm-tester_setcap_netsys_admin.sh' + proc = Process(SETCAP_NETSYS_ADMIN_BIN, run_dir, ['sudo', SETCAP_NETSYS_ADMIN_BIN, binary]) + proc.launch_sync() + def move_iface_to_netns(ifname, netns, run_dir): ''' Moves an iface to a netns. It creates the netns if it doesn't exist. -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17133 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I734e910af90fd25bed27c24b60346064b5fde67e Gerrit-Change-Number: 17133 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 17:49:39 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 17:49:39 +0000 Subject: Change in osmo-gsm-tester[master]: iperf3: Support running iperf3 remotely In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17134 ) Change subject: iperf3: Support running iperf3 remotely ...................................................................... iperf3: Support running iperf3 remotely The new RunNode class is used and ip_address support will be dropped eventually, replaced by the former. Change-Id: Ib803d7774cb502c7d07443d7720a7b013684faa8 --- M src/osmo_gsm_tester/iperf3.py 1 file changed, 103 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/iperf3.py b/src/osmo_gsm_tester/iperf3.py index 55cb546..2038daa 100644 --- a/src/osmo_gsm_tester/iperf3.py +++ b/src/osmo_gsm_tester/iperf3.py @@ -20,7 +20,7 @@ import os import json -from . import log, util, process, pcap_recorder +from . import log, util, process, pcap_recorder, run_node, remote def iperf3_result_to_json(file): with open(file) as f: @@ -35,32 +35,77 @@ class IPerf3Server(log.Origin): DEFAULT_SRV_PORT = 5003 + LOGFILE = 'iperf3_srv.json' + REMOTE_DIR = '/tmp' def __init__(self, suite_run, ip_address): super().__init__(log.C_RUN, 'iperf3-srv_%s' % ip_address.get('addr')) self.run_dir = None - self.config_file = None self.process = None + self._run_node = None self.suite_run = suite_run self.ip_address = ip_address self._port = IPerf3Server.DEFAULT_SRV_PORT + self.log_file = None + self.rem_host = None + self.remote_log_file = None + self.log_copied = False + + def cleanup(self): + if self.process is None: + return + if self.runs_locally(): + return + # copy back files (may not exist, for instance if there was an early error of process): + try: + self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file) + except Exception as e: + self.log(repr(e)) + + def runs_locally(self): + locally = not self._run_node or self._run_node.is_local() + return locally def start(self): self.log('Starting iperf3-srv') + self.log_copied = False self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.log_file = self.run_dir.new_file(IPerf3Server.LOGFILE) + if self.runs_locally(): + self.start_locally() + else: + self.start_remotely() + def start_remotely(self): + self.rem_host = remote.RemoteHost(self.run_dir, self._run_node.ssh_user(), self._run_node.ssh_addr()) + remote_prefix_dir = util.Dir(IPerf3Server.REMOTE_DIR) + remote_run_dir = util.Dir(remote_prefix_dir.child('srv-' + str(self))) + self.remote_log_file = remote_run_dir.child(IPerf3Server.LOGFILE) + + self.rem_host.recreate_remote_dir(remote_run_dir) + + args = ('iperf3', '-s', '-B', self.addr(), + '-p', str(self._port), '-J', + '--logfile', self.remote_log_file) + self.process = self.rem_host.RemoteProcess(self.name(), args) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def start_locally(self): pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.addr()) - self.log_file = self.run_dir.new_file('iperf3_srv.json') - self.process = process.Process(self.name(), self.run_dir, - ('iperf3', '-s', '-B', self.addr(), - '-p', str(self._port), '-J', - '--logfile', os.path.abspath(self.log_file)), - env={}) + args = ('iperf3', '-s', '-B', self.addr(), + '-p', str(self._port), '-J', + '--logfile', os.path.abspath(self.log_file)) + + self.process = process.Process(self.name(), self.run_dir, args, env={}) self.suite_run.remember_to_stop(self.process) self.process.launch() + def set_run_node(self, run_node): + self._run_node = run_node + def set_port(self, port): self._port = port @@ -68,6 +113,9 @@ self.suite_run.stop_process(self.process) def get_results(self): + if not self.runs_locally() and not self.log_copied: + self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file) + self.log_copied = True return iperf3_result_to_json(self.log_file) def addr(self): @@ -87,22 +135,57 @@ class IPerf3Client(log.Origin): + REMOTE_DIR = '/tmp' + LOGFILE = 'iperf3_cli.json' + def __init__(self, suite_run, iperf3srv): super().__init__(log.C_RUN, 'iperf3-cli_%s' % iperf3srv.addr()) self.run_dir = None - self.config_file = None self.process = None + self._run_node = None self.server = iperf3srv self.suite_run = suite_run + self.log_file = None + self.rem_host = None + self.remote_log_file = None + self.log_copied = False + + def runs_locally(self): + locally = not self._run_node or self._run_node.is_local() + return locally def prepare_test_proc(self, netns=None): self.log('Starting iperf3-client connecting to %s:%d' % (self.server.addr(), self.server.port())) + self.log_copied = False self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.log_file = self.run_dir.new_file(IPerf3Client.LOGFILE) + if self.runs_locally(): + return self.prepare_test_proc_locally() + else: + return self.prepare_test_proc_remotely() + def prepare_test_proc_remotely(self, netns=None): + self.rem_host = remote.RemoteHost(self.run_dir, self._run_node.ssh_user(), self._run_node.ssh_addr()) + + remote_prefix_dir = util.Dir(IPerf3Client.REMOTE_DIR) + remote_run_dir = util.Dir(remote_prefix_dir.child('cli-' + str(self))) + self.remote_log_file = remote_run_dir.child(IPerf3Client.LOGFILE) + + self.rem_host.recreate_remote_dir(remote_run_dir) + + popen_args = ('iperf3', '-c', self.server.addr(), + '-p', str(self.server.port()), '-J', + '--logfile', self.remote_log_file) + if netns: + self.process = self.rem_host.RemoteNetNSProcess(self.name(), netns, popen_args, env={}) + else: + self.process = self.rem_host.RemoteProcess(self.name(), popen_args, env={}) + return self.process + + def prepare_test_proc_locally(self, netns=None): pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.server.addr(), netns) - self.log_file = self.run_dir.new_file('iperf3_cli.json') popen_args = ('iperf3', '-c', self.server.addr(), '-p', str(self.server.port()), '-J', '--logfile', os.path.abspath(self.log_file)) @@ -118,6 +201,16 @@ return self.get_results() def get_results(self): + if not self.runs_locally() and not self.log_copied: + self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file) + self.log_copied = True return iperf3_result_to_json(self.log_file) + def set_run_node(self, run_node): + self._run_node = run_node + + def __str__(self): + # FIXME: somehow differentiate between several clients connected to same server? + return "%s:%u" %(self.server.addr(), self.server.port()) + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17134 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ib803d7774cb502c7d07443d7720a7b013684faa8 Gerrit-Change-Number: 17134 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 18:13:01 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 18:13:01 +0000 Subject: Change in osmo-ci[master]: gsm-tester: Install helper scripts and sudoers.d files from git repo In-Reply-To: References: Message-ID: pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-ci/+/17131 ) Change subject: gsm-tester: Install helper scripts and sudoers.d files from git repo ...................................................................... gsm-tester: Install helper scripts and sudoers.d files from git repo Let's avoid duplicating and having to add manually the files here every time a new helper is required by osmo-gsm-tester. Change-Id: Ibbdd291f4c3f7aecdd5118cc2b3b35edaddf7c09 --- D ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh D ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_setup.sh D ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_admin.sh D ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_raw.sh M ansible/roles/gsm-tester/tasks/main.yml 5 files changed, 25 insertions(+), 81 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/31/17131/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibbdd291f4c3f7aecdd5118cc2b3b35edaddf7c09 Gerrit-Change-Number: 17131 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 18:16:43 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 11 Feb 2020 18:16:43 +0000 Subject: Change in osmo-gsm-tester[master]: Fix remote and process RemoteNetNSProcess References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17135 ) Change subject: Fix remote and process RemoteNetNSProcess ...................................................................... Fix remote and process RemoteNetNSProcess Change-Id: Icdc917968a1310e287dd98994420519a605be9c0 --- M src/osmo_gsm_tester/process.py M src/osmo_gsm_tester/remote.py 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/35/17135/1 diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index 2735c6a..f399b29 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -399,9 +399,9 @@ class RemoteNetNSProcess(RemoteProcess): NETNS_EXEC_BIN = 'osmo-gsm-tester_netns_exec.sh' def __init__(self, name, run_dir, remote_user, remote_host, remote_cwd, netns, popen_args, **popen_kwargs): + self.netns = netns args = ['sudo', self.NETNS_EXEC_BIN, self.netns] + list(popen_args) super().__init__(name, run_dir, remote_user, remote_host, remote_cwd, args, **popen_kwargs) - self.netns = netns def run_local_sync(run_dir, name, popen_args): run_dir =run_dir.new_dir(name) diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index 42a7981..bd657c0 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -124,7 +124,7 @@ def RemoteNetNSProcess(self, name, netns, popen_args, **popen_kwargs): run_dir = self.run_dir.new_dir(name) - return self.RemoteNetNSProcess(name, run_dir, self.user(), self.host(), self.cwd(), netns, popen_args, **popen_kwargs) + return process.RemoteNetNSProcess(name, run_dir, self.user(), self.host(), self.cwd(), netns, popen_args, **popen_kwargs) def run_remote_sync(self, name, popen_args): proc = self.RemoteProcess(name, popen_args, remote_env=self.remote_env) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17135 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Icdc917968a1310e287dd98994420519a605be9c0 Gerrit-Change-Number: 17135 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 21:03:18 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 11 Feb 2020 21:03:18 +0000 Subject: Change in libosmocore[master]: bitvec: make bitvec_free() safe against NULL In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17114 ) Change subject: bitvec: make bitvec_free() safe against NULL ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17114 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ifafb65e9d0adc286e16104274db440f38a86d800 Gerrit-Change-Number: 17114 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 11 Feb 2020 21:03:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 11 21:03:26 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 11 Feb 2020 21:03:26 +0000 Subject: Change in libosmocore[master]: bitvec: make bitvec_free() safe against NULL In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17114 ) Change subject: bitvec: make bitvec_free() safe against NULL ...................................................................... bitvec: make bitvec_free() safe against NULL Change-Id: Ifafb65e9d0adc286e16104274db440f38a86d800 Related: CID#208181, CID#208179 --- M src/bitvec.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/src/bitvec.c b/src/bitvec.c index ef8621c..5130705 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -418,6 +418,8 @@ * \param[in] bit vector to free */ void bitvec_free(struct bitvec *bv) { + if (bv == NULL) + return; talloc_free(bv->data); talloc_free(bv); } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17114 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ifafb65e9d0adc286e16104274db440f38a86d800 Gerrit-Change-Number: 17114 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 12 13:30:45 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 12 Feb 2020 13:30:45 +0000 Subject: Change in osmo-bts[master]: l1_if: Fix strange formatting of Meas info logging References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17136 ) Change subject: l1_if: Fix strange formatting of Meas info logging ...................................................................... l1_if: Fix strange formatting of Meas info logging Some use LOGPC, but were used after a LOGP with a trailing newline. Let's simply add some defines/macros to be able to include it into a normal LOGP easily insted of having a function. Change-Id: Ie082b11c9d6d00ff2206184f03f6e3647c3da18c --- M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-oc2g/l1_if.c M src/osmo-bts-octphy/l1_if.c M src/osmo-bts-sysmo/l1_if.c 4 files changed, 27 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/36/17136/1 diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index d7e0cde..989cc10 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -936,12 +936,8 @@ goto tx; } -static void dump_meas_res(int ll, GsmL1_MeasParam_t *m) -{ - LOGPC(DL1C, ll, ", Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, " - "BER %-3.2f, Timing %d\n", m->fRssi, m->fLinkQuality, - m->fBer, m->i16BurstTiming); -} +#define LOG_FMT_MEAS "Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, BER %-3.2f, Timing %d" +#define LOG_PARAM_MEAS(meas_param) (meas_param)->fRssi, (meas_param)->fLinkQuality, (meas_param)->fBer, (meas_param)->i16BurstTiming static int process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr, GsmL1_MeasParam_t *m, uint32_t fn) @@ -992,10 +988,10 @@ process_meas_res(trx, chan_nr, &data_ind->measParam, fn); - DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s\n", + DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s, " LOG_FMT_MEAS "\n", get_value_string(lc15bts_l1sapi_names, data_ind->sapi), (uint32_t)data_ind->hLayer2, - osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size)); - dump_meas_res(LOGL_DEBUG, &data_ind->measParam); + osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size), + LOG_PARAM_MEAS(&data_ind->measParam)); /* check for TCH */ if (data_ind->sapi == GsmL1_Sapi_TchF @@ -1046,7 +1042,8 @@ struct ph_rach_ind_param rach_ind_param; set_log_ctx_sapi(ra_ind->sapi); - dump_meas_res(LOGL_DEBUG, &ra_ind->measParam); + LOGPFN(DL1C, LOGL_DEBUG, ra_ind->u32Fn, "Rx PH-RA.ind, " LOG_FMT_MEAS "\n", + LOG_PARAM_MEAS(&ra_ind->measParam)); if ((ra_ind->msgUnitParam.u8Size != 1) && (ra_ind->msgUnitParam.u8Size != 2)) { diff --git a/src/osmo-bts-oc2g/l1_if.c b/src/osmo-bts-oc2g/l1_if.c index 425fd0d..9816979 100644 --- a/src/osmo-bts-oc2g/l1_if.c +++ b/src/osmo-bts-oc2g/l1_if.c @@ -992,12 +992,9 @@ goto tx; } -static void dump_meas_res(int ll, GsmL1_MeasParam_t *m) -{ - LOGPC(DL1C, ll, ", Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, " - "BER %-3.2f, Timing %d\n", m->fRssi, m->fLinkQuality, - m->fBer, m->i16BurstTiming); -} + +#define LOG_FMT_MEAS "Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, BER %-3.2f, Timing %d" +#define LOG_PARAM_MEAS(meas_param) (meas_param)->fRssi, (meas_param)->fLinkQuality, (meas_param)->fBer, (meas_param)->i16BurstTiming static int process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr, GsmL1_MeasParam_t *m, uint32_t fn) @@ -1048,10 +1045,10 @@ process_meas_res(trx, chan_nr, &data_ind->measParam, fn); - DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s\n", + DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s, " LOG_FMT_MEAS "\n", get_value_string(oc2gbts_l1sapi_names, data_ind->sapi), (uint32_t)data_ind->hLayer2, - osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size)); - dump_meas_res(LOGL_DEBUG, &data_ind->measParam); + osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size), + LOG_PARAM_MEAS(&data_ind->measParam)); /* check for TCH */ if (data_ind->sapi == GsmL1_Sapi_TchF @@ -1102,7 +1099,8 @@ struct ph_rach_ind_param rach_ind_param; set_log_ctx_sapi(ra_ind->sapi); - dump_meas_res(LOGL_DEBUG, &ra_ind->measParam); + LOGPFN(DL1C, LOGL_DEBUG, ra_ind->u32Fn, "Rx PH-RA.ind, " LOG_FMT_MEAS "\n", + LOG_PARAM_MEAS(&ra_ind->measParam)); if ((ra_ind->msgUnitParam.u8Size != 1) && (ra_ind->msgUnitParam.u8Size != 2)) { diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index 8f06b34..bdf85ca 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -906,14 +906,9 @@ l1sap_up(trx, &l1sap); } -static void dump_meas_res(int ll, tOCTVC1_GSM_MEASUREMENT_INFO * m) -{ - LOGP(DMEAS, ll, - "Meas: RSSI %d dBm, Burst Timing %d Quarter of bits :%d, " - "BER Error Count %d , BER Toatal Bit count %d in last decoded frame\n", - m->sRSSIDbm, m->sBurstTiming, m->sBurstTiming4x, m->usBERCnt, - m->usBERTotalBitCnt); -} + +#define LOG_FMT_MEAS "Meas: RSSI %d dBm, Burst Timing %d Quarter of bits: %d, BER Error Count %d, BER Toatal Bit count %d in last decoded frame" +#define LOG_PARAM_MEAS(meas_param) (meas_param)->sRSSIDbm, (meas_param)->sBurstTiming, (meas_param)->sBurstTiming4x, (meas_param)->usBERCnt, (meas_param)->usBERTotalBitCnt static int handle_mph_time_ind(struct octphy_hdl *fl1, uint8_t trx_id, uint32_t fn) { @@ -1218,7 +1213,8 @@ set_log_ctx_sapi(ra_ind->LchId.bySAPI); - dump_meas_res(LOGL_DEBUG, &ra_ind->MeasurementInfo); + LOGPFN(DL1C, LOGL_DEBUG, ra_ind->ulFrameNumber, "Rx PH-RA.ind, " LOG_FMT_MEAS "\n", + LOG_PARAM_MEAS(&ra_ind->MeasurementInfo)); if (ra_ind->ulMsgLength != 1) { LOGPFN(DL1C, LOGL_ERROR, ra_ind->ulFrameNumber, diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 199d8bd..db0dfb5 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -937,12 +937,8 @@ goto tx; } -static void dump_meas_res(int ll, GsmL1_MeasParam_t *m) -{ - LOGPC(DL1C, ll, ", Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, " - "BER %-3.2f, Timing %d\n", m->fRssi, m->fLinkQuality, - m->fBer, m->i16BurstTiming); -} +#define LOG_FMT_MEAS "Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, BER %-3.2f, Timing %d" +#define LOG_PARAM_MEAS(meas_param) (meas_param)->fRssi, (meas_param)->fLinkQuality, (meas_param)->fBer, (meas_param)->i16BurstTiming static int process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr, uint32_t fn, GsmL1_MeasParam_t *m) @@ -991,10 +987,10 @@ gsm_fn2gsmtime(&g_time, fn); - DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s\n", + DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s, " LOG_FMT_MEAS "\n", get_value_string(femtobts_l1sapi_names, data_ind->sapi), data_ind->hLayer2, - osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size)); - dump_meas_res(LOGL_DEBUG, &data_ind->measParam); + osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size), + LOG_PARAM_MEAS(&data_ind->measParam)); /* check for TCH */ if (data_ind->sapi == GsmL1_Sapi_TchF @@ -1040,8 +1036,8 @@ struct ph_rach_ind_param rach_ind_param; set_log_ctx_sapi(ra_ind->sapi); - - dump_meas_res(LOGL_DEBUG, &ra_ind->measParam); + LOGPFN(DL1C, LOGL_DEBUG, ra_ind->u32Fn, "Rx PH-RA.ind, " LOG_FMT_MEAS "\n", + LOG_PARAM_MEAS(&ra_ind->measParam)); if ((ra_ind->msgUnitParam.u8Size != 1) && (ra_ind->msgUnitParam.u8Size != 2)) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17136 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ie082b11c9d6d00ff2206184f03f6e3647c3da18c Gerrit-Change-Number: 17136 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 12 13:36:12 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 12 Feb 2020 13:36:12 +0000 Subject: Change in osmo-gsm-tester[master]: Fix remote and process RemoteNetNSProcess In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17135 ) Change subject: Fix remote and process RemoteNetNSProcess ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17135 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Icdc917968a1310e287dd98994420519a605be9c0 Gerrit-Change-Number: 17135 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 12 Feb 2020 13:36:12 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 12 13:36:15 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 12 Feb 2020 13:36:15 +0000 Subject: Change in osmo-gsm-tester[master]: Fix remote and process RemoteNetNSProcess In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17135 ) Change subject: Fix remote and process RemoteNetNSProcess ...................................................................... Fix remote and process RemoteNetNSProcess Change-Id: Icdc917968a1310e287dd98994420519a605be9c0 --- M src/osmo_gsm_tester/process.py M src/osmo_gsm_tester/remote.py 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/process.py b/src/osmo_gsm_tester/process.py index 2735c6a..f399b29 100644 --- a/src/osmo_gsm_tester/process.py +++ b/src/osmo_gsm_tester/process.py @@ -399,9 +399,9 @@ class RemoteNetNSProcess(RemoteProcess): NETNS_EXEC_BIN = 'osmo-gsm-tester_netns_exec.sh' def __init__(self, name, run_dir, remote_user, remote_host, remote_cwd, netns, popen_args, **popen_kwargs): + self.netns = netns args = ['sudo', self.NETNS_EXEC_BIN, self.netns] + list(popen_args) super().__init__(name, run_dir, remote_user, remote_host, remote_cwd, args, **popen_kwargs) - self.netns = netns def run_local_sync(run_dir, name, popen_args): run_dir =run_dir.new_dir(name) diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index 42a7981..bd657c0 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -124,7 +124,7 @@ def RemoteNetNSProcess(self, name, netns, popen_args, **popen_kwargs): run_dir = self.run_dir.new_dir(name) - return self.RemoteNetNSProcess(name, run_dir, self.user(), self.host(), self.cwd(), netns, popen_args, **popen_kwargs) + return process.RemoteNetNSProcess(name, run_dir, self.user(), self.host(), self.cwd(), netns, popen_args, **popen_kwargs) def run_remote_sync(self, name, popen_args): proc = self.RemoteProcess(name, popen_args, remote_env=self.remote_env) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17135 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Icdc917968a1310e287dd98994420519a605be9c0 Gerrit-Change-Number: 17135 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 12 15:02:23 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 12 Feb 2020 15:02:23 +0000 Subject: Change in osmo-bts[master]: l1sap: Change loglevel of Rx TCH.ind INFO->DEBUG References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17137 ) Change subject: l1sap: Change loglevel of Rx TCH.ind INFO->DEBUG ...................................................................... l1sap: Change loglevel of Rx TCH.ind INFO->DEBUG This line appears tens of times per second when a call is ongoing, making it impossible to follow logs on INFO level. Change-Id: Iadb1baf55df2f6d96f85260f2e8d03627fef7e66 --- M src/common/l1sap.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/37/17137/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 21f3a8a..0b51045 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1369,7 +1369,7 @@ gsm_fn2gsmtime(&g_time, fn); - LOGPGT(DL1P, LOGL_INFO, &g_time, "Rx TCH.ind chan_nr=%s\n", rsl_chan_nr_str(chan_nr)); + LOGPGT(DL1P, LOGL_DEBUG, &g_time, "Rx TCH.ind chan_nr=%s\n", rsl_chan_nr_str(chan_nr)); lchan = get_active_lchan_by_chan_nr(trx, chan_nr); if (!lchan) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iadb1baf55df2f6d96f85260f2e8d03627fef7e66 Gerrit-Change-Number: 17137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 12 15:38:42 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 12 Feb 2020 15:38:42 +0000 Subject: Change in osmo-bsc[master]: bssap: Avoid logging error if no optional Global Call Ref IE received References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/17138 ) Change subject: bssap: Avoid logging error if no optional Global Call Ref IE received ...................................................................... bssap: Avoid logging error if no optional Global Call Ref IE received Also take the chance to simplify related code and print erroneous IE data. Change-Id: I27ee9c6112f96d6839b8b6141888ac8fe377db65 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 14 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/38/17138/1 diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 74faae1..1ba490f 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -568,20 +568,24 @@ static void bssmap_handle_ass_req_lcls(struct gsm_subscriber_connection *conn, const struct tlv_parsed *tp) { - const uint8_t *config, *control, *gcr, gcr_len = TLVP_LEN(tp, GSM0808_IE_GLOBAL_CALL_REF); + const uint8_t *config, *control, *gcr; + uint8_t gcr_len; - if (gcr_len > sizeof(conn->lcls.global_call_ref)) - LOGPFSML(conn->fi, LOGL_ERROR, "Global Call Ref IE of %u bytes is too long\n", - gcr_len); - else { - gcr = TLVP_VAL_MINLEN(tp, GSM0808_IE_GLOBAL_CALL_REF, 13); - if (gcr) { + /* TS 48.008 sec 3.2.2.115 Global Call Reference */ + if (TLVP_PRESENT(tp, GSM0808_IE_GLOBAL_CALL_REF)) { + gcr = TLVP_VAL(tp, GSM0808_IE_GLOBAL_CALL_REF); + gcr_len = TLVP_LEN(tp, GSM0808_IE_GLOBAL_CALL_REF); + if (gcr_len > sizeof(conn->lcls.global_call_ref)) { + LOGPFSML(conn->fi, LOGL_ERROR, "Global Call Ref IE of %u bytes is too long: %s\n", + gcr_len, osmo_hexdump_nospc(gcr, gcr_len)); + } else if (gcr_len < 13) { /* FIXME: document this magic value 13 */ + LOGPFSML(conn->fi, LOGL_ERROR, "Global Call Ref IE of %u bytes is too short: %s\n", + gcr_len, osmo_hexdump_nospc(gcr, gcr_len)); + } else { LOGPFSM(conn->fi, "Setting GCR to %s\n", osmo_hexdump_nospc(gcr, gcr_len)); memcpy(&conn->lcls.global_call_ref, gcr, gcr_len); conn->lcls.global_call_ref_len = gcr_len; - } else - LOGPFSML(conn->fi, LOGL_ERROR, "Global Call Ref IE of %u bytes is too short\n", - gcr_len); + } } config = TLVP_VAL_MINLEN(tp, GSM0808_IE_LCLS_CONFIG, 1); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/17138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I27ee9c6112f96d6839b8b6141888ac8fe377db65 Gerrit-Change-Number: 17138 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 12 16:55:59 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 12 Feb 2020 16:55:59 +0000 Subject: Change in osmo-gsm-tester[master]: WIP: Initial srsLTE support References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17139 ) Change subject: WIP: Initial srsLTE support ...................................................................... WIP: Initial srsLTE support Change-Id: I290c0d79258a9f94f00c7ff2e1c6c5579c0e32f4 --- M example/resources.conf.prod M src/osmo_gsm_tester/resource.py A src/osmo_gsm_tester/srs_enb.py A src/osmo_gsm_tester/srs_epc.py A src/osmo_gsm_tester/srs_ue.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/templates/srsenb.conf.tmpl A src/osmo_gsm_tester/templates/srsenb_drb.conf.tmpl A src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl A src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl A src/osmo_gsm_tester/templates/srsepc.conf.tmpl A src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl A src/osmo_gsm_tester/templates/srsue.conf.tmpl A suites/4g/iperf3.py D suites/4g/mo_mt_sms.py A suites/4g/ping.py M suites/4g/suite.conf 17 files changed, 1,747 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/39/17139/1 diff --git a/example/resources.conf.prod b/example/resources.conf.prod index 6de4e2e..82ff516 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -11,6 +11,12 @@ - addr: 10.42.42.9 - addr: 10.42.42.10 +run_node: +- run_type: ssh + run_addr: 10.42.42.118 + ssh_user: jenkins + ssh_addr: 10.42.42.116 + bts: - label: sysmoBTS 1002 type: osmo-bts-sysmo @@ -149,6 +155,13 @@ direct_pcu: true ciphers: [a5_0, a5_1, a5_3] +enb: +- label: srsENB-zmq + type: srsenb + remote_user: jenkins + addr: 10.42.42.117 + band: GSM-900 + arfcn: - arfcn: 512 band: GSM-1800 @@ -228,5 +241,17 @@ ciphers: [a5_0, a5_1] features: ['sms', 'voice', 'ussd', 'gprs', 'sim'] +- label: srsUE-zmq_1 + type: srsue + remote_user: jenkins + addr: 10.42.42.116 + imsi: '001010123456789' + ki: '00112233445566778899aabbccddeeff' + auth_algo: 'xor' + ciphers: [a5_0, a5_1] + features: ['sms', 'voice', 'ussd', 'gprs', 'sim'] + + + osmocon_phone: - serial_device: '/dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_00897B41-if00-port0' diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 0cdcb8a..0804591 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -29,6 +29,7 @@ from . import bts_sysmo, bts_osmotrx, bts_osmovirtual, bts_octphy, bts_nanobts, bts_oc2g from . import modem from . import ms_osmo_mobile +from . import srs_ue, srs_enb from .util import is_dict, is_list @@ -45,7 +46,8 @@ R_ARFCN = 'arfcn' R_MODEM = 'modem' R_OSMOCON = 'osmocon_phone' -R_ALL = (R_IP_ADDRESS, R_RUN_NODE, R_BTS, R_ARFCN, R_MODEM, R_OSMOCON) +R_ENB = 'enb' +R_ALL = (R_IP_ADDRESS, R_RUN_NODE, R_BTS, R_ARFCN, R_MODEM, R_OSMOCON, R_ENB) RESOURCES_SCHEMA = { 'ip_address[].addr': schema.IPV4, @@ -83,6 +85,11 @@ 'bts[].osmo_trx.max_trxd_version': schema.UINT, 'bts[].osmo_trx.channels[].rx_path': schema.STR, 'bts[].osmo_trx.channels[].tx_path': schema.STR, + 'enb[].label': schema.STR, + 'enb[].type': schema.STR, + 'enb[].remote_user': schema.STR, + 'enb[].addr': schema.IPV4, + 'enb[].band': schema.BAND, 'arfcn[].arfcn': schema.INT, 'arfcn[].band': schema.BAND, 'modem[].type': schema.STR, @@ -91,6 +98,8 @@ 'modem[].imsi': schema.IMSI, 'modem[].ki': schema.KI, 'modem[].auth_algo': schema.AUTH_ALGO, + 'modem[].remote_user': schema.STR, + 'modem[].addr': schema.IPV4, 'modem[].ciphers[]': schema.CIPHER, 'modem[].features[]': schema.MODEM_FEATURE, 'osmocon_phone[].serial_device': schema.STR, @@ -115,12 +124,16 @@ 'nanobts': bts_nanobts.NanoBts, } +KNOWN_ENB_TYPES = { + 'srsenb': srs_enb.srsENB, +} KNOWN_MS_TYPES = { # Map None to ofono for forward compability None: modem.Modem, 'ofono': modem.Modem, 'osmo-mobile': ms_osmo_mobile.MSOsmoMobile, + 'srsue': srs_ue.srsUE, } diff --git a/src/osmo_gsm_tester/srs_enb.py b/src/osmo_gsm_tester/srs_enb.py new file mode 100644 index 0000000..a5da088 --- /dev/null +++ b/src/osmo_gsm_tester/srs_enb.py @@ -0,0 +1,187 @@ +# osmo_gsm_tester: specifics for running an SRS eNodeB process +# +# Copyright (C) 2020 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, remote + +class srsENB(log.Origin): + + REMOTE_DIR = '/osmo-gsm-tester-srsenb' + BINFILE = 'srsenb' + CFGFILE = 'srsenb.conf' + CFGFILE_SIB = 'srsenb_sib.conf' + CFGFILE_RR = 'srsenb_rr.conf' + CFGFILE_DRB = 'srsenb_drb.conf' + LOGFILE = 'srsenb.log' + + def __init__(self, suite_run, conf): + super().__init__('srsenb', conf) + self._addr = conf.get('addr', None) + if self._addr is None: + raise log.Error('addr not set') + self.set_name('srsenb_%s' % self._addr) + self.run_dir = None + self.config_file = None + self.config_sib_file = None + self.config_rr_file = None + self.config_drb_file = None + self.process = None + self.rem_host = None + self.remote_config_file = None + self.remote_config_sib_file = None + self.remote_config_rr_file = None + self.remote_config_drb_file = None + self.remote_log_file = None + self.suite_run = suite_run + self.nof_prb=100 + if self.nof_prb == 75: + self.base_srate=15.36e6 + else: + self.base_srate=23.04e6 + self.remote_user = conf.get('remote_user', None) + + def cleanup(self): + if self.process is None: + return + if self.setup_runs_locally(): + return + # copy back files (may not exist, for instance if there was an early error of process): + try: + self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file) + except Exception as e: + self.log(repr(e)) + + def setup_runs_locally(self): + return self.remote_user is None + + def start(self): + self.log('Starting srsENB') + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + if self.remote_user: + self.start_remotely() + else: + self.start_locally() + + def start_remotely(self): + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('srslte'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', self.inst) + if not self.inst.isfile('bin', srsENB.BINFILE): + raise log.Error('No %s binary in' % srsENB.BINFILE, self.inst) + + self.rem_host = remote.RemoteHost(self.run_dir, self.remote_user, self._addr) + remote_prefix_dir = util.Dir(srsENB.REMOTE_DIR) + self.remote_inst = util.Dir(remote_prefix_dir.child(os.path.basename(str(self.inst)))) + remote_run_dir = util.Dir(remote_prefix_dir.child(srsENB.BINFILE)) + + self.remote_config_file = remote_run_dir.child(srsENB.CFGFILE) + self.remote_config_sib_file = remote_run_dir.child(srsENB.CFGFILE_SIB) + self.remote_config_rr_file = remote_run_dir.child(srsENB.CFGFILE_RR) + self.remote_config_drb_file = remote_run_dir.child(srsENB.CFGFILE_DRB) + self.remote_log_file = remote_run_dir.child(srsENB.LOGFILE) + + self.rem_host.recreate_remote_dir(self.remote_inst) + self.rem_host.scp('scp-inst-to-remote', str(self.inst), remote_prefix_dir) + self.rem_host.create_remote_dir(remote_run_dir) + self.rem_host.scp('scp-cfg-to-remote', self.config_file, self.remote_config_file) + self.rem_host.scp('scp-cfg-sib-to-remote', self.config_sib_file, self.remote_config_sib_file) + self.rem_host.scp('scp-cfg-rr-to-remote', self.config_rr_file, self.remote_config_rr_file) + self.rem_host.scp('scp-cfg-drb-to-remote', self.config_drb_file, self.remote_config_drb_file) + + remote_env = { 'LD_LIBRARY_PATH': self.remote_inst.child('lib') } + remote_binary = self.remote_inst.child('bin', srsENB.BINFILE) + args = (remote_binary, self.remote_config_file, + '--enb_files.sib_config=' + self.remote_config_sib_file, + '--enb_files.rr_config=' + self.remote_config_rr_file, + '--enb_files.drb_config=' + self.remote_config_drb_file, + '--rf.device_name=zmq', + '--rf.device_args="fail_on_disconnect=true,tx_port=tcp://*:2000,rx_port=tcp://localhost:2001,id=enb,base_srate='+ str(self.base_srate) + '"', + '--expert.nof_phy_threads=1', + '--expert.rrc_inactivity_timer=1500', + '--enb.n_prb=' + str(self.nof_prb), + '--log.filename=' + self.remote_log_file) + + self.process = self.rem_host.RemoteProcessFixIgnoreSIGHUP(srsENB.BINFILE, util.Dir(srsENB.REMOTE_DIR), args, remote_env=remote_env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def start_locally(self): + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('srslte'))) + + binary = inst.child('bin', BINFILE) + if not os.path.isfile(binary): + raise log.Error('Binary missing:', binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', inst) + + env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + args = (binary, os.path.abspath(self.config_file), + '--enb_files.sib_config=' + os.path.abspath(self.config_sib_file), + '--enb_files.rr_config=' + os.path.abspath(self.config_rr_file), + '--enb_files.drb_config=' + os.path.abspath(self.config_drb_file), + '--rf.device_name=zmq', + '--rf.device_args="fail_on_disconnect=true,tx_port=tcp://*:2000,rx_port=tcp://localhost:2001,id=enb,base_srate='+ str(self.base_srate) + '"', + '--expert.nof_phy_threads=1', + '--expert.rrc_inactivity_timer=1500', + '--enb.n_prb=' + str(self.nof_prb), + '--log.filename=' + self.log_file) + + self.process = process.Process(self.name(), self.run_dir, args, env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def gen_conf_file(self, path, filename): + self.dbg(config_file=path) + + values = dict(ue=config.get_defaults('srsenb')) + config.overlay(values, self.suite_run.config()) + + self.dbg('srsENB ' + filename + ':\n' + pprint.pformat(values)) + + with open(path, 'w') as f: + r = template.render(filename, values) + self.dbg(r) + f.write(r) + + def configure(self): + self.config_file = self.run_dir.new_file(srsENB.CFGFILE) + self.config_sib_file = self.run_dir.new_file(srsENB.CFGFILE_SIB) + self.config_rr_file = self.run_dir.new_file(srsENB.CFGFILE_RR) + self.config_drb_file = self.run_dir.new_file(srsENB.CFGFILE_DRB) + self.log_file = self.run_dir.new_file(srsENB.LOGFILE) + + self.gen_conf_file(self.config_file, srsENB.CFGFILE) + self.gen_conf_file(self.config_sib_file, srsENB.CFGFILE_SIB) + self.gen_conf_file(self.config_rr_file, srsENB.CFGFILE_RR) + self.gen_conf_file(self.config_drb_file, srsENB.CFGFILE_DRB) + + def running(self): + return not self.process.terminated() + + def addr(self): + return self._addr + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/srs_epc.py b/src/osmo_gsm_tester/srs_epc.py new file mode 100644 index 0000000..4bcb625 --- /dev/null +++ b/src/osmo_gsm_tester/srs_epc.py @@ -0,0 +1,202 @@ +# osmo_gsm_tester: specifics for running an SRS EPC process +# +# Copyright (C) 2020 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, remote + +class srsEPC(log.Origin): + + REMOTE_DIR = '/osmo-gsm-tester-srsepc' + BINFILE = 'srsepc' + CFGFILE = 'srsepc.conf' + DBFILE = 'srsepc_user_db.csv' + PCAPFILE = 'srsepc.pcap' + LOGFILE = 'srsepc.log' + + def __init__(self, suite_run, run_node): + super().__init__(log.C_RUN, 'srsepc') + self._addr = run_node.run_addr() + self.set_name('srsepc_%s' % self._addr) + self.run_dir = None + self.config_file = None + self.db_file = None + self.log_file = None + self.pcap_file = None + self.process = None + self.rem_host = None + self.remote_config_file = None + self.remote_db_file = None + self.remote_log_file = None + self.remote_pcap_file = None + self.subscriber_list = [] + self.suite_run = suite_run + self._run_node = run_node + + def cleanup(self): + if self.process is None: + return + if self._run_node.is_local(): + return + # copy back files (may not exist, for instance if there was an early error of process): + try: + self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file) + except Exception as e: + self.log(repr(e)) + try: + self.rem_host.scpfrom('scp-back-pcap', self.remote_pcap_file, self.pcap_file) + except Exception as e: + self.log(repr(e)) + + def start(self): + self.log('Starting srsepc') + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + if self._run_node.is_local(): + self.start_locally() + else: + self.start_remotely() + + def start_remotely(self): + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('srslte'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', self.inst) + if not self.inst.isfile('bin', srsEPC.BINFILE): + raise log.Error('No %s binary in' % srsEPC.BINFILE, self.inst) + + self.rem_host = remote.RemoteHost(self.run_dir, self._run_node.ssh_user(), self._run_node.ssh_addr()) + remote_prefix_dir = util.Dir(srsEPC.REMOTE_DIR) + remote_inst = util.Dir(remote_prefix_dir.child(os.path.basename(str(self.inst)))) + remote_run_dir = util.Dir(remote_prefix_dir.child(srsEPC.BINFILE)) + self.remote_config_file = remote_run_dir.child(srsEPC.CFGFILE) + self.remote_db_file = remote_run_dir.child(srsEPC.DBFILE) + self.remote_log_file = remote_run_dir.child(srsEPC.LOGFILE) + self.remote_pcap_file = remote_run_dir.child(srsEPC.PCAPFILE) + + self.rem_host.recreate_remote_dir(remote_inst) + self.rem_host.scp('scp-inst-to-remote', str(self.inst), remote_prefix_dir) + self.rem_host.create_remote_dir(remote_run_dir) + self.rem_host.scp('scp-cfg-to-remote', self.config_file, self.remote_config_file) + self.rem_host.scp('scp-db-to-remote', self.db_file, self.remote_db_file) + + remote_lib = remote_inst.child('lib') + remote_binary = remote_inst.child('bin', srsEPC.BINFILE) + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for srsepc') + self.rem_host.change_elf_rpath(remote_binary, remote_lib) + # srsepc requires CAP_NET_ADMIN to create tunnel devices: ioctl(TUNSETIFF): + self.log('Applying CAP_NET_ADMIN capability to srsepc') + self.rem_host.setcap_net_admin(remote_binary) + + args = (remote_binary, self.remote_config_file, + '--hss.db_file=' + self.remote_db_file, + '--log.filename=' + self.remote_log_file, + '--pcap.enable=true', + '--pcap.filename=' + self.remote_pcap_file) + + self.process = self.rem_host.RemoteProcess(srsEPC.BINFILE, args) + #self.process = self.rem_host.RemoteProcessFixIgnoreSIGHUP(srsEPC.BINFILE, remote_run_dir, args) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def start_locally(self): + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('srslte'))) + + binary = inst.child('bin', BINFILE) + if not os.path.isfile(binary): + raise log.Error('Binary missing:', binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', inst) + + env = {} + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for srsepc') + # srsepc binary needs patchelf <= 0.9 (0.10 and current master fail) to avoid failing during patch. OS#4389, patchelf-GH#192. + util.change_elf_rpath(binary, util.prepend_library_path(lib), self.run_dir.new_dir('patchelf')) + # srsepc requires CAP_NET_ADMIN to create tunnel devices: ioctl(TUNSETIFF): + self.log('Applying CAP_NET_ADMIN capability to srsepc') + util.setcap_net_admin(binary, self.run_dir.new_dir('setcap_net_admin')) + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + args = (binary, os.path.abspath(self.config_file), + '--hss.db_file=' + self.db_file, + '--log.filename=' + self.log_file, + '--pcap.enable=true', + '--pcap.filename=' + self.pcap_file) + + self.process = process.Process(self.name(), self.run_dir, args, env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def configure(self): + self.config_file = self.run_dir.new_file(srsEPC.CFGFILE) + self.db_file = self.run_dir.new_file(srsEPC.DBFILE) + self.log_file = self.run_dir.new_file(srsEPC.LOGFILE) + self.pcap_file = self.run_dir.new_file(srsEPC.PCAPFILE) + self.dbg(config_file=self.config_file, db_file=self.db_file) + + values = dict(epc=config.get_defaults('srsepc')) + config.overlay(values, dict(epc=dict(hss=dict(subscribers=self.subscriber_list)))) + config.overlay(values, self.suite_run.config()) + + self.dbg('SRSEPC CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(srsEPC.CFGFILE, values) + self.dbg(r) + f.write(r) + with open(self.db_file, 'w') as f: + r = template.render(srsEPC.DBFILE, values) + self.dbg(r) + f.write(r) + + def subscriber_add(self, modem, msisdn=None, algo_str=None): + if msisdn is None: + msisdn = self.suite_run.resources_pool.next_msisdn(modem) + modem.set_msisdn(msisdn) + + if algo_str is None: + algo_str = modem.auth_algo() or util.OSMO_AUTH_ALGO_NONE + + if algo_str != util.OSMO_AUTH_ALGO_NONE and not modem.ki(): + raise log.Error("Auth algo %r selected but no KI specified" % algo_str) + + subscriber_id = len(self.subscriber_list) # list index + self.subscriber_list.append({'id': subscriber_id, 'imsi': modem.imsi(), 'msisdn': msisdn, 'auth_algo': algo_str, 'ki': modem.ki(), 'opc': None}) + + self.log('Add subscriber', msisdn=msisdn, imsi=modem.imsi(), subscriber_id=subscriber_id, + algo_str=algo_str) + return subscriber_id + + def running(self): + return not self.process.terminated() + + def addr(self): + return self._addr + + def tun_addr(self): + return '172.16.0.1' + + def run_node(self): + return self._run_node + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/srs_ue.py b/src/osmo_gsm_tester/srs_ue.py new file mode 100644 index 0000000..07e9226 --- /dev/null +++ b/src/osmo_gsm_tester/srs_ue.py @@ -0,0 +1,210 @@ +# osmo_gsm_tester: specifics for running an SRS UE process +# +# Copyright (C) 2020 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, remote +from .run_node import RunNode +from .ms import MS + +class srsUE(MS): + + REMOTE_DIR = '/osmo-gsm-tester-srsue' + BINFILE = 'srsue' + CFGFILE = 'srsue.conf' + PCAPFILE = 'srsue.pcap' + LOGFILE = 'srsue.log' + + def __init__(self, suite_run, conf): + self._addr = conf.get('addr', None) + if self._addr is None: + raise log.Error('addr not set') + super().__init__('srsue_%s' % self._addr, conf) + self.run_dir = None + self.config_file = None + self.log_file = None + self.pcap_file = None + self.process = None + self.rem_host = None + self.remote_config_file = None + self.remote_log_file = None + self.remote_pcap_file = None + self.suite_run = suite_run + self.nof_prb=50 + if self.nof_prb == 75: + self.base_srate=15.36e6 + else: + self.base_srate=23.04e6 + self.remote_user = conf.get('remote_user', None) + + def cleanup(self): + if self.process is None: + return + if self.setup_runs_locally(): + return + # copy back files (may not exist, for instance if there was an early error of process): + try: + self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file) + except Exception as e: + self.log(repr(e)) + try: + self.rem_host.scpfrom('scp-back-pcap', self.remote_pcap_file, self.pcap_file) + except Exception as e: + self.log(repr(e)) + + def setup_runs_locally(self): + return self.remote_user is None + + def netns(self): + return "srsue1" + + def connect(self, mcc_mnc=None): + self.log('Starting srsue') + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + if self.setup_runs_locally(): + self.start_locally() + else: + self.start_remotely() + + def start_remotely(self): + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('srslte'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', self.inst) + if not self.inst.isfile('bin', srsUE.BINFILE): + raise log.Error('No %s binary in' % srsUE.BINFILE, self.inst) + + self.rem_host = remote.RemoteHost(self.run_dir, self.remote_user, self._addr) + remote_prefix_dir = util.Dir(srsUE.REMOTE_DIR) + remote_inst = util.Dir(remote_prefix_dir.child(os.path.basename(str(self.inst)))) + remote_run_dir = util.Dir(remote_prefix_dir.child(srsUE.BINFILE)) + self.remote_config_file = remote_run_dir.child(srsUE.CFGFILE) + self.remote_log_file = remote_run_dir.child(srsUE.LOGFILE) + self.remote_pcap_file = remote_run_dir.child(srsUE.PCAPFILE) + + self.rem_host.recreate_remote_dir(remote_inst) + self.rem_host.scp('scp-inst-to-remote', str(self.inst), remote_prefix_dir) + self.rem_host.create_remote_dir(remote_run_dir) + self.rem_host.scp('scp-cfg-to-remote', self.config_file, self.remote_config_file) + + remote_lib = remote_inst.child('lib') + remote_binary = remote_inst.child('bin', srsUE.BINFILE) + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for srsue') + # srsue binary needs patchelf >= 0.9+52 to avoid failing during patch. OS#4389, patchelf-GH#192. + self.rem_host.set_remote_env({'PATCHELF_BIN': '/opt/bin/patchelf-v0.10' }) + self.rem_host.change_elf_rpath(remote_binary, remote_lib) + + # srsue requires CAP_SYS_ADMIN to cjump to net network namespace: netns(CLONE_NEWNET): + # srsue requires CAP_NET_ADMIN to create tunnel devices: ioctl(TUNSETIFF): + self.log('Applying CAP_SYS_ADMIN+CAP_NET_ADMIN capability to srsue') + self.rem_host.setcap_netsys_admin(remote_binary) + + #'strace', '-ff', + args = (remote_binary, self.remote_config_file, + '--rf.device_name=zmq', + '--rf.device_args="tx_port=tcp://*:2001,rx_port=tcp://localhost:2000,id=ue,base_srate='+ str(self.base_srate) + '"', + '--phy.nof_phy_threads=1', + '--gw.netns=' + self.netns(), + '--log.filename=' + 'stdout', #self.remote_log_file, + '--pcap.enable=true', + '--pcap.filename=' + self.remote_pcap_file) + + self.process = self.rem_host.RemoteProcessFixIgnoreSIGHUP(srsUE.BINFILE, util.Dir(srsUE.REMOTE_DIR), args) + #self.process = self.rem_host.RemoteProcessFixIgnoreSIGHUP(srsUE.BINFILE, remote_run_dir, args, remote_lib) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def start_locally(self): + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('srslte'))) + + binary = inst.child('bin', BINFILE) + if not os.path.isfile(binary): + raise log.Error('Binary missing:', binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', inst) + + env = {} + + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for srsue') + util.change_elf_rpath(binary, util.prepend_library_path(lib), self.run_dir.new_dir('patchelf')) + + # srsue requires CAP_SYS_ADMIN to cjump to net network namespace: netns(CLONE_NEWNET): + # srsue requires CAP_NET_ADMIN to create tunnel devices: ioctl(TUNSETIFF): + self.log('Applying CAP_SYS_ADMIN+CAP_NET_ADMIN capability to srsue') + util.setcap_netsys_admin(binary, self.run_dir.new_dir('setcap_netsys_admin')) + + args = (binary, os.path.abspath(self.config_file), + '--rf.device_name=zmq', + '--rf.device_args="tx_port=tcp://*:2001,rx_port=tcp://localhost:2000,id=ue,base_srate='+ str(self.base_srate) + '"', + '--phy.nof_phy_threads=1', + '--gw.netns=' + self.netns(), + '--log.filename=' + self.log_file, + '--pcap.enable=true', + '--pcap.filename=' + self.pcap_file) + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + self.process = process.Process(self.name(), self.run_dir, args, env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def configure(self): + self.config_file = self.run_dir.new_file(srsUE.CFGFILE) + self.log_file = self.run_dir.child(srsUE.LOGFILE) + self.pcap_file = self.run_dir.new_file(srsUE.PCAPFILE) + self.dbg(config_file=self.config_file) + + values = dict(ue=config.get_defaults('srsue')) + config.overlay(values, self.suite_run.config()) + + self.dbg('SRSUE CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(srsUE.CFGFILE, values) + self.dbg(r) + f.write(r) + + def is_connected(self, mcc_mnc=None): + return 'Network attach successful.' in (self.process.get_stdout() or '') + + def is_attached(self): + return self.is_connected() + + def running(self): + return not self.process.terminated() + + def addr(self): + return self._addr + + def run_node(self): + # TODO: move to an object + return RunNode(RunNode.T_REM_SSH, self._addr, self.remote_user, self._addr) + + def run_netns_wait(self, name, popen_args): + if self.setup_runs_locally(): + proc = process.NetNSProcess(name, self.run_dir.new_dir(name), self.netns(), popen_args, env={}) + else: + proc = self.rem_host.RemoteNetNSProcess(name, self.netns(), popen_args, env={}) + proc.launch_sync() + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 457bfb3..c2faa36 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -25,6 +25,7 @@ from .event_loop import MainLoop from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, osmo_sgsn, esme, osmocon, ms_driver, iperf3, process from . import run_node +from . import srs_epc class Timeout(Exception): pass @@ -362,6 +363,18 @@ def run_node(self, specifics=None): return run_node.RunNode.from_conf(self.reserved_resources.get(resource.R_RUN_NODE, specifics=specifics)) + def enb(self, specifics=None): + enb = enb_obj(self, self.reserved_resources.get(resource.R_ENB, specifics=specifics)) + self.register_for_cleanup(enb) + return enb + + def epc(self, run_node=None): + if run_node is None: + run_node = self.run_node() + epc_obj = srs_epc.srsEPC(self, run_node) + self.register_for_cleanup(epc_obj) + return epc_obj + def osmocon(self, specifics=None): conf = self.reserved_resources.get(resource.R_OSMOCON, specifics=specifics) osmocon_obj = osmocon.Osmocon(self, conf=conf) @@ -481,4 +494,12 @@ raise RuntimeError('No such BTS type is defined: %r' % bts_type) return bts_class(suite_run, conf) +def enb_obj(suite_run, conf): + enb_type = conf.get('type') + log.dbg('create ENB object', type=enb_type) + enb_class = resource.KNOWN_ENB_TYPES.get(enb_type) + if enb_class is None: + raise RuntimeError('No such ENB type is defined: %r' % enb_type) + return enb_class(suite_run, conf) + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl new file mode 100644 index 0000000..3d8841a --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl @@ -0,0 +1,279 @@ +##################################################################### +# srsENB configuration file +##################################################################### + +##################################################################### +# eNB configuration +# +# enb_id: 20-bit eNB identifier. +# cell_id: 8-bit cell identifier. +# tac: 16-bit Tracking Area Code. +# mcc: Mobile Country Code +# mnc: Mobile Network Code +# mme_addr: IP address of MME for S1 connnection +# gtp_bind_addr: Local IP address to bind for GTP connection +# s1c_bind_addr: Local IP address to bind for S1AP connection +# n_prb: Number of Physical Resource Blocks (6,15,25,50,75,100) +# tm: Transmission mode 1-4 (TM1 default) +# nof_ports: Number of Tx ports (1 port default, set to 2 for TM2/3/4) +# +##################################################################### +[enb] +enb_id = 0x19B +cell_id = 0x01 +phy_cell_id = 1 +tac = 0x0007 +mcc = 001 +mnc = 01 +mme_addr = 127.0.1.100 +gtp_bind_addr = 127.0.1.1 +s1c_bind_addr = 127.0.1.1 +n_prb = 50 +#tm = 4 +#nof_ports = 2 + +##################################################################### +# eNB configuration files +# +# sib_config: SIB1, SIB2 and SIB3 configuration file +# note: when enabling mbms, use the sib.conf.mbsfn configuration file which includes SIB13 +# rr_config: Radio Resources configuration file +# drb_config: DRB configuration file +##################################################################### +[enb_files] +sib_config = sib.conf +rr_config = rr.conf +drb_config = drb.conf + +##################################################################### +# RF configuration +# +# dl_earfcn: EARFCN code for DL +# tx_gain: Transmit gain (dB). +# rx_gain: Optional receive gain (dB). If disabled, AGC if enabled +# +# Optional parameters: +# dl_freq: Override DL frequency corresponding to dl_earfcn +# ul_freq: Override UL frequency corresponding to dl_earfcn (must be set if dl_freq is set) +# device_name: Device driver family. Supported options: "auto" (uses first found), "UHD" or "bladeRF" +# device_args: Arguments for the device driver. Options are "auto" or any string. +# Default for UHD: "recv_frame_size=9232,send_frame_size=9232" +# Default for bladeRF: "" +# #time_adv_nsamples: Transmission time advance (in number of samples) to compensate for RF delay +# from antenna to timestamp insertion. +# Default "auto". B210 USRP: 100 samples, bladeRF: 27. +# burst_preamble_us: Preamble length to transmit before start of burst. +# Default "auto". B210 USRP: 400 us, bladeRF: 0 us. +##################################################################### +[rf] +dl_earfcn = 3400 +tx_gain = 80 +rx_gain = 40 + +#device_name = auto + +# For best performance in 2x2 MIMO and >= 15 MHz use the following device_args settings: +# USRP B210: num_recv_frames=64,num_send_frames=64 + +# For best performance when BW<5 MHz (25 PRB), use the following device_args settings: +# USRP B210: send_frame_size=512,recv_frame_size=512 + +#device_args = auto +#time_adv_nsamples = auto +#burst_preamble_us = auto + + +##################################################################### +# MAC-layer packet capture configuration +# +# Packets are captured to file in the compact format decoded by +# the Wireshark mac-lte-framed dissector and with DLT 147. +# To use the dissector, edit the preferences for DLT_USER to +# add an entry with DLT=147, Payload Protocol=mac-lte-framed. +# For more information see: https://wiki.wireshark.org/MAC-LTE +# +# Please note that this setting will by default only capture MAC +# frames on dedicated channels, and not SIB. You have to build with +# WRITE_SIB_PCAP enabled in srsenb/src/stack/mac/mac.cc if you want +# SIB to be part of the MAC pcap file. +# +# enable: Enable MAC layer packet captures (true/false) +# filename: File path to use for packet captures +##################################################################### +[pcap] +enable = false +filename = /tmp/enb.pcap + +##################################################################### +# Log configuration +# +# Log levels can be set for individual layers. "all_level" sets log +# level for all layers unless otherwise configured. +# Format: e.g. phy_level = info +# +# In the same way, packet hex dumps can be limited for each level. +# "all_hex_limit" sets the hex limit for all layers unless otherwise +# configured. +# Format: e.g. phy_hex_limit = 32 +# +# Logging layers: rf, phy, phy_lib, mac, rlc, pdcp, rrc, gtpu, s1ap, all +# Logging levels: debug, info, warning, error, none +# +# filename: File path to use for log output. Can be set to stdout +# to print logs to standard output +# file_max_size: Maximum file size (in kilobytes). When passed, multiple files are created. +# If set to negative, a single log file will be created. +##################################################################### +[log] +all_level = warning +all_hex_limit = 32 +filename = /tmp/enb.log +file_max_size = -1 + +[gui] +enable = false + +##################################################################### +# Scheduler configuration options +# +# max_aggr_level: Optional maximum aggregation level index (l=log2(L) can be 0, 1, 2 or 3) +# pdsch_mcs: Optional fixed PDSCH MCS (ignores reported CQIs if specified) +# pdsch_max_mcs: Optional PDSCH MCS limit +# pusch_mcs: Optional fixed PUSCH MCS (ignores reported CQIs if specified) +# pusch_max_mcs: Optional PUSCH MCS limit +# #nof_ctrl_symbols: Number of control symbols +# +##################################################################### +[scheduler] +#max_aggr_level = -1 +#pdsch_mcs = -1 +#pdsch_max_mcs = -1 +#pusch_mcs = -1 +pusch_max_mcs = 16 +nof_ctrl_symbols = 3 + +##################################################################### +# eMBMS configuration options +# +# enable: Enable MBMS transmission in the eNB +# m1u_multiaddr: Multicast addres the M1-U socket will register to +# m1u_if_addr: Address of the inteferface the M1-U interface will listen for multicast packets. +# +##################################################################### +[embms] +#enable = false +#m1u_multiaddr = 239.255.0.1 +#m1u_if_addr = 127.0.1.201 + + + +##################################################################### +# Channel emulator options: +# enable: Enable/Disable internal Downlink/Uplink channel emulator +# +# -- Fading emulator +# fading.enable: Enable/disable fading simulator +# fading.model: Fading model + maximum doppler (E.g. none, epa5, eva70, etu300, etc) +# +# -- Delay Emulator delay(t) = delay_min + (delay_max - delay_min) * (1 + sin(2pi*t/period)) / 2 +# Maximum speed [m/s]: (delay_max - delay_min) * pi * 300 / period +# delay.enable: Enable/disable delay simulator +# delay.period_s: Delay period in seconds. +# delay.init_time_s: Delay initial time in seconds. +# delay.maximum_us: Maximum delay in microseconds +# delay.minumum_us: Minimum delay in microseconds +# +# -- Radio-Link Failure (RLF) Emulator +# rlf.enable: Enable/disable RLF simulator +# rlf.t_on_ms: Time for On state of the channel (ms) +# rlf.t_off_ms: Time for Off state of the channel (ms) +# +# -- High Speed Train Doppler model simulator +# hst.enable: Enable/Disable HST simulator +# hst.period_s: HST simulation period in seconds +# hst.fd_hz: Doppler frequency in Hz +# hst.init_time_s: Initial time in seconds +##################################################################### +[channel.dl] +#enable = false + +[channel.dl.fading] +#enable = false +#model = none + +[channel.dl.delay] +#enable = false +#period_s = 3600 +#init_time_s = 0 +#maximum_us = 100 +#minimum_us = 10 + +[channel.dl.rlf] +#enable = false +#t_on_ms = 10000 +#t_off_ms = 2000 + +[channel.dl.hst] +#enable = false +#period_s = 7.2 +#fd_hz = 750.0 +#init_time_s = 0.0 + +[channel.ul] +#enable = false + +[channel.ul.fading] +#enable = false +#model = none + +[channel.ul.delay] +#enable = false +#period_s = 3600 +#init_time_s = 0 +#maximum_us = 100 +#minimum_us = 10 + +[channel.ul.rlf] +#enable = false +#t_on_ms = 10000 +#t_off_ms = 2000 + +[channel.ul.hst] +#enable = false +#period_s = 7.2 +#fd_hz = -750.0 +#init_time_s = 0.0 + + +##################################################################### +# Expert configuration options +# +# pusch_max_its: Maximum number of turbo decoder iterations (Default 4) +# pusch_8bit_decoder: Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental) +# nof_phy_threads: Selects the number of PHY threads (maximum 4, minimum 1, default 2) +# metrics_period_secs: Sets the period at which metrics are requested from the eNB. +# metrics_csv_enable: Write eNB metrics to CSV file. +# metrics_csv_filename: File path to use for CSV metrics. +# pregenerate_signals: Pregenerate uplink signals after attach. Improves CPU performance. +# tx_amplitude: Transmit amplitude factor (set 0-1 to reduce PAPR) +# link_failure_nof_err: Number of PUSCH failures after which a radio-link failure is triggered. +# a link failure is when SNR<0 and CRC=KO +# max_prach_offset_us: Maximum allowed RACH offset (in us) +# eea_pref_list: Ordered preference list for the selection of encryption algorithm (EEA) (default: EEA0, EEA2, EEA1). +# eia_pref_list: Ordered preference list for the selection of integrity algorithm (EIA) (default: EIA2, EIA1, EIA0). +# +##################################################################### +[expert] +#pusch_max_its = 8 # These are half iterations +#pusch_8bit_decoder = false +#nof_phy_threads = 3 +#metrics_period_secs = 1 +#metrics_csv_enable = false +#metrics_csv_filename = /tmp/enb_metrics.csv +#pregenerate_signals = false +#tx_amplitude = 0.6 +#link_failure_nof_err = 50 +#rrc_inactivity_timer = 60000 +#max_prach_offset_us = 30 +#eea_pref_list = EEA0, EEA2, EEA1 +#eia_pref_list = EIA2, EIA1, EIA0 \ No newline at end of file diff --git a/src/osmo_gsm_tester/templates/srsenb_drb.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb_drb.conf.tmpl new file mode 100644 index 0000000..32b6e93 --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsenb_drb.conf.tmpl @@ -0,0 +1,54 @@ + +// All times are in ms. Use -1 for infinity, where available + +qci_config = ( + +{ + qci=7; + pdcp_config = { + discard_timer = 100; + pdcp_sn_size = 12; + } + rlc_config = { + ul_um = { + sn_field_length = 10; + }; + dl_um = { + sn_field_length = 10; + t_reordering = 45; + }; + }; + logical_channel_config = { + priority = 13; + prioritized_bit_rate = -1; + bucket_size_duration = 100; + log_chan_group = 2; + }; +}, +{ + qci=9; + pdcp_config = { + discard_timer = -1; + status_report_required = true; + } + rlc_config = { + ul_am = { + t_poll_retx = 120; + poll_pdu = 64; + poll_byte = 750; + max_retx_thresh = 16; + }; + dl_am = { + t_reordering = 50; + t_status_prohibit = 50; + }; + }; + logical_channel_config = { + priority = 11; + prioritized_bit_rate = -1; + bucket_size_duration = 100; + log_chan_group = 3; + }; +} + +); diff --git a/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl new file mode 100644 index 0000000..1fff189 --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl @@ -0,0 +1,90 @@ +mac_cnfg = +{ + phr_cnfg = + { + dl_pathloss_change = "dB3"; // Valid: 1, 3, 6 or INFINITY + periodic_phr_timer = 50; + prohibit_phr_timer = 0; + }; + ulsch_cnfg = + { + max_harq_tx = 4; + periodic_bsr_timer = 20; // in ms + retx_bsr_timer = 320; // in ms + }; + + time_alignment_timer = -1; // -1 is infinity +}; + +phy_cnfg = +{ + phich_cnfg = + { + duration = "Normal"; + resources = "1/6"; + }; + + pusch_cnfg_ded = + { + beta_offset_ack_idx = 6; + beta_offset_ri_idx = 6; + beta_offset_cqi_idx = 6; + }; + + // PUCCH-SR resources are scheduled on time-frequeny domain first, then multiplexed in the same resource. + sched_request_cnfg = + { + dsr_trans_max = 64; + period = 20; // in ms + subframe = [1]; // vector of subframe indices allowed for SR transmissions + nof_prb = 2; // number of PRBs on each extreme used for SR (total prb is twice this number) + }; + cqi_report_cnfg = + { + mode = "periodic"; + simultaneousAckCQI = true; + period = 40; // in ms + subframe = [0]; + nof_prb = 2; + m_ri = 8; // RI period in CQI period + }; +}; + +cell_list = +( + { + // rf_port = 0; + // cell_id = 0x01; + // tac = 0x0001; + // pci = 1; + // root_seq_idx = 204; + // dl_earfcn = 3400; + // ul_earfcn = 474; + ho_active = false; + + // CA cells + scell_list = ( + {cell_id = 0x02; cross_carrier_scheduling = false; scheduling_cell_id = 0x02; ul_allowed = true} + ) + + // Cells available for handover + meas_cell_list = + ( + { + eci = 0x19C02; + dl_earfcn = 2850; + pci = 2; + } + ); + + // ReportCfg (only A3 supported) + meas_report_desc = { + a3_report_type = "RSRP"; + a3_offset = 6; + a3_hysteresis = 0; + a3_time_to_trigger = 480; + rsrq_config = 4; + }; + } + // Add here more cells +); diff --git a/src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl new file mode 100644 index 0000000..201d022 --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl @@ -0,0 +1,118 @@ +sib1 = +{ + intra_freq_reselection = "Allowed"; + q_rx_lev_min = -65; + //p_max = 3; + cell_barred = "NotBarred" + si_window_length = 20; + sched_info = + ( + { + si_periodicity = 16; + si_mapping_info = []; // comma-separated array of SIB-indexes (from 3 to 13). + // Leave empty or commented to just scheduler sib2 + } + ); + system_info_value_tag = 0; +}; + +sib2 = +{ + rr_config_common_sib = + { + rach_cnfg = + { + num_ra_preambles = 52; + preamble_init_rx_target_pwr = -104; + pwr_ramping_step = 6; // in dB + preamble_trans_max = 10; + ra_resp_win_size = 10; // in ms + mac_con_res_timer = 64; // in ms + max_harq_msg3_tx = 4; + }; + bcch_cnfg = + { + modification_period_coeff = 16; // in ms + }; + pcch_cnfg = + { + default_paging_cycle = 32; // in rf + nB = "1"; + }; + prach_cnfg = + { + root_sequence_index = 128; + prach_cnfg_info = + { + high_speed_flag = false; + prach_config_index = 3; + prach_freq_offset = 2; + zero_correlation_zone_config = 5; + }; + }; + pdsch_cnfg = + { + /* Warning: Currently disabled and forced to p_b=1 for TM2/3/4 and p_b=0 for TM1 + */ + p_b = 1; + rs_power = 0; + }; + pusch_cnfg = + { + n_sb = 1; + hopping_mode = "inter-subframe"; + pusch_hopping_offset = 2; + enable_64_qam = false; // 64QAM PUSCH is not currently enabled + ul_rs = + { + cyclic_shift = 0; + group_assignment_pusch = 0; + group_hopping_enabled = false; + sequence_hopping_enabled = false; + }; + }; + pucch_cnfg = + { + delta_pucch_shift = 2; + n_rb_cqi = 2; + n_cs_an = 0; + n1_pucch_an = 12; + }; + ul_pwr_ctrl = + { + p0_nominal_pusch = -85; + alpha = 0.7; + p0_nominal_pucch = -107; + delta_flist_pucch = + { + format_1 = 0; + format_1b = 3; + format_2 = 1; + format_2a = 2; + format_2b = 2; + }; + delta_preamble_msg3 = 6; + }; + ul_cp_length = "len1"; + }; + + ue_timers_and_constants = + { + t300 = 2000; // in ms + t301 = 100; // in ms + t310 = 1000; // in ms + n310 = 1; + t311 = 1000; // in ms + n311 = 1; + }; + + freqInfo = + { + ul_carrier_freq_present = true; + ul_bw_present = true; + additional_spectrum_emission = 1; + }; + + time_alignment_timer = "INFINITY"; // use "sf500", "sf750", etc. +}; + diff --git a/src/osmo_gsm_tester/templates/srsepc.conf.tmpl b/src/osmo_gsm_tester/templates/srsepc.conf.tmpl new file mode 100644 index 0000000..32a6daf --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsepc.conf.tmpl @@ -0,0 +1,106 @@ +##################################################################### +# srsEPC configuration file +##################################################################### + +##################################################################### +# MME configuration +# +# mme_code: 8-bit MME code identifies the MME within a group. +# mme_group: 16-bit MME group identifier. +# tac: 16-bit Tracking Area Code. +# mcc: Mobile Country Code +# mnc: Mobile Network Code +# apn: Set Access Point Name (APN) +# mme_bind_addr: IP bind addr to listen for eNB S1-MME connnections +# dns_addr: DNS server address for the UEs +# encryption_algo: Preferred encryption algorithm for NAS layer +# (default: EEA0, support: EEA1, EEA2) +# integrity_algo: Preferred integrity protection algorithm for NAS +# (default: EIA1, support: EIA1, EIA2 (EIA0 not support) +# paging_timer: Value of paging timer in seconds (T3413) +# +##################################################################### +[mme] +mme_code = 0x1a +mme_group = 0x0001 +tac = 0x0007 +mcc = 001 +mnc = 01 +mme_bind_addr = 127.0.1.100 +apn = srsapn +dns_addr = 8.8.8.8 +encryption_algo = EEA0 +integrity_algo = EIA1 +paging_timer = 2 + +##################################################################### +# HSS configuration +# +# db_file: Location of .csv file that stores UEs information. +# +##################################################################### +[hss] +db_file = user_db.csv + +##################################################################### +# SP-GW configuration +# +# gtpu_bind_addr: GTP-U bind address. +# sgi_if_addr: SGi TUN interface IP address. +# sgi_if_name: SGi TUN interface name. +# max_paging_queue: Maximum packets in paging queue (per UE). +# +##################################################################### + +[spgw] +gtpu_bind_addr = 127.0.1.100 +sgi_if_addr = 172.16.0.1 +sgi_if_name = srs_spgw_sgi +max_paging_queue = 100 + +#################################################################### +# PCAP configuration +# +# Packets are captured to file in the compact format decoded by +# the Wireshark s1ap dissector and with DLT 150. +# To use the dissector, edit the preferences for DLT_USER to +# add an entry with DLT=150, Payload Protocol=s1ap. +# +# enable: Enable or disable the PCAP. +# filename: File name where to save the PCAP. +# +#################################################################### +[pcap] +enable = false +filename = /tmp/epc.pcap + +#################################################################### +# Log configuration +# +# Log levels can be set for individual layers. "all_level" sets log +# level for all layers unless otherwise configured. +# Format: e.g. s1ap_level = info +# +# In the same way, packet hex dumps can be limited for each level. +# "all_hex_limit" sets the hex limit for all layers unless otherwise +# configured. +# Format: e.g. s1ap_hex_limit = 32 +# +# Logging layers: nas, s1ap, mme_gtpc, spgw_gtpc, gtpu, spgw, hss, all +# Logging levels: debug, info, warning, error, none +# +# filename: File path to use for log output. Can be set to stdout +# to print logs to standard output +##################################################################### +[log] +all_level = info +all_hex_limit = 32 +filename = /tmp/epc.log + +#nas_level = debug +#s1ap_level = debug +#mme_gtpc_level = debug +#spgw_gtpc_level = debug +#gtpu_level = debug +#spgw_level = debug +#hss_level = debug diff --git a/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl b/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl new file mode 100644 index 0000000..32df58d --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl @@ -0,0 +1,24 @@ +# +# .csv to store UE's information in HSS +# Kept in the following format: "Name,Auth,IMSI,Key,OP_Type,OP,AMF,SQN,QCI,IP_alloc" +# +# Name: Human readable name to help distinguish UE's. Ignored by the HSS +# IMSI: UE's IMSI value +# Auth: Authentication algorithm used by the UE. Valid algorithms are XOR +# (xor) and MILENAGE (mil) +# Key: UE's key, where other keys are derived from. Stored in hexadecimal +# OP_Type: Operator's code type, either OP or OPc +# OP/OPc: Operator Code/Cyphered Operator Code, stored in hexadecimal +# AMF: Authentication management field, stored in hexadecimal +# SQN: UE's Sequence number for freshness of the authentication +# QCI: QoS Class Identifier for the UE's default bearer. +# IP_alloc: IP allocation stratagy for the SPGW. +# With 'dynamic' the SPGW will automatically allocate IPs +# With a valid IPv4 (e.g. '172.16.0.2') the UE will have a statically assigned IP. +# +# Note: Lines starting by '#' are ignored and will be overwritten +#ue2,mil,001010123456780,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,7,dynamic +#ue1,xor,001010123456789,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,9001,000000001255,7,dynamic +%for sub in epc.hss.subscribers: +ogt${sub.id},${sub.auth_algo},${sub.imsi},${sub.ki},opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,7,dynamic +%endfor diff --git a/src/osmo_gsm_tester/templates/srsue.conf.tmpl b/src/osmo_gsm_tester/templates/srsue.conf.tmpl new file mode 100644 index 0000000..0afa78b --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsue.conf.tmpl @@ -0,0 +1,347 @@ +##################################################################### +# srsUE configuration file +##################################################################### + +##################################################################### +# RF configuration +# +# dl_earfcn: Downlink EARFCN code. +# freq_offset: Uplink and Downlink optional frequency offset (in Hz) +# tx_gain: Transmit gain (dB). +# rx_gain: Optional receive gain (dB). If disabled, AGC if enabled +# +# Optional parameters: +# dl_freq: Override DL frequency corresponding to dl_earfcn +# ul_freq: Override UL frequency corresponding to dl_earfcn +# nof_radios: Number of available RF devices +# nof_rf_channels: Number of RF channels per radio +# nof_rx_ant: Number of RX antennas per channel +# device_name: Device driver family. Supported options: "auto" (uses first found), "UHD" or "bladeRF" +# device_args: Arguments for the device driver. Options are "auto" or any string. +# Default for UHD: "recv_frame_size=9232,send_frame_size=9232" +# Default for bladeRF: "" +# device_args_2: Arguments for the RF device driver 2. +# device_args_3: Arguments for the RF device driver 3. +# time_adv_nsamples: Transmission time advance (in number of samples) to compensate for RF delay +# from antenna to timestamp insertion. +# Default "auto". B210 USRP: 100 samples, bladeRF: 27. +# burst_preamble_us: Preamble length to transmit before start of burst. +# Default "auto". B210 USRP: 400 us, bladeRF: 0 us. +# continuous_tx: Transmit samples continuously to the radio or on bursts (auto/yes/no). +# Default is auto (yes for UHD, no for rest) +##################################################################### +[rf] +dl_earfcn = 3400 +freq_offset = 0 +tx_gain = 80 +#rx_gain = 40 + +#nof_radios = 1 +#nof_rx_ant = 1 + +# For best performance in 2x2 MIMO and >= 15 MHz use the following device_args settings: +# USRP B210: num_recv_frames=64,num_send_frames=64 + +# For best performance when BW<5 MHz (25 PRB), use the following device_args settings: +# USRP B210: send_frame_size=512,recv_frame_size=512 + +#device_args = auto +#time_adv_nsamples = auto +#burst_preamble_us = auto +#continuous_tx = auto + + +##################################################################### +# Packet capture configuration +# +# Packet capture is supported at both MAC and NAS layers. +# MAC-layer packets are captured to file in the compact format +# decoded by the Wireshark mac-lte-framed dissector. +# To use this dissector, edit the preferences for DLT_USER to +# add an entry with DLT=147, Payload Protocol=mac-lte-framed. +# For more information see: https://wiki.wireshark.org/MAC-LTE +# NAS-layer packets are dissected with DLT=148, and +# Payload Protocol = nas-eps. +# +# enable: Enable MAC layer packet captures (true/false) +# filename: File path to use for MAC packet captures +# nas_enable: Enable NAS layer packet captures (true/false) +# nas_filename: File path to use for NAS packet captures +##################################################################### +[pcap] +enable = false +filename = /tmp/ue.pcap +nas_enable = false +nas_filename = /tmp/nas.pcap + +##################################################################### +# Log configuration +# +# Log levels can be set for individual layers. "all_level" sets log +# level for all layers unless otherwise configured. +# Format: e.g. phy_level = info +# +# In the same way, packet hex dumps can be limited for each level. +# "all_hex_limit" sets the hex limit for all layers unless otherwise +# configured. +# Format: e.g. phy_hex_limit = 32 +# +# Logging layers: rf, phy, mac, rlc, pdcp, rrc, nas, gw, usim, all +# Logging levels: debug, info, warning, error, none +# +# filename: File path to use for log output. Can be set to stdout +# to print logs to standard output +# file_max_size: Maximum file size (in kilobytes). When passed, multiple files are created. +# If set to negative, a single log file will be created. +##################################################################### +[log] +all_level = warning +phy_lib_level = none +all_hex_limit = 32 +filename = /tmp/ue.log +file_max_size = -1 + +##################################################################### +# USIM configuration +# +# mode: USIM mode (soft/pcsc) +# algo: Authentication algorithm (xor/milenage) +# op/opc: 128-bit Operator Variant Algorithm Configuration Field (hex) +# - Specify either op or opc (only used in milenage) +# k: 128-bit subscriber key (hex) +# imsi: 15 digit International Mobile Subscriber Identity +# imei: 15 digit International Mobile Station Equipment Identity +# pin: PIN in case real SIM card is used +# reader: Specify card reader by it's name as listed by 'pcsc_scan'. If empty, try all available readers. +##################################################################### +[usim] +mode = soft +algo = xor +#opc = 63BFA50EE6523365FF14C1F45F88737D +k = 00112233445566778899aabbccddeeff +imsi = 001010123456789 +imei = 353490069873319 +#reader = +#pin = 1234 + +##################################################################### +# RRC configuration +# +# ue_category: Sets UE category (range 1-5). Default: 4 +# release: UE Release (8 to 10) +# feature_group: Hex value of the featureGroupIndicators field in the +# UECapabilityInformation message. Default 0xe6041000 +# mbms_service_id: MBMS service id for autostarting MBMS reception +# (default -1 means disabled) +# mbms_service_port: Port of the MBMS service +##################################################################### +[rrc] +#ue_category = 4 +#release = 8 +#feature_group = 0xe6041000 +#mbms_service_id = -1 +#mbms_service_port = 4321 + +##################################################################### +# NAS configuration +# +# apn: Set Access Point Name (APN) +# apn_protocol: Set APN protocol (IPv4, IPv6 or IPv4v6.) +# user: Username for CHAP authentication +# pass: Password for CHAP authentication +# force_imsi_attach: Whether to always perform an IMSI attach +# eia: List of integrity algorithms included in UE capabilities +# Supported: 1 - Snow3G, 2 - AES +# eea: List of ciphering algorithms included in UE capabilities +# Supported: 0 - NULL, 1 - Snow3G, 2 - AES +##################################################################### +[nas] +#apn = internetinternet +#apn_protocol = ipv4 +#user = srsuser +#pass = srspass +#force_imsi_attach = false +#eia = 1,2 +#eea = 0,1,2 + +##################################################################### +# GW configuration +# +# netns: Network namespace to create TUN device. Default: empty +# ip_devname: Name of the tun_srsue device. Default: tun_srsue +# ip_netmask: Netmask of the tun_srsue device. Default: 255.255.255.0 +##################################################################### +[gw] +#netns = +#ip_devname = tun_srsue +#ip_netmask = 255.255.255.0 + +##################################################################### +# GUI configuration +# +# Simple GUI displaying PDSCH constellation and channel freq response. +# (Requires building with srsGUI) +# enable: Enable the graphical interface (true/false) +##################################################################### +[gui] +enable = false + +##################################################################### +# Channel emulator options: +# enable: Enable/Disable internal Downlink/Uplink channel emulator +# +# -- Fading emulator +# fading.enable: Enable/disable fading simulator +# fading.model: Fading model + maximum doppler (E.g. none, epa5, eva70, etu300, etc) +# +# -- Delay Emulator delay(t) = delay_min + (delay_max - delay_min) * (1 + sin(2pi*t/period)) / 2 +# Maximum speed [m/s]: (delay_max - delay_min) * pi * 300 / period +# delay.enable: Enable/disable delay simulator +# delay.period_s: Delay period in seconds. +# delay.init_time_s: Delay initial time in seconds. +# delay.maximum_us: Maximum delay in microseconds +# delay.minumum_us: Minimum delay in microseconds +# +# -- Radio-Link Failure (RLF) Emulator +# rlf.enable: Enable/disable RLF simulator +# rlf.t_on_ms: Time for On state of the channel (ms) +# rlf.t_off_ms: Time for Off state of the channel (ms) +# +# -- High Speed Train Doppler model simulator +# hst.enable: Enable/Disable HST simulator +# hst.period_s: HST simulation period in seconds +# hst.fd_hz: Doppler frequency in Hz +# hst.init_time_s: Initial time in seconds +##################################################################### +[channel.dl] +#enable = false + +[channel.dl.fading] +#enable = false +#model = none + +[channel.dl.delay] +#enable = false +#period_s = 3600 +#init_time_s = 0 +#maximum_us = 100 +#minimum_us = 10 + +[channel.dl.rlf] +#enable = false +#t_on_ms = 10000 +#t_off_ms = 2000 + +[channel.dl.hst] +#enable = false +#period_s = 7.2 +#fd_hz = 750.0 +#init_time_s = 0.0 + +[channel.ul] +#enable = false + +[channel.ul.fading] +#enable = false +#model = none + +[channel.ul.delay] +#enable = false +#period_s = 3600 +#init_time_s = 0 +#maximum_us = 100 +#minimum_us = 10 + +[channel.ul.rlf] +#enable = false +#t_on_ms = 10000 +#t_off_ms = 2000 + +[channel.ul.hst] +#enable = false +#period_s = 7.2 +#fd_hz = -750.0 +#init_time_s = 0.0 + +##################################################################### +# PHY configuration options +# +# rx_gain_offset: RX Gain offset to add to rx_gain to calibrate RSRP readings +# prach_gain: PRACH gain (dB). If defined, forces a gain for the tranmsission of PRACH only., +# Default is to use tx_gain in [rf] section. +# cqi_max: Upper bound on the maximum CQI to be reported. Default 15. +# cqi_fixed: Fixes the reported CQI to a constant value. Default disabled. +# snr_ema_coeff: Sets the SNR exponential moving average coefficient (Default 0.1) +# snr_estim_alg: Sets the noise estimation algorithm. (Default refs) +# Options: pss: use difference between received and known pss signal, +# refs: use difference between noise references and noiseless (after filtering) +# empty: use empty subcarriers in the boarder of pss/sss signal +# pdsch_max_its: Maximum number of turbo decoder iterations (Default 4) +# nof_phy_threads: Selects the number of PHY threads (maximum 4, minimum 1, default 2) +# equalizer_mode: Selects equalizer mode. Valid modes are: "mmse", "zf" or any +# non-negative real number to indicate a regularized zf coefficient. +# Default is MMSE. +# sfo_ema: EMA coefficient to average sample offsets used to compute SFO +# sfo_correct_period: Period in ms to correct sample time to adjust for SFO +# sss_algorithm: Selects the SSS estimation algorithm. Can choose between +# {full, partial, diff}. +# estimator_fil_auto: The channel estimator smooths the channel estimate with an adaptative filter. +# estimator_fil_stddev: Sets the channel estimator smooth gaussian filter standard deviation. +# estimator_fil_order: Sets the channel estimator smooth gaussian filter order (even values perform better). +# The taps are [w, 1-2w, w] +# +# snr_to_cqi_offset: Sets an offset in the SNR to CQI table. This is used to adjust the reported CQI. +# +# pregenerate_signals: Pregenerate uplink signals after attach. Improves CPU performance. +# +# interpolate_subframe_enabled: Interpolates in the time domain the channel estimates within 1 subframe. Default is to average. +# +# sic_pss_enabled: Applies Successive Interference Cancellation to PSS signals when searching for neighbour cells. +# Must be disabled if cells have identical channel and timing, for instance if generated from +# the same source. +# +# pdsch_csi_enabled: Stores the Channel State Information and uses it for weightening the softbits. It is only +# used in TM1. It is True by default. +# +# pdsch_8bit_decoder: Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental) +# force_ul_amplitude: Forces the peak amplitude in the PUCCH, PUSCH and SRS (set 0.0 to 1.0, set to 0 or negative for disabling) +# +##################################################################### +[phy] +#rx_gain_offset = 62 +#prach_gain = 30 +#cqi_max = 15 +#cqi_fixed = 10 +#snr_ema_coeff = 0.1 +#snr_estim_alg = refs +#pdsch_max_its = 8 # These are half iterations +#nof_phy_threads = 3 +#equalizer_mode = mmse +#sfo_ema = 0.1 +#sfo_correct_period = 10 +#sss_algorithm = full +#estimator_fil_auto = false +#estimator_fil_stddev = 1.0 +#estimator_fil_order = 4 +#snr_to_cqi_offset = 0.0 +#interpolate_subframe_enabled = false +#sic_pss_enabled = true +#pregenerate_signals = false +#pdsch_csi_enabled = true +#pdsch_8bit_decoder = false +#force_ul_amplitude = 0 + +##################################################################### +# General configuration options +# +# metrics_csv_enable: Write UE metrics to CSV file. +# +# metrics_period_secs: Sets the period at which metrics are requested from the UE. +# +# metrics_csv_filename: File path to use for CSV metrics. +# +##################################################################### +[general] +#metrics_csv_enable = false +#metrics_period_secs = 1 +#metrics_csv_filename = /tmp/ue_metrics.csv diff --git a/suites/4g/iperf3.py b/suites/4g/iperf3.py new file mode 100755 index 0000000..2f19d11 --- /dev/null +++ b/suites/4g/iperf3.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.testenv import * + +def print_results(cli_res, srv_res): + cli_sent = cli_res['end']['sum_sent'] + cli_recv = cli_res['end']['sum_received'] + print("RESULT client:") + print("\tSEND: %d KB, %d kbps, %d seconds (%d retrans)" % (cli_sent['bytes']/1000, cli_sent['bits_per_second']/1000, cli_sent['seconds'], cli_sent['retransmits'])) + print("\tRECV: %d KB, %d kbps, %d seconds" % (cli_recv['bytes']/1000, cli_recv['bits_per_second']/1000, cli_recv['seconds'])) + print("RESULT server:") + print("\tSEND: %d KB, %d kbps, %d seconds" % (cli_sent['bytes']/1000, cli_sent['bits_per_second']/1000, cli_sent['seconds'])) + print("\tRECV: %d KB, %d kbps, %d seconds" % (cli_recv['bytes']/1000, cli_recv['bits_per_second']/1000, cli_recv['seconds'])) + + +epc = suite.epc() +enb = suite.enb() +ue = suite.modem() +iperf3srv = suite.iperf3srv({'addr': epc.tun_addr()}) +iperf3srv.set_run_node(epc.run_node()) +iperf3cli = iperf3srv.create_client() +iperf3cli.set_run_node(ue.run_node()) + +epc.subscriber_add(ue) +epc.start() +enb.start() +#epc.enb_add(enb) + +#wait(epc.enb_is_connected, enb) + +#ue.connect(epc.mcc_mnc()) +ue.connect() + +iperf3srv.start() +proc = iperf3cli.prepare_test_proc(ue.netns()) + +print('waiting for UE to attach...') +wait(ue.is_connected, None) +print('UE is attached') +sleep(5) +print("Running iperf3 client to %s through %s" % (str(iperf3cli), ue.netns())) +proc.launch_sync() +iperf3srv.stop() +print_results(iperf3cli.get_results(), iperf3srv.get_results()) diff --git a/suites/4g/mo_mt_sms.py b/suites/4g/mo_mt_sms.py deleted file mode 100755 index 8aa4357..0000000 --- a/suites/4g/mo_mt_sms.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python3 -from osmo_gsm_tester.testenv import * - -#epc = suite.epc() -#enb = suite.enb() -ue = suite.modem() - -#enb.start() -#epc.enb_add(enb) -#epc.start() - -#wait(epc.enb_is_connected, enb) - -#hss/epc.subscriber_add(ue) - -#ue.connect(epc.mcc_mnc()) -ue.connect() - - -print('waiting for modem to attach...') -#wait(ue.is_connected, msc.mcc_mnc()) -sleep(10) diff --git a/suites/4g/ping.py b/suites/4g/ping.py new file mode 100755 index 0000000..db2c85d --- /dev/null +++ b/suites/4g/ping.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.testenv import * + +epc = suite.epc() +enb = suite.enb() +ue = suite.modem() + +epc.subscriber_add(ue) +epc.start() +enb.start() +#epc.enb_add(enb) + +#wait(epc.enb_is_connected, enb) + +#ue.connect(epc.mcc_mnc()) +ue.connect() + +print('waiting for UE to attach...') +wait(ue.is_connected, None) +print('UE is attached') +sleep(5) + +ue.run_netns_wait('ping', ('ping', '-c', '10', epc.tun_addr())) diff --git a/suites/4g/suite.conf b/suites/4g/suite.conf index c55b610..352293a 100644 --- a/suites/4g/suite.conf +++ b/suites/4g/suite.conf @@ -1,6 +1,9 @@ resources: - ip_address: + run_node: # for EPC - times: 1 + enb: + - times: 1 + type: srsenb modem: - times: 1 type: srsue -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I290c0d79258a9f94f00c7ff2e1c6c5579c0e32f4 Gerrit-Change-Number: 17139 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 12 16:55:59 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 12 Feb 2020 16:55:59 +0000 Subject: Change in osmo-gsm-tester[master]: powersupply_intellinet: Log target ip+dev_port References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17140 ) Change subject: powersupply_intellinet: Log target ip+dev_port ...................................................................... powersupply_intellinet: Log target ip+dev_port Change-Id: Iafd6e3aaf1d3b4d91ac6cf06f2a7fe94fd1203c3 --- M src/osmo_gsm_tester/powersupply_intellinet.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/40/17140/1 diff --git a/src/osmo_gsm_tester/powersupply_intellinet.py b/src/osmo_gsm_tester/powersupply_intellinet.py index c2bf2c8..792d929 100644 --- a/src/osmo_gsm_tester/powersupply_intellinet.py +++ b/src/osmo_gsm_tester/powersupply_intellinet.py @@ -88,10 +88,10 @@ def power_set(self, onoff): """Turn on (onoff=True) or off (onoff=False) the device.""" if onoff: - self.dbg('switchon') + self.dbg('switchon %s:%u' % (self.device_ip, self.port)) self._set_port_status(self.PDU_CMD_ON) else: - self.dbg('switchoff') + self.dbg('switchoff %s:%u' % (self.device_ip, self.port)) self._set_port_status(self.PDU_CMD_OFF) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iafd6e3aaf1d3b4d91ac6cf06f2a7fe94fd1203c3 Gerrit-Change-Number: 17140 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 12 17:11:02 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 12 Feb 2020 17:11:02 +0000 Subject: Change in osmo-gsm-tester[master]: powersupply_intellinet: Log target ip+dev_port In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17140 ) Change subject: powersupply_intellinet: Log target ip+dev_port ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iafd6e3aaf1d3b4d91ac6cf06f2a7fe94fd1203c3 Gerrit-Change-Number: 17140 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 12 Feb 2020 17:11:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 12 17:11:03 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 12 Feb 2020 17:11:03 +0000 Subject: Change in osmo-gsm-tester[master]: powersupply_intellinet: Log target ip+dev_port In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17140 ) Change subject: powersupply_intellinet: Log target ip+dev_port ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iafd6e3aaf1d3b4d91ac6cf06f2a7fe94fd1203c3 Gerrit-Change-Number: 17140 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 12 Feb 2020 17:11:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 12 17:11:06 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 12 Feb 2020 17:11:06 +0000 Subject: Change in osmo-gsm-tester[master]: powersupply_intellinet: Log target ip+dev_port In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17140 ) Change subject: powersupply_intellinet: Log target ip+dev_port ...................................................................... powersupply_intellinet: Log target ip+dev_port Change-Id: Iafd6e3aaf1d3b4d91ac6cf06f2a7fe94fd1203c3 --- M src/osmo_gsm_tester/powersupply_intellinet.py 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, approved; Verified diff --git a/src/osmo_gsm_tester/powersupply_intellinet.py b/src/osmo_gsm_tester/powersupply_intellinet.py index c2bf2c8..792d929 100644 --- a/src/osmo_gsm_tester/powersupply_intellinet.py +++ b/src/osmo_gsm_tester/powersupply_intellinet.py @@ -88,10 +88,10 @@ def power_set(self, onoff): """Turn on (onoff=True) or off (onoff=False) the device.""" if onoff: - self.dbg('switchon') + self.dbg('switchon %s:%u' % (self.device_ip, self.port)) self._set_port_status(self.PDU_CMD_ON) else: - self.dbg('switchoff') + self.dbg('switchoff %s:%u' % (self.device_ip, self.port)) self._set_port_status(self.PDU_CMD_OFF) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17140 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iafd6e3aaf1d3b4d91ac6cf06f2a7fe94fd1203c3 Gerrit-Change-Number: 17140 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 12 18:09:35 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 12 Feb 2020 18:09:35 +0000 Subject: Change in osmo-gsm-tester[master]: resources.conf.prod: sysmocell500 new firmware now supports TRXDv1 References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17141 ) Change subject: resources.conf.prod: sysmocell500 new firmware now supports TRXDv1 ...................................................................... resources.conf.prod: sysmocell500 new firmware now supports TRXDv1 Change-Id: Iec50662580479bf7b6dc08d08a1de8075b2da078 --- M example/resources.conf.prod 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/41/17141/1 diff --git a/example/resources.conf.prod b/example/resources.conf.prod index 6de4e2e..992a694 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -96,7 +96,6 @@ remote_user: root clock_reference: external trx_ip: 10.42.42.112 - max_trxd_version: 0 - label: OCTBTS 3500 type: osmo-bts-octphy -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17141 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iec50662580479bf7b6dc08d08a1de8075b2da078 Gerrit-Change-Number: 17141 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 12 20:21:17 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 12 Feb 2020 20:21:17 +0000 Subject: Change in osmo-bts[master]: l1_if: Fix strange formatting of Meas info logging In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17136 ) Change subject: l1_if: Fix strange formatting of Meas info logging ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17136 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ie082b11c9d6d00ff2206184f03f6e3647c3da18c Gerrit-Change-Number: 17136 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Wed, 12 Feb 2020 20:21:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 12 20:21:33 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 12 Feb 2020 20:21:33 +0000 Subject: Change in osmo-bts[master]: l1sap: Change loglevel of Rx TCH.ind INFO->DEBUG In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17137 ) Change subject: l1sap: Change loglevel of Rx TCH.ind INFO->DEBUG ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iadb1baf55df2f6d96f85260f2e8d03627fef7e66 Gerrit-Change-Number: 17137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Wed, 12 Feb 2020 20:21:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:09:46 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:09:46 +0000 Subject: Change in osmo-bts[master]: l1_if: Fix strange formatting of Meas info logging In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17136 ) Change subject: l1_if: Fix strange formatting of Meas info logging ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17136 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ie082b11c9d6d00ff2206184f03f6e3647c3da18c Gerrit-Change-Number: 17136 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 13 Feb 2020 12:09:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:09:58 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:09:58 +0000 Subject: Change in osmo-bts[master]: l1sap: Change loglevel of Rx TCH.ind INFO->DEBUG In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17137 ) Change subject: l1sap: Change loglevel of Rx TCH.ind INFO->DEBUG ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iadb1baf55df2f6d96f85260f2e8d03627fef7e66 Gerrit-Change-Number: 17137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 13 Feb 2020 12:09:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:09:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:09:59 +0000 Subject: Change in osmo-bts[master]: l1_if: Fix strange formatting of Meas info logging In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17136 ) Change subject: l1_if: Fix strange formatting of Meas info logging ...................................................................... l1_if: Fix strange formatting of Meas info logging Some use LOGPC, but were used after a LOGP with a trailing newline. Let's simply add some defines/macros to be able to include it into a normal LOGP easily insted of having a function. Change-Id: Ie082b11c9d6d00ff2206184f03f6e3647c3da18c --- M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-oc2g/l1_if.c M src/osmo-bts-octphy/l1_if.c M src/osmo-bts-sysmo/l1_if.c 4 files changed, 27 insertions(+), 40 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index d7e0cde..989cc10 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -936,12 +936,8 @@ goto tx; } -static void dump_meas_res(int ll, GsmL1_MeasParam_t *m) -{ - LOGPC(DL1C, ll, ", Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, " - "BER %-3.2f, Timing %d\n", m->fRssi, m->fLinkQuality, - m->fBer, m->i16BurstTiming); -} +#define LOG_FMT_MEAS "Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, BER %-3.2f, Timing %d" +#define LOG_PARAM_MEAS(meas_param) (meas_param)->fRssi, (meas_param)->fLinkQuality, (meas_param)->fBer, (meas_param)->i16BurstTiming static int process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr, GsmL1_MeasParam_t *m, uint32_t fn) @@ -992,10 +988,10 @@ process_meas_res(trx, chan_nr, &data_ind->measParam, fn); - DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s\n", + DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s, " LOG_FMT_MEAS "\n", get_value_string(lc15bts_l1sapi_names, data_ind->sapi), (uint32_t)data_ind->hLayer2, - osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size)); - dump_meas_res(LOGL_DEBUG, &data_ind->measParam); + osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size), + LOG_PARAM_MEAS(&data_ind->measParam)); /* check for TCH */ if (data_ind->sapi == GsmL1_Sapi_TchF @@ -1046,7 +1042,8 @@ struct ph_rach_ind_param rach_ind_param; set_log_ctx_sapi(ra_ind->sapi); - dump_meas_res(LOGL_DEBUG, &ra_ind->measParam); + LOGPFN(DL1C, LOGL_DEBUG, ra_ind->u32Fn, "Rx PH-RA.ind, " LOG_FMT_MEAS "\n", + LOG_PARAM_MEAS(&ra_ind->measParam)); if ((ra_ind->msgUnitParam.u8Size != 1) && (ra_ind->msgUnitParam.u8Size != 2)) { diff --git a/src/osmo-bts-oc2g/l1_if.c b/src/osmo-bts-oc2g/l1_if.c index 425fd0d..9816979 100644 --- a/src/osmo-bts-oc2g/l1_if.c +++ b/src/osmo-bts-oc2g/l1_if.c @@ -992,12 +992,9 @@ goto tx; } -static void dump_meas_res(int ll, GsmL1_MeasParam_t *m) -{ - LOGPC(DL1C, ll, ", Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, " - "BER %-3.2f, Timing %d\n", m->fRssi, m->fLinkQuality, - m->fBer, m->i16BurstTiming); -} + +#define LOG_FMT_MEAS "Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, BER %-3.2f, Timing %d" +#define LOG_PARAM_MEAS(meas_param) (meas_param)->fRssi, (meas_param)->fLinkQuality, (meas_param)->fBer, (meas_param)->i16BurstTiming static int process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr, GsmL1_MeasParam_t *m, uint32_t fn) @@ -1048,10 +1045,10 @@ process_meas_res(trx, chan_nr, &data_ind->measParam, fn); - DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s\n", + DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s, " LOG_FMT_MEAS "\n", get_value_string(oc2gbts_l1sapi_names, data_ind->sapi), (uint32_t)data_ind->hLayer2, - osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size)); - dump_meas_res(LOGL_DEBUG, &data_ind->measParam); + osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size), + LOG_PARAM_MEAS(&data_ind->measParam)); /* check for TCH */ if (data_ind->sapi == GsmL1_Sapi_TchF @@ -1102,7 +1099,8 @@ struct ph_rach_ind_param rach_ind_param; set_log_ctx_sapi(ra_ind->sapi); - dump_meas_res(LOGL_DEBUG, &ra_ind->measParam); + LOGPFN(DL1C, LOGL_DEBUG, ra_ind->u32Fn, "Rx PH-RA.ind, " LOG_FMT_MEAS "\n", + LOG_PARAM_MEAS(&ra_ind->measParam)); if ((ra_ind->msgUnitParam.u8Size != 1) && (ra_ind->msgUnitParam.u8Size != 2)) { diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index 8f06b34..bdf85ca 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -906,14 +906,9 @@ l1sap_up(trx, &l1sap); } -static void dump_meas_res(int ll, tOCTVC1_GSM_MEASUREMENT_INFO * m) -{ - LOGP(DMEAS, ll, - "Meas: RSSI %d dBm, Burst Timing %d Quarter of bits :%d, " - "BER Error Count %d , BER Toatal Bit count %d in last decoded frame\n", - m->sRSSIDbm, m->sBurstTiming, m->sBurstTiming4x, m->usBERCnt, - m->usBERTotalBitCnt); -} + +#define LOG_FMT_MEAS "Meas: RSSI %d dBm, Burst Timing %d Quarter of bits: %d, BER Error Count %d, BER Toatal Bit count %d in last decoded frame" +#define LOG_PARAM_MEAS(meas_param) (meas_param)->sRSSIDbm, (meas_param)->sBurstTiming, (meas_param)->sBurstTiming4x, (meas_param)->usBERCnt, (meas_param)->usBERTotalBitCnt static int handle_mph_time_ind(struct octphy_hdl *fl1, uint8_t trx_id, uint32_t fn) { @@ -1218,7 +1213,8 @@ set_log_ctx_sapi(ra_ind->LchId.bySAPI); - dump_meas_res(LOGL_DEBUG, &ra_ind->MeasurementInfo); + LOGPFN(DL1C, LOGL_DEBUG, ra_ind->ulFrameNumber, "Rx PH-RA.ind, " LOG_FMT_MEAS "\n", + LOG_PARAM_MEAS(&ra_ind->MeasurementInfo)); if (ra_ind->ulMsgLength != 1) { LOGPFN(DL1C, LOGL_ERROR, ra_ind->ulFrameNumber, diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 199d8bd..db0dfb5 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -937,12 +937,8 @@ goto tx; } -static void dump_meas_res(int ll, GsmL1_MeasParam_t *m) -{ - LOGPC(DL1C, ll, ", Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, " - "BER %-3.2f, Timing %d\n", m->fRssi, m->fLinkQuality, - m->fBer, m->i16BurstTiming); -} +#define LOG_FMT_MEAS "Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, BER %-3.2f, Timing %d" +#define LOG_PARAM_MEAS(meas_param) (meas_param)->fRssi, (meas_param)->fLinkQuality, (meas_param)->fBer, (meas_param)->i16BurstTiming static int process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr, uint32_t fn, GsmL1_MeasParam_t *m) @@ -991,10 +987,10 @@ gsm_fn2gsmtime(&g_time, fn); - DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s\n", + DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s, " LOG_FMT_MEAS "\n", get_value_string(femtobts_l1sapi_names, data_ind->sapi), data_ind->hLayer2, - osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size)); - dump_meas_res(LOGL_DEBUG, &data_ind->measParam); + osmo_hexdump(data_ind->msgUnitParam.u8Buffer, data_ind->msgUnitParam.u8Size), + LOG_PARAM_MEAS(&data_ind->measParam)); /* check for TCH */ if (data_ind->sapi == GsmL1_Sapi_TchF @@ -1040,8 +1036,8 @@ struct ph_rach_ind_param rach_ind_param; set_log_ctx_sapi(ra_ind->sapi); - - dump_meas_res(LOGL_DEBUG, &ra_ind->measParam); + LOGPFN(DL1C, LOGL_DEBUG, ra_ind->u32Fn, "Rx PH-RA.ind, " LOG_FMT_MEAS "\n", + LOG_PARAM_MEAS(&ra_ind->measParam)); if ((ra_ind->msgUnitParam.u8Size != 1) && (ra_ind->msgUnitParam.u8Size != 2)) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17136 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ie082b11c9d6d00ff2206184f03f6e3647c3da18c Gerrit-Change-Number: 17136 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:09:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:09:59 +0000 Subject: Change in osmo-bts[master]: l1sap: Change loglevel of Rx TCH.ind INFO->DEBUG In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17137 ) Change subject: l1sap: Change loglevel of Rx TCH.ind INFO->DEBUG ...................................................................... l1sap: Change loglevel of Rx TCH.ind INFO->DEBUG This line appears tens of times per second when a call is ongoing, making it impossible to follow logs on INFO level. Change-Id: Iadb1baf55df2f6d96f85260f2e8d03627fef7e66 --- M src/common/l1sap.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, approved diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 21f3a8a..0b51045 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1369,7 +1369,7 @@ gsm_fn2gsmtime(&g_time, fn); - LOGPGT(DL1P, LOGL_INFO, &g_time, "Rx TCH.ind chan_nr=%s\n", rsl_chan_nr_str(chan_nr)); + LOGPGT(DL1P, LOGL_DEBUG, &g_time, "Rx TCH.ind chan_nr=%s\n", rsl_chan_nr_str(chan_nr)); lchan = get_active_lchan_by_chan_nr(trx, chan_nr); if (!lchan) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17137 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iadb1baf55df2f6d96f85260f2e8d03627fef7e66 Gerrit-Change-Number: 17137 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:10:13 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:10:13 +0000 Subject: Change in osmo-gsm-tester[master]: resources.conf.prod: sysmocell500 new firmware now supports TRXDv1 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17141 ) Change subject: resources.conf.prod: sysmocell500 new firmware now supports TRXDv1 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17141 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iec50662580479bf7b6dc08d08a1de8075b2da078 Gerrit-Change-Number: 17141 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 13 Feb 2020 12:10:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:10:15 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:10:15 +0000 Subject: Change in osmo-gsm-tester[master]: resources.conf.prod: sysmocell500 new firmware now supports TRXDv1 In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17141 ) Change subject: resources.conf.prod: sysmocell500 new firmware now supports TRXDv1 ...................................................................... resources.conf.prod: sysmocell500 new firmware now supports TRXDv1 Change-Id: Iec50662580479bf7b6dc08d08a1de8075b2da078 --- M example/resources.conf.prod 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/example/resources.conf.prod b/example/resources.conf.prod index 6de4e2e..992a694 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -96,7 +96,6 @@ remote_user: root clock_reference: external trx_ip: 10.42.42.112 - max_trxd_version: 0 - label: OCTBTS 3500 type: osmo-bts-octphy -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17141 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iec50662580479bf7b6dc08d08a1de8075b2da078 Gerrit-Change-Number: 17141 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:11:08 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:11:08 +0000 Subject: Change in osmo-bsc[master]: bssap: Avoid logging error if no optional Global Call Ref IE received In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/17138 ) Change subject: bssap: Avoid logging error if no optional Global Call Ref IE received ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/17138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I27ee9c6112f96d6839b8b6141888ac8fe377db65 Gerrit-Change-Number: 17138 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 13 Feb 2020 12:11:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:12:42 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:12:42 +0000 Subject: Change in osmo-ccid-firmware[master]: Implement CI scripts for testing the resulting binary on hardware for... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 ) Change subject: Implement CI scripts for testing the resulting binary on hardware for jenkins ...................................................................... Patch Set 3: would be nice to include some kind of README file about what the contents of the 'tests' directory is about. After all, those are note generic unit tests, or anything the normal user is expected to execute? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 Gerrit-Change-Number: 17099 Gerrit-PatchSet: 3 Gerrit-Owner: roh Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 13 Feb 2020 12:12:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:13:11 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:13:11 +0000 Subject: Change in osmo-ci[master]: gsm-tester: Manual build and install of patchelf v0.10 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17128 ) Change subject: gsm-tester: Manual build and install of patchelf v0.10 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17128 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I28825d723b85900fb51cc5b8a9d14c6ef346e667 Gerrit-Change-Number: 17128 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 13 Feb 2020 12:13:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:13:32 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:13:32 +0000 Subject: Change in osmo-ci[master]: gsm-tester: Install helper scripts and sudoers.d files from git repo In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17131 ) Change subject: gsm-tester: Install helper scripts and sudoers.d files from git repo ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibbdd291f4c3f7aecdd5118cc2b3b35edaddf7c09 Gerrit-Change-Number: 17131 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 13 Feb 2020 12:13:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:14:19 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:14:19 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Introduce new module for performance tests In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098 ) Change subject: bts: Introduce new module for performance tests ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098 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: I2d5f0043bdee1f8f5edcf46acce79ce547d1333d Gerrit-Change-Number: 17098 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 13 Feb 2020 12:14:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:14:39 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:14:39 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: mark Packet Polling Request as malformed In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17121 ) Change subject: tests/rlcmac: mark Packet Polling Request as malformed ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17121 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I663edfdaac0c065e08ab7b6dc50d2f18e433433c Gerrit-Change-Number: 17121 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 13 Feb 2020 12:14:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:14:40 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:14:40 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): catch unknown CSN_CHOICE values In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17120 ) Change subject: csn1: fix csnStreamDecoder(): catch unknown CSN_CHOICE values ...................................................................... csn1: fix csnStreamDecoder(): catch unknown CSN_CHOICE values After the recent changes [1], it was noticed that one of the unit tests fails. In particular, a decode-encode cycle of Packet Polling Request produces a different vector: vector1 = 49 13 e0 08 50 88 40 13 a8 04 8b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector2 = 49 13 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : FALSE As it turns out, the original (input) vector itself is malformed because it contails no valid identity, and thus violates the specs. The CSN.1 decoder from Pycrate [2] throws an exception while trying to decode it. I believe we should do the same. Let's stop decoding the bit stream and return an error in case if neither of a given list of the choice items matched. [1] Ia0f8cc224a4c38e80699f834fd83d4c0d99322ea [2] https://github.com/P1sec/pycrate Change-Id: I420144773ed5e80372534e0f18db5e74cdb2999d Fixes: OS#4392 --- M src/csn1.cpp M tests/rlcmac/RLCMACTest.ok 2 files changed, 10 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/csn1.cpp b/src/csn1.cpp index 01e3a43..5928d69 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -495,6 +495,10 @@ guint8 i = 0; CSN_ChoiceElement_t* pChoice = (CSN_ChoiceElement_t*) pDescr->descr.ptr; + /* Make sure that the list of choice items is not empty */ + if (!count) + return ProcessError(readIndex, "csnStreamDecoder", CSN_ERROR_IN_SCRIPT, pDescr); + while (count > 0) { guint8 no_of_bits = pChoice->bits; @@ -537,6 +541,10 @@ i++; } + /* Neither of the choice items matched => unknown value */ + if (!count) + return ProcessError(readIndex, "csnStreamDecoder", CSN_ERROR_STREAM_NOT_SUPPORTED, pDescr); + pDescr++; break; } diff --git a/tests/rlcmac/RLCMACTest.ok b/tests/rlcmac/RLCMACTest.ok index 24ea4b7..2d27ca4 100644 --- a/tests/rlcmac/RLCMACTest.ok +++ b/tests/rlcmac/RLCMACTest.ok @@ -58,11 +58,11 @@ vector1 == vector2 : TRUE vector1 = 4913e00850884013a8048b2b2b2b2b2b2b2b2b2b2b2b2b =========Start DECODE=========== -+++++++++Finish DECODE (0)++++++++++ ++++++++++Finish DECODE (-8)++++++++++ =========Start ENCODE============= +++++++++Finish ENCODE (0)+++++++++++ vector1 = 49 13 e0 08 50 88 40 13 a8 04 8b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -vector2 = 49 13 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +vector2 = 49 13 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b vector1 == vector2 : FALSE vector1 = 412430007fffffffffffffffefd19c7ba12b2b2b2b2b2b =========Start DECODE=========== -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17120 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I420144773ed5e80372534e0f18db5e74cdb2999d Gerrit-Change-Number: 17120 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:14:40 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 12:14:40 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: mark Packet Polling Request as malformed In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17121 ) Change subject: tests/rlcmac: mark Packet Polling Request as malformed ...................................................................... tests/rlcmac: mark Packet Polling Request as malformed It contails no valid identity, and thus violates the specs. Let's keep it 'as-is' to check that decoder actually fails. Change-Id: I663edfdaac0c065e08ab7b6dc50d2f18e433433c Related: OS#4392 --- M tests/rlcmac/RLCMACTest.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved laforge: Looks good to me, approved diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp index 04c06cf..1f74e41 100644 --- a/tests/rlcmac/RLCMACTest.cpp +++ b/tests/rlcmac/RLCMACTest.cpp @@ -106,7 +106,7 @@ "400820001a3904df0680efb3300b2b2b2b2b2b2b2b2b2b", // Packet Downlink Assignment (EGPRS) "40284f0000001009810c826f4406809dcecb2b2b2b2b2b", // Packet Uplink Assignment (EGPRS) "4024030f2f0000000087b0042b2b2b2b2b2b2b2b2b2b2b", // Packet Uplink Ack Nack (EGPRS) - "4913e00850884013a8048b2b2b2b2b2b2b2b2b2b2b2b2b", // Polling Request? + "4913e00850884013a8048b2b2b2b2b2b2b2b2b2b2b2b2b", // Polling Request (malformed) "412430007fffffffffffffffefd19c7ba12b2b2b2b2b2b", // Packet Uplink Ack Nack? "41942b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b", // System Info 13? }; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17121 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I663edfdaac0c065e08ab7b6dc50d2f18e433433c Gerrit-Change-Number: 17121 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 12:39:35 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 13 Feb 2020 12:39:35 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Introduce new module for performance tests In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098 ) Change subject: bts: Introduce new module for performance tests ...................................................................... bts: Introduce new module for performance tests A new module is created since its tests are aimed at running against real HW set ups to check performance of the system under high loads. As a result, tests in here will usually require a specific config file. One first test is introduced to activate all TCH/H channels and see if the BTS (+BTS-TRX) can keep on going fine for a while. Related: OS#4365 Change-Id: I2d5f0043bdee1f8f5edcf46acce79ce547d1333d --- M bts/BTS_Tests.ttcn A bts/BTS_Tests_perf.ttcn 2 files changed, 103 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 7fa1af6..46c9647 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -66,6 +66,7 @@ friend module BTS_Tests_SMSCB; friend module BTS_Tests_virtphy; friend module BTS_Tests_LAPDm; +friend module BTS_Tests_perf; /* The tests assume a BTS with the following timeslot configuration: * TS0 : Combined CCCH + SDCCH/4 diff --git a/bts/BTS_Tests_perf.ttcn b/bts/BTS_Tests_perf.ttcn new file mode 100644 index 0000000..1e70bc8 --- /dev/null +++ b/bts/BTS_Tests_perf.ttcn @@ -0,0 +1,102 @@ +module BTS_Tests_perf { + +/* Performance Tests for OsmoBTS + * (C) 2020 by sysmocom s.f.m.c. GmbH + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This test suite tests performance of OsmoBTS under different heavy load scenarios. + */ + +import from Misc_Helpers all; +import from General_Types all; +import from Osmocom_Types all; +import from GSM_Types all; +import from L1CTL_PortType all; +import from L1CTL_Types all; +import from LAPDm_Types all; +import from IPA_Emulation all; +import from GSM_RR_Types all; + +import from RSL_Types all; +import from RSL_Emulation all; + +import from PCUIF_Types all; +import from PCUIF_CodecPort all; + +import from Osmocom_VTY_Functions all; + +import from BTS_Tests all; + +/*********************************************************************** + * Performance tests. Expect osmo-bts to be configured with all TRX as TCH/H. + ***********************************************************************/ + +modulepar { + float mp_wait_time := 10.0; +} + + +/* This test requires BTS with 1 TRX to be configured with following timeslots: TS[0]=CCCH+SDCCH4, TS[1..7]: TCH/H + * One can simply take the osmo-bsc.cfg in the same dir and change TS1..7, that's all needed. + * It will activate TS1..7 TCH/Hchannels (2 TCH/H per TS, that's 14 channels) + * and wait for requested time. This test is useful to bring the BTS (+BTS-TRX) + * into a high channel load state to check that the system it runs on can keep + * on with full load. + */ +function f_TC_highchanload_tchh(charstring id) runs on ConnHdlr { + var ChannelNrs chan_nr := { /* TS 1..7: TCH/H */ + valueof(ts_RslChanNr_Lm(1,0)), valueof(ts_RslChanNr_Lm(1,1)), + valueof(ts_RslChanNr_Lm(2,0)), valueof(ts_RslChanNr_Lm(2,1)), + valueof(ts_RslChanNr_Lm(3,0)), valueof(ts_RslChanNr_Lm(3,1)), + valueof(ts_RslChanNr_Lm(4,0)), valueof(ts_RslChanNr_Lm(4,1)), + valueof(ts_RslChanNr_Lm(5,0)), valueof(ts_RslChanNr_Lm(5,1)), + valueof(ts_RslChanNr_Lm(6,0)), valueof(ts_RslChanNr_Lm(6,1)), + valueof(ts_RslChanNr_Lm(7,0)), valueof(ts_RslChanNr_Lm(7,1)) + }; + + log("Started"); + for (var integer i := 0; i < sizeof(chan_nr); i := i+1) { + log("Registering ", chan_nr[i]); + f_rslem_register(0, chan_nr[i]); + } + log("Registered"); + for (var integer i := 0; i < sizeof(chan_nr); i := i+1) { + f_rsl_transceive(ts_RSL_CHAN_ACT(chan_nr[i], + ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3 /* AMR*/)), + tr_RSL_CHAN_ACT_ACK(chan_nr[i]), + log2str("RSL CHAN ACT [", i, "]")); + } + log("Activated, now waiting ", mp_wait_time, " seconds"); + + f_sleep(mp_wait_time); + log("sleep done, deactivating"); + + for (var integer i := 0; i < sizeof(chan_nr); i := i+1) { + f_rsl_transceive(ts_RSL_RF_CHAN_REL(chan_nr[i]), + tr_RSL_RF_CHAN_REL_ACK(chan_nr[i]), + log2str("RF CHAN REL [", i, "]"), + true); + } + setverdict(pass); +} +testcase TC_highchanload_tchh() runs on test_CT { + var ConnHdlr vc_conn; /* 1..7 * 2 */ + var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN, 60.0 + mp_wait_time)); + + f_init(); + + vc_conn := f_start_handler(refers(f_TC_highchanload_tchh), pars); + vc_conn.done; +} + +control { + execute( TC_highchanload_tchh() ); +} + + +} -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17098 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: I2d5f0043bdee1f8f5edcf46acce79ce547d1333d Gerrit-Change-Number: 17098 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 15:43:10 2020 From: gerrit-no-reply at lists.osmocom.org (roh) Date: Thu, 13 Feb 2020 15:43:10 +0000 Subject: Change in osmo-ccid-firmware[master]: Implement CI scripts for testing the resulting binary on hardware for... In-Reply-To: References: Message-ID: Hello Jenkins Builder, Hoernchen, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 to look at the new patch set (#4). Change subject: Implement CI scripts for testing the resulting binary on hardware for jenkins ...................................................................... Implement CI scripts for testing the resulting binary on hardware for jenkins Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 --- A tests/README A tests/run-tests A tests/sysmo-octsim/01_check_rig.out A tests/sysmo-octsim/01_check_rig.sh A tests/sysmo-octsim/02_flash_dfu.out A tests/sysmo-octsim/02_flash_dfu.sh A tests/sysmo-octsim/03_check_lsusb.out A tests/sysmo-octsim/03_check_lsusb.sh A tests/sysmo-octsim/04_check_dfu_lsusb.out A tests/sysmo-octsim/04_check_dfu_lsusb.sh A tests/sysmo-octsim/README A tests/sysmo-octsim/ctl_reset_target.sh A tests/sysmo-octsim/ctl_reset_to_dfu.sh A tests/sysmo-octsim/fetch_image.sh A tests/sysmo-octsim/flash_octsim_dfu.sh A tests/sysmo-octsim/get_installed_version.sh A tests/sysmo-octsim/prepare A tests/sysmo-octsim/regen A tests/sysmo-octsim/run-tests A tests/sysmo-octsim/test-data 20 files changed, 506 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/99/17099/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 Gerrit-Change-Number: 17099 Gerrit-PatchSet: 4 Gerrit-Owner: roh Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 16:06:54 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 13 Feb 2020 16:06:54 +0000 Subject: Change in osmo-ccid-firmware[master]: Implement CI scripts for testing the resulting binary on hardware for... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 ) Change subject: Implement CI scripts for testing the resulting binary on hardware for jenkins ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 Gerrit-Change-Number: 17099 Gerrit-PatchSet: 4 Gerrit-Owner: roh Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 13 Feb 2020 16:06:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 16:49:53 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 13 Feb 2020 16:49:53 +0000 Subject: Change in osmo-gsm-tester[master]: Initial srsLTE support In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17139 ) Change subject: Initial srsLTE support ...................................................................... Patch Set 2: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I290c0d79258a9f94f00c7ff2e1c6c5579c0e32f4 Gerrit-Change-Number: 17139 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 13 Feb 2020 16:49:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 16:54:21 2020 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Thu, 13 Feb 2020 16:54:21 +0000 Subject: Change in osmo-ccid-firmware[master]: Implement CI scripts for testing the resulting binary on hardware for... In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 ) Change subject: Implement CI scripts for testing the resulting binary on hardware for jenkins ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 Gerrit-Change-Number: 17099 Gerrit-PatchSet: 4 Gerrit-Owner: roh Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 13 Feb 2020 16:54:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 16:55:18 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 13 Feb 2020 16:55:18 +0000 Subject: Change in osmo-gsm-tester[master]: default-suites.conf: Run 4g test suite (srsLTE ZeroMQ) References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17142 ) Change subject: default-suites.conf: Run 4g test suite (srsLTE ZeroMQ) ...................................................................... default-suites.conf: Run 4g test suite (srsLTE ZeroMQ) Change-Id: I3f8c3588d7b139f044462d02069919256126bf57 --- M example/default-suites.conf 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/42/17142/1 diff --git a/example/default-suites.conf b/example/default-suites.conf index a0dabdd..cfac1ca 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -161,3 +161,5 @@ - nitb_smpp - smpp - encryption + +- 4g -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I3f8c3588d7b139f044462d02069919256126bf57 Gerrit-Change-Number: 17142 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 17:07:31 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 13 Feb 2020 17:07:31 +0000 Subject: Change in osmo-gsm-tester[master]: Initial srsLTE support In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17139 to look at the new patch set (#3). Change subject: Initial srsLTE support ...................................................................... Initial srsLTE support 2 tests (iperf3, ping) working against a full srs{UE,ENB,EPC} network using ZeroMQ backend for RF (so no real RF support yet, that will come next). Related: OS##4295, OS#4296 Change-Id: I290c0d79258a9f94f00c7ff2e1c6c5579c0e32f4 --- M example/defaults.conf M example/resources.conf.prod M src/osmo_gsm_tester/resource.py A src/osmo_gsm_tester/srs_enb.py A src/osmo_gsm_tester/srs_epc.py A src/osmo_gsm_tester/srs_ue.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/templates/srsenb.conf.tmpl A src/osmo_gsm_tester/templates/srsenb_drb.conf.tmpl A src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl A src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl A src/osmo_gsm_tester/templates/srsepc.conf.tmpl A src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl A src/osmo_gsm_tester/templates/srsue.conf.tmpl A suites/4g/iperf3.py D suites/4g/mo_mt_sms.py A suites/4g/ping.py M suites/4g/suite.conf 18 files changed, 1,769 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/39/17139/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I290c0d79258a9f94f00c7ff2e1c6c5579c0e32f4 Gerrit-Change-Number: 17139 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 17:41:39 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 13 Feb 2020 17:41:39 +0000 Subject: Change in docker-playground[master]: Introduce osmo-gsm-tester docker setup References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/17143 ) Change subject: Introduce osmo-gsm-tester docker setup ...................................................................... Introduce osmo-gsm-tester docker setup This set up allows running a typical osmo-gsm-tester set up with a main unit (ogt-master) attached to one (or more) slaves where resources are located and processes are run. As an example, current config allows running an iperf3 test over an srsLTE stack using the ZeroMQ backend. Change-Id: Iac7c0b613048ce332642d3957c55cc7c53b56d42 --- M make/Makefile A osmo-gsm-tester/Dockerfile A osmo-gsm-tester/Makefile A osmo-gsm-tester/Release.key A osmo-gsm-tester/jenkins.sh A osmo-gsm-tester/osmo-gsm-tester.sh A osmo-gsm-tester/resources.conf A osmo-gsm-tester/ssh/authorized_keys A osmo-gsm-tester/ssh/config A osmo-gsm-tester/ssh/id_rsa A osmo-gsm-tester/ssh/id_rsa.pub A osmo-gsm-tester/ssh/known_hosts 12 files changed, 334 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/43/17143/1 diff --git a/make/Makefile b/make/Makefile index 83f56ae..b10c665 100644 --- a/make/Makefile +++ b/make/Makefile @@ -21,6 +21,7 @@ OSMO_BSC_BRANCH?=master OSMO_BTS_BRANCH?=master OSMO_GGSN_BRANCH?=master +OSMO_GSM_TESTER_BRANCH?=master OSMO_HLR_BRANCH?=master OSMO_IUH_BRANCH?=master OSMO_MGW_BRANCH?=master @@ -59,6 +60,7 @@ --build-arg OSMO_BSC_BRANCH=$(OSMO_BSC_BRANCH) \ --build-arg OSMO_BTS_BRANCH=$(OSMO_BTS_BRANCH) \ --build-arg OSMO_GGSN_BRANCH=$(OSMO_GGSN_BRANCH) \ + --build-arg OSMO_GSM_TESTER_BRANCH=$(OSMO_GSM_TESTER_BRANCH) \ --build-arg OSMO_HLR_BRANCH=$(OSMO_HLR_BRANCH) \ --build-arg OSMO_IUH_BRANCH=$(OSMO_IUH_BRANCH) \ --build-arg OSMO_MGW_BRANCH=$(OSMO_MGW_BRANCH) \ diff --git a/osmo-gsm-tester/Dockerfile b/osmo-gsm-tester/Dockerfile new file mode 100644 index 0000000..40e7e1a --- /dev/null +++ b/osmo-gsm-tester/Dockerfile @@ -0,0 +1,135 @@ +ARG USER +FROM $USER/debian-stretch-build + +MAINTAINER Pau Espin Pedrol + +# Create jenkins user +RUN useradd -ms /bin/bash jenkins +# Create osmo-gsm-tester group and add user to it +RUN groupadd osmo-gsm-tester +RUN usermod -a -G osmo-gsm-tester jenkins + +# install osmo-gsm-tester dependencies +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + dbus \ + tcpdump \ + sqlite3 \ + python3 \ + python3-setuptools \ + python3-yaml \ + python3-mako \ + python3-gi \ + python3-wheel \ + ofono \ + patchelf \ + sudo \ + libcap2-bin \ + python3-pip \ + udhcpc \ + iperf3 \ + locales + +# install osmo-gsm-tester pip dependencies +RUN pip3 install \ + "git+https://github.com/podshumok/python-smpplib.git at master#egg=smpplib" \ + pydbus \ + pyusb \ + pysispm + +# install srsLTE runtime dependencies +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + cmake \ + libfftw3-dev \ + libmbedtls-dev \ + libboost-program-options-dev \ + libconfig++-dev \ + libsctp-dev \ + libpcsclite-dev \ + libuhd-dev \ + libczmq-dev + +# Intall sshd: +RUN apt-get update && apt-get install -y openssh-server +RUN mkdir /var/run/sshd +COPY ssh /root/.ssh +COPY --chown=jenkins:jenkins ssh /home/jenkins/.ssh +RUN chmod -R 0700 /home/jenkins/.ssh /root/.ssh + +# Create directories for slaves with correct file permissions: +RUN mkdir -p /osmo-gsm-tester-srsue \ + /osmo-gsm-tester-srsenb \ + /osmo-gsm-tester-srsepc \ + /osmo-gsm-tester-trx +RUN chown -R jenkins:jenkins \ + /osmo-gsm-tester-srsue \ + /osmo-gsm-tester-srsenb \ + /osmo-gsm-tester-srsepc \ + /osmo-gsm-tester-trx + +# Set a UTF-8 locale +RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ + dpkg-reconfigure --frontend=noninteractive locales && \ + update-locale LANG=en_US.UTF-8 +ENV LANG en_US.UTF-8 + +# We require a newer patchelf for srsue (OS#4389) +ADD https://nixos.org/releases/patchelf/patchelf-0.10/patchelf-0.10.tar.bz2 /tmp/patchelf-0.10.tar.bz2 +RUN cd /tmp && \ + tar -jxf /tmp/patchelf-0.10.tar.bz2 && \ + cd patchelf-0.10 && \ + ./configure --prefix=/opt && \ + make && \ + mkdir -p /opt/bin/ && \ + cp src/patchelf /opt/bin/patchelf-v0.10 + +ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" + +COPY Release.key /tmp/Release.key + +RUN apt-key add /tmp/Release.key && \ + rm /tmp/Release.key && \ + echo "deb " $OSMOCOM_REPO " ./" > /etc/apt/sources.list.d/osmocom-nightly.list + +ADD $OSMOCOM_REPO/Release /tmp/Release +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + telnet \ + libosmocore-dev \ + libosmo-abis-dev \ + libosmo-gsup-client-dev \ + libosmo-netif-dev \ + libosmo-ranap-dev \ + libosmo-sccp-dev \ + libosmo-sigtran-dev \ + libsmpp34-dev \ + libgtp-dev \ + libasn1c-dev && \ + apt-get clean + +WORKDIR /tmp + +ARG OSMO_GSM_TESTER_BRANCH="master" + +RUN git clone git://git.osmocom.org/osmo-gsm-tester.git +ADD http://git.osmocom.org/osmo-gsm-tester/patch?h=$OSMO_GSM_TESTER_BRANCH /tmp/commit + +RUN cd osmo-gsm-tester && \ + git fetch && git checkout $OSMO_GSM_TESTER_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_GSM_TESTER_BRANCH || exit 1); \ + git rev-parse --abbrev-ref HEAD && git rev-parse HEAD + +# Copy several scripts and permission for osmo-gsm-tester: +RUN mkdir -p /usr/local/bin/ && cp osmo-gsm-tester/utils/bin/* /usr/local/bin/ +RUN mkdir -p /etc/sudoers.d/ && cp osmo-gsm-tester/utils/sudoers.d/* /etc/sudoers.d/ + +VOLUME /data +COPY resources.conf /tmp/osmo-gsm-tester/example/resources.conf + +ENV OSMO_GSM_TESTER_CONF /tmp/osmo-gsm-tester/example + +WORKDIR /data +CMD ["/bin/sh", "-c", "/data/osmo-gsm-tester.sh >/data/osmo-gsm-tester.log 2>&1"] + +EXPOSE 22/tcp diff --git a/osmo-gsm-tester/Makefile b/osmo-gsm-tester/Makefile new file mode 100644 index 0000000..03366a0 --- /dev/null +++ b/osmo-gsm-tester/Makefile @@ -0,0 +1,3 @@ +RUN_ARGS?=--rm --privileged --cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun --network sigtran --ip 172.18.50.21 -v ogt-vol:/data + +include ../make/Makefile diff --git a/osmo-gsm-tester/Release.key b/osmo-gsm-tester/Release.key new file mode 100644 index 0000000..e656238 --- /dev/null +++ b/osmo-gsm-tester/Release.key @@ -0,0 +1,20 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQENBFJBt/wBCADAht3d/ilNuyzaXYw/QwTRvmjyoDvfXw+H/3Fvk1zlDZoiKPPc +a1wCVBINUZl7vYM2OXqbJwYa++JP2Q48xKSvC6thbRc/YLievkbcvTemf7IaREfl +CTjoYpoqXHa9kHMw1aALDm8CNU88jZmnV7v9L6hKkbYDxie+jpoj7D6B9JlxgNJ4 +5dQyRNsFGVcIl4Vplt1HyGc5Q5nQI/VgS2rlF/IOXmhRQBc4LEDdU8R2IKnkU4ee +S7TWanAigGAQhxGuCkS39/CWzc1DhLhjlNhBl/+RTPejkqJtAy00ZLps3+RqUN1Y +CU/Fsr7aRlYVGqQ/BlptwV0XQ2VVYJX2oEBBABEBAAG0MG5ldHdvcmsgT0JTIFBy +b2plY3QgPG5ldHdvcmtAYnVpbGQub3BlbnN1c2Uub3JnPokBPAQTAQIAJgUCWmMc +aQIbAwUJDEAUbQYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEGLrGgkXKA3fjsoI +ALSXmXzFCpTxg8a6tvXkqddY/qAmeBMNUf7hslI9wN3leNmCrnuHS8TbHWYJZgtw +8M5fKL3aRQYaIiqqm1XOUF0OqwYNDj5V3y38mM68NYOkzgSP7foMwZp9Y0TlGhtI +L8weA+2RUjB4hwwGMAYMqkRZyKW3NhPqdlGGoXac1ilwEyGXFHdOLbkhtyS+P2yb +/EvaKIN5cMLzRZKeYgdp9WuAirV+yV/SDbgvabW098lrWhGLltlRRDQgMV883p8I +ERMI1wlLFZGnHL3mfBWGeQ24M/DaBOdXQDtfBLCJ9nGztmDBUb8i6GFWU7nD2TGi +8mYUsED1ZDwO/0jdvJ4gSluIRgQTEQIABgUCUkG3/AAKCRA7MBG3a51lIzhdAJ9v +d6XPffMZRcCGgDEY5OaTn/MsCQCgrXbeZpFJgnirSrc8rRonvzYFiF4= +=Gvly +-----END PGP PUBLIC KEY BLOCK----- diff --git a/osmo-gsm-tester/jenkins.sh b/osmo-gsm-tester/jenkins.sh new file mode 100755 index 0000000..16552f9 --- /dev/null +++ b/osmo-gsm-tester/jenkins.sh @@ -0,0 +1,56 @@ +#!/bin/sh + +# This docket env allows running a typical osmo-gsm-tester setup with a main +# unit (ogt-master) running osmo-gsm-tester process, and using another docker +# container as a remote host where to run child processes. +# +# Trial directory must be set in the parent host's /tmp/trial path, which will +# then be mounted to ogt-master and used my osmo-gsm-tester. +# +# osmo-gsm-tester parameters and suites are passed in osmo-gsm-tester.sh in same +# directory as this script. +# +# Log files can be found in host's /tmp/logs/ directory. + +. ../jenkins-common.sh +IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}" +docker_images_require \ + "debian-stretch-build" \ + "osmo-gsm-tester" + +network_create 172.18.50.0/24 + +mkdir $VOL_BASE_DIR/ogt-slave + +mkdir $VOL_BASE_DIR/ogt-master +cp osmo-gsm-tester.sh $VOL_BASE_DIR/ogt-master/ + +echo Starting container with osmo-gsm-tester slave +docker run --rm \ + --cap-add=NET_ADMIN \ + --cap-add=SYS_ADMIN \ + --device /dev/net/tun:/dev/net/tun \ + --network $NET_NAME \ + --ip 172.18.50.100 \ + -v $VOL_BASE_DIR/ogt-slave:/data \ + --name ${BUILD_TAG}-ogt-slave -d \ + $REPO_USER/osmo-gsm-tester \ + /bin/sh -c "/usr/sbin/sshd -D -e >/data/sshd.log 2>&1" + +echo Starting container with osmo-gsm-tester main unit +docker run --rm \ + --cap-add=NET_ADMIN \ + --cap-add=SYS_ADMIN \ + --device /dev/net/tun:/dev/net/tun \ + --network $NET_NAME \ + --ip 172.18.50.2 \ + -v $VOL_BASE_DIR/ogt-master:/data \ + -v /tmp/trial:/tmp/trial \ + --name ${BUILD_TAG}-ogt-master \ + $REPO_USER/osmo-gsm-tester + +echo Stopping containers +docker container kill ${BUILD_TAG}-ogt-slave + +network_remove +collect_logs diff --git a/osmo-gsm-tester/osmo-gsm-tester.sh b/osmo-gsm-tester/osmo-gsm-tester.sh new file mode 100755 index 0000000..bfd303b --- /dev/null +++ b/osmo-gsm-tester/osmo-gsm-tester.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Add local IP addresses required by osmo-gsm-tester resources: +ip addr add 172.18.50.2/24 dev eth0 +ip addr add 172.18.50.3/24 dev eth0 +ip addr add 172.18.50.4/24 dev eth0 +ip addr add 172.18.50.5/24 dev eth0 +ip addr add 172.18.50.6/24 dev eth0 +ip addr add 172.18.50.7/24 dev eth0 +ip addr add 172.18.50.8/24 dev eth0 +ip addr add 172.18.50.9/24 dev eth0 +ip addr add 172.18.50.10/24 dev eth0 + +su -c "python3 -u /tmp/osmo-gsm-tester/src/osmo-gsm-tester.py /tmp/trial -T -l dbg -s 4g -t iperf3" -m jenkins diff --git a/osmo-gsm-tester/resources.conf b/osmo-gsm-tester/resources.conf new file mode 100644 index 0000000..1120178 --- /dev/null +++ b/osmo-gsm-tester/resources.conf @@ -0,0 +1,60 @@ +# all hardware and interfaces available to this osmo-gsm-tester + +ip_address: +- addr: 172.18.50.2 +- addr: 172.18.50.3 +- addr: 172.18.50.4 +- addr: 172.18.50.5 +- addr: 172.18.50.6 +- addr: 172.18.50.7 +- addr: 172.18.50.8 +- addr: 172.18.50.9 +- addr: 172.18.50.10 + +run_node: +- run_type: ssh + run_addr: 172.18.50.100 + ssh_user: jenkins + ssh_addr: 172.18.50.100 + +bts: +- label: Ettus B200 + type: osmo-bts-trx + ipa_unit_id: 6 + addr: 172.18.50.3 + band: GSM-1800 + ciphers: [a5_0, a5_1, a5_3] + osmo_trx: + type: uhd + launch_trx: true + remote_user: jenkins + trx_ip: 172.18.50.100 + dev_args: "type=b200,serial=306BD11" + clock_reference: external + multi_arfcn: true + +enb: +- label: srsENB-zmq + type: srsenb + remote_user: jenkins + addr: 172.18.50.100 + +arfcn: + - arfcn: 512 + band: GSM-1800 + +modem: +- label: sierra_1st + path: '/sys/devices/pci0000:00/0000:00:12.2/usb1/1-5/1-5.4/1-5.4.1/1-5.4.1.2' + ki: 'EBAB63D06C3F546A16C977CB40E57C68' + auth_algo: 'comp128v1' + ciphers: [a5_0, a5_1] + features: ['sms', 'voice', 'ussd', 'sim'] + +- label: srsUE-zmq_1 + type: srsue + remote_user: jenkins + addr: 172.18.50.100 + imsi: '001010123456789' + ki: '8CCBE85A62C6DC7AC2A9886F4BBC3146' + auth_algo: 'xor' diff --git a/osmo-gsm-tester/ssh/authorized_keys b/osmo-gsm-tester/ssh/authorized_keys new file mode 100644 index 0000000..5d58f36 --- /dev/null +++ b/osmo-gsm-tester/ssh/authorized_keys @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDGYP7+YrCjZ04y+4arcB8Iv72g64nYJJvu+M66EDWVMr2Gvb0yHLvi/jeIfHlI3TvxBvouwX4wuFnLlI5BNvrwB0rCPnDzzPfX+osnAmqvBbVWFbAQkq4y9+tTiwqhAPV+PVW/AkTGoDGdiMdDL12AwT9HHRKCZUZBdPV3SmKqxRTI+pFZTROROulWMCBEn7LnEiQiqrcS2t79dDLFmbnZ75c9lOewHZfGgLUUwj5b+CHKwLNiFhJYdVq6LtyJ11D/sktEs+yyKbn7/1mbGy9Uwe2Rk+521XdmuHow86f9tOPvdRVqm7kzugkANOe2qz4PvT167bQHhm3I975d86fEeC6Ro+OvDDxARxLsCBFFZxmbNMg2+Ggt5y7l0GUa5lyjY+prKGrQ2ZWHASlwby8FCGe8fFzaJbag6841xiHE0PKPSySAnVq2gUHcLMAdsjCZsfAi0i15VDfKrd1W3Zlu6ikE9II/N89gVCVHI53Nnb7L9W445C8ido9qDSLEgOM= pespin at pespin-thinkpad diff --git a/osmo-gsm-tester/ssh/config b/osmo-gsm-tester/ssh/config new file mode 100644 index 0000000..6e350e5 --- /dev/null +++ b/osmo-gsm-tester/ssh/config @@ -0,0 +1,3 @@ +Host 172.18.50.* + StrictHostKeyChecking no + UserKnownHostsFile=/dev/null diff --git a/osmo-gsm-tester/ssh/id_rsa b/osmo-gsm-tester/ssh/id_rsa new file mode 100644 index 0000000..8e9fab8 --- /dev/null +++ b/osmo-gsm-tester/ssh/id_rsa @@ -0,0 +1,38 @@ +-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn +NhAAAAAwEAAQAAAYEAxmD+/mKwo2dOMvuGq3AfCL+9oOuJ2CSb7vjOuhA1lTK9hr29Mhy7 +4v43iHx5SN078Qb6LsF+MLhZy5SOQTb68AdKwj5w88z31/qLJwJqrwW1VhWwEJKuMvfrU4 +sKoQD1fj1VvwJExqAxnYjHQy9dgME/Rx0SgmVGQXT1d0piqsUUyPqRWU0TkTrpVjAgRJ+y +5xIkIqq3Etre/XQyxZm52e+XPZTnsB2XxoC1FMI+W/ghysCzYhYSWHVaui7ciddQ/7JLRL +Pssim5+/9ZmxsvVMHtkZPudtV3Zrh6MPOn/bTj73UVapu5M7oJADTntqs+D709eu20B4Zt +yPe+XfOnxHgukaPjrww8QEcS7AgRRWcZmzTINvhoLecu5dBlGuZco2Pqayhq0NmVhwEpcG +8vBQhnvHxc2iW2oOvONcYhxNDyj0skgJ1atoFB3CzAHbIwmbHwItIteVQ3yq3dVt2Zbuop +BPSCPzfPYFQlRyOdzZ2+y/VuOOQvInaPag0ixIDjAAAFkPaSKFT2kihUAAAAB3NzaC1yc2 +EAAAGBAMZg/v5isKNnTjL7hqtwHwi/vaDridgkm+74zroQNZUyvYa9vTIcu+L+N4h8eUjd +O/EG+i7BfjC4WcuUjkE2+vAHSsI+cPPM99f6iycCaq8FtVYVsBCSrjL361OLCqEA9X49Vb +8CRMagMZ2Ix0MvXYDBP0cdEoJlRkF09XdKYqrFFMj6kVlNE5E66VYwIESfsucSJCKqtxLa +3v10MsWZudnvlz2U57Adl8aAtRTCPlv4IcrAs2IWElh1Wrou3InXUP+yS0Sz7LIpufv/WZ +sbL1TB7ZGT7nbVd2a4ejDzp/204+91FWqbuTO6CQA057arPg+9PXrttAeGbcj3vl3zp8R4 +LpGj468MPEBHEuwIEUVnGZs0yDb4aC3nLuXQZRrmXKNj6msoatDZlYcBKXBvLwUIZ7x8XN +oltqDrzjXGIcTQ8o9LJICdWraBQdwswB2yMJmx8CLSLXlUN8qt3VbdmW7qKQT0gj83z2BU +JUcjnc2dvsv1bjjkLyJ2j2oNIsSA4wAAAAMBAAEAAAGAN7ewhvRjFlIClbEtnuMr5EIuWY +8uNSX7IgCB16KL2i7ZKooKJJQLdXLfWBdV3VA98LF7/TvdXIO6vMIpvklZ66awqaPuB5vP +FLtK8Bburd/Vkasfu1fnU2tsjhdkUdo6GU3S0oYpmPwPU2bCSK15/prIUgnpU/Rr6iCWfP +3IfpxB/TzbLBDI6SZ5uPplZcDQ97ORsKbwKnyM2vUS+Yr2ty5i9SnodP+qzFcEBSOVbjFg +FFlRSMBYQL4dUGOvD4wItkBObpbujF9/GGVqnGcWhLRkxs/jmSZUUFhfhW4B8nyuwtRkiN +ISgvzEmTz26BquezaRVWzbvPFChroA3/NrciSg1+tNyKV7SQv1Q1z1ESqUhB00MbH9GRr0 +ICyxZfB8DLpDDIv2T7Foaqhd3cnbxnb9hfYI+cP0QXMAcIYhB1Vy7kyipMVi5oaU++B/u2 +rRZ2kv6Oqsl7e4eq3mD+wuy7cWN0J5oqcxNIByRNmkOPkmCpExClcS3UNUjCT9Z2wBAAAA +wQDW1IjZkNz8HdczvSB30Eg7uaoau7uoQngKrlDVZCFLxJCn2kwzwLw8AYkiTwtYNqBbje +LC5cBBudhVLO1yB1ZicAP+kmlNJpEWFkdwTkxP0rEc9EvlmM+c2N2jVEY74jOlWMmdXrux +BRoUViLrWjJPxhQZGECd7Ua/T9/cvGP4eKk3dNiWOudGJvc4w1AuvuISu1KGIv6e1pHwdA +BYficO6h2n4QJgTIgrs7rUgoGxFP6XtUSeTBBVm8MlkTJugAsAAADBAOvCZiWDSZuopPlx +V3t+cfMpEG+ieac4E4ohXu0/lQcbfHam1SHsH6hBCdjBYaNRy39wNhOE/Yj4SYnERNKWrd +v06uDBgMsSQFC6Xbuf2gLEFCmkMcsmYOP7F+aHJAcC/ZHK/iSDw/9LE2wqQgp7OgCICHaM +ZyxhPJbRTdgPGK44zTvYDaDUF4YU2dPTB1xh8WXws4D2Sz+mnxXaoLJCAAbWelr0TCPFzY +1tv2U8sYa6IpH64w2ZBHowOn/UYGnS4wAAAMEA12kJMzK8NwipiEjYTi36wlAXfJWsXzae +h3OL1iiaFYkEdJp3rPBAlwo9uZmZ5KckWRKRKQtDsEoVnbmF82OazJlO8tjEKXvXfXYBic +Z2dJWeXRUjWY6XuC6inYf00Aw7hH+2GBDiPL9kd20n7ZXOxErpMnHfdPutIYVF1b6w5Iwu +c/VAt4lnEodsC6rvO6Nuf87gOksuK4shX00WF9uia5HBy9tJqOO7mAwXV1qwqORRwSGIUx +UFWh/WcfQzQ/oBAAAAFnBlc3BpbkBwZXNwaW4tdGhpbmtwYWQBAgME +-----END OPENSSH PRIVATE KEY----- diff --git a/osmo-gsm-tester/ssh/id_rsa.pub b/osmo-gsm-tester/ssh/id_rsa.pub new file mode 100644 index 0000000..5d58f36 --- /dev/null +++ b/osmo-gsm-tester/ssh/id_rsa.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDGYP7+YrCjZ04y+4arcB8Iv72g64nYJJvu+M66EDWVMr2Gvb0yHLvi/jeIfHlI3TvxBvouwX4wuFnLlI5BNvrwB0rCPnDzzPfX+osnAmqvBbVWFbAQkq4y9+tTiwqhAPV+PVW/AkTGoDGdiMdDL12AwT9HHRKCZUZBdPV3SmKqxRTI+pFZTROROulWMCBEn7LnEiQiqrcS2t79dDLFmbnZ75c9lOewHZfGgLUUwj5b+CHKwLNiFhJYdVq6LtyJ11D/sktEs+yyKbn7/1mbGy9Uwe2Rk+521XdmuHow86f9tOPvdRVqm7kzugkANOe2qz4PvT167bQHhm3I975d86fEeC6Ro+OvDDxARxLsCBFFZxmbNMg2+Ggt5y7l0GUa5lyjY+prKGrQ2ZWHASlwby8FCGe8fFzaJbag6841xiHE0PKPSySAnVq2gUHcLMAdsjCZsfAi0i15VDfKrd1W3Zlu6ikE9II/N89gVCVHI53Nnb7L9W445C8ido9qDSLEgOM= pespin at pespin-thinkpad diff --git a/osmo-gsm-tester/ssh/known_hosts b/osmo-gsm-tester/ssh/known_hosts new file mode 100644 index 0000000..5b4d64b --- /dev/null +++ b/osmo-gsm-tester/ssh/known_hosts @@ -0,0 +1 @@ +|1|eVQDORaCD0M0PU3796H/UNBd7UY=|HOZgOCC2cv57PWiBdDr60diz68A= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIW6ho8F4O1Mr9kTFbQAWTa7hB8UoaDzRha2ycVE8JmGRgX/L2iy4SeqlDDizoOT2kk4KBRWU0QxUWsxoUfzN6o= -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17143 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Iac7c0b613048ce332642d3957c55cc7c53b56d42 Gerrit-Change-Number: 17143 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 13 19:18:16 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 13 Feb 2020 19:18:16 +0000 Subject: Change in osmo-ci[master]: ansible: Install libsoapysdr-dev as dependency for srsLTE References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17144 ) Change subject: ansible: Install libsoapysdr-dev as dependency for srsLTE ...................................................................... ansible: Install libsoapysdr-dev as dependency for srsLTE srsLTE supports using LimeSDR devices through SoapySDR. Change-Id: Idd8baf934cb9245e0f897e84754905172b659e40 --- M ansible/roles/gsm-tester/tasks/main.yml M ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/44/17144/1 diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 309c187..ef51178 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -57,6 +57,7 @@ - libpcsclite-dev - libuhd-dev - libczmq-dev + - libsoapysdr-dev - name: install ofono build dependencies apt: diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml index bfa9715..bc90aae 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml @@ -149,3 +149,4 @@ - libpcsclite-dev - libuhd-dev - libczmq-dev + - libsoapysdr-dev -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Idd8baf934cb9245e0f897e84754905172b659e40 Gerrit-Change-Number: 17144 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 09:40:01 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 09:40:01 +0000 Subject: Change in osmo-hlr[master]: mslookup_client_mdns_test: disable by default In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/17071 ) Change subject: mslookup_client_mdns_test: disable by default ...................................................................... Patch Set 1: Verified+1 Code-Review+2 Fixes the problem for me. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/17071 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie0cd4b0c55a1fbb00c215aeec7dcd0c15805add3 Gerrit-Change-Number: 17071 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 09:40:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 11:16:47 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 14 Feb 2020 11:16:47 +0000 Subject: Change in osmo-hlr[master]: mslookup_client_mdns_test: disable by default In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/17071 ) Change subject: mslookup_client_mdns_test: disable by default ...................................................................... mslookup_client_mdns_test: disable by default Only build and run the test, if --enable-mslookup-client-mdns-test is passed to ./configure. Enable that option in jenkins.sh. Related: OS#4385 Change-Id: Ie0cd4b0c55a1fbb00c215aeec7dcd0c15805add3 --- M configure.ac M contrib/jenkins.sh M tests/mslookup/Makefile.am M tests/testsuite.at 4 files changed, 29 insertions(+), 10 deletions(-) Approvals: fixeria: Looks good to me, approved; Verified Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 59261e8..34c5163 100644 --- a/configure.ac +++ b/configure.ac @@ -107,6 +107,15 @@ AC_MSG_RESULT([$enable_ext_tests]) AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes") +# mslookup_client_mdns_test (OS#4385: does not work everywhere) +AC_ARG_ENABLE([mslookup_client_mdns_test], + AC_HELP_STRING([--enable-mslookup-client-mdns-test], + [Include the mslookup_client_mdns_test in make check [default=no]]), + [enable_mslookup_client_mdns_test="$enableval"],[enable_mslookup_client_mdns_test="no"]) +AC_MSG_CHECKING([whether to enable mslookup_client_mdns_test]) +AC_MSG_RESULT([$enable_mslookup_client_mdns_test]) +AM_CONDITIONAL(ENABLE_MSLOOKUP_CLIENT_MDNS_TEST, test "x$enable_mslookup_client_mdns_test" = "xyes") + # Generate manuals AC_ARG_ENABLE(manuals, [AS_HELP_STRING( diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 5914182..522d72e 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -49,7 +49,12 @@ cd "$base" autoreconf --install --force -./configure --enable-sanitize --enable-external-tests --enable-werror $CONFIG +./configure \ + --enable-sanitize \ + --enable-external-tests \ + --enable-mslookup-client-mdns-test \ + --enable-werror \ + $CONFIG $MAKE $PARALLEL_MAKE $MAKE check || cat-testlogs.sh DISTCHECK_CONFIGURE_FLAGS="$CONFIG" $MAKE distcheck || cat-testlogs.sh diff --git a/tests/mslookup/Makefile.am b/tests/mslookup/Makefile.am index ebf2add..04778e8 100644 --- a/tests/mslookup/Makefile.am +++ b/tests/mslookup/Makefile.am @@ -24,7 +24,6 @@ check_PROGRAMS = \ mdns_test \ - mslookup_client_mdns_test \ mslookup_client_test \ mslookup_test \ $(NULL) @@ -45,14 +44,6 @@ $(LIBOSMOGSM_LIBS) \ $(NULL) -mslookup_client_mdns_test_SOURCES = \ - mslookup_client_mdns_test.c \ - $(NULL) -mslookup_client_mdns_test_LDADD = \ - $(top_builddir)/src/mslookup/libosmo-mslookup.la \ - $(LIBOSMOGSM_LIBS) \ - $(NULL) - mdns_test_SOURCES = \ mdns_test.c \ $(NULL) @@ -61,6 +52,18 @@ $(LIBOSMOGSM_LIBS) \ $(NULL) +if ENABLE_MSLOOKUP_CLIENT_MDNS_TEST +check_PROGRAMS += mslookup_client_mdns_test + +mslookup_client_mdns_test_SOURCES = \ + mslookup_client_mdns_test.c \ + $(NULL) +mslookup_client_mdns_test_LDADD = \ + $(top_builddir)/src/mslookup/libosmo-mslookup.la \ + $(LIBOSMOGSM_LIBS) \ + $(NULL) +endif + .PHONY: update_exp update_exp: for i in $(check_PROGRAMS); do \ diff --git a/tests/testsuite.at b/tests/testsuite.at index 827e9f8..d30b5e9 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -58,7 +58,9 @@ AT_CHECK([$abs_top_builddir/tests/mslookup/mslookup_client_test], [0], [ignore], [experr]) AT_CLEANUP +# AT_SKIP_IF: disable without --enable-mslookup-client-mdns-test (OS#4385) AT_SETUP([mslookup_client_mdns]) +AT_SKIP_IF([! test -e $abs_top_builddir/tests/mslookup/mslookup_client_mdns_test ]) AT_KEYWORDS([mslookup_client_mdns]) cat $abs_srcdir/mslookup/mslookup_client_mdns_test.err > experr AT_CHECK([$abs_top_builddir/tests/mslookup/mslookup_client_mdns_test], [0], [ignore], [experr]) -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/17071 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ie0cd4b0c55a1fbb00c215aeec7dcd0c15805add3 Gerrit-Change-Number: 17071 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 11:16:48 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Fri, 14 Feb 2020 11:16:48 +0000 Subject: Change in osmo-hlr[master]: mslookup_client_mdns_test: no automatic skip In-Reply-To: References: Message-ID: osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/17072 ) Change subject: mslookup_client_mdns_test: no automatic skip ...................................................................... mslookup_client_mdns_test: no automatic skip Exit with error code if multicast is disabled. The test is disabled by default already, so when explicitly enabling it, we should not automatically skip it. Related: OS#4385 Change-Id: I82022c23fa9c40535f922b12d917efd7e229912b --- M tests/mslookup/mslookup_client_mdns_test.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/tests/mslookup/mslookup_client_mdns_test.c b/tests/mslookup/mslookup_client_mdns_test.c index f33ef98..5e558b4 100644 --- a/tests/mslookup/mslookup_client_mdns_test.c +++ b/tests/mslookup/mslookup_client_mdns_test.c @@ -225,8 +225,8 @@ int main() { if (!is_multicast_enabled()) { - fprintf(stderr, "WARNING: multicast is disabled, skipping the test! (OS#4361)"); - return 77; + fprintf(stderr, "ERROR: multicast is disabled! (OS#4361)"); + return 1; } talloc_enable_null_tracking(); -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/17072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I82022c23fa9c40535f922b12d917efd7e229912b Gerrit-Change-Number: 17072 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 14:24:00 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 14:24:00 +0000 Subject: Change in osmo-gsm-tester[master]: Initial srsLTE support In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17139 ) Change subject: Initial srsLTE support ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I290c0d79258a9f94f00c7ff2e1c6c5579c0e32f4 Gerrit-Change-Number: 17139 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 14:24:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 14:24:03 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 14:24:03 +0000 Subject: Change in osmo-gsm-tester[master]: default-suites.conf: Run 4g test suite (srsLTE ZeroMQ) In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17142 ) Change subject: default-suites.conf: Run 4g test suite (srsLTE ZeroMQ) ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I3f8c3588d7b139f044462d02069919256126bf57 Gerrit-Change-Number: 17142 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 14:24:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 14:24:08 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 14:24:08 +0000 Subject: Change in osmo-gsm-tester[master]: Initial srsLTE support In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17139 ) Change subject: Initial srsLTE support ...................................................................... Initial srsLTE support 2 tests (iperf3, ping) working against a full srs{UE,ENB,EPC} network using ZeroMQ backend for RF (so no real RF support yet, that will come next). Related: OS##4295, OS#4296 Change-Id: I290c0d79258a9f94f00c7ff2e1c6c5579c0e32f4 --- M example/defaults.conf M example/resources.conf.prod M src/osmo_gsm_tester/resource.py A src/osmo_gsm_tester/srs_enb.py A src/osmo_gsm_tester/srs_epc.py A src/osmo_gsm_tester/srs_ue.py M src/osmo_gsm_tester/suite.py A src/osmo_gsm_tester/templates/srsenb.conf.tmpl A src/osmo_gsm_tester/templates/srsenb_drb.conf.tmpl A src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl A src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl A src/osmo_gsm_tester/templates/srsepc.conf.tmpl A src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl A src/osmo_gsm_tester/templates/srsue.conf.tmpl A suites/4g/iperf3.py D suites/4g/mo_mt_sms.py A suites/4g/ping.py M suites/4g/suite.conf 18 files changed, 1,769 insertions(+), 24 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/example/defaults.conf b/example/defaults.conf index 353cf9b..f32e1f5 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -92,3 +92,11 @@ max_trx: 1 trx_list: - nominal_power: 25 + +srsepc: + mcc: 901 + mnc: 70 + +srsenb: + mcc: 901 + mnc: 70 diff --git a/example/resources.conf.prod b/example/resources.conf.prod index 992a694..943160b 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -11,6 +11,12 @@ - addr: 10.42.42.9 - addr: 10.42.42.10 +run_node: +- run_type: ssh + run_addr: 10.42.42.118 + ssh_user: jenkins + ssh_addr: 10.42.42.116 + bts: - label: sysmoBTS 1002 type: osmo-bts-sysmo @@ -148,6 +154,12 @@ direct_pcu: true ciphers: [a5_0, a5_1, a5_3] +enb: +- label: srsENB-zmq + type: srsenb + remote_user: jenkins + addr: 10.42.42.117 + arfcn: - arfcn: 512 band: GSM-1800 @@ -227,5 +239,14 @@ ciphers: [a5_0, a5_1] features: ['sms', 'voice', 'ussd', 'gprs', 'sim'] +- label: srsUE-zmq_1 + type: srsue + remote_user: jenkins + addr: 10.42.42.116 + imsi: '001010123456789' + ki: '00112233445566778899aabbccddeeff' + auth_algo: 'xor' + + osmocon_phone: - serial_device: '/dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_00897B41-if00-port0' diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 0cdcb8a..0804591 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -29,6 +29,7 @@ from . import bts_sysmo, bts_osmotrx, bts_osmovirtual, bts_octphy, bts_nanobts, bts_oc2g from . import modem from . import ms_osmo_mobile +from . import srs_ue, srs_enb from .util import is_dict, is_list @@ -45,7 +46,8 @@ R_ARFCN = 'arfcn' R_MODEM = 'modem' R_OSMOCON = 'osmocon_phone' -R_ALL = (R_IP_ADDRESS, R_RUN_NODE, R_BTS, R_ARFCN, R_MODEM, R_OSMOCON) +R_ENB = 'enb' +R_ALL = (R_IP_ADDRESS, R_RUN_NODE, R_BTS, R_ARFCN, R_MODEM, R_OSMOCON, R_ENB) RESOURCES_SCHEMA = { 'ip_address[].addr': schema.IPV4, @@ -83,6 +85,11 @@ 'bts[].osmo_trx.max_trxd_version': schema.UINT, 'bts[].osmo_trx.channels[].rx_path': schema.STR, 'bts[].osmo_trx.channels[].tx_path': schema.STR, + 'enb[].label': schema.STR, + 'enb[].type': schema.STR, + 'enb[].remote_user': schema.STR, + 'enb[].addr': schema.IPV4, + 'enb[].band': schema.BAND, 'arfcn[].arfcn': schema.INT, 'arfcn[].band': schema.BAND, 'modem[].type': schema.STR, @@ -91,6 +98,8 @@ 'modem[].imsi': schema.IMSI, 'modem[].ki': schema.KI, 'modem[].auth_algo': schema.AUTH_ALGO, + 'modem[].remote_user': schema.STR, + 'modem[].addr': schema.IPV4, 'modem[].ciphers[]': schema.CIPHER, 'modem[].features[]': schema.MODEM_FEATURE, 'osmocon_phone[].serial_device': schema.STR, @@ -115,12 +124,16 @@ 'nanobts': bts_nanobts.NanoBts, } +KNOWN_ENB_TYPES = { + 'srsenb': srs_enb.srsENB, +} KNOWN_MS_TYPES = { # Map None to ofono for forward compability None: modem.Modem, 'ofono': modem.Modem, 'osmo-mobile': ms_osmo_mobile.MSOsmoMobile, + 'srsue': srs_ue.srsUE, } diff --git a/src/osmo_gsm_tester/srs_enb.py b/src/osmo_gsm_tester/srs_enb.py new file mode 100644 index 0000000..2b65a5b --- /dev/null +++ b/src/osmo_gsm_tester/srs_enb.py @@ -0,0 +1,197 @@ +# osmo_gsm_tester: specifics for running an SRS eNodeB process +# +# Copyright (C) 2020 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, remote + +class srsENB(log.Origin): + + REMOTE_DIR = '/osmo-gsm-tester-srsenb' + BINFILE = 'srsenb' + CFGFILE = 'srsenb.conf' + CFGFILE_SIB = 'srsenb_sib.conf' + CFGFILE_RR = 'srsenb_rr.conf' + CFGFILE_DRB = 'srsenb_drb.conf' + LOGFILE = 'srsenb.log' + + def __init__(self, suite_run, conf): + super().__init__(log.C_RUN, 'srsenb') + self._addr = conf.get('addr', None) + if self._addr is None: + raise log.Error('addr not set') + self.set_name('srsenb_%s' % self._addr) + self.ue = None + self.epc = None + self.run_dir = None + self.config_file = None + self.config_sib_file = None + self.config_rr_file = None + self.config_drb_file = None + self.process = None + self.rem_host = None + self.remote_config_file = None + self.remote_config_sib_file = None + self.remote_config_rr_file = None + self.remote_config_drb_file = None + self.remote_log_file = None + self.suite_run = suite_run + self.nof_prb=100 + if self.nof_prb == 75: + self.base_srate=15.36e6 + else: + self.base_srate=23.04e6 + self.remote_user = conf.get('remote_user', None) + + def cleanup(self): + if self.process is None: + return + if self.setup_runs_locally(): + return + # copy back files (may not exist, for instance if there was an early error of process): + try: + self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file) + except Exception as e: + self.log(repr(e)) + + def setup_runs_locally(self): + return self.remote_user is None + + def start(self, epc): + self.log('Starting srsENB') + self.epc = epc + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + if self.remote_user: + self.start_remotely() + else: + self.start_locally() + + def start_remotely(self): + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('srslte'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', self.inst) + if not self.inst.isfile('bin', srsENB.BINFILE): + raise log.Error('No %s binary in' % srsENB.BINFILE, self.inst) + + self.rem_host = remote.RemoteHost(self.run_dir, self.remote_user, self._addr) + remote_prefix_dir = util.Dir(srsENB.REMOTE_DIR) + self.remote_inst = util.Dir(remote_prefix_dir.child(os.path.basename(str(self.inst)))) + remote_run_dir = util.Dir(remote_prefix_dir.child(srsENB.BINFILE)) + + self.remote_config_file = remote_run_dir.child(srsENB.CFGFILE) + self.remote_config_sib_file = remote_run_dir.child(srsENB.CFGFILE_SIB) + self.remote_config_rr_file = remote_run_dir.child(srsENB.CFGFILE_RR) + self.remote_config_drb_file = remote_run_dir.child(srsENB.CFGFILE_DRB) + self.remote_log_file = remote_run_dir.child(srsENB.LOGFILE) + + self.rem_host.recreate_remote_dir(self.remote_inst) + self.rem_host.scp('scp-inst-to-remote', str(self.inst), remote_prefix_dir) + self.rem_host.create_remote_dir(remote_run_dir) + self.rem_host.scp('scp-cfg-to-remote', self.config_file, self.remote_config_file) + self.rem_host.scp('scp-cfg-sib-to-remote', self.config_sib_file, self.remote_config_sib_file) + self.rem_host.scp('scp-cfg-rr-to-remote', self.config_rr_file, self.remote_config_rr_file) + self.rem_host.scp('scp-cfg-drb-to-remote', self.config_drb_file, self.remote_config_drb_file) + + remote_env = { 'LD_LIBRARY_PATH': self.remote_inst.child('lib') } + remote_binary = self.remote_inst.child('bin', srsENB.BINFILE) + args = (remote_binary, self.remote_config_file, + '--enb_files.sib_config=' + self.remote_config_sib_file, + '--enb_files.rr_config=' + self.remote_config_rr_file, + '--enb_files.drb_config=' + self.remote_config_drb_file, + '--rf.device_name=zmq', + '--rf.device_args="fail_on_disconnect=true,tx_port=tcp://'+ self.addr() +':2000,rx_port=tcp://'+ self.ue.addr() +':2001,id=enb,base_srate='+ str(self.base_srate) + '"', + '--expert.nof_phy_threads=1', + '--expert.rrc_inactivity_timer=1500', + '--enb.n_prb=' + str(self.nof_prb), + '--log.filename=' + self.remote_log_file) + + self.process = self.rem_host.RemoteProcessFixIgnoreSIGHUP(srsENB.BINFILE, util.Dir(srsENB.REMOTE_DIR), args, remote_env=remote_env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def start_locally(self): + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('srslte'))) + + binary = inst.child('bin', BINFILE) + if not os.path.isfile(binary): + raise log.Error('Binary missing:', binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', inst) + + env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) } + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + args = (binary, os.path.abspath(self.config_file), + '--enb_files.sib_config=' + os.path.abspath(self.config_sib_file), + '--enb_files.rr_config=' + os.path.abspath(self.config_rr_file), + '--enb_files.drb_config=' + os.path.abspath(self.config_drb_file), + '--rf.device_name=zmq', + '--rf.device_args="fail_on_disconnect=true,tx_port=tcp://'+ self.addr() +':2000,rx_port=tcp://'+ self.ue.addr() +':2001,id=enb,base_srate='+ str(self.base_srate) + '"', + '--expert.nof_phy_threads=1', + '--expert.rrc_inactivity_timer=1500', + '--enb.n_prb=' + str(self.nof_prb), + '--log.filename=' + self.log_file) + + self.process = process.Process(self.name(), self.run_dir, args, env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def gen_conf_file(self, path, filename): + self.dbg(config_file=path) + + values = dict(enb=config.get_defaults('srsenb')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, dict(enb={ 'run_addr': self.addr(), + 'mme_addr': self.epc.addr()})) + + self.dbg('srsENB ' + filename + ':\n' + pprint.pformat(values)) + + with open(path, 'w') as f: + r = template.render(filename, values) + self.dbg(r) + f.write(r) + + def configure(self): + self.config_file = self.run_dir.new_file(srsENB.CFGFILE) + self.config_sib_file = self.run_dir.new_file(srsENB.CFGFILE_SIB) + self.config_rr_file = self.run_dir.new_file(srsENB.CFGFILE_RR) + self.config_drb_file = self.run_dir.new_file(srsENB.CFGFILE_DRB) + self.log_file = self.run_dir.new_file(srsENB.LOGFILE) + + self.gen_conf_file(self.config_file, srsENB.CFGFILE) + self.gen_conf_file(self.config_sib_file, srsENB.CFGFILE_SIB) + self.gen_conf_file(self.config_rr_file, srsENB.CFGFILE_RR) + self.gen_conf_file(self.config_drb_file, srsENB.CFGFILE_DRB) + + def ue_add(self, ue): + if self.ue is not None: + raise log.Error("More than one UE per ENB not yet supported (ZeroMQ)") + self.ue = ue + + def running(self): + return not self.process.terminated() + + def addr(self): + return self._addr + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/srs_epc.py b/src/osmo_gsm_tester/srs_epc.py new file mode 100644 index 0000000..0a0036e --- /dev/null +++ b/src/osmo_gsm_tester/srs_epc.py @@ -0,0 +1,207 @@ +# osmo_gsm_tester: specifics for running an SRS EPC process +# +# Copyright (C) 2020 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, remote + +class srsEPC(log.Origin): + + REMOTE_DIR = '/osmo-gsm-tester-srsepc' + BINFILE = 'srsepc' + CFGFILE = 'srsepc.conf' + DBFILE = 'srsepc_user_db.csv' + PCAPFILE = 'srsepc.pcap' + LOGFILE = 'srsepc.log' + + def __init__(self, suite_run, run_node): + super().__init__(log.C_RUN, 'srsepc') + self._addr = run_node.run_addr() + self.set_name('srsepc_%s' % self._addr) + self.run_dir = None + self.config_file = None + self.db_file = None + self.log_file = None + self.pcap_file = None + self.process = None + self.rem_host = None + self.remote_config_file = None + self.remote_db_file = None + self.remote_log_file = None + self.remote_pcap_file = None + self.subscriber_list = [] + self.suite_run = suite_run + self._run_node = run_node + + def cleanup(self): + if self.process is None: + return + if self._run_node.is_local(): + return + # copy back files (may not exist, for instance if there was an early error of process): + try: + self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file) + except Exception as e: + self.log(repr(e)) + try: + self.rem_host.scpfrom('scp-back-pcap', self.remote_pcap_file, self.pcap_file) + except Exception as e: + self.log(repr(e)) + + def start(self): + self.log('Starting srsepc') + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + if self._run_node.is_local(): + self.start_locally() + else: + self.start_remotely() + + def start_remotely(self): + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('srslte'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', self.inst) + if not self.inst.isfile('bin', srsEPC.BINFILE): + raise log.Error('No %s binary in' % srsEPC.BINFILE, self.inst) + + self.rem_host = remote.RemoteHost(self.run_dir, self._run_node.ssh_user(), self._run_node.ssh_addr()) + remote_prefix_dir = util.Dir(srsEPC.REMOTE_DIR) + remote_inst = util.Dir(remote_prefix_dir.child(os.path.basename(str(self.inst)))) + remote_run_dir = util.Dir(remote_prefix_dir.child(srsEPC.BINFILE)) + self.remote_config_file = remote_run_dir.child(srsEPC.CFGFILE) + self.remote_db_file = remote_run_dir.child(srsEPC.DBFILE) + self.remote_log_file = remote_run_dir.child(srsEPC.LOGFILE) + self.remote_pcap_file = remote_run_dir.child(srsEPC.PCAPFILE) + + self.rem_host.recreate_remote_dir(remote_inst) + self.rem_host.scp('scp-inst-to-remote', str(self.inst), remote_prefix_dir) + self.rem_host.create_remote_dir(remote_run_dir) + self.rem_host.scp('scp-cfg-to-remote', self.config_file, self.remote_config_file) + self.rem_host.scp('scp-db-to-remote', self.db_file, self.remote_db_file) + + remote_lib = remote_inst.child('lib') + remote_binary = remote_inst.child('bin', srsEPC.BINFILE) + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for srsepc') + self.rem_host.change_elf_rpath(remote_binary, remote_lib) + # srsepc requires CAP_NET_ADMIN to create tunnel devices: ioctl(TUNSETIFF): + self.log('Applying CAP_NET_ADMIN capability to srsepc') + self.rem_host.setcap_net_admin(remote_binary) + + args = (remote_binary, self.remote_config_file, + '--hss.db_file=' + self.remote_db_file, + '--log.filename=' + self.remote_log_file, + '--pcap.enable=true', + '--pcap.filename=' + self.remote_pcap_file) + + self.process = self.rem_host.RemoteProcess(srsEPC.BINFILE, args) + #self.process = self.rem_host.RemoteProcessFixIgnoreSIGHUP(srsEPC.BINFILE, remote_run_dir, args) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def start_locally(self): + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('srslte'))) + + binary = inst.child('bin', BINFILE) + if not os.path.isfile(binary): + raise log.Error('Binary missing:', binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', inst) + + env = {} + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for srsepc') + # srsepc binary needs patchelf <= 0.9 (0.10 and current master fail) to avoid failing during patch. OS#4389, patchelf-GH#192. + util.change_elf_rpath(binary, util.prepend_library_path(lib), self.run_dir.new_dir('patchelf')) + # srsepc requires CAP_NET_ADMIN to create tunnel devices: ioctl(TUNSETIFF): + self.log('Applying CAP_NET_ADMIN capability to srsepc') + util.setcap_net_admin(binary, self.run_dir.new_dir('setcap_net_admin')) + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + args = (binary, os.path.abspath(self.config_file), + '--hss.db_file=' + self.db_file, + '--log.filename=' + self.log_file, + '--pcap.enable=true', + '--pcap.filename=' + self.pcap_file) + + self.process = process.Process(self.name(), self.run_dir, args, env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def configure(self): + self.config_file = self.run_dir.new_file(srsEPC.CFGFILE) + self.db_file = self.run_dir.new_file(srsEPC.DBFILE) + self.log_file = self.run_dir.new_file(srsEPC.LOGFILE) + self.pcap_file = self.run_dir.new_file(srsEPC.PCAPFILE) + self.dbg(config_file=self.config_file, db_file=self.db_file) + + values = dict(epc=config.get_defaults('srsepc')) + config.overlay(values, dict(epc=dict(hss=dict(subscribers=self.subscriber_list)))) + config.overlay(values, self.suite_run.config()) + config.overlay(values, dict(epc={'run_addr': self.addr()})) + + self.dbg('SRSEPC CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(srsEPC.CFGFILE, values) + self.dbg(r) + f.write(r) + with open(self.db_file, 'w') as f: + r = template.render(srsEPC.DBFILE, values) + self.dbg(r) + f.write(r) + + def subscriber_add(self, modem, msisdn=None, algo_str=None): + if msisdn is None: + msisdn = self.suite_run.resources_pool.next_msisdn(modem) + modem.set_msisdn(msisdn) + + if algo_str is None: + algo_str = modem.auth_algo() or util.OSMO_AUTH_ALGO_NONE + + if algo_str != util.OSMO_AUTH_ALGO_NONE and not modem.ki(): + raise log.Error("Auth algo %r selected but no KI specified" % algo_str) + + subscriber_id = len(self.subscriber_list) # list index + self.subscriber_list.append({'id': subscriber_id, 'imsi': modem.imsi(), 'msisdn': msisdn, 'auth_algo': algo_str, 'ki': modem.ki(), 'opc': None}) + + self.log('Add subscriber', msisdn=msisdn, imsi=modem.imsi(), subscriber_id=subscriber_id, + algo_str=algo_str) + return subscriber_id + + def enb_is_connected(self, enb): + # FIXME: srspec's stdout: "S1 Setup Request - eNB Id 0x66c0", but srsenb.conf has "enb_id = 0x19B" + return 'S1 Setup Request - eNB Id' in (self.process.get_stdout() or '') + + def running(self): + return not self.process.terminated() + + def addr(self): + return self._addr + + def tun_addr(self): + return '172.16.0.1' + + def run_node(self): + return self._run_node + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/srs_ue.py b/src/osmo_gsm_tester/srs_ue.py new file mode 100644 index 0000000..c68c726 --- /dev/null +++ b/src/osmo_gsm_tester/srs_ue.py @@ -0,0 +1,213 @@ +# osmo_gsm_tester: specifics for running an SRS UE process +# +# Copyright (C) 2020 by sysmocom - s.f.m.c. GmbH +# +# Author: Pau Espin Pedrol +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import pprint + +from . import log, util, config, template, process, remote +from .run_node import RunNode +from .ms import MS + +class srsUE(MS): + + REMOTE_DIR = '/osmo-gsm-tester-srsue' + BINFILE = 'srsue' + CFGFILE = 'srsue.conf' + PCAPFILE = 'srsue.pcap' + LOGFILE = 'srsue.log' + + def __init__(self, suite_run, conf): + self._addr = conf.get('addr', None) + if self._addr is None: + raise log.Error('addr not set') + super().__init__('srsue_%s' % self._addr, conf) + self.enb = None + self.run_dir = None + self.config_file = None + self.log_file = None + self.pcap_file = None + self.process = None + self.rem_host = None + self.remote_config_file = None + self.remote_log_file = None + self.remote_pcap_file = None + self.suite_run = suite_run + self.nof_prb=50 + if self.nof_prb == 75: + self.base_srate=15.36e6 + else: + self.base_srate=23.04e6 + self.remote_user = conf.get('remote_user', None) + + def cleanup(self): + if self.process is None: + return + if self.setup_runs_locally(): + return + # copy back files (may not exist, for instance if there was an early error of process): + try: + self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file) + except Exception as e: + self.log(repr(e)) + try: + self.rem_host.scpfrom('scp-back-pcap', self.remote_pcap_file, self.pcap_file) + except Exception as e: + self.log(repr(e)) + + def setup_runs_locally(self): + return self.remote_user is None + + def netns(self): + return "srsue1" + + def connect(self, enb): + self.log('Starting srsue') + self.enb = enb + self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) + self.configure() + if self.setup_runs_locally(): + self.start_locally() + else: + self.start_remotely() + + def start_remotely(self): + self.inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('srslte'))) + lib = self.inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', self.inst) + if not self.inst.isfile('bin', srsUE.BINFILE): + raise log.Error('No %s binary in' % srsUE.BINFILE, self.inst) + + self.rem_host = remote.RemoteHost(self.run_dir, self.remote_user, self._addr) + remote_prefix_dir = util.Dir(srsUE.REMOTE_DIR) + remote_inst = util.Dir(remote_prefix_dir.child(os.path.basename(str(self.inst)))) + remote_run_dir = util.Dir(remote_prefix_dir.child(srsUE.BINFILE)) + self.remote_config_file = remote_run_dir.child(srsUE.CFGFILE) + self.remote_log_file = remote_run_dir.child(srsUE.LOGFILE) + self.remote_pcap_file = remote_run_dir.child(srsUE.PCAPFILE) + + self.rem_host.recreate_remote_dir(remote_inst) + self.rem_host.scp('scp-inst-to-remote', str(self.inst), remote_prefix_dir) + self.rem_host.create_remote_dir(remote_run_dir) + self.rem_host.scp('scp-cfg-to-remote', self.config_file, self.remote_config_file) + + remote_lib = remote_inst.child('lib') + remote_binary = remote_inst.child('bin', srsUE.BINFILE) + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for srsue') + # srsue binary needs patchelf >= 0.9+52 to avoid failing during patch. OS#4389, patchelf-GH#192. + self.rem_host.set_remote_env({'PATCHELF_BIN': '/opt/bin/patchelf-v0.10' }) + self.rem_host.change_elf_rpath(remote_binary, remote_lib) + + # srsue requires CAP_SYS_ADMIN to cjump to net network namespace: netns(CLONE_NEWNET): + # srsue requires CAP_NET_ADMIN to create tunnel devices: ioctl(TUNSETIFF): + self.log('Applying CAP_SYS_ADMIN+CAP_NET_ADMIN capability to srsue') + self.rem_host.setcap_netsys_admin(remote_binary) + + #'strace', '-ff', + args = (remote_binary, self.remote_config_file, + '--rf.device_name=zmq', + '--rf.device_args="tx_port=tcp://'+ self.addr() +':2001,rx_port=tcp://'+ self.enb.addr() +':2000,id=ue,base_srate='+ str(self.base_srate) + '"', + '--phy.nof_phy_threads=1', + '--gw.netns=' + self.netns(), + '--log.filename=' + 'stdout', #self.remote_log_file, + '--pcap.enable=true', + '--pcap.filename=' + self.remote_pcap_file) + + self.process = self.rem_host.RemoteProcessFixIgnoreSIGHUP(srsUE.BINFILE, util.Dir(srsUE.REMOTE_DIR), args) + #self.process = self.rem_host.RemoteProcessFixIgnoreSIGHUP(srsUE.BINFILE, remote_run_dir, args, remote_lib) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def start_locally(self): + inst = util.Dir(os.path.abspath(self.suite_run.trial.get_inst('srslte'))) + + binary = inst.child('bin', BINFILE) + if not os.path.isfile(binary): + raise log.Error('Binary missing:', binary) + lib = inst.child('lib') + if not os.path.isdir(lib): + raise log.Error('No lib/ in', inst) + + env = {} + + # setting capabilities will later disable use of LD_LIBRARY_PATH from ELF loader -> modify RPATH instead. + self.log('Setting RPATH for srsue') + util.change_elf_rpath(binary, util.prepend_library_path(lib), self.run_dir.new_dir('patchelf')) + + # srsue requires CAP_SYS_ADMIN to cjump to net network namespace: netns(CLONE_NEWNET): + # srsue requires CAP_NET_ADMIN to create tunnel devices: ioctl(TUNSETIFF): + self.log('Applying CAP_SYS_ADMIN+CAP_NET_ADMIN capability to srsue') + util.setcap_netsys_admin(binary, self.run_dir.new_dir('setcap_netsys_admin')) + + args = (binary, os.path.abspath(self.config_file), + '--rf.device_name=zmq', + '--rf.device_args="tx_port=tcp://'+ self.addr() +':2001,rx_port=tcp://'+ self.enb.addr() +':2000,id=ue,base_srate='+ str(self.base_srate) + '"', + '--phy.nof_phy_threads=1', + '--gw.netns=' + self.netns(), + '--log.filename=' + self.log_file, + '--pcap.enable=true', + '--pcap.filename=' + self.pcap_file) + + self.dbg(run_dir=self.run_dir, binary=binary, env=env) + self.process = process.Process(self.name(), self.run_dir, args, env=env) + self.suite_run.remember_to_stop(self.process) + self.process.launch() + + def configure(self): + self.config_file = self.run_dir.new_file(srsUE.CFGFILE) + self.log_file = self.run_dir.child(srsUE.LOGFILE) + self.pcap_file = self.run_dir.new_file(srsUE.PCAPFILE) + self.dbg(config_file=self.config_file) + + values = dict(ue=config.get_defaults('srsue')) + config.overlay(values, self.suite_run.config()) + config.overlay(values, dict(ue=self._conf)) + + self.dbg('SRSUE CONFIG:\n' + pprint.pformat(values)) + + with open(self.config_file, 'w') as f: + r = template.render(srsUE.CFGFILE, values) + self.dbg(r) + f.write(r) + + def is_connected(self, mcc_mnc=None): + return 'Network attach successful.' in (self.process.get_stdout() or '') + + def is_attached(self): + return self.is_connected() + + def running(self): + return not self.process.terminated() + + def addr(self): + return self._addr + + def run_node(self): + # TODO: move to an object + return RunNode(RunNode.T_REM_SSH, self._addr, self.remote_user, self._addr) + + def run_netns_wait(self, name, popen_args): + if self.setup_runs_locally(): + proc = process.NetNSProcess(name, self.run_dir.new_dir(name), self.netns(), popen_args, env={}) + else: + proc = self.rem_host.RemoteNetNSProcess(name, self.netns(), popen_args, env={}) + proc.launch_sync() + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/suite.py b/src/osmo_gsm_tester/suite.py index 457bfb3..c2faa36 100644 --- a/src/osmo_gsm_tester/suite.py +++ b/src/osmo_gsm_tester/suite.py @@ -25,6 +25,7 @@ from .event_loop import MainLoop from . import osmo_nitb, osmo_hlr, osmo_mgcpgw, osmo_mgw, osmo_msc, osmo_bsc, osmo_stp, osmo_ggsn, osmo_sgsn, esme, osmocon, ms_driver, iperf3, process from . import run_node +from . import srs_epc class Timeout(Exception): pass @@ -362,6 +363,18 @@ def run_node(self, specifics=None): return run_node.RunNode.from_conf(self.reserved_resources.get(resource.R_RUN_NODE, specifics=specifics)) + def enb(self, specifics=None): + enb = enb_obj(self, self.reserved_resources.get(resource.R_ENB, specifics=specifics)) + self.register_for_cleanup(enb) + return enb + + def epc(self, run_node=None): + if run_node is None: + run_node = self.run_node() + epc_obj = srs_epc.srsEPC(self, run_node) + self.register_for_cleanup(epc_obj) + return epc_obj + def osmocon(self, specifics=None): conf = self.reserved_resources.get(resource.R_OSMOCON, specifics=specifics) osmocon_obj = osmocon.Osmocon(self, conf=conf) @@ -481,4 +494,12 @@ raise RuntimeError('No such BTS type is defined: %r' % bts_type) return bts_class(suite_run, conf) +def enb_obj(suite_run, conf): + enb_type = conf.get('type') + log.dbg('create ENB object', type=enb_type) + enb_class = resource.KNOWN_ENB_TYPES.get(enb_type) + if enb_class is None: + raise RuntimeError('No such ENB type is defined: %r' % enb_type) + return enb_class(suite_run, conf) + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl new file mode 100644 index 0000000..0eba35b --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl @@ -0,0 +1,279 @@ +##################################################################### +# srsENB configuration file +##################################################################### + +##################################################################### +# eNB configuration +# +# enb_id: 20-bit eNB identifier. +# cell_id: 8-bit cell identifier. +# tac: 16-bit Tracking Area Code. +# mcc: Mobile Country Code +# mnc: Mobile Network Code +# mme_addr: IP address of MME for S1 connnection +# gtp_bind_addr: Local IP address to bind for GTP connection +# s1c_bind_addr: Local IP address to bind for S1AP connection +# n_prb: Number of Physical Resource Blocks (6,15,25,50,75,100) +# tm: Transmission mode 1-4 (TM1 default) +# nof_ports: Number of Tx ports (1 port default, set to 2 for TM2/3/4) +# +##################################################################### +[enb] +enb_id = 0x19B +cell_id = 0x01 +phy_cell_id = 1 +tac = 0x0007 +mcc = ${enb.mcc} +mnc = ${enb.mnc} +mme_addr = ${enb.mme_addr} +gtp_bind_addr = ${enb.run_addr} +s1c_bind_addr = ${enb.run_addr} +n_prb = 50 +#tm = 4 +#nof_ports = 2 + +##################################################################### +# eNB configuration files +# +# sib_config: SIB1, SIB2 and SIB3 configuration file +# note: when enabling mbms, use the sib.conf.mbsfn configuration file which includes SIB13 +# rr_config: Radio Resources configuration file +# drb_config: DRB configuration file +##################################################################### +[enb_files] +sib_config = sib.conf +rr_config = rr.conf +drb_config = drb.conf + +##################################################################### +# RF configuration +# +# dl_earfcn: EARFCN code for DL +# tx_gain: Transmit gain (dB). +# rx_gain: Optional receive gain (dB). If disabled, AGC if enabled +# +# Optional parameters: +# dl_freq: Override DL frequency corresponding to dl_earfcn +# ul_freq: Override UL frequency corresponding to dl_earfcn (must be set if dl_freq is set) +# device_name: Device driver family. Supported options: "auto" (uses first found), "UHD" or "bladeRF" +# device_args: Arguments for the device driver. Options are "auto" or any string. +# Default for UHD: "recv_frame_size=9232,send_frame_size=9232" +# Default for bladeRF: "" +# #time_adv_nsamples: Transmission time advance (in number of samples) to compensate for RF delay +# from antenna to timestamp insertion. +# Default "auto". B210 USRP: 100 samples, bladeRF: 27. +# burst_preamble_us: Preamble length to transmit before start of burst. +# Default "auto". B210 USRP: 400 us, bladeRF: 0 us. +##################################################################### +[rf] +dl_earfcn = 3400 +tx_gain = 80 +rx_gain = 40 + +#device_name = auto + +# For best performance in 2x2 MIMO and >= 15 MHz use the following device_args settings: +# USRP B210: num_recv_frames=64,num_send_frames=64 + +# For best performance when BW<5 MHz (25 PRB), use the following device_args settings: +# USRP B210: send_frame_size=512,recv_frame_size=512 + +#device_args = auto +#time_adv_nsamples = auto +#burst_preamble_us = auto + + +##################################################################### +# MAC-layer packet capture configuration +# +# Packets are captured to file in the compact format decoded by +# the Wireshark mac-lte-framed dissector and with DLT 147. +# To use the dissector, edit the preferences for DLT_USER to +# add an entry with DLT=147, Payload Protocol=mac-lte-framed. +# For more information see: https://wiki.wireshark.org/MAC-LTE +# +# Please note that this setting will by default only capture MAC +# frames on dedicated channels, and not SIB. You have to build with +# WRITE_SIB_PCAP enabled in enb/src/stack/mac/mac.cc if you want +# SIB to be part of the MAC pcap file. +# +# enable: Enable MAC layer packet captures (true/false) +# filename: File path to use for packet captures +##################################################################### +[pcap] +enable = false +filename = /tmp/enb.pcap + +##################################################################### +# Log configuration +# +# Log levels can be set for individual layers. "all_level" sets log +# level for all layers unless otherwise configured. +# Format: e.g. phy_level = info +# +# In the same way, packet hex dumps can be limited for each level. +# "all_hex_limit" sets the hex limit for all layers unless otherwise +# configured. +# Format: e.g. phy_hex_limit = 32 +# +# Logging layers: rf, phy, phy_lib, mac, rlc, pdcp, rrc, gtpu, s1ap, all +# Logging levels: debug, info, warning, error, none +# +# filename: File path to use for log output. Can be set to stdout +# to print logs to standard output +# file_max_size: Maximum file size (in kilobytes). When passed, multiple files are created. +# If set to negative, a single log file will be created. +##################################################################### +[log] +all_level = warning +all_hex_limit = 32 +filename = /tmp/enb.log +file_max_size = -1 + +[gui] +enable = false + +##################################################################### +# Scheduler configuration options +# +# max_aggr_level: Optional maximum aggregation level index (l=log2(L) can be 0, 1, 2 or 3) +# pdsch_mcs: Optional fixed PDSCH MCS (ignores reported CQIs if specified) +# pdsch_max_mcs: Optional PDSCH MCS limit +# pusch_mcs: Optional fixed PUSCH MCS (ignores reported CQIs if specified) +# pusch_max_mcs: Optional PUSCH MCS limit +# #nof_ctrl_symbols: Number of control symbols +# +##################################################################### +[scheduler] +#max_aggr_level = -1 +#pdsch_mcs = -1 +#pdsch_max_mcs = -1 +#pusch_mcs = -1 +pusch_max_mcs = 16 +nof_ctrl_symbols = 3 + +##################################################################### +# eMBMS configuration options +# +# enable: Enable MBMS transmission in the eNB +# m1u_multiaddr: Multicast addres the M1-U socket will register to +# m1u_if_addr: Address of the inteferface the M1-U interface will listen for multicast packets. +# +##################################################################### +[embms] +#enable = false +#m1u_multiaddr = 239.255.0.1 +#m1u_if_addr = 127.0.1.201 + + + +##################################################################### +# Channel emulator options: +# enable: Enable/Disable internal Downlink/Uplink channel emulator +# +# -- Fading emulator +# fading.enable: Enable/disable fading simulator +# fading.model: Fading model + maximum doppler (E.g. none, epa5, eva70, etu300, etc) +# +# -- Delay Emulator delay(t) = delay_min + (delay_max - delay_min) * (1 + sin(2pi*t/period)) / 2 +# Maximum speed [m/s]: (delay_max - delay_min) * pi * 300 / period +# delay.enable: Enable/disable delay simulator +# delay.period_s: Delay period in seconds. +# delay.init_time_s: Delay initial time in seconds. +# delay.maximum_us: Maximum delay in microseconds +# delay.minumum_us: Minimum delay in microseconds +# +# -- Radio-Link Failure (RLF) Emulator +# rlf.enable: Enable/disable RLF simulator +# rlf.t_on_ms: Time for On state of the channel (ms) +# rlf.t_off_ms: Time for Off state of the channel (ms) +# +# -- High Speed Train Doppler model simulator +# hst.enable: Enable/Disable HST simulator +# hst.period_s: HST simulation period in seconds +# hst.fd_hz: Doppler frequency in Hz +# hst.init_time_s: Initial time in seconds +##################################################################### +[channel.dl] +#enable = false + +[channel.dl.fading] +#enable = false +#model = none + +[channel.dl.delay] +#enable = false +#period_s = 3600 +#init_time_s = 0 +#maximum_us = 100 +#minimum_us = 10 + +[channel.dl.rlf] +#enable = false +#t_on_ms = 10000 +#t_off_ms = 2000 + +[channel.dl.hst] +#enable = false +#period_s = 7.2 +#fd_hz = 750.0 +#init_time_s = 0.0 + +[channel.ul] +#enable = false + +[channel.ul.fading] +#enable = false +#model = none + +[channel.ul.delay] +#enable = false +#period_s = 3600 +#init_time_s = 0 +#maximum_us = 100 +#minimum_us = 10 + +[channel.ul.rlf] +#enable = false +#t_on_ms = 10000 +#t_off_ms = 2000 + +[channel.ul.hst] +#enable = false +#period_s = 7.2 +#fd_hz = -750.0 +#init_time_s = 0.0 + + +##################################################################### +# Expert configuration options +# +# pusch_max_its: Maximum number of turbo decoder iterations (Default 4) +# pusch_8bit_decoder: Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental) +# nof_phy_threads: Selects the number of PHY threads (maximum 4, minimum 1, default 2) +# metrics_period_secs: Sets the period at which metrics are requested from the eNB. +# metrics_csv_enable: Write eNB metrics to CSV file. +# metrics_csv_filename: File path to use for CSV metrics. +# pregenerate_signals: Pregenerate uplink signals after attach. Improves CPU performance. +# tx_amplitude: Transmit amplitude factor (set 0-1 to reduce PAPR) +# link_failure_nof_err: Number of PUSCH failures after which a radio-link failure is triggered. +# a link failure is when SNR<0 and CRC=KO +# max_prach_offset_us: Maximum allowed RACH offset (in us) +# eea_pref_list: Ordered preference list for the selection of encryption algorithm (EEA) (default: EEA0, EEA2, EEA1). +# eia_pref_list: Ordered preference list for the selection of integrity algorithm (EIA) (default: EIA2, EIA1, EIA0). +# +##################################################################### +[expert] +#pusch_max_its = 8 # These are half iterations +#pusch_8bit_decoder = false +#nof_phy_threads = 3 +#metrics_period_secs = 1 +#metrics_csv_enable = false +#metrics_csv_filename = /tmp/enb_metrics.csv +#pregenerate_signals = false +#tx_amplitude = 0.6 +#link_failure_nof_err = 50 +#rrc_inactivity_timer = 60000 +#max_prach_offset_us = 30 +#eea_pref_list = EEA0, EEA2, EEA1 +#eia_pref_list = EIA2, EIA1, EIA0 diff --git a/src/osmo_gsm_tester/templates/srsenb_drb.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb_drb.conf.tmpl new file mode 100644 index 0000000..32b6e93 --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsenb_drb.conf.tmpl @@ -0,0 +1,54 @@ + +// All times are in ms. Use -1 for infinity, where available + +qci_config = ( + +{ + qci=7; + pdcp_config = { + discard_timer = 100; + pdcp_sn_size = 12; + } + rlc_config = { + ul_um = { + sn_field_length = 10; + }; + dl_um = { + sn_field_length = 10; + t_reordering = 45; + }; + }; + logical_channel_config = { + priority = 13; + prioritized_bit_rate = -1; + bucket_size_duration = 100; + log_chan_group = 2; + }; +}, +{ + qci=9; + pdcp_config = { + discard_timer = -1; + status_report_required = true; + } + rlc_config = { + ul_am = { + t_poll_retx = 120; + poll_pdu = 64; + poll_byte = 750; + max_retx_thresh = 16; + }; + dl_am = { + t_reordering = 50; + t_status_prohibit = 50; + }; + }; + logical_channel_config = { + priority = 11; + prioritized_bit_rate = -1; + bucket_size_duration = 100; + log_chan_group = 3; + }; +} + +); diff --git a/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl new file mode 100644 index 0000000..1fff189 --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl @@ -0,0 +1,90 @@ +mac_cnfg = +{ + phr_cnfg = + { + dl_pathloss_change = "dB3"; // Valid: 1, 3, 6 or INFINITY + periodic_phr_timer = 50; + prohibit_phr_timer = 0; + }; + ulsch_cnfg = + { + max_harq_tx = 4; + periodic_bsr_timer = 20; // in ms + retx_bsr_timer = 320; // in ms + }; + + time_alignment_timer = -1; // -1 is infinity +}; + +phy_cnfg = +{ + phich_cnfg = + { + duration = "Normal"; + resources = "1/6"; + }; + + pusch_cnfg_ded = + { + beta_offset_ack_idx = 6; + beta_offset_ri_idx = 6; + beta_offset_cqi_idx = 6; + }; + + // PUCCH-SR resources are scheduled on time-frequeny domain first, then multiplexed in the same resource. + sched_request_cnfg = + { + dsr_trans_max = 64; + period = 20; // in ms + subframe = [1]; // vector of subframe indices allowed for SR transmissions + nof_prb = 2; // number of PRBs on each extreme used for SR (total prb is twice this number) + }; + cqi_report_cnfg = + { + mode = "periodic"; + simultaneousAckCQI = true; + period = 40; // in ms + subframe = [0]; + nof_prb = 2; + m_ri = 8; // RI period in CQI period + }; +}; + +cell_list = +( + { + // rf_port = 0; + // cell_id = 0x01; + // tac = 0x0001; + // pci = 1; + // root_seq_idx = 204; + // dl_earfcn = 3400; + // ul_earfcn = 474; + ho_active = false; + + // CA cells + scell_list = ( + {cell_id = 0x02; cross_carrier_scheduling = false; scheduling_cell_id = 0x02; ul_allowed = true} + ) + + // Cells available for handover + meas_cell_list = + ( + { + eci = 0x19C02; + dl_earfcn = 2850; + pci = 2; + } + ); + + // ReportCfg (only A3 supported) + meas_report_desc = { + a3_report_type = "RSRP"; + a3_offset = 6; + a3_hysteresis = 0; + a3_time_to_trigger = 480; + rsrq_config = 4; + }; + } + // Add here more cells +); diff --git a/src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl new file mode 100644 index 0000000..201d022 --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsenb_sib.conf.tmpl @@ -0,0 +1,118 @@ +sib1 = +{ + intra_freq_reselection = "Allowed"; + q_rx_lev_min = -65; + //p_max = 3; + cell_barred = "NotBarred" + si_window_length = 20; + sched_info = + ( + { + si_periodicity = 16; + si_mapping_info = []; // comma-separated array of SIB-indexes (from 3 to 13). + // Leave empty or commented to just scheduler sib2 + } + ); + system_info_value_tag = 0; +}; + +sib2 = +{ + rr_config_common_sib = + { + rach_cnfg = + { + num_ra_preambles = 52; + preamble_init_rx_target_pwr = -104; + pwr_ramping_step = 6; // in dB + preamble_trans_max = 10; + ra_resp_win_size = 10; // in ms + mac_con_res_timer = 64; // in ms + max_harq_msg3_tx = 4; + }; + bcch_cnfg = + { + modification_period_coeff = 16; // in ms + }; + pcch_cnfg = + { + default_paging_cycle = 32; // in rf + nB = "1"; + }; + prach_cnfg = + { + root_sequence_index = 128; + prach_cnfg_info = + { + high_speed_flag = false; + prach_config_index = 3; + prach_freq_offset = 2; + zero_correlation_zone_config = 5; + }; + }; + pdsch_cnfg = + { + /* Warning: Currently disabled and forced to p_b=1 for TM2/3/4 and p_b=0 for TM1 + */ + p_b = 1; + rs_power = 0; + }; + pusch_cnfg = + { + n_sb = 1; + hopping_mode = "inter-subframe"; + pusch_hopping_offset = 2; + enable_64_qam = false; // 64QAM PUSCH is not currently enabled + ul_rs = + { + cyclic_shift = 0; + group_assignment_pusch = 0; + group_hopping_enabled = false; + sequence_hopping_enabled = false; + }; + }; + pucch_cnfg = + { + delta_pucch_shift = 2; + n_rb_cqi = 2; + n_cs_an = 0; + n1_pucch_an = 12; + }; + ul_pwr_ctrl = + { + p0_nominal_pusch = -85; + alpha = 0.7; + p0_nominal_pucch = -107; + delta_flist_pucch = + { + format_1 = 0; + format_1b = 3; + format_2 = 1; + format_2a = 2; + format_2b = 2; + }; + delta_preamble_msg3 = 6; + }; + ul_cp_length = "len1"; + }; + + ue_timers_and_constants = + { + t300 = 2000; // in ms + t301 = 100; // in ms + t310 = 1000; // in ms + n310 = 1; + t311 = 1000; // in ms + n311 = 1; + }; + + freqInfo = + { + ul_carrier_freq_present = true; + ul_bw_present = true; + additional_spectrum_emission = 1; + }; + + time_alignment_timer = "INFINITY"; // use "sf500", "sf750", etc. +}; + diff --git a/src/osmo_gsm_tester/templates/srsepc.conf.tmpl b/src/osmo_gsm_tester/templates/srsepc.conf.tmpl new file mode 100644 index 0000000..8acd22f --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsepc.conf.tmpl @@ -0,0 +1,106 @@ +##################################################################### +# srsEPC configuration file +##################################################################### + +##################################################################### +# MME configuration +# +# mme_code: 8-bit MME code identifies the MME within a group. +# mme_group: 16-bit MME group identifier. +# tac: 16-bit Tracking Area Code. +# mcc: Mobile Country Code +# mnc: Mobile Network Code +# apn: Set Access Point Name (APN) +# mme_bind_addr: IP bind addr to listen for eNB S1-MME connnections +# dns_addr: DNS server address for the UEs +# encryption_algo: Preferred encryption algorithm for NAS layer +# (default: EEA0, support: EEA1, EEA2) +# integrity_algo: Preferred integrity protection algorithm for NAS +# (default: EIA1, support: EIA1, EIA2 (EIA0 not support) +# paging_timer: Value of paging timer in seconds (T3413) +# +##################################################################### +[mme] +mme_code = 0x1a +mme_group = 0x0001 +tac = 0x0007 +mcc = ${epc.mcc} +mnc = ${epc.mnc} +mme_bind_addr = ${epc.run_addr} +apn = srsapn +dns_addr = 8.8.8.8 +encryption_algo = EEA0 +integrity_algo = EIA1 +paging_timer = 2 + +##################################################################### +# HSS configuration +# +# db_file: Location of .csv file that stores UEs information. +# +##################################################################### +[hss] +db_file = user_db.csv + +##################################################################### +# SP-GW configuration +# +# gtpu_bind_addr: GTP-U bind address. +# sgi_if_addr: SGi TUN interface IP address. +# sgi_if_name: SGi TUN interface name. +# max_paging_queue: Maximum packets in paging queue (per UE). +# +##################################################################### + +[spgw] +gtpu_bind_addr = ${epc.run_addr} +sgi_if_addr = 172.16.0.1 +sgi_if_name = srs_spgw_sgi +max_paging_queue = 100 + +#################################################################### +# PCAP configuration +# +# Packets are captured to file in the compact format decoded by +# the Wireshark s1ap dissector and with DLT 150. +# To use the dissector, edit the preferences for DLT_USER to +# add an entry with DLT=150, Payload Protocol=s1ap. +# +# enable: Enable or disable the PCAP. +# filename: File name where to save the PCAP. +# +#################################################################### +[pcap] +enable = false +filename = /tmp/epc.pcap + +#################################################################### +# Log configuration +# +# Log levels can be set for individual layers. "all_level" sets log +# level for all layers unless otherwise configured. +# Format: e.g. s1ap_level = info +# +# In the same way, packet hex dumps can be limited for each level. +# "all_hex_limit" sets the hex limit for all layers unless otherwise +# configured. +# Format: e.g. s1ap_hex_limit = 32 +# +# Logging layers: nas, s1ap, mme_gtpc, spgw_gtpc, gtpu, spgw, hss, all +# Logging levels: debug, info, warning, error, none +# +# filename: File path to use for log output. Can be set to stdout +# to print logs to standard output +##################################################################### +[log] +all_level = info +all_hex_limit = 32 +filename = /tmp/epc.log + +#nas_level = debug +#s1ap_level = debug +#mme_gtpc_level = debug +#spgw_gtpc_level = debug +#gtpu_level = debug +#spgw_level = debug +#hss_level = debug diff --git a/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl b/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl new file mode 100644 index 0000000..32df58d --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl @@ -0,0 +1,24 @@ +# +# .csv to store UE's information in HSS +# Kept in the following format: "Name,Auth,IMSI,Key,OP_Type,OP,AMF,SQN,QCI,IP_alloc" +# +# Name: Human readable name to help distinguish UE's. Ignored by the HSS +# IMSI: UE's IMSI value +# Auth: Authentication algorithm used by the UE. Valid algorithms are XOR +# (xor) and MILENAGE (mil) +# Key: UE's key, where other keys are derived from. Stored in hexadecimal +# OP_Type: Operator's code type, either OP or OPc +# OP/OPc: Operator Code/Cyphered Operator Code, stored in hexadecimal +# AMF: Authentication management field, stored in hexadecimal +# SQN: UE's Sequence number for freshness of the authentication +# QCI: QoS Class Identifier for the UE's default bearer. +# IP_alloc: IP allocation stratagy for the SPGW. +# With 'dynamic' the SPGW will automatically allocate IPs +# With a valid IPv4 (e.g. '172.16.0.2') the UE will have a statically assigned IP. +# +# Note: Lines starting by '#' are ignored and will be overwritten +#ue2,mil,001010123456780,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,7,dynamic +#ue1,xor,001010123456789,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,9001,000000001255,7,dynamic +%for sub in epc.hss.subscribers: +ogt${sub.id},${sub.auth_algo},${sub.imsi},${sub.ki},opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,7,dynamic +%endfor diff --git a/src/osmo_gsm_tester/templates/srsue.conf.tmpl b/src/osmo_gsm_tester/templates/srsue.conf.tmpl new file mode 100644 index 0000000..5e5676d --- /dev/null +++ b/src/osmo_gsm_tester/templates/srsue.conf.tmpl @@ -0,0 +1,347 @@ +##################################################################### +# srsUE configuration file +##################################################################### + +##################################################################### +# RF configuration +# +# dl_earfcn: Downlink EARFCN code. +# freq_offset: Uplink and Downlink optional frequency offset (in Hz) +# tx_gain: Transmit gain (dB). +# rx_gain: Optional receive gain (dB). If disabled, AGC if enabled +# +# Optional parameters: +# dl_freq: Override DL frequency corresponding to dl_earfcn +# ul_freq: Override UL frequency corresponding to dl_earfcn +# nof_radios: Number of available RF devices +# nof_rf_channels: Number of RF channels per radio +# nof_rx_ant: Number of RX antennas per channel +# device_name: Device driver family. Supported options: "auto" (uses first found), "UHD" or "bladeRF" +# device_args: Arguments for the device driver. Options are "auto" or any string. +# Default for UHD: "recv_frame_size=9232,send_frame_size=9232" +# Default for bladeRF: "" +# device_args_2: Arguments for the RF device driver 2. +# device_args_3: Arguments for the RF device driver 3. +# time_adv_nsamples: Transmission time advance (in number of samples) to compensate for RF delay +# from antenna to timestamp insertion. +# Default "auto". B210 USRP: 100 samples, bladeRF: 27. +# burst_preamble_us: Preamble length to transmit before start of burst. +# Default "auto". B210 USRP: 400 us, bladeRF: 0 us. +# continuous_tx: Transmit samples continuously to the radio or on bursts (auto/yes/no). +# Default is auto (yes for UHD, no for rest) +##################################################################### +[rf] +dl_earfcn = 3400 +freq_offset = 0 +tx_gain = 80 +#rx_gain = 40 + +#nof_radios = 1 +#nof_rx_ant = 1 + +# For best performance in 2x2 MIMO and >= 15 MHz use the following device_args settings: +# USRP B210: num_recv_frames=64,num_send_frames=64 + +# For best performance when BW<5 MHz (25 PRB), use the following device_args settings: +# USRP B210: send_frame_size=512,recv_frame_size=512 + +#device_args = auto +#time_adv_nsamples = auto +#burst_preamble_us = auto +#continuous_tx = auto + + +##################################################################### +# Packet capture configuration +# +# Packet capture is supported at both MAC and NAS layers. +# MAC-layer packets are captured to file in the compact format +# decoded by the Wireshark mac-lte-framed dissector. +# To use this dissector, edit the preferences for DLT_USER to +# add an entry with DLT=147, Payload Protocol=mac-lte-framed. +# For more information see: https://wiki.wireshark.org/MAC-LTE +# NAS-layer packets are dissected with DLT=148, and +# Payload Protocol = nas-eps. +# +# enable: Enable MAC layer packet captures (true/false) +# filename: File path to use for MAC packet captures +# nas_enable: Enable NAS layer packet captures (true/false) +# nas_filename: File path to use for NAS packet captures +##################################################################### +[pcap] +enable = false +filename = /tmp/ue.pcap +nas_enable = false +nas_filename = /tmp/nas.pcap + +##################################################################### +# Log configuration +# +# Log levels can be set for individual layers. "all_level" sets log +# level for all layers unless otherwise configured. +# Format: e.g. phy_level = info +# +# In the same way, packet hex dumps can be limited for each level. +# "all_hex_limit" sets the hex limit for all layers unless otherwise +# configured. +# Format: e.g. phy_hex_limit = 32 +# +# Logging layers: rf, phy, mac, rlc, pdcp, rrc, nas, gw, usim, all +# Logging levels: debug, info, warning, error, none +# +# filename: File path to use for log output. Can be set to stdout +# to print logs to standard output +# file_max_size: Maximum file size (in kilobytes). When passed, multiple files are created. +# If set to negative, a single log file will be created. +##################################################################### +[log] +all_level = warning +phy_lib_level = none +all_hex_limit = 32 +filename = /tmp/ue.log +file_max_size = -1 + +##################################################################### +# USIM configuration +# +# mode: USIM mode (soft/pcsc) +# algo: Authentication algorithm (xor/milenage) +# op/opc: 128-bit Operator Variant Algorithm Configuration Field (hex) +# - Specify either op or opc (only used in milenage) +# k: 128-bit subscriber key (hex) +# imsi: 15 digit International Mobile Subscriber Identity +# imei: 15 digit International Mobile Station Equipment Identity +# pin: PIN in case real SIM card is used +# reader: Specify card reader by it's name as listed by 'pcsc_scan'. If empty, try all available readers. +##################################################################### +[usim] +mode = soft +algo = ${ue.auth_algo} +#opc = 63BFA50EE6523365FF14C1F45F88737D +k = ${ue.ki} +imsi = ${ue.imsi} +imei = 353490069873319 +#reader = +#pin = 1234 + +##################################################################### +# RRC configuration +# +# ue_category: Sets UE category (range 1-5). Default: 4 +# release: UE Release (8 to 10) +# feature_group: Hex value of the featureGroupIndicators field in the +# UECapabilityInformation message. Default 0xe6041000 +# mbms_service_id: MBMS service id for autostarting MBMS reception +# (default -1 means disabled) +# mbms_service_port: Port of the MBMS service +##################################################################### +[rrc] +#ue_category = 4 +#release = 8 +#feature_group = 0xe6041000 +#mbms_service_id = -1 +#mbms_service_port = 4321 + +##################################################################### +# NAS configuration +# +# apn: Set Access Point Name (APN) +# apn_protocol: Set APN protocol (IPv4, IPv6 or IPv4v6.) +# user: Username for CHAP authentication +# pass: Password for CHAP authentication +# force_imsi_attach: Whether to always perform an IMSI attach +# eia: List of integrity algorithms included in UE capabilities +# Supported: 1 - Snow3G, 2 - AES +# eea: List of ciphering algorithms included in UE capabilities +# Supported: 0 - NULL, 1 - Snow3G, 2 - AES +##################################################################### +[nas] +#apn = internetinternet +#apn_protocol = ipv4 +#user = srsuser +#pass = srspass +#force_imsi_attach = false +#eia = 1,2 +#eea = 0,1,2 + +##################################################################### +# GW configuration +# +# netns: Network namespace to create TUN device. Default: empty +# ip_devname: Name of the tun_srsue device. Default: tun_srsue +# ip_netmask: Netmask of the tun_srsue device. Default: 255.255.255.0 +##################################################################### +[gw] +#netns = +#ip_devname = tun_srsue +#ip_netmask = 255.255.255.0 + +##################################################################### +# GUI configuration +# +# Simple GUI displaying PDSCH constellation and channel freq response. +# (Requires building with srsGUI) +# enable: Enable the graphical interface (true/false) +##################################################################### +[gui] +enable = false + +##################################################################### +# Channel emulator options: +# enable: Enable/Disable internal Downlink/Uplink channel emulator +# +# -- Fading emulator +# fading.enable: Enable/disable fading simulator +# fading.model: Fading model + maximum doppler (E.g. none, epa5, eva70, etu300, etc) +# +# -- Delay Emulator delay(t) = delay_min + (delay_max - delay_min) * (1 + sin(2pi*t/period)) / 2 +# Maximum speed [m/s]: (delay_max - delay_min) * pi * 300 / period +# delay.enable: Enable/disable delay simulator +# delay.period_s: Delay period in seconds. +# delay.init_time_s: Delay initial time in seconds. +# delay.maximum_us: Maximum delay in microseconds +# delay.minumum_us: Minimum delay in microseconds +# +# -- Radio-Link Failure (RLF) Emulator +# rlf.enable: Enable/disable RLF simulator +# rlf.t_on_ms: Time for On state of the channel (ms) +# rlf.t_off_ms: Time for Off state of the channel (ms) +# +# -- High Speed Train Doppler model simulator +# hst.enable: Enable/Disable HST simulator +# hst.period_s: HST simulation period in seconds +# hst.fd_hz: Doppler frequency in Hz +# hst.init_time_s: Initial time in seconds +##################################################################### +[channel.dl] +#enable = false + +[channel.dl.fading] +#enable = false +#model = none + +[channel.dl.delay] +#enable = false +#period_s = 3600 +#init_time_s = 0 +#maximum_us = 100 +#minimum_us = 10 + +[channel.dl.rlf] +#enable = false +#t_on_ms = 10000 +#t_off_ms = 2000 + +[channel.dl.hst] +#enable = false +#period_s = 7.2 +#fd_hz = 750.0 +#init_time_s = 0.0 + +[channel.ul] +#enable = false + +[channel.ul.fading] +#enable = false +#model = none + +[channel.ul.delay] +#enable = false +#period_s = 3600 +#init_time_s = 0 +#maximum_us = 100 +#minimum_us = 10 + +[channel.ul.rlf] +#enable = false +#t_on_ms = 10000 +#t_off_ms = 2000 + +[channel.ul.hst] +#enable = false +#period_s = 7.2 +#fd_hz = -750.0 +#init_time_s = 0.0 + +##################################################################### +# PHY configuration options +# +# rx_gain_offset: RX Gain offset to add to rx_gain to calibrate RSRP readings +# prach_gain: PRACH gain (dB). If defined, forces a gain for the tranmsission of PRACH only., +# Default is to use tx_gain in [rf] section. +# cqi_max: Upper bound on the maximum CQI to be reported. Default 15. +# cqi_fixed: Fixes the reported CQI to a constant value. Default disabled. +# snr_ema_coeff: Sets the SNR exponential moving average coefficient (Default 0.1) +# snr_estim_alg: Sets the noise estimation algorithm. (Default refs) +# Options: pss: use difference between received and known pss signal, +# refs: use difference between noise references and noiseless (after filtering) +# empty: use empty subcarriers in the boarder of pss/sss signal +# pdsch_max_its: Maximum number of turbo decoder iterations (Default 4) +# nof_phy_threads: Selects the number of PHY threads (maximum 4, minimum 1, default 2) +# equalizer_mode: Selects equalizer mode. Valid modes are: "mmse", "zf" or any +# non-negative real number to indicate a regularized zf coefficient. +# Default is MMSE. +# sfo_ema: EMA coefficient to average sample offsets used to compute SFO +# sfo_correct_period: Period in ms to correct sample time to adjust for SFO +# sss_algorithm: Selects the SSS estimation algorithm. Can choose between +# {full, partial, diff}. +# estimator_fil_auto: The channel estimator smooths the channel estimate with an adaptative filter. +# estimator_fil_stddev: Sets the channel estimator smooth gaussian filter standard deviation. +# estimator_fil_order: Sets the channel estimator smooth gaussian filter order (even values perform better). +# The taps are [w, 1-2w, w] +# +# snr_to_cqi_offset: Sets an offset in the SNR to CQI table. This is used to adjust the reported CQI. +# +# pregenerate_signals: Pregenerate uplink signals after attach. Improves CPU performance. +# +# interpolate_subframe_enabled: Interpolates in the time domain the channel estimates within 1 subframe. Default is to average. +# +# sic_pss_enabled: Applies Successive Interference Cancellation to PSS signals when searching for neighbour cells. +# Must be disabled if cells have identical channel and timing, for instance if generated from +# the same source. +# +# pdsch_csi_enabled: Stores the Channel State Information and uses it for weightening the softbits. It is only +# used in TM1. It is True by default. +# +# pdsch_8bit_decoder: Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental) +# force_ul_amplitude: Forces the peak amplitude in the PUCCH, PUSCH and SRS (set 0.0 to 1.0, set to 0 or negative for disabling) +# +##################################################################### +[phy] +#rx_gain_offset = 62 +#prach_gain = 30 +#cqi_max = 15 +#cqi_fixed = 10 +#snr_ema_coeff = 0.1 +#snr_estim_alg = refs +#pdsch_max_its = 8 # These are half iterations +#nof_phy_threads = 3 +#equalizer_mode = mmse +#sfo_ema = 0.1 +#sfo_correct_period = 10 +#sss_algorithm = full +#estimator_fil_auto = false +#estimator_fil_stddev = 1.0 +#estimator_fil_order = 4 +#snr_to_cqi_offset = 0.0 +#interpolate_subframe_enabled = false +#sic_pss_enabled = true +#pregenerate_signals = false +#pdsch_csi_enabled = true +#pdsch_8bit_decoder = false +#force_ul_amplitude = 0 + +##################################################################### +# General configuration options +# +# metrics_csv_enable: Write UE metrics to CSV file. +# +# metrics_period_secs: Sets the period at which metrics are requested from the UE. +# +# metrics_csv_filename: File path to use for CSV metrics. +# +##################################################################### +[general] +#metrics_csv_enable = false +#metrics_period_secs = 1 +#metrics_csv_filename = /tmp/ue_metrics.csv diff --git a/suites/4g/iperf3.py b/suites/4g/iperf3.py new file mode 100755 index 0000000..5ccc922 --- /dev/null +++ b/suites/4g/iperf3.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.testenv import * + +def print_results(cli_res, srv_res): + cli_sent = cli_res['end']['sum_sent'] + cli_recv = cli_res['end']['sum_received'] + print("RESULT client:") + print("\tSEND: %d KB, %d kbps, %d seconds (%d retrans)" % (cli_sent['bytes']/1000, cli_sent['bits_per_second']/1000, cli_sent['seconds'], cli_sent['retransmits'])) + print("\tRECV: %d KB, %d kbps, %d seconds" % (cli_recv['bytes']/1000, cli_recv['bits_per_second']/1000, cli_recv['seconds'])) + print("RESULT server:") + print("\tSEND: %d KB, %d kbps, %d seconds" % (cli_sent['bytes']/1000, cli_sent['bits_per_second']/1000, cli_sent['seconds'])) + print("\tRECV: %d KB, %d kbps, %d seconds" % (cli_recv['bytes']/1000, cli_recv['bits_per_second']/1000, cli_recv['seconds'])) + + +epc = suite.epc() +enb = suite.enb() +ue = suite.modem() +iperf3srv = suite.iperf3srv({'addr': epc.tun_addr()}) +iperf3srv.set_run_node(epc.run_node()) +iperf3cli = iperf3srv.create_client() +iperf3cli.set_run_node(ue.run_node()) + +epc.subscriber_add(ue) +epc.start() +enb.ue_add(ue) +enb.start(epc) + +print('waiting for ENB to connect to EPC...') +wait(epc.enb_is_connected, enb) +print('ENB is connected to EPC') + +ue.connect(enb) + +iperf3srv.start() +proc = iperf3cli.prepare_test_proc(ue.netns()) + +print('waiting for UE to attach...') +wait(ue.is_connected, None) +print('UE is attached') + +print("Running iperf3 client to %s through %s" % (str(iperf3cli), ue.netns())) +proc.launch_sync() +iperf3srv.stop() +print_results(iperf3cli.get_results(), iperf3srv.get_results()) diff --git a/suites/4g/mo_mt_sms.py b/suites/4g/mo_mt_sms.py deleted file mode 100755 index 8aa4357..0000000 --- a/suites/4g/mo_mt_sms.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python3 -from osmo_gsm_tester.testenv import * - -#epc = suite.epc() -#enb = suite.enb() -ue = suite.modem() - -#enb.start() -#epc.enb_add(enb) -#epc.start() - -#wait(epc.enb_is_connected, enb) - -#hss/epc.subscriber_add(ue) - -#ue.connect(epc.mcc_mnc()) -ue.connect() - - -print('waiting for modem to attach...') -#wait(ue.is_connected, msc.mcc_mnc()) -sleep(10) diff --git a/suites/4g/ping.py b/suites/4g/ping.py new file mode 100755 index 0000000..b44ff84 --- /dev/null +++ b/suites/4g/ping.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.testenv import * + +epc = suite.epc() +enb = suite.enb() +ue = suite.modem() + +epc.subscriber_add(ue) +epc.start() +enb.ue_add(ue) +enb.start(epc) + +print('waiting for ENB to connect to EPC...') +wait(epc.enb_is_connected, enb) +print('ENB is connected to EPC') + +ue.connect(enb) +print('waiting for UE to attach...') +wait(ue.is_connected, None) +print('UE is attached') + +ue.run_netns_wait('ping', ('ping', '-c', '10', epc.tun_addr())) diff --git a/suites/4g/suite.conf b/suites/4g/suite.conf index c55b610..352293a 100644 --- a/suites/4g/suite.conf +++ b/suites/4g/suite.conf @@ -1,6 +1,9 @@ resources: - ip_address: + run_node: # for EPC - times: 1 + enb: + - times: 1 + type: srsenb modem: - times: 1 type: srsue -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17139 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I290c0d79258a9f94f00c7ff2e1c6c5579c0e32f4 Gerrit-Change-Number: 17139 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 14:24:09 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 14:24:09 +0000 Subject: Change in osmo-gsm-tester[master]: default-suites.conf: Run 4g test suite (srsLTE ZeroMQ) In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17142 ) Change subject: default-suites.conf: Run 4g test suite (srsLTE ZeroMQ) ...................................................................... default-suites.conf: Run 4g test suite (srsLTE ZeroMQ) Change-Id: I3f8c3588d7b139f044462d02069919256126bf57 --- M example/default-suites.conf 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/example/default-suites.conf b/example/default-suites.conf index a0dabdd..cfac1ca 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -161,3 +161,5 @@ - nitb_smpp - smpp - encryption + +- 4g -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17142 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I3f8c3588d7b139f044462d02069919256126bf57 Gerrit-Change-Number: 17142 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 14:40:57 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 14:40:57 +0000 Subject: Change in osmo-gsm-tester[master]: contrib/*sysmo.sh: Fix default poky SDK version to 2.3.4 References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17145 ) Change subject: contrib/*sysmo.sh: Fix default poky SDK version to 2.3.4 ...................................................................... contrib/*sysmo.sh: Fix default poky SDK version to 2.3.4 Current latest poky SDK is 2.3.4, and that's the one we have installed in all buildhosts. Change-Id: I8c855456c7f94a3d6ee58ca550a056a0fea61a71 --- M contrib/jenkins-build-osmo-bts-sysmo.sh M contrib/jenkins-build-osmo-pcu-sysmo.sh 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/45/17145/1 diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh b/contrib/jenkins-build-osmo-bts-sysmo.sh index 4370ecd..82dae39 100755 --- a/contrib/jenkins-build-osmo-bts-sysmo.sh +++ b/contrib/jenkins-build-osmo-bts-sysmo.sh @@ -4,7 +4,7 @@ _poky_version="$POKY_VERSION" _poky_path="$POKY_PATH" -[ -z "$_poky_version" ] && _poky_version="2.3.2" +[ -z "$_poky_version" ] && _poky_version="2.3.4" [ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version" . "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi" diff --git a/contrib/jenkins-build-osmo-pcu-sysmo.sh b/contrib/jenkins-build-osmo-pcu-sysmo.sh index ecc8bc3..13f37b5 100755 --- a/contrib/jenkins-build-osmo-pcu-sysmo.sh +++ b/contrib/jenkins-build-osmo-pcu-sysmo.sh @@ -4,7 +4,7 @@ _poky_version="$POKY_VERSION" _poky_path="$POKY_PATH" -[ -z "$_poky_version" ] && _poky_version="2.3.2" +[ -z "$_poky_version" ] && _poky_version="2.3.4" [ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version" . "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi" -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I8c855456c7f94a3d6ee58ca550a056a0fea61a71 Gerrit-Change-Number: 17145 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 14:44:59 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 14:44:59 +0000 Subject: Change in osmo-ci[master]: ansible: Install libsoapysdr-dev as dependency for srsLTE In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17144 ) Change subject: ansible: Install libsoapysdr-dev as dependency for srsLTE ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Idd8baf934cb9245e0f897e84754905172b659e40 Gerrit-Change-Number: 17144 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 14:44:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 14:45:03 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 14:45:03 +0000 Subject: Change in osmo-ci[master]: gsm-tester: Install helper scripts and sudoers.d files from git repo In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17131 ) Change subject: gsm-tester: Install helper scripts and sudoers.d files from git repo ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibbdd291f4c3f7aecdd5118cc2b3b35edaddf7c09 Gerrit-Change-Number: 17131 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 14:45:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 14:45:08 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 14:45:08 +0000 Subject: Change in osmo-ci[master]: gsm-tester: Manual build and install of patchelf v0.10 In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17128 ) Change subject: gsm-tester: Manual build and install of patchelf v0.10 ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17128 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I28825d723b85900fb51cc5b8a9d14c6ef346e667 Gerrit-Change-Number: 17128 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 14:45:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 14:45:19 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 14:45:19 +0000 Subject: Change in docker-playground[master]: Introduce osmo-gsm-tester docker setup In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/17143 ) Change subject: Introduce osmo-gsm-tester docker setup ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17143 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Iac7c0b613048ce332642d3957c55cc7c53b56d42 Gerrit-Change-Number: 17143 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 14:45:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 14:50:22 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 14:50:22 +0000 Subject: Change in osmo-gsm-tester[master]: contrib/*sysmo.sh: Fix default poky SDK version to 2.3.4 In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17145 ) Change subject: contrib/*sysmo.sh: Fix default poky SDK version to 2.3.4 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I8c855456c7f94a3d6ee58ca550a056a0fea61a71 Gerrit-Change-Number: 17145 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 14:50:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 14:50:25 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 14:50:25 +0000 Subject: Change in osmo-gsm-tester[master]: contrib/*sysmo.sh: Fix default poky SDK version to 2.3.4 In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17145 ) Change subject: contrib/*sysmo.sh: Fix default poky SDK version to 2.3.4 ...................................................................... contrib/*sysmo.sh: Fix default poky SDK version to 2.3.4 Current latest poky SDK is 2.3.4, and that's the one we have installed in all buildhosts. Change-Id: I8c855456c7f94a3d6ee58ca550a056a0fea61a71 --- M contrib/jenkins-build-osmo-bts-sysmo.sh M contrib/jenkins-build-osmo-pcu-sysmo.sh 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh b/contrib/jenkins-build-osmo-bts-sysmo.sh index 4370ecd..82dae39 100755 --- a/contrib/jenkins-build-osmo-bts-sysmo.sh +++ b/contrib/jenkins-build-osmo-bts-sysmo.sh @@ -4,7 +4,7 @@ _poky_version="$POKY_VERSION" _poky_path="$POKY_PATH" -[ -z "$_poky_version" ] && _poky_version="2.3.2" +[ -z "$_poky_version" ] && _poky_version="2.3.4" [ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version" . "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi" diff --git a/contrib/jenkins-build-osmo-pcu-sysmo.sh b/contrib/jenkins-build-osmo-pcu-sysmo.sh index ecc8bc3..13f37b5 100755 --- a/contrib/jenkins-build-osmo-pcu-sysmo.sh +++ b/contrib/jenkins-build-osmo-pcu-sysmo.sh @@ -4,7 +4,7 @@ _poky_version="$POKY_VERSION" _poky_path="$POKY_PATH" -[ -z "$_poky_version" ] && _poky_version="2.3.2" +[ -z "$_poky_version" ] && _poky_version="2.3.4" [ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version" . "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi" -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17145 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I8c855456c7f94a3d6ee58ca550a056a0fea61a71 Gerrit-Change-Number: 17145 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:04:32 2020 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Fri, 14 Feb 2020 15:04:32 +0000 Subject: Change in osmo-bts[master]: osmo-bts-sysmo: merge measurement data and payload References: Message-ID: dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17146 ) Change subject: osmo-bts-sysmo: merge measurement data and payload ...................................................................... osmo-bts-sysmo: merge measurement data and payload For osmo-bts-sysmo the MPH INFO MEAS IND indication is still sent separately. Lets merge the measurement information into the PH DATA and TCH indication like we already did it for osmo-bts-trx Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Related: OS#2977 --- M include/osmo-bts/l1sap.h M src/common/l1sap.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/main.c M src/osmo-bts-sysmo/tch.c 5 files changed, 35 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/17146/1 diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h index 1883869..94d42d8 100644 --- a/include/osmo-bts/l1sap.h +++ b/include/osmo-bts/l1sap.h @@ -136,6 +136,11 @@ struct gsm_lchan *lchan, uint8_t chan_nr, uint32_t fn, uint16_t ber10k, int16_t lqual_cb); +int add_l1sap_header2(struct gsm_bts_trx *trx, struct msgb *rmsg, + struct gsm_lchan *lchan, uint8_t chan_nr, uint32_t fn, + uint16_t ber10k, int16_t lqual_cb, int8_t rssi, + int16_t ta_offs, uint8_t is_sub); + #define msgb_l1sap_prim(msg) ((struct osmo_phsap_prim *)(msg)->l1h) int bts_check_for_first_ciphrd(struct gsm_lchan *lchan, diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 0b51045..084c86b 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -180,6 +180,15 @@ struct gsm_lchan *lchan, uint8_t chan_nr, uint32_t fn, uint16_t ber10k, int16_t lqual_cb) { + return add_l1sap_header2(trx, rmsg, lchan, chan_nr, fn, ber10k, + lqual_cb, 0, 0, 0); +} + +int add_l1sap_header2(struct gsm_bts_trx *trx, struct msgb *rmsg, + struct gsm_lchan *lchan, uint8_t chan_nr, uint32_t fn, + uint16_t ber10k, int16_t lqual_cb, int8_t rssi, + int16_t ta_offs, uint8_t is_sub) +{ struct osmo_phsap_prim *l1sap; LOGPLCHAN(lchan, DL1P, LOGL_DEBUG, "Rx -> RTP: %s\n", osmo_hexdump(rmsg->data, rmsg->len)); @@ -194,6 +203,10 @@ l1sap->u.tch.ber10k = ber10k; l1sap->u.tch.lqual_cb = lqual_cb; + l1sap->u.tch.rssi = rssi; + l1sap->u.tch.ta_offs_256bits = ta_offs; + l1sap->u.tch.is_sub = is_sub; + return l1sap_up(trx, l1sap); } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index db0dfb5..2e5e5b6 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -940,25 +940,6 @@ #define LOG_FMT_MEAS "Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, BER %-3.2f, Timing %d" #define LOG_PARAM_MEAS(meas_param) (meas_param)->fRssi, (meas_param)->fLinkQuality, (meas_param)->fBer, (meas_param)->i16BurstTiming -static int process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr, - uint32_t fn, GsmL1_MeasParam_t *m) -{ - struct osmo_phsap_prim l1sap; - memset(&l1sap, 0, sizeof(l1sap)); - osmo_prim_init(&l1sap.oph, SAP_GSM_PH, PRIM_MPH_INFO, - PRIM_OP_INDICATION, NULL); - l1sap.u.info.type = PRIM_INFO_MEAS; - l1sap.u.info.u.meas_ind.chan_nr = chan_nr; - l1sap.u.info.u.meas_ind.ta_offs_256bits = m->i16BurstTiming * 64; - l1sap.u.info.u.meas_ind.ber10k = (unsigned int) (m->fBer * 10000); - l1sap.u.info.u.meas_ind.inv_rssi = (uint8_t) (m->fRssi * -1); - l1sap.u.info.u.meas_ind.fn = fn; - - /* l1sap wants to take msgb ownership. However, as there is no - * msg, it will msgb_free(l1sap.oph.msg == NULL) */ - return l1sap_up(trx, &l1sap); -} - static int handle_ph_data_ind(struct femtol1_hdl *fl1, GsmL1_PhDataInd_t *data_ind, struct msgb *l1p_msg) { @@ -983,8 +964,6 @@ fn = data_ind->u32Fn; link_id = (data_ind->sapi == GsmL1_Sapi_Sacch) ? LID_SACCH : LID_DEDIC; - process_meas_res(trx, chan_nr, fn, &data_ind->measParam); - gsm_fn2gsmtime(&g_time, fn); DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s, " LOG_FMT_MEAS "\n", @@ -1010,11 +989,10 @@ l1sap->u.data.chan_nr = chan_nr; l1sap->u.data.fn = fn; l1sap->u.data.rssi = (int8_t) (data_ind->measParam.fRssi); - if (!pcu_direct) { /* FIXME: if pcu_direct=1, then this is not set, what to do in pcu_tx_data_ind() in this case ?*/ - l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; - l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming * 64; - l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; - } + l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; + l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming * 64; + l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; + /* copy data from L1 primitive to L1SAP primitive */ sap_msg->l2h = msgb_put(sap_msg, data_ind->msgUnitParam.u8Size); memcpy(sap_msg->l2h, data_ind->msgUnitParam.u8Buffer, diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index bb2c436..44c6d5d 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -87,6 +87,7 @@ gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); + gsm_bts_set_feature(bts, BTS_FEAT_MEAS_PAYLOAD_COMB); bts_model_vty_init(bts); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index 54e7313..a9997f6 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -516,9 +516,12 @@ LOGPFN(DL1P, LOGL_DEBUG, data_ind->u32Fn, "chan_nr %d Rx Payload size 0\n", chan_nr); /* Push empty payload to upper layers */ rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP"); - return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, - data_ind->measParam.fBer * 10000, - data_ind->measParam.fLinkQuality * 10); + return add_l1sap_header2(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, + data_ind->measParam.fBer * 10000, + data_ind->measParam.fLinkQuality * 10, + data_ind->measParam.fRssi, + data_ind->measParam.i16BurstTiming * 64, + 0); } payload_type = data_ind->msgUnitParam.u8Buffer[0]; @@ -611,9 +614,12 @@ } if (rmsg) - return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, - data_ind->measParam.fBer * 10000, - data_ind->measParam.fLinkQuality * 10); + return add_l1sap_header2(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, + data_ind->measParam.fBer * 10000, + data_ind->measParam.fLinkQuality * 10, + data_ind->measParam.fRssi, + data_ind->measParam.i16BurstTiming * 64, + 0); return 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Gerrit-Change-Number: 17146 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:22:49 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 15:22:49 +0000 Subject: Change in osmo-ci[master]: poky-sdk: Use first letter in caps (as in python bool) References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17147 ) Change subject: poky-sdk: Use first letter in caps (as in python bool) ...................................................................... poky-sdk: Use first letter in caps (as in python bool) Same as done in install-coverity/tasks/main.yml. Change-Id: Ifbfe678e89bef3acd33e562888ad81093fa1230d --- M ansible/roles/install-poky-sdk/tasks/main.yml 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/47/17147/1 diff --git a/ansible/roles/install-poky-sdk/tasks/main.yml b/ansible/roles/install-poky-sdk/tasks/main.yml index 7f95dce..ff65c1b 100644 --- a/ansible/roles/install-poky-sdk/tasks/main.yml +++ b/ansible/roles/install-poky-sdk/tasks/main.yml @@ -21,7 +21,7 @@ command: "/tmp/{{ poky_installer_file }} -y -d '{{ poky_dest }}'" args: creates: "{{ poky_dest }}" - when: poky_copy.failed == false + when: poky_copy.failed == False tags: [poky] - name: change owner/group to jenkins user @@ -30,18 +30,18 @@ owner: "{{ jenkins_user }}" group: "{{ jenkins_user }}" recurse: yes - when: poky_copy.failed == false + when: poky_copy.failed == False tags: [poky] - name: remove poky installer file: path: "/tmp/{{ poky_installer_file }}" state: absent - when: poky_copy.failed == false + when: poky_copy.failed == False tags: [poky] - name: "Please download {{ poky_installer_file }} to your ansible directory to allow ansible to install poky" debug: msg: "Ansible can not find or copy {{ poky_installer_file }}" - when: poky_copy.failed + when: poky_copy.failed == True tags: [poky] -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17147 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ifbfe678e89bef3acd33e562888ad81093fa1230d Gerrit-Change-Number: 17147 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:28:24 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 15:28:24 +0000 Subject: Change in osmo-gsm-tester[master]: contrib/*sysmo.sh: Fix default poky SDK path References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17148 ) Change subject: contrib/*sysmo.sh: Fix default poky SDK path ...................................................................... contrib/*sysmo.sh: Fix default poky SDK path ansible scripts are installing the SDK in "poky-sdk" dir, not "poky" one. Change-Id: I002fde53684cd4a43c9f22e09264056f2a950c24 --- M contrib/jenkins-build-osmo-bts-sysmo.sh M contrib/jenkins-build-osmo-pcu-sysmo.sh 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/48/17148/1 diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh b/contrib/jenkins-build-osmo-bts-sysmo.sh index 82dae39..fc528d3 100755 --- a/contrib/jenkins-build-osmo-bts-sysmo.sh +++ b/contrib/jenkins-build-osmo-bts-sysmo.sh @@ -5,7 +5,7 @@ _poky_path="$POKY_PATH" [ -z "$_poky_version" ] && _poky_version="2.3.4" -[ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version" +[ -z "$_poky_path" ] && _poky_path="/opt/poky-sdk/$_poky_version" . "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi" diff --git a/contrib/jenkins-build-osmo-pcu-sysmo.sh b/contrib/jenkins-build-osmo-pcu-sysmo.sh index 13f37b5..789b0c0 100755 --- a/contrib/jenkins-build-osmo-pcu-sysmo.sh +++ b/contrib/jenkins-build-osmo-pcu-sysmo.sh @@ -5,7 +5,7 @@ _poky_path="$POKY_PATH" [ -z "$_poky_version" ] && _poky_version="2.3.4" -[ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version" +[ -z "$_poky_path" ] && _poky_path="/opt/poky-sdk/$_poky_version" . "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi" -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17148 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I002fde53684cd4a43c9f22e09264056f2a950c24 Gerrit-Change-Number: 17148 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:33:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:33:20 +0000 Subject: Change in pysim[master]: pySim-read.py: fix copy-paste: s/HPLMNAcT/PLMNsel/ In-Reply-To: References: Message-ID: Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/17019 to look at the new patch set (#2). Change subject: pySim-read.py: fix copy-paste: s/HPLMNAcT/PLMNsel/ ...................................................................... pySim-read.py: fix copy-paste: s/HPLMNAcT/PLMNsel/ Change-Id: I4a452a2e439cb713621a028cf0046339f50864b6 --- M pySim-read.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/19/17019/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4a452a2e439cb713621a028cf0046339f50864b6 Gerrit-Change-Number: 17019 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:33:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:33:20 +0000 Subject: Change in pysim[master]: pySim-read.py: print meaningful message when SPN is not set In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#3) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16981 ) Change subject: pySim-read.py: print meaningful message when SPN is not set ...................................................................... pySim-read.py: print meaningful message when SPN is not set Change-Id: I1d98520f33a8564c7d69f50a0811204f138f9dca --- M pySim-read.py M pysim-testdata/sysmoISIM-SJA2.ok M pysim-testdata/sysmosim-gr1.ok 3 files changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/81/16981/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1d98520f33a8564c7d69f50a0811204f138f9dca Gerrit-Change-Number: 16981 Gerrit-PatchSet: 3 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:33:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:33:20 +0000 Subject: Change in pysim[master]: pySim-prog.py: add presence/length checks for user-provided SPN In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#4) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16977 ) Change subject: pySim-prog.py: add presence/length checks for user-provided SPN ...................................................................... pySim-prog.py: add presence/length checks for user-provided SPN Change-Id: I35fab9a85efda2b83f221a460d31c7d41db582b0 --- M pySim-prog.py M pySim/cards.py 2 files changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/77/16977/4 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16977 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I35fab9a85efda2b83f221a460d31c7d41db582b0 Gerrit-Change-Number: 16977 Gerrit-PatchSet: 4 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:33:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:33:20 +0000 Subject: Change in pysim[master]: cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act() In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#8) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16945 ) Change subject: cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act() ...................................................................... cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act() Change-Id: I35848059d6082c379246c8d695cb094c20780d15 --- M pySim/cards.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/45/16945/8 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I35848059d6082c379246c8d695cb094c20780d15 Gerrit-Change-Number: 16945 Gerrit-PatchSet: 8 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:33:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:33:20 +0000 Subject: Change in pysim[master]: cards/sysmoUSIM-SJS1: support programming of ACC bits In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#6) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16950 ) Change subject: cards/sysmoUSIM-SJS1: support programming of ACC bits ...................................................................... cards/sysmoUSIM-SJS1: support programming of ACC bits Change-Id: Id0ed9e5654dc0a70a4732bbe5787f1900789d580 --- M pySim/cards.py 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/50/16950/6 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16950 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Id0ed9e5654dc0a70a4732bbe5787f1900789d580 Gerrit-Change-Number: 16950 Gerrit-PatchSet: 6 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:33:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:33:20 +0000 Subject: Change in pysim[master]: cards/sysmoUSIM-SJS1: support programming of EF.HPLMNwAcT In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#6) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16972 ) Change subject: cards/sysmoUSIM-SJS1: support programming of EF.HPLMNwAcT ...................................................................... cards/sysmoUSIM-SJS1: support programming of EF.HPLMNwAcT Change-Id: Ida93f4a00fe3b1d0f05d6eeda0e7873ce16d4c17 --- M pySim/cards.py 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/72/16972/6 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16972 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ida93f4a00fe3b1d0f05d6eeda0e7873ce16d4c17 Gerrit-Change-Number: 16972 Gerrit-PatchSet: 6 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:33:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:33:20 +0000 Subject: Change in pysim[master]: Fix MCC and MCC representation in the output of pySim-read In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#7) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16944 ) Change subject: Fix MCC and MCC representation in the output of pySim-read ...................................................................... Fix MCC and MCC representation in the output of pySim-read Change-Id: Ie699c0a38d5ae90e4d6109e4574ce860e4044096 --- M pySim/utils.py M pysim-testdata/Fairwaves-SIM.ok M pysim-testdata/Wavemobile-SIM.ok M pysim-testdata/sysmoISIM-SJA2.ok M pysim-testdata/sysmoUSIM-SJS1.ok 5 files changed, 59 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/44/16944/7 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16944 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie699c0a38d5ae90e4d6109e4574ce860e4044096 Gerrit-Change-Number: 16944 Gerrit-PatchSet: 7 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:33:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:33:20 +0000 Subject: Change in pysim[master]: pySim-read.py: fix reading and parsing of EF.MSISDN In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#16) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16947 ) Change subject: pySim-read.py: fix reading and parsing of EF.MSISDN ...................................................................... pySim-read.py: fix reading and parsing of EF.MSISDN This change implements parsing of EF.MSISDN (and thus EF.ADN) as per 3GPP TS 31.102, sections 4.2.26 and 4.4.2.3. Example (commercial SIM card from 401/02): EF.MSISDN: ffffffffffffffffffffffffffff07917787028982f7ffffffffffff Decoded: (ToN=1 NPI=1) +77782098287 Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 --- M pySim-read.py M pySim/utils.py 2 files changed, 46 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/47/16947/16 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 Gerrit-Change-Number: 16947 Gerrit-PatchSet: 16 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: dexter Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:33:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:33:20 +0000 Subject: Change in pysim[master]: pySim-prog.py: add support for MSISDN programming In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#7) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16946 ) Change subject: pySim-prog.py: add support for MSISDN programming ...................................................................... pySim-prog.py: add support for MSISDN programming This change implements programming of EF.MSISDN as per 3GPP TS 31.102, sections 4.2.26 and 4.4.2.3, excluding the following fields: - Alpha Identifier (currently 'FF'O * 20), - Capability/Configuration1 Record Identifier ('FF'O), - Extension1 Record Identifier ('FF'O). This feature is introduced exclusively for sysmoUSIM-SJS1. Othere SIM card types need to be tested. Change-Id: Ie033a0ffc3697ae562eaa7a241a0f6af6c2b0594 --- M pySim-prog.py M pySim/cards.py M pySim/utils.py 3 files changed, 52 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/46/16946/7 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie033a0ffc3697ae562eaa7a241a0f6af6c2b0594 Gerrit-Change-Number: 16946 Gerrit-PatchSet: 7 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:33:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:33:20 +0000 Subject: Change in pysim[master]: WIP: pySim-read.py: parse SIM Service table based on SIM type In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#2) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16991 ) Change subject: WIP: pySim-read.py: parse SIM Service table based on SIM type ...................................................................... WIP: pySim-read.py: parse SIM Service table based on SIM type If USIM is present the EF.UST service mapping is used, otherwise the EF.SST is used. Change-Id: I6680e8c7f86326f72b98a33338e0dd5b58e55013 --- M pySim-read.py A pySim/ts_31_102.py M pySim/ts_51_011.py M pySim/utils.py 4 files changed, 256 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/91/16991/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16991 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I6680e8c7f86326f72b98a33338e0dd5b58e55013 Gerrit-Change-Number: 16991 Gerrit-PatchSet: 2 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: herlesupreeth Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:33:27 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:33:27 +0000 Subject: Change in pysim[master]: cards: cosmetic/indentation fix: use tabs, not spaces References: Message-ID: Hello herlesupreeth, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/c/pysim/+/17149 to review the following change. Change subject: cards: cosmetic/indentation fix: use tabs, not spaces ...................................................................... cards: cosmetic/indentation fix: use tabs, not spaces Change-Id: I5d9cbdb0ecbee783729d0a208d12f8e59ca957ff --- M pySim/cards.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/49/17149/1 diff --git a/pySim/cards.py b/pySim/cards.py index 022182c..a49fe43 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -175,7 +175,7 @@ each possible provider uses a specific record number in each EF. The indexes used are ( where N is the number of providers supported ) : - [2 .. N+1] for the operator name - - [1 .. N] for the programable EFs + - [1 .. N] for the programable EFs * 3f00/7f4d/8f0c : Operator Name -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5d9cbdb0ecbee783729d0a208d12f8e59ca957ff Gerrit-Change-Number: 17149 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:35:44 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 15:35:44 +0000 Subject: Change in osmo-bts[master]: osmo-bts-sysmo: merge measurement data and payload In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17146 ) Change subject: osmo-bts-sysmo: merge measurement data and payload ...................................................................... Patch Set 1: Code-Review-1 (2 comments) https://gerrit.osmocom.org/c/osmo-bts/+/17146/1/src/common/l1sap.c File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/17146/1/src/common/l1sap.c at 187 PS1, Line 187: int add_l1sap_header2(struct gsm_bts_trx *trx, struct msgb *rmsg, This is not a public library which must maintain API compatibility, please avoid this kind of mangling and simply add the params and use 0,0,0 when needed. https://gerrit.osmocom.org/c/osmo-bts/+/17146/1/src/osmo-bts-sysmo/l1_if.c File src/osmo-bts-sysmo/l1_if.c: https://gerrit.osmocom.org/c/osmo-bts/+/17146/1/src/osmo-bts-sysmo/l1_if.c at 992 PS1, Line 992: l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; Can you explain what's the rationale behind this condition being dropped here? It should be in commit log too. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Gerrit-Change-Number: 17146 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 15:35:44 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:36:51 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 15:36:51 +0000 Subject: Change in osmo-gsm-tester[master]: contrib/*sysmo.sh: Fix default poky SDK path In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17148 ) Change subject: contrib/*sysmo.sh: Fix default poky SDK path ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17148 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I002fde53684cd4a43c9f22e09264056f2a950c24 Gerrit-Change-Number: 17148 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 15:36:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:36:55 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 14 Feb 2020 15:36:55 +0000 Subject: Change in osmo-gsm-tester[master]: contrib/*sysmo.sh: Fix default poky SDK path In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17148 ) Change subject: contrib/*sysmo.sh: Fix default poky SDK path ...................................................................... contrib/*sysmo.sh: Fix default poky SDK path ansible scripts are installing the SDK in "poky-sdk" dir, not "poky" one. Change-Id: I002fde53684cd4a43c9f22e09264056f2a950c24 --- M contrib/jenkins-build-osmo-bts-sysmo.sh M contrib/jenkins-build-osmo-pcu-sysmo.sh 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh b/contrib/jenkins-build-osmo-bts-sysmo.sh index 82dae39..fc528d3 100755 --- a/contrib/jenkins-build-osmo-bts-sysmo.sh +++ b/contrib/jenkins-build-osmo-bts-sysmo.sh @@ -5,7 +5,7 @@ _poky_path="$POKY_PATH" [ -z "$_poky_version" ] && _poky_version="2.3.4" -[ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version" +[ -z "$_poky_path" ] && _poky_path="/opt/poky-sdk/$_poky_version" . "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi" diff --git a/contrib/jenkins-build-osmo-pcu-sysmo.sh b/contrib/jenkins-build-osmo-pcu-sysmo.sh index 13f37b5..789b0c0 100755 --- a/contrib/jenkins-build-osmo-pcu-sysmo.sh +++ b/contrib/jenkins-build-osmo-pcu-sysmo.sh @@ -5,7 +5,7 @@ _poky_path="$POKY_PATH" [ -z "$_poky_version" ] && _poky_version="2.3.4" -[ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version" +[ -z "$_poky_path" ] && _poky_path="/opt/poky-sdk/$_poky_version" . "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi" -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17148 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I002fde53684cd4a43c9f22e09264056f2a950c24 Gerrit-Change-Number: 17148 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:48:33 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:48:33 +0000 Subject: Change in pysim[master]: Fix MCC and MCC representation in the output of pySim-read In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#8) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16944 ) Change subject: Fix MCC and MCC representation in the output of pySim-read ...................................................................... Fix MCC and MCC representation in the output of pySim-read Change-Id: Ie699c0a38d5ae90e4d6109e4574ce860e4044096 --- M pySim/utils.py M pysim-testdata/Fairwaves-SIM.ok M pysim-testdata/Wavemobile-SIM.ok M pysim-testdata/sysmoISIM-SJA2.ok M pysim-testdata/sysmoUSIM-SJS1.ok 5 files changed, 48 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/44/16944/8 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16944 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie699c0a38d5ae90e4d6109e4574ce860e4044096 Gerrit-Change-Number: 16944 Gerrit-PatchSet: 8 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:48:33 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:48:33 +0000 Subject: Change in pysim[master]: pySim-read.py: fix reading and parsing of EF.MSISDN In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#17) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16947 ) Change subject: pySim-read.py: fix reading and parsing of EF.MSISDN ...................................................................... pySim-read.py: fix reading and parsing of EF.MSISDN This change implements parsing of EF.MSISDN (and thus EF.ADN) as per 3GPP TS 31.102, sections 4.2.26 and 4.4.2.3. Example (commercial SIM card from 401/02): EF.MSISDN: ffffffffffffffffffffffffffff07917787028982f7ffffffffffff Decoded: (ToN=1 NPI=1) +77782098287 Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 --- M pySim-read.py M pySim/utils.py 2 files changed, 46 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/47/16947/17 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 Gerrit-Change-Number: 16947 Gerrit-PatchSet: 17 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: dexter Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:48:33 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:48:33 +0000 Subject: Change in pysim[master]: pySim-prog.py: add support for MSISDN programming In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#8) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16946 ) Change subject: pySim-prog.py: add support for MSISDN programming ...................................................................... pySim-prog.py: add support for MSISDN programming This change implements programming of EF.MSISDN as per 3GPP TS 31.102, sections 4.2.26 and 4.4.2.3, excluding the following fields: - Alpha Identifier (currently 'FF'O * 20), - Capability/Configuration1 Record Identifier ('FF'O), - Extension1 Record Identifier ('FF'O). This feature is introduced exclusively for sysmoUSIM-SJS1. Othere SIM card types need to be tested. Change-Id: Ie033a0ffc3697ae562eaa7a241a0f6af6c2b0594 --- M pySim-prog.py M pySim/cards.py M pySim/utils.py 3 files changed, 52 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/46/16946/8 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie033a0ffc3697ae562eaa7a241a0f6af6c2b0594 Gerrit-Change-Number: 16946 Gerrit-PatchSet: 8 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:48:33 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:48:33 +0000 Subject: Change in pysim[master]: WIP: pySim-read.py: parse SIM Service table based on SIM type In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#3) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16991 ) Change subject: WIP: pySim-read.py: parse SIM Service table based on SIM type ...................................................................... WIP: pySim-read.py: parse SIM Service table based on SIM type If USIM is present the EF.UST service mapping is used, otherwise the EF.SST is used. Change-Id: I6680e8c7f86326f72b98a33338e0dd5b58e55013 --- M pySim-read.py A pySim/ts_31_102.py M pySim/ts_51_011.py M pySim/utils.py 4 files changed, 256 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/91/16991/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16991 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I6680e8c7f86326f72b98a33338e0dd5b58e55013 Gerrit-Change-Number: 16991 Gerrit-PatchSet: 3 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: herlesupreeth Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:48:36 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:48:36 +0000 Subject: Change in pysim[master]: testdata/sysmoUSIM-SJS1.ok: make it match the actual EF.HPLMNAcT References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/17150 ) Change subject: testdata/sysmoUSIM-SJS1.ok: make it match the actual EF.HPLMNAcT ...................................................................... testdata/sysmoUSIM-SJS1.ok: make it match the actual EF.HPLMNAcT Change-Id: Ibe1bf274c15a3159b012c6fe07ef6a7cbf0adbdb Related: OS#4383 --- M pysim-testdata/sysmoUSIM-SJS1.ok 1 file changed, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/50/17150/1 diff --git a/pysim-testdata/sysmoUSIM-SJS1.ok b/pysim-testdata/sysmoUSIM-SJS1.ok index d9a9072..d0523f8 100644 --- a/pysim-testdata/sysmoUSIM-SJS1.ok +++ b/pysim-testdata/sysmoUSIM-SJS1.ok @@ -36,18 +36,18 @@ ffffff0000 # unused HPLMNAcT: - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused + fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused ACC: 0008 MSISDN: Not available -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17150 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ibe1bf274c15a3159b012c6fe07ef6a7cbf0adbdb Gerrit-Change-Number: 17150 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 15:51:11 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 15:51:11 +0000 Subject: Change in pysim[master]: pySim-read.py: fix copy-paste: s/HPLMNAcT/PLMNsel/ In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/17019 ) Change subject: pySim-read.py: fix copy-paste: s/HPLMNAcT/PLMNsel/ ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4a452a2e439cb713621a028cf0046339f50864b6 Gerrit-Change-Number: 17019 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 14 Feb 2020 15:51:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:30:24 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:30:24 +0000 Subject: Change in pysim[master]: testdata/sysmoUSIM-SJS1.ok: make it match the actual EF.HPLMNAcT In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/17150 ) Change subject: testdata/sysmoUSIM-SJS1.ok: make it match the actual EF.HPLMNAcT ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17150 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ibe1bf274c15a3159b012c6fe07ef6a7cbf0adbdb Gerrit-Change-Number: 17150 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 14 Feb 2020 19:30:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:31:01 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:31:01 +0000 Subject: Change in pysim[master]: pySim-read.py: fix copy-paste: s/HPLMNAcT/PLMNsel/ In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/17019 ) Change subject: pySim-read.py: fix copy-paste: s/HPLMNAcT/PLMNsel/ ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4a452a2e439cb713621a028cf0046339f50864b6 Gerrit-Change-Number: 17019 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 14 Feb 2020 19:31:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:31:02 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:31:02 +0000 Subject: Change in pysim[master]: testdata/sysmoUSIM-SJS1.ok: make it match the actual EF.HPLMNAcT In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/17150 ) Change subject: testdata/sysmoUSIM-SJS1.ok: make it match the actual EF.HPLMNAcT ...................................................................... testdata/sysmoUSIM-SJS1.ok: make it match the actual EF.HPLMNAcT Change-Id: Ibe1bf274c15a3159b012c6fe07ef6a7cbf0adbdb Related: OS#4383 --- M pysim-testdata/sysmoUSIM-SJS1.ok 1 file changed, 12 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pysim-testdata/sysmoUSIM-SJS1.ok b/pysim-testdata/sysmoUSIM-SJS1.ok index d9a9072..d0523f8 100644 --- a/pysim-testdata/sysmoUSIM-SJS1.ok +++ b/pysim-testdata/sysmoUSIM-SJS1.ok @@ -36,18 +36,18 @@ ffffff0000 # unused HPLMNAcT: - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused - ffffffffff # unused + fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused + ffffff0000 # unused ACC: 0008 MSISDN: Not available -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17150 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ibe1bf274c15a3159b012c6fe07ef6a7cbf0adbdb Gerrit-Change-Number: 17150 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:31:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:31:03 +0000 Subject: Change in pysim[master]: Fix compatibility with Python 3: print() is a function In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/16982 ) Change subject: Fix compatibility with Python 3: print() is a function ...................................................................... Fix compatibility with Python 3: print() is a function Change-Id: I5dd8e5daf420fc8667c5156bfacc8763d8895993 --- M README.md M pySim-prog.py M pySim-read.py M pySim/card_handler.py M pySim/transport/serial.py 5 files changed, 51 insertions(+), 51 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/README.md b/README.md index 85b9a57..7074ffa 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ sl.wait_for_card() # Print IMSI -print sc.read_binary(['3f00', '7f20', '6f07']) +print(sc.read_binary(['3f00', '7f20', '6f07'])) # Run A3/A8 -print sc.run_gsm('00112233445566778899aabbccddeeff') +print(sc.run_gsm('00112233445566778899aabbccddeeff')) diff --git a/pySim-prog.py b/pySim-prog.py index b070c5e..bfb40b2 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -173,7 +173,7 @@ if options.type == 'list': for kls in _cards_classes: - print kls.name + print(kls.name) sys.exit(0) if options.probe: @@ -560,7 +560,7 @@ for k in BATCH_INCOMPATIBLE: if getattr(opts, k): - print "Incompatible option with batch_state: %s" % (k,) + print("Incompatible option with batch_state: %s" % (k,)) sys.exit(-1) # Don't load state if there is none ... @@ -568,7 +568,7 @@ return if not os.path.isfile(opts.batch_state): - print "No state file yet" + print("No state file yet") return # Get stored data @@ -601,12 +601,12 @@ for kls in _cards_classes: card = kls.autodetect(scc) if card: - print "Autodetected card type: %s" % card.name + print("Autodetected card type: %s" % card.name) card.reset() break if card is None: - print "Autodetection failed" + print("Autodetection failed") return if opts.type == "auto_once": @@ -631,7 +631,7 @@ # Get card card = card_detect(opts, scc) if card is None: - print "No card detected!" + print("No card detected!") return -1 # Probe only @@ -640,7 +640,7 @@ # Erase if requested if opts.erase: - print "Formatting ..." + print("Formatting ...") card.erase() card.reset() @@ -666,16 +666,16 @@ imsi = opts.imsi cp = read_params_csv(opts, imsi=imsi, iccid=iccid) if cp is None: - print "Error reading parameters from CSV file!\n" + print("Error reading parameters from CSV file!\n") return 2 print_parameters(cp) if opts.dry_run is False: # Program the card - print "Programming ..." + print("Programming ...") card.program(cp) else: - print "Dry Run: NOT PROGRAMMING!" + print("Dry Run: NOT PROGRAMMING!") # Write parameters permanently write_parameters(opts, cp) @@ -716,9 +716,9 @@ # If we use a CSV file as data input, check if the CSV file exists. if opts.source == 'csv': - print "Using CSV file as data input: " + str(opts.read_csv) + print("Using CSV file as data input: " + str(opts.read_csv)) if not os.path.isfile(opts.read_csv): - print "CSV file not found!" + print("CSV file not found!") sys.exit(1) # Batch mode init @@ -737,18 +737,18 @@ try: rc = process_card(opts, first, card_handler) except (KeyboardInterrupt): - print "" - print "Terminated by user!" + print("") + print("Terminated by user!") sys.exit(0) except (SystemExit): raise except: - print "" - print "Card programming failed with an execption:" - print "---------------------8<---------------------" + print("") + print("Card programming failed with an execption:") + print("---------------------8<---------------------") traceback.print_exc() - print "---------------------8<---------------------" - print "" + print("---------------------8<---------------------") + print("") rc = -1 # Something did not work as well as expected, however, lets diff --git a/pySim-read.py b/pySim-read.py index 662ee54..b59b7f3 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -140,7 +140,7 @@ else: print("PLMNsel: Can't read, response code = %s" % (sw,)) except Exception as e: - print "HPLMNAcT: Can't read file -- " + str(e) + print("HPLMNAcT: Can't read file -- " + str(e)) # EF.PLMNwAcT try: @@ -150,7 +150,7 @@ else: print("PLMNwAcT: Can't read, response code = %s" % (sw,)) except Exception as e: - print "PLMNwAcT: Can't read file -- " + str(e) + print("PLMNwAcT: Can't read file -- " + str(e)) # EF.OPLMNwAcT try: @@ -160,7 +160,7 @@ else: print("OPLMNwAcT: Can't read, response code = %s" % (sw,)) except Exception as e: - print "OPLMNwAcT: Can't read file -- " + str(e) + print("OPLMNwAcT: Can't read file -- " + str(e)) # EF.HPLMNAcT try: @@ -170,7 +170,7 @@ else: print("HPLMNAcT: Can't read, response code = %s" % (sw,)) except Exception as e: - print "HPLMNAcT: Can't read file -- " + str(e) + print("HPLMNAcT: Can't read file -- " + str(e)) # EF.ACC (res, sw) = scc.read_binary(['3f00', '7f20', '6f78']) @@ -191,7 +191,7 @@ else: print("MSISDN: Can't read, response code = %s" % (sw,)) except Exception as e: - print "MSISDN: Can't read file -- " + str(e) + print("MSISDN: Can't read file -- " + str(e)) # EF.AD (res, sw) = scc.read_binary(['3f00', '7f20', '6fad']) @@ -201,4 +201,4 @@ print("AD: Can't read, response code = %s" % (sw,)) # Done for this card and maybe for everything ? - print "Done !\n" + print("Done !\n") diff --git a/pySim/card_handler.py b/pySim/card_handler.py index 46ec93e..bb33833 100644 --- a/pySim/card_handler.py +++ b/pySim/card_handler.py @@ -36,16 +36,16 @@ self.sl = sl def get(self, first = False): - print "Ready for Programming: Insert card now (or CTRL-C to cancel)" + print("Ready for Programming: Insert card now (or CTRL-C to cancel)") self.sl.wait_for_card(newcardonly=not first) def error(self): - print "Programming failed: Remove card from reader" - print "" + print("Programming failed: Remove card from reader") + print("") def done(self): - print "Programming successful: Remove card from reader" - print "" + print("Programming successful: Remove card from reader") + print("") # Automatic card handler: A machine is used to handle the cards. class card_handler_auto: @@ -55,7 +55,7 @@ verbose = True def __init__(self, sl, config_file): - print "Card handler Config-file: " + str(config_file) + print("Card handler Config-file: " + str(config_file)) self.sl = sl with open(config_file) as cfg: self.cmds = yaml.load(cfg, Loader=yaml.FullLoader) @@ -63,22 +63,22 @@ self.verbose = (self.cmds.get('verbose') == True) def __print_outout(self,out): - print "" - print "Card handler output:" - print "---------------------8<---------------------" + print("") + print("Card handler output:") + print("---------------------8<---------------------") stdout = out[0].strip() if len(stdout) > 0: - print "stdout:" - print stdout + print("stdout:") + print(stdout) stderr = out[1].strip() if len(stderr) > 0: - print "stderr:" - print stderr - print "---------------------8<---------------------" - print "" + print("stderr:") + print(stderr) + print("---------------------8<---------------------") + print("") def __exec_cmd(self, command): - print "Card handler Commandline: " + str(command) + print("Card handler Commandline: " + str(command)) proc = subprocess.Popen([command], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) out = proc.communicate() @@ -88,21 +88,21 @@ self.__print_outout(out) if rc != 0: - print "" - print "Error: Card handler failure! (rc=" + str(rc) + ")" + print("") + print("Error: Card handler failure! (rc=" + str(rc) + ")") sys.exit(rc) def get(self, first = False): - print "Ready for Programming: Transporting card into the reader-bay..." + print("Ready for Programming: Transporting card into the reader-bay...") self.__exec_cmd(self.cmds['get']) self.sl.connect() def error(self): - print "Programming failed: Transporting card to the error-bin..." + print("Programming failed: Transporting card to the error-bin...") self.__exec_cmd(self.cmds['error']) - print "" + print("") def done(self): - print "Programming successful: Transporting card into the collector bin..." + print("Programming successful: Transporting card into the collector bin...") self.__exec_cmd(self.cmds['done']) - print "" + print("") diff --git a/pySim/transport/serial.py b/pySim/transport/serial.py index 7a2bfd3..f672be2 100644 --- a/pySim/transport/serial.py +++ b/pySim/transport/serial.py @@ -162,7 +162,7 @@ def _dbg_print(self, s): if self._debug: - print s + print(s) def _tx_byte(self, b): self._sl.write(b) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16982 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5dd8e5daf420fc8667c5156bfacc8763d8895993 Gerrit-Change-Number: 16982 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-CC: neels Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:31:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:31:03 +0000 Subject: Change in pysim[master]: pySim-read.py: fix copy-paste: s/HPLMNAcT/PLMNsel/ In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/17019 ) Change subject: pySim-read.py: fix copy-paste: s/HPLMNAcT/PLMNsel/ ...................................................................... pySim-read.py: fix copy-paste: s/HPLMNAcT/PLMNsel/ Change-Id: I4a452a2e439cb713621a028cf0046339f50864b6 --- M pySim-read.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/pySim-read.py b/pySim-read.py index b59b7f3..853e924 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -140,7 +140,7 @@ else: print("PLMNsel: Can't read, response code = %s" % (sw,)) except Exception as e: - print("HPLMNAcT: Can't read file -- " + str(e)) + print("PLMNsel: Can't read file -- " + str(e)) # EF.PLMNwAcT try: -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17019 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4a452a2e439cb713621a028cf0046339f50864b6 Gerrit-Change-Number: 17019 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:31:28 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:31:28 +0000 Subject: Change in pysim[master]: pySim-read.py: print meaningful message when SPN is not set In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16981 ) Change subject: pySim-read.py: print meaningful message when SPN is not set ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1d98520f33a8564c7d69f50a0811204f138f9dca Gerrit-Change-Number: 16981 Gerrit-PatchSet: 4 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-Comment-Date: Fri, 14 Feb 2020 19:31:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:31:54 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:31:54 +0000 Subject: Change in pysim[master]: pySim-prog.py: add presence/length checks for user-provided SPN In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16977 ) Change subject: pySim-prog.py: add presence/length checks for user-provided SPN ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16977 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I35fab9a85efda2b83f221a460d31c7d41db582b0 Gerrit-Change-Number: 16977 Gerrit-PatchSet: 5 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 14 Feb 2020 19:31:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:32:11 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:32:11 +0000 Subject: Change in pysim[master]: cards: cosmetic/indentation fix: use tabs, not spaces In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/17149 ) Change subject: cards: cosmetic/indentation fix: use tabs, not spaces ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5d9cbdb0ecbee783729d0a208d12f8e59ca957ff Gerrit-Change-Number: 17149 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 14 Feb 2020 19:32:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:32:33 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:32:33 +0000 Subject: Change in pysim[master]: cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16945 ) Change subject: cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act() ...................................................................... Patch Set 9: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I35848059d6082c379246c8d695cb094c20780d15 Gerrit-Change-Number: 16945 Gerrit-PatchSet: 9 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-Comment-Date: Fri, 14 Feb 2020 19:32:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:32:41 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:32:41 +0000 Subject: Change in pysim[master]: cards/sysmoUSIM-SJS1: support programming of ACC bits In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16950 ) Change subject: cards/sysmoUSIM-SJS1: support programming of ACC bits ...................................................................... Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16950 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Id0ed9e5654dc0a70a4732bbe5787f1900789d580 Gerrit-Change-Number: 16950 Gerrit-PatchSet: 7 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-Comment-Date: Fri, 14 Feb 2020 19:32:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:32:53 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:32:53 +0000 Subject: Change in pysim[master]: cards/sysmoUSIM-SJS1: support programming of EF.HPLMNwAcT In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16972 ) Change subject: cards/sysmoUSIM-SJS1: support programming of EF.HPLMNwAcT ...................................................................... Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16972 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ida93f4a00fe3b1d0f05d6eeda0e7873ce16d4c17 Gerrit-Change-Number: 16972 Gerrit-PatchSet: 7 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 14 Feb 2020 19:32:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:33:25 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:33:25 +0000 Subject: Change in pysim[master]: Fix MCC and MCC representation in the output of pySim-read In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16944 ) Change subject: Fix MCC and MCC representation in the output of pySim-read ...................................................................... Patch Set 8: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16944 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie699c0a38d5ae90e4d6109e4574ce860e4044096 Gerrit-Change-Number: 16944 Gerrit-PatchSet: 8 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 14 Feb 2020 19:33:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:33:51 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:33:51 +0000 Subject: Change in pysim[master]: pySim-read.py: fix reading and parsing of EF.MSISDN In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16947 ) Change subject: pySim-read.py: fix reading and parsing of EF.MSISDN ...................................................................... Patch Set 17: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 Gerrit-Change-Number: 16947 Gerrit-PatchSet: 17 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: dexter Gerrit-Comment-Date: Fri, 14 Feb 2020 19:33:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:35:26 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:35:26 +0000 Subject: Change in osmo-ci[master]: poky-sdk: Use first letter in caps (as in python bool) In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17147 ) Change subject: poky-sdk: Use first letter in caps (as in python bool) ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17147 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ifbfe678e89bef3acd33e562888ad81093fa1230d Gerrit-Change-Number: 17147 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 14 Feb 2020 19:35:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:35:46 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:35:46 +0000 Subject: Change in osmo-ci[master]: ansible: Install libsoapysdr-dev as dependency for srsLTE In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17144 ) Change subject: ansible: Install libsoapysdr-dev as dependency for srsLTE ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Idd8baf934cb9245e0f897e84754905172b659e40 Gerrit-Change-Number: 17144 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 19:35:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:35:53 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:35:53 +0000 Subject: Change in osmo-ci[master]: gsm-tester: Manual build and install of patchelf v0.10 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17128 ) Change subject: gsm-tester: Manual build and install of patchelf v0.10 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17128 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I28825d723b85900fb51cc5b8a9d14c6ef346e667 Gerrit-Change-Number: 17128 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 19:35:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:35:55 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:35:55 +0000 Subject: Change in osmo-ci[master]: gsm-tester: Install helper scripts and sudoers.d files from git repo In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17131 ) Change subject: gsm-tester: Install helper scripts and sudoers.d files from git repo ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibbdd291f4c3f7aecdd5118cc2b3b35edaddf7c09 Gerrit-Change-Number: 17131 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 19:35:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:35:57 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:35:57 +0000 Subject: Change in osmo-ci[master]: gsm-tester: Manual build and install of patchelf v0.10 In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17128 ) Change subject: gsm-tester: Manual build and install of patchelf v0.10 ...................................................................... gsm-tester: Manual build and install of patchelf v0.10 Due to [1], we require both debian9 patchelf v0.9 and v0.10 to be available and used by osmo-gsm-teser depending on the binary to be patched. [1] https://github.com/NixOS/patchelf/issues/192 Related: OS#4389 Change-Id: I28825d723b85900fb51cc5b8a9d14c6ef346e667 --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 25 insertions(+), 0 deletions(-) Approvals: pespin: Verified laforge: Looks good to me, approved diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 88f072e..0a5a838 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -129,6 +129,31 @@ tags: - ofono +# patchelf 0.9 available in debian has bugs with certain binaries. Version 0.10 +# fails on other binaries, so we need both 0.9 and 0.10 versions installed. +- name: setup patchelf v0.10 repository + git: + repo: 'https://github.com/NixOS/patchelf.git' + dest: /root/patchelf + version: "0.10" + clone: yes + update: no + tags: + - patchelf + +- name: build patchelf v0.10 + shell: | + autoreconf -fi && \ + ./configure --prefix=/opt && \ + make && \ + mkdir -p /opt/bin/ && \ + cp src/patchelf /opt/bin/patchelf-v0.10 + args: + chdir: /root/patchelf + creates: /opt/bin/patchelf-v0.10 + tags: + - patchelf + - name: install gsm tester dependencies apt: name: "{{ item }}" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17128 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I28825d723b85900fb51cc5b8a9d14c6ef346e667 Gerrit-Change-Number: 17128 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:35:58 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:35:58 +0000 Subject: Change in osmo-ci[master]: gsm-tester: Install helper scripts and sudoers.d files from git repo In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17131 ) Change subject: gsm-tester: Install helper scripts and sudoers.d files from git repo ...................................................................... gsm-tester: Install helper scripts and sudoers.d files from git repo Let's avoid duplicating and having to add manually the files here every time a new helper is required by osmo-gsm-tester. Change-Id: Ibbdd291f4c3f7aecdd5118cc2b3b35edaddf7c09 --- D ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh D ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_setup.sh D ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_admin.sh D ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_raw.sh M ansible/roles/gsm-tester/tasks/main.yml 5 files changed, 25 insertions(+), 81 deletions(-) Approvals: pespin: Verified laforge: Looks good to me, approved diff --git a/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh b/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh deleted file mode 100755 index 336b746..0000000 --- a/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_exec.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -netns="$1" -shift -#TODO: Later on I may want to call myself with specific ENV and calling sudo in order to run inside the netns but with dropped privileges -ip netns exec $netns "$@" diff --git a/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_setup.sh b/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_setup.sh deleted file mode 100755 index 1600c44..0000000 --- a/ansible/roles/gsm-tester/files/osmo-gsm-tester_netns_setup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -e - -ifname="$1" -netns="$2" -shift -shift - - - -if [ -f "/var/run/netns/${netns}" ]; then - echo "netns $netns already exists" -else - echo "Creating netns $netns" - ip netns add "$netns" -fi - -if [ -d "/sys/class/net/${ifname}" ]; then - echo "Moving iface $ifname to netns $netns" - ip link set $ifname netns $netns -else - ip netns exec $netns ls "/sys/class/net/${ifname}" >/dev/null && echo "iface $ifname already in netns $netns" -fi diff --git a/ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_admin.sh b/ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_admin.sh deleted file mode 100644 index 60e527a..0000000 --- a/ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_admin.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -/sbin/setcap cap_net_admin+ep "$1" diff --git a/ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_raw.sh b/ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_raw.sh deleted file mode 100755 index 1f3a727..0000000 --- a/ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_raw.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -/sbin/setcap cap_net_raw+ep "$1" diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 0a5a838..309c187 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -262,57 +262,33 @@ content: "@osmo-gsm-tester - rtprio 99" dest: /etc/security/limits.d/osmo-gsm-tester_rtprio.conf -- name: create a wrapper script to add CAP_NET_RAW - copy: - src: osmo-gsm-tester_setcap_net_raw.sh - dest: /usr/local/bin/osmo-gsm-tester_setcap_net_raw.sh - mode: 0755 +- name: setup osmo-gsm-tester repository + git: + repo: 'git://git.osmocom.org/osmo-gsm-tester' + dest: /root/osmo-gsm-tester + version: master + clone: yes + update: no + tags: + - osmo-gsm-tester -- name: allow osmo-gsm-tester sudo osmo-gsm-tester_setcap_net_raw.sh - copy: - content: | - %osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_setcap_net_raw.sh - dest: /etc/sudoers.d/osmo-gsm-tester_setcap_net_raw - mode: 0440 +- name: Install osmo-gsm-tester script helpers to /usr/local/bin (PATH) + shell: | + mkdir -p /usr/local/bin/ && \ + cp utils/bin/*.sh /usr/local/bin/ + args: + chdir: /root/osmo-gsm-tester + tags: + - osmo-gsm-tester -- name: create a wrapper script to add CAP_NET_ADMIN - copy: - src: osmo-gsm-tester_setcap_net_admin.sh - dest: /usr/local/bin/osmo-gsm-tester_setcap_net_admin.sh - mode: 0755 - -- name: allow osmo-gsm-tester sudo osmo-gsm-tester_setcap_net_admin.sh - copy: - content: | - %osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_setcap_net_admin.sh - dest: /etc/sudoers.d/osmo-gsm-tester_setcap_net_admin - mode: 0440 - -- name: create a wrapper script to run processes on modem netns - copy: - src: osmo-gsm-tester_netns_exec.sh - dest: /usr/local/bin/osmo-gsm-tester_netns_exec.sh - mode: 0755 - -- name: allow osmo-gsm-tester sudo osmo-gsm-tester_netns_exec.sh - copy: - content: | - %osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_netns_exec.sh - dest: /etc/sudoers.d/osmo-gsm-tester_netns_exec - mode: 0440 - -- name: create a wrapper script to move modem net iface into its own netns - copy: - src: osmo-gsm-tester_netns_setup.sh - dest: /usr/local/bin/osmo-gsm-tester_netns_setup.sh - mode: 0755 - -- name: allow osmo-gsm-tester sudo osmo-gsm-tester_netns_setup.sh - copy: - content: | - %osmo-gsm-tester ALL=(root) NOPASSWD: /usr/local/bin/osmo-gsm-tester_netns_setup.sh - dest: /etc/sudoers.d/osmo-gsm-tester_netns_setup - mode: 0440 +- name: Install osmo-gsm-tester sudoers.d files to /etc/sudoers.d/ (PATH) + shell: | + mkdir -p /etc/sudoers.d/ && \ + cp utils/sudoers.d/* /etc/sudoers.d/ + args: + chdir: /root/osmo-gsm-tester + tags: + - osmo-gsm-tester - name: logrotate limit filesizes to 10M copy: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibbdd291f4c3f7aecdd5118cc2b3b35edaddf7c09 Gerrit-Change-Number: 17131 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:35:58 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:35:58 +0000 Subject: Change in osmo-ci[master]: ansible: Install libsoapysdr-dev as dependency for srsLTE In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17144 ) Change subject: ansible: Install libsoapysdr-dev as dependency for srsLTE ...................................................................... ansible: Install libsoapysdr-dev as dependency for srsLTE srsLTE supports using LimeSDR devices through SoapySDR. Change-Id: Idd8baf934cb9245e0f897e84754905172b659e40 --- M ansible/roles/gsm-tester/tasks/main.yml M ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: pespin: Verified laforge: Looks good to me, approved diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 309c187..ef51178 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -57,6 +57,7 @@ - libpcsclite-dev - libuhd-dev - libczmq-dev + - libsoapysdr-dev - name: install ofono build dependencies apt: diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml index bfa9715..bc90aae 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml @@ -149,3 +149,4 @@ - libpcsclite-dev - libuhd-dev - libczmq-dev + - libsoapysdr-dev -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17144 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Idd8baf934cb9245e0f897e84754905172b659e40 Gerrit-Change-Number: 17144 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:36:54 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:36:54 +0000 Subject: Change in docker-playground[master]: Introduce osmo-gsm-tester docker setup In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/17143 ) Change subject: Introduce osmo-gsm-tester docker setup ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17143 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Iac7c0b613048ce332642d3957c55cc7c53b56d42 Gerrit-Change-Number: 17143 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 14 Feb 2020 19:36:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:38:18 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:38:18 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: improve dissection of Packet Resource Request message In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17050 ) Change subject: gsm_rlcmac: improve dissection of Packet Resource Request message ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17050/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-pcu/+/17050/2//COMMIT_MSG at 11 PS2, Line 11: This commit breaks a unit test. so what do we do about this? Is the test wrong? Is it sane to simply adjust the expected test output? Missing --verbose :) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ibb4cbd3f5865415fd547e95fc24ff31df1aed4c0 Gerrit-Change-Number: 17050 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Fri, 14 Feb 2020 19:38:18 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:38:40 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:38:40 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: Update : PACKET RESOURCE REQUEST to Release 14.0.0 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17051 ) Change subject: gsm_rlcmac: Update : PACKET RESOURCE REQUEST to Release 14.0.0 ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17051 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iceb59c58406180bc57fe6eb27127b4d11a0a3df7 Gerrit-Change-Number: 17051 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 14 Feb 2020 19:38:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:42:12 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 14 Feb 2020 19:42:12 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: Update : PACKET RESOURCE REQUEST to Release 14.0.0 In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17051 ) Change subject: gsm_rlcmac: Update : PACKET RESOURCE REQUEST to Release 14.0.0 ...................................................................... gsm_rlcmac: Update : PACKET RESOURCE REQUEST to Release 14.0.0 Port from wireshark.git 07fc801684ebff7aff02505cdb2c120caea846e0. Ported-by: Pau Espin Pedrol Change-Id: Iceb59c58406180bc57fe6eb27127b4d11a0a3df7 --- M src/gsm_rlcmac.cpp M src/gsm_rlcmac.h 2 files changed, 295 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index 8d846a1..546e7fb 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -1097,6 +1097,152 @@ CSN_DESCR_END (EGPRS_BEP_LinkQualityMeasurements_t) static const +CSN_DESCR_BEGIN(IU_Mode_Channel_Request_Desk_t) + + M_UINT (IU_Mode_Channel_Request_Desk_t, RB_ID, 5), + M_UINT (IU_Mode_Channel_Request_Desk_t, RADIO_PRIORITY, 2), + + M_NEXT_EXIST (IU_Mode_Channel_Request_Desk_t, Exist_RLC_BLOCK_COUNT, 1), + M_UINT (IU_Mode_Channel_Request_Desk_t, RLC_BLOCK_COUNT, 8), + + M_NEXT_EXIST (IU_Mode_Channel_Request_Desk_t, Exist_Iu_Mode_ChRequestDesk, 1), /* Don't use M_REC_TARRAY as we don't support multiple TBFs */ + +CSN_DESCR_END (IU_Mode_Channel_Request_Desk_t) + +static const +CSN_DESCR_BEGIN(IU_Mode_Channel_Request_Desk_RNTI_t) + + M_NEXT_EXIST (IU_Mode_Channel_Request_Desk_RNTI_t, Exist_G_RNTI_Extension, 1), + M_UINT (IU_Mode_Channel_Request_Desk_RNTI_t, G_RNTI_Extension, 4), + + M_TYPE (IU_Mode_Channel_Request_Desk_RNTI_t, IU_Mode_Channel_Request_Desk, IU_Mode_Channel_Request_Desk_t), + +CSN_DESCR_END (IU_Mode_Channel_Request_Desk_RNTI_t) + + +static const +CSN_DESCR_BEGIN(Ext_Channel_Request_desc_t) + + M_UINT (Ext_Channel_Request_desc_t, PFI, 7), + M_UINT (Ext_Channel_Request_desc_t, RADIO_PRIORITY, 2), + M_UINT (Ext_Channel_Request_desc_t, RLC_Mode, 1), + + M_NEXT_EXIST (Ext_Channel_Request_desc_t, Exist_LCC_PDU, 1), + M_UINT (Ext_Channel_Request_desc_t, LCC_PDU, 1), + + M_NEXT_EXIST (Ext_Channel_Request_desc_t, Exist_Ext_Channel_Request_desc, 1), /* Don't use M_REC_TARRAY as we don't support multiple TBFs */ + +CSN_DESCR_END (Ext_Channel_Request_desc_t) + +static const +CSN_DESCR_BEGIN(EGPRS_BEP_LinkQualityMeasurements_type2_t) + + M_NEXT_EXIST (EGPRS_BEP_LinkQualityMeasurements_type2_t, Exist_GMSK_MEAN_BEP, 1), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, GMSK_MEAN_BEP, 5), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, GMSK_CV_BEP, 3), + + M_NEXT_EXIST (EGPRS_BEP_LinkQualityMeasurements_type2_t, Exist_8PSK_MEAN_BEP, 1), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, p8PSK_MEAN_BEP, 5), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, p8PSK_CV_BEP, 3), + + M_NEXT_EXIST (EGPRS_BEP_LinkQualityMeasurements_type2_t, Exist_QPSK_MEAN_BEP, 1), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, QPSK_MEAN_BEP, 5), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, QPSK_CV_BEP, 3), + + M_NEXT_EXIST (EGPRS_BEP_LinkQualityMeasurements_type2_t, Exist_16QAM_NSR_MEAN_BEP, 1), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, p16QAM_NSR_MEAN_BEP, 5), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, p16QAM_NSR_CV_BEP, 3), + + M_NEXT_EXIST (EGPRS_BEP_LinkQualityMeasurements_type2_t, Exist_32QAM_NSR_MEAN_BEP, 1), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, p32QAM_NSR_MEAN_BEP, 5), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, p32QAM_NSR_CV_BEP, 3), + + M_NEXT_EXIST (EGPRS_BEP_LinkQualityMeasurements_type2_t, Exist_16QAM_HSR_MEAN_BEP, 1), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, p16QAM_HSR_MEAN_BEP, 5), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, p16QAM_HSR_CV_BEP, 3), + + M_NEXT_EXIST (EGPRS_BEP_LinkQualityMeasurements_type2_t, Exist_32QAM_HSR_MEAN_BEP, 1), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, p32QAM_HSR_MEAN_BEP, 5), + M_UINT (EGPRS_BEP_LinkQualityMeasurements_type2_t, p32QAM_HSR_CV_BEP, 3), + +CSN_DESCR_END (EGPRS_BEP_LinkQualityMeasurements_type2_t) + +static const +CSN_DESCR_BEGIN(BEP_MeasurementReport_type2_t) + M_NEXT_EXIST (BEP_MeasurementReport_type2_t, Exist, 1), + M_UINT (BEP_MeasurementReport_type2_t, REPORTED_MODULATION, 2), + M_UINT (BEP_MeasurementReport_type2_t, MEAN_BEP_TN, 4), +CSN_DESCR_END (BEP_MeasurementReport_type2_t) + +static const +CSN_DESCR_BEGIN(InterferenceMeasurementReport_type2_t) + M_NEXT_EXIST (InterferenceMeasurementReport_type2_t, Exist, 1), + M_UINT (InterferenceMeasurementReport_type2_t, I_LEVEL, 4), +CSN_DESCR_END (InterferenceMeasurementReport_type2_t) +static const +CSN_DESCR_BEGIN(EGPRS_TimeslotLinkQualityMeasurements_type2_t) + M_NEXT_EXIST (EGPRS_TimeslotLinkQualityMeasurements_type2_t, Exist_BEP_MEASUREMENTS, 1), + M_TYPE_ARRAY (EGPRS_TimeslotLinkQualityMeasurements_type2_t, BEP_MEASUREMENTS, BEP_MeasurementReport_type2_t, 8), + + M_NEXT_EXIST (EGPRS_TimeslotLinkQualityMeasurements_type2_t, Exist_INTERFERENCE_MEASUREMENTS, 1), + M_TYPE_ARRAY (EGPRS_TimeslotLinkQualityMeasurements_type2_t, INTERFERENCE_MEASUREMENTS, InterferenceMeasurementReport_type2_t, 8), +CSN_DESCR_END (EGPRS_TimeslotLinkQualityMeasurements_type2_t) + +static const +CSN_DESCR_BEGIN(PRR_AdditionsR12_t) + + M_NEXT_EXIST (PRR_AdditionsR12_t, Exist_Downlink_eTFI, 1), + M_UINT (PRR_AdditionsR12_t, DOWNLINK_ETFI, 3), + +CSN_DESCR_END (PRR_AdditionsR12_t) + +static const +CSN_DESCR_BEGIN(PRR_AdditionsR10_t) + M_UINT (PRR_AdditionsR10_t, LOW_ACCESS_PRIORITY_SIGNALLING, 1), + + M_NEXT_EXIST_OR_NULL(PRR_AdditionsR10_t, Exist_AdditionsR12, 1), + M_TYPE (PRR_AdditionsR10_t, AdditionsR12, PRR_AdditionsR12_t), + +CSN_DESCR_END (PRR_AdditionsR10_t) + +static const +CSN_DESCR_BEGIN(PRR_AdditionsR7_t) + M_UINT (PRR_AdditionsR7_t, EARLY_TBF_ESTABLISHMENT, 1), + + M_NEXT_EXIST (PRR_AdditionsR7_t, Exist_EGPRS_BEP_LinkQualityMeasurements_type2, 1), + M_TYPE (PRR_AdditionsR7_t, EGPRS_BEP_LinkQualityMeasurements_type2, EGPRS_BEP_LinkQualityMeasurements_type2_t), + + M_NEXT_EXIST (PRR_AdditionsR7_t, Exist_EGPRS_TimeslotLinkQualityMeasurements_type2, 1), + M_TYPE (PRR_AdditionsR7_t, EGPRS_TimeslotLinkQualityMeasurements_type2, EGPRS_TimeslotLinkQualityMeasurements_type2_t), + + M_NEXT_EXIST_OR_NULL(PRR_AdditionsR7_t, Exist_AdditionsR10, 1), + M_TYPE (PRR_AdditionsR7_t, AdditionsR10, PRR_AdditionsR10_t), + +CSN_DESCR_END (PRR_AdditionsR7_t) + +static const +CSN_DESCR_BEGIN(PRR_AdditionsR6_t) + M_NEXT_EXIST (PRR_AdditionsR6_t, Exist_Ext_Channel_Request_desc, 1), + M_TYPE (PRR_AdditionsR6_t, Ext_Channel_Request_desc, Ext_Channel_Request_desc_t), + + M_NEXT_EXIST_OR_NULL(PRR_AdditionsR6_t, Exist_AdditionsR7, 1), + M_TYPE (PRR_AdditionsR6_t, AdditionsR7, PRR_AdditionsR7_t), + +CSN_DESCR_END (PRR_AdditionsR6_t) + +static const +CSN_DESCR_BEGIN(PRR_AdditionsR5_t) + M_NEXT_EXIST (PRR_AdditionsR5_t, Exist_Iu_Mode_ChRequestDesk, 1), + M_TYPE (PRR_AdditionsR5_t, IU_Mode_Channel_Request_Desk_RNTI, IU_Mode_Channel_Request_Desk_RNTI_t), + + M_NEXT_EXIST (PRR_AdditionsR5_t, Exist_HFN_LSB, 1), + M_UINT (PRR_AdditionsR5_t, HFN_LSb, 7), + + M_NEXT_EXIST_OR_NULL(PRR_AdditionsR5_t, Exist_AdditionsR6, 1), + M_TYPE (PRR_AdditionsR5_t, AdditionsR6, PRR_AdditionsR6_t), +CSN_DESCR_END (PRR_AdditionsR5_t) + +static const CSN_DESCR_BEGIN(PRR_AdditionsR99_t) M_NEXT_EXIST (PRR_AdditionsR99_t, Exist_EGPRS_BEP_LinkQualityMeasurements, 1), M_TYPE (PRR_AdditionsR99_t, EGPRS_BEP_LinkQualityMeasurements, EGPRS_BEP_LinkQualityMeasurements_t), @@ -1109,6 +1255,10 @@ M_UINT (PRR_AdditionsR99_t, MS_RAC_AdditionalInformationAvailable, 1), M_UINT (PRR_AdditionsR99_t, RetransmissionOfPRR, 1), + + M_NEXT_EXIST_OR_NULL(PRR_AdditionsR99_t, Exist_AdditionsR5, 1), + M_TYPE (PRR_AdditionsR99_t, AdditionsR5, PRR_AdditionsR5_t), + CSN_DESCR_END (PRR_AdditionsR99_t) static const diff --git a/src/gsm_rlcmac.h b/src/gsm_rlcmac.h index e9b355d..f6979e7 100644 --- a/src/gsm_rlcmac.h +++ b/src/gsm_rlcmac.h @@ -1409,6 +1409,148 @@ guint8 CV_BEP_8PSK; } EGPRS_BEP_LinkQualityMeasurements_t; +typedef struct{ +guint8 RB_ID; +guint8 RADIO_PRIORITY; + +gboolean Exist_RLC_BLOCK_COUNT; +guint8 RLC_BLOCK_COUNT; + +gboolean Exist_Iu_Mode_ChRequestDesk; +//IU_Mode_Channel_Request_Desk_t IU_Mode_Channel_Request_Desk1; + +} IU_Mode_Channel_Request_Desk_t; + +typedef struct{ + gboolean Exist_G_RNTI_Extension; + guint8 G_RNTI_Extension; + IU_Mode_Channel_Request_Desk_t IU_Mode_Channel_Request_Desk; + +} IU_Mode_Channel_Request_Desk_RNTI_t; + +typedef struct{ + guint8 PFI; + guint8 RADIO_PRIORITY; + guint8 RLC_Mode; + + gboolean Exist_LCC_PDU; + guint8 LCC_PDU; + + gboolean Exist_Ext_Channel_Request_desc; + +} Ext_Channel_Request_desc_t; + + +typedef struct{ + gboolean Exist_GMSK_MEAN_BEP; + guint8 GMSK_MEAN_BEP; + guint8 GMSK_CV_BEP; + + gboolean Exist_8PSK_MEAN_BEP; + guint8 p8PSK_MEAN_BEP; + guint8 p8PSK_CV_BEP; + + gboolean Exist_QPSK_MEAN_BEP; + guint8 QPSK_MEAN_BEP; + guint8 QPSK_CV_BEP; + + gboolean Exist_16QAM_NSR_MEAN_BEP; + guint8 p16QAM_NSR_MEAN_BEP; + guint8 p16QAM_NSR_CV_BEP; + + gboolean Exist_32QAM_NSR_MEAN_BEP; + guint8 p32QAM_NSR_MEAN_BEP; + guint8 p32QAM_NSR_CV_BEP; + + gboolean Exist_16QAM_HSR_MEAN_BEP; + guint8 p16QAM_HSR_MEAN_BEP; + guint8 p16QAM_HSR_CV_BEP; + + gboolean Exist_32QAM_HSR_MEAN_BEP; + guint8 p32QAM_HSR_MEAN_BEP; + guint8 p32QAM_HSR_CV_BEP; + +} EGPRS_BEP_LinkQualityMeasurements_type2_t; + +typedef struct +{ + gboolean Exist; + guint8 REPORTED_MODULATION; + guint8 MEAN_BEP_TN; + +} BEP_MeasurementReport_type2_t; + +typedef struct +{ + gboolean Exist; + guint8 I_LEVEL; +} InterferenceMeasurementReport_type2_t; + +typedef struct +{ + gboolean Exist_BEP_MEASUREMENTS; + BEP_MeasurementReport_type2_t BEP_MEASUREMENTS[8]; + + gboolean Exist_INTERFERENCE_MEASUREMENTS; + InterferenceMeasurementReport_type2_t INTERFERENCE_MEASUREMENTS[8]; + +} EGPRS_TimeslotLinkQualityMeasurements_type2_t; + + +typedef struct +{ + gboolean Exist_Downlink_eTFI; + guint8 DOWNLINK_ETFI; + +} PRR_AdditionsR12_t; + +typedef struct +{ + guint8 LOW_ACCESS_PRIORITY_SIGNALLING; + + gboolean Exist_AdditionsR12; + PRR_AdditionsR12_t AdditionsR12; + +} PRR_AdditionsR10_t; + +typedef struct +{ + guint8 EARLY_TBF_ESTABLISHMENT; + + gboolean Exist_EGPRS_BEP_LinkQualityMeasurements_type2; + EGPRS_BEP_LinkQualityMeasurements_type2_t EGPRS_BEP_LinkQualityMeasurements_type2; + + gboolean Exist_EGPRS_TimeslotLinkQualityMeasurements_type2; + EGPRS_TimeslotLinkQualityMeasurements_type2_t EGPRS_TimeslotLinkQualityMeasurements_type2; + + gboolean Exist_AdditionsR10; + PRR_AdditionsR10_t AdditionsR10; + +} PRR_AdditionsR7_t; + +typedef struct +{ + gboolean Exist_Ext_Channel_Request_desc; + Ext_Channel_Request_desc_t Ext_Channel_Request_desc; + + guint8 Exist_AdditionsR7; + PRR_AdditionsR7_t AdditionsR7; + +} PRR_AdditionsR6_t; + +typedef struct +{ + guint8 Exist_Iu_Mode_ChRequestDesk; + IU_Mode_Channel_Request_Desk_RNTI_t IU_Mode_Channel_Request_Desk_RNTI; + + guint8 Exist_HFN_LSB; + guint8 HFN_LSb; + + guint8 Exist_AdditionsR6; + PRR_AdditionsR6_t AdditionsR6; + +} PRR_AdditionsR5_t; + typedef struct { gboolean Exist_EGPRS_BEP_LinkQualityMeasurements; @@ -1422,6 +1564,9 @@ guint8 MS_RAC_AdditionalInformationAvailable; guint8 RetransmissionOfPRR; + + guint8 Exist_AdditionsR5; + PRR_AdditionsR5_t AdditionsR5; } PRR_AdditionsR99_t; typedef struct -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17051 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iceb59c58406180bc57fe6eb27127b4d11a0a3df7 Gerrit-Change-Number: 17051 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 19:48:54 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 19:48:54 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: improve dissection of Packet Resource Request message In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17050 ) Change subject: gsm_rlcmac: improve dissection of Packet Resource Request message ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17050/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-pcu/+/17050/2//COMMIT_MSG at 11 PS2, Line 11: This commit breaks a unit test. > so what do we do about this? Is the test wrong? Is it sane to simply adjust the expected test output [?] I did a quick investigation using Pycrate (https://osmocom.org/issues/4382#note-1). Decoding results look good, but the encoder generates a different vector that Pycrate fails to decode... -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ibb4cbd3f5865415fd547e95fc24ff31df1aed4c0 Gerrit-Change-Number: 17050 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Fri, 14 Feb 2020 19:48:54 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 20:43:34 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 20:43:34 +0000 Subject: Change in pysim[master]: pySim-read.py: print meaningful message when SPN is not set In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#5) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16981 ) Change subject: pySim-read.py: print meaningful message when SPN is not set ...................................................................... pySim-read.py: print meaningful message when SPN is not set Change-Id: I1d98520f33a8564c7d69f50a0811204f138f9dca --- M pySim-read.py M pysim-testdata/sysmoISIM-SJA2.ok M pysim-testdata/sysmosim-gr1.ok 3 files changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/81/16981/5 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1d98520f33a8564c7d69f50a0811204f138f9dca Gerrit-Change-Number: 16981 Gerrit-PatchSet: 5 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 20:43:34 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 20:43:34 +0000 Subject: Change in pysim[master]: pySim-read.py: fix reading and parsing of EF.MSISDN In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#18) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16947 ) Change subject: pySim-read.py: fix reading and parsing of EF.MSISDN ...................................................................... pySim-read.py: fix reading and parsing of EF.MSISDN This change implements parsing of EF.MSISDN (and thus EF.ADN) as per 3GPP TS 31.102, sections 4.2.26 and 4.4.2.3. Example (commercial SIM card from 401/02): EF.MSISDN: ffffffffffffffffffffffffffff07917787028982f7ffffffffffff Decoded (NPI=1 ToN=1): +77782098287 Note that sysmoUSIM-SJS1 in the test setup has malformed EF.MSISDN, so that's why the test output is changed. Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 --- M pySim-read.py M pySim/utils.py M pysim-testdata/sysmoUSIM-SJS1.ok 3 files changed, 47 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/47/16947/18 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 Gerrit-Change-Number: 16947 Gerrit-PatchSet: 18 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: dexter Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 20:43:34 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 20:43:34 +0000 Subject: Change in pysim[master]: pySim-prog.py: add support for MSISDN programming In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#9) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16946 ) Change subject: pySim-prog.py: add support for MSISDN programming ...................................................................... pySim-prog.py: add support for MSISDN programming This change implements programming of EF.MSISDN as per 3GPP TS 31.102, sections 4.2.26 and 4.4.2.3, excluding the following fields: - Alpha Identifier (currently 'FF'O * 20), - Capability/Configuration1 Record Identifier ('FF'O), - Extension1 Record Identifier ('FF'O). This feature is introduced exclusively for sysmoUSIM-SJS1. Othere SIM card types need to be tested. Change-Id: Ie033a0ffc3697ae562eaa7a241a0f6af6c2b0594 --- M pySim-prog.py M pySim/cards.py M pySim/utils.py M pysim-testdata/sysmoUSIM-SJS1.data M pysim-testdata/sysmoUSIM-SJS1.ok M tests/pysim-test.sh M tests/sysmoUSIM-SJS1.data.example 7 files changed, 57 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/46/16946/9 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie033a0ffc3697ae562eaa7a241a0f6af6c2b0594 Gerrit-Change-Number: 16946 Gerrit-PatchSet: 9 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 21:04:16 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 21:04:16 +0000 Subject: Change in pysim[master]: Python2 is deprecated, switch to Python3 In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#6) to the change originally created by gnutoo. ( https://gerrit.osmocom.org/c/pysim/+/15504 ) Change subject: Python2 is deprecated, switch to Python3 ...................................................................... Python2 is deprecated, switch to Python3 Signed-off-by: Denis 'GNUtoo' Carikli Change-Id: I430d173535e0cd5bb895b9dfc9070cbc40cfc8ff --- M contrib/jenkins.sh M pySim-prog.py M pySim-read.py M pySim/card_handler.py 4 files changed, 5 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/04/15504/6 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/15504 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I430d173535e0cd5bb895b9dfc9070cbc40cfc8ff Gerrit-Change-Number: 15504 Gerrit-PatchSet: 6 Gerrit-Owner: gnutoo Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 21:04:18 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 21:04:18 +0000 Subject: Change in pysim[master]: pySim-read.py: do not import json, it is not needed References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/17151 ) Change subject: pySim-read.py: do not import json, it is not needed ...................................................................... pySim-read.py: do not import json, it is not needed Change-Id: I4ae1d71c5695c9cd8ddebea514847b0be6a24c6c --- M pySim-read.py 1 file changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/51/17151/1 diff --git a/pySim-read.py b/pySim-read.py index 853e924..c93d2e9 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -30,12 +30,6 @@ import sys from pySim.ts_51_011 import EF, DF -try: - import json -except ImportError: - # Python < 2.5 - import simplejson as json - from pySim.commands import SimCardCommands from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, format_xplmn_w_act, dec_spn -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4ae1d71c5695c9cd8ddebea514847b0be6a24c6c Gerrit-Change-Number: 17151 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 21:14:11 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 21:14:11 +0000 Subject: Change in pysim[master]: Python2 is deprecated, switch to Python3 In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#7) to the change originally created by gnutoo. ( https://gerrit.osmocom.org/c/pysim/+/15504 ) Change subject: Python2 is deprecated, switch to Python3 ...................................................................... Python2 is deprecated, switch to Python3 Signed-off-by: Denis 'GNUtoo' Carikli Change-Id: I430d173535e0cd5bb895b9dfc9070cbc40cfc8ff --- M contrib/jenkins.sh M pySim-prog.py M pySim-read.py M pySim/card_handler.py 4 files changed, 6 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/04/15504/7 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/15504 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I430d173535e0cd5bb895b9dfc9070cbc40cfc8ff Gerrit-Change-Number: 15504 Gerrit-PatchSet: 7 Gerrit-Owner: gnutoo Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 21:30:21 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 21:30:21 +0000 Subject: Change in pysim[master]: pySim-read.py: fix reading and parsing of EF.MSISDN In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#19) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16947 ) Change subject: pySim-read.py: fix reading and parsing of EF.MSISDN ...................................................................... pySim-read.py: fix reading and parsing of EF.MSISDN This change implements parsing of EF.MSISDN (and thus EF.ADN) as per 3GPP TS 31.102, sections 4.2.26 and 4.4.2.3. Example (commercial SIM card from 401/02): EF.MSISDN: ffffffffffffffffffffffffffff07917787028982f7ffffffffffff Decoded (NPI=1 ToN=1): +77782098287 Note that sysmoUSIM-SJS1 in the test setup has malformed EF.MSISDN, so that's why the test output is changed. Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 --- M pySim-read.py M pySim/utils.py M pysim-testdata/sysmoISIM-SJA2.ok M pysim-testdata/sysmoUSIM-SJS1.ok 4 files changed, 48 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/47/16947/19 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 Gerrit-Change-Number: 16947 Gerrit-PatchSet: 19 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: dexter Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 21:58:29 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 21:58:29 +0000 Subject: Change in pysim[master]: pySim-prog.py: add support for MSISDN programming In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#11) to the change originally created by herlesupreeth. ( https://gerrit.osmocom.org/c/pysim/+/16946 ) Change subject: pySim-prog.py: add support for MSISDN programming ...................................................................... pySim-prog.py: add support for MSISDN programming This change implements programming of EF.MSISDN as per 3GPP TS 31.102, sections 4.2.26 and 4.4.2.3, excluding the following fields: - Alpha Identifier (currently 'FF'O * 20), - Capability/Configuration1 Record Identifier ('FF'O), - Extension1 Record Identifier ('FF'O). This feature is introduced exclusively for sysmoUSIM-SJS1. Othere SIM card types need to be tested. Change-Id: Ie033a0ffc3697ae562eaa7a241a0f6af6c2b0594 --- M pySim-prog.py M pySim/cards.py M pySim/utils.py M pysim-testdata/sysmoUSIM-SJS1.data M pysim-testdata/sysmoUSIM-SJS1.ok M tests/pysim-test.sh M tests/sysmoUSIM-SJS1.data.example 7 files changed, 57 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/46/16946/11 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie033a0ffc3697ae562eaa7a241a0f6af6c2b0594 Gerrit-Change-Number: 16946 Gerrit-PatchSet: 11 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 14 22:06:52 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Fri, 14 Feb 2020 22:06:52 +0000 Subject: Change in pysim[master]: Py2 -> Py3: use the floor division operator // where possible References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/17152 ) Change subject: Py2 -> Py3: use the floor division operator // where possible ...................................................................... Py2 -> Py3: use the floor division operator // where possible In Python 3, traditional division operator returns a float, while we need a floor integer in the most cases. Change-Id: I5565eb64a1ddea7075cbb142eaacaa5d494c87bb --- M pySim/cards.py M pySim/commands.py M pySim/transport/serial.py 3 files changed, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/52/17152/1 diff --git a/pySim/cards.py b/pySim/cards.py index faaeca3..b30e449 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -89,7 +89,7 @@ """ # get size and write EF.OPLMNwAcT data = self._scc.read_binary(EF['OPLMNwAcT'], length=None, offset=0) - size = len(data[0])/2 + size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) content = hplmn + access_tech data, sw = self._scc.update_binary(EF['OPLMNwAcT'], content + 'ffffff0000' * (size/5-1)) @@ -101,7 +101,7 @@ """ # get size and write EF.PLMNwAcT data = self._scc.read_binary(EF['PLMNwAcT'], length=None, offset=0) - size = len(data[0])/2 + size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) content = hplmn + access_tech data, sw = self._scc.update_binary(EF['PLMNwAcT'], content + 'ffffff0000' * (size/5-1)) @@ -109,7 +109,7 @@ def update_plmnsel(self, mcc, mnc): data = self._scc.read_binary(EF['PLMNsel'], length=None, offset=0) - size = len(data[0])/2 + size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) data, sw = self._scc.update_binary(EF['PLMNsel'], hplmn + 'ff' * (size-3)) return sw @@ -127,7 +127,7 @@ raise RuntimeError('unable to calculate proper mnclen') data = self._scc.read_binary(EF['AD'], length=None, offset=0) - size = len(data[0])/2 + size = len(data[0]) // 2 content = data[0][0:6] + "%02X" % mnclen data, sw = self._scc.update_binary(EF['AD'], content) return sw diff --git a/pySim/commands.py b/pySim/commands.py index 385cacf..ff64ed2 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -49,11 +49,11 @@ # what we get in the length field. # See also ETSI TS 102 221, chapter 11.1.1.3.0 Base coding. exp_tlv_len = int(fcp[2:4], 16) - if len(fcp[4:])/2 == exp_tlv_len: + if len(fcp[4:]) // 2 == exp_tlv_len: skip = 4 else: exp_tlv_len = int(fcp[2:6], 16) - if len(fcp[4:])/2 == exp_tlv_len: + if len(fcp[4:]) // 2 == exp_tlv_len: skip = 6 # Skip FCP tag and length @@ -108,7 +108,7 @@ return rv def select_adf(self, aid): - aidlen = ("0" + format(len(aid)/2, 'x'))[-2:] + aidlen = ("0" + format(len(aid) // 2, 'x'))[-2:] return self._tp.send_apdu_checksw(self.cla_byte + "a4" + "0404" + aidlen + aid) def read_binary(self, ef, length=None, offset=0): @@ -126,7 +126,7 @@ if not hasattr(type(ef), '__iter__'): ef = [ef] self.select_file(ef) - pdu = self.cla_byte + 'd6%04x%02x' % (offset, len(data)/2) + data + pdu = self.cla_byte + 'd6%04x%02x' % (offset, len(data) // 2) + data return self._tp.send_apdu_checksw(pdu) def read_record(self, ef, rec_no): @@ -143,10 +143,10 @@ r = self.select_file(ef) if not force_len: rec_length = self.__record_len(r) - if (len(data)/2 != rec_length): - raise ValueError('Invalid data length (expected %d, got %d)' % (rec_length, len(data)/2)) + if (len(data) // 2 != rec_length): + raise ValueError('Invalid data length (expected %d, got %d)' % (rec_length, len(data) // 2)) else: - rec_length = len(data)/2 + rec_length = len(data) // 2 pdu = (self.cla_byte + 'dc%02x04%02x' % (rec_no, rec_length)) + data return self._tp.send_apdu_checksw(pdu) diff --git a/pySim/transport/serial.py b/pySim/transport/serial.py index f672be2..11fcd6a 100644 --- a/pySim/transport/serial.py +++ b/pySim/transport/serial.py @@ -213,7 +213,7 @@ self._tx_string(pdu[5:]) # Receive data (including SW !) - # length = [P3 - tx_data (=len(pdu)-len(hdr)) + 2 (SW1/2) ] + # length = [P3 - tx_data (=len(pdu)-len(hdr)) + 2 (SW1//2) ] to_recv = data_len - len(pdu) + 5 + 2 data = '' -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5565eb64a1ddea7075cbb142eaacaa5d494c87bb Gerrit-Change-Number: 17152 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 09:28:24 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 09:28:24 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac.cpp: fix another global-buffer-overflow error reported by ... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17053 ) Change subject: gsm_rlcmac.cpp: fix another global-buffer-overflow error reported by ASAN ...................................................................... gsm_rlcmac.cpp: fix another global-buffer-overflow error reported by ASAN Port from wireshark.git aa3bbe5aebdc180172e7956719b26199e4784fcc. Ported-by: Pau Espin Pedrol Change-Id: I808ec66011cdfe8e1193298f7fb7e92d25b45be4 --- M src/gsm_rlcmac.cpp 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index 546e7fb..839bfbb 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -1130,7 +1130,10 @@ M_NEXT_EXIST (Ext_Channel_Request_desc_t, Exist_LCC_PDU, 1), M_UINT (Ext_Channel_Request_desc_t, LCC_PDU, 1), - M_NEXT_EXIST (Ext_Channel_Request_desc_t, Exist_Ext_Channel_Request_desc, 1), /* Don't use M_REC_TARRAY as we don't support multiple TBFs */ + /* Don't use M_REC_TARRAY as we don't support multiple TBFs + M_NEXT_EXIST (Ext_Channel_Request_desc_t, Exist_Ext_Channel_Request_desc, 1), + M_TYPE (Ext_Channel_Request_desc_t, Ext_Channel_Request_desc, Ext_Channel_Request_desc_t),*/ + M_UINT (Ext_Channel_Request_desc_t, Exist_Ext_Channel_Request_desc, 1), CSN_DESCR_END (Ext_Channel_Request_desc_t) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17053 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I808ec66011cdfe8e1193298f7fb7e92d25b45be4 Gerrit-Change-Number: 17053 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 09:28:28 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 09:28:28 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac.cpp: fix global-buffer-overflow error reported by ASAN In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17052 ) Change subject: gsm_rlcmac.cpp: fix global-buffer-overflow error reported by ASAN ...................................................................... gsm_rlcmac.cpp: fix global-buffer-overflow error reported by ASAN Port from wireshark.git f751918476bdde65f2289b86245a3c30dace6730. Ported-by: Pau Espin Pedrol Change-Id: I70d4ff3e137b5fd13d367bd4ea6ab501e81e7a87 --- M src/gsm_rlcmac.cpp 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index 839bfbb..403b65e 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -1105,7 +1105,10 @@ M_NEXT_EXIST (IU_Mode_Channel_Request_Desk_t, Exist_RLC_BLOCK_COUNT, 1), M_UINT (IU_Mode_Channel_Request_Desk_t, RLC_BLOCK_COUNT, 8), - M_NEXT_EXIST (IU_Mode_Channel_Request_Desk_t, Exist_Iu_Mode_ChRequestDesk, 1), /* Don't use M_REC_TARRAY as we don't support multiple TBFs */ + /* Don't use M_REC_TARRAY as we don't support multiple TBFs + M_NEXT_EXIST (IU_Mode_Channel_Request_Desk_t, Exist_Iu_Mode_ChRequestDesk, 1), + M_TYPE (IU_Mode_Channel_Request_Desk1, IU_Mode_Channel_Request_Desk_t),*/ + M_UINT (IU_Mode_Channel_Request_Desk_t, Exist_Iu_Mode_ChRequestDesk, 1), CSN_DESCR_END (IU_Mode_Channel_Request_Desk_t) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17052 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I70d4ff3e137b5fd13d367bd4ea6ab501e81e7a87 Gerrit-Change-Number: 17052 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 09:29:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 09:29:07 +0000 Subject: Change in pysim[master]: Py2 -> Py3: use the floor division operator // where possible In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/17152 ) Change subject: Py2 -> Py3: use the floor division operator // where possible ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5565eb64a1ddea7075cbb142eaacaa5d494c87bb Gerrit-Change-Number: 17152 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 09:29:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 09:29:17 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 09:29:17 +0000 Subject: Change in pysim[master]: pySim-read.py: do not import json, it is not needed In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/17151 ) Change subject: pySim-read.py: do not import json, it is not needed ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4ae1d71c5695c9cd8ddebea514847b0be6a24c6c Gerrit-Change-Number: 17151 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 09:29:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 09:29:47 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 09:29:47 +0000 Subject: Change in pysim[master]: pySim-read.py: print meaningful message when SPN is not set In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16981 ) Change subject: pySim-read.py: print meaningful message when SPN is not set ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1d98520f33a8564c7d69f50a0811204f138f9dca Gerrit-Change-Number: 16981 Gerrit-PatchSet: 5 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-Comment-Date: Sat, 15 Feb 2020 09:29:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 09:30:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 09:30:03 +0000 Subject: Change in pysim[master]: pySim-read.py: fix reading and parsing of EF.MSISDN In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16947 ) Change subject: pySim-read.py: fix reading and parsing of EF.MSISDN ...................................................................... Patch Set 19: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 Gerrit-Change-Number: 16947 Gerrit-PatchSet: 19 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: dexter Gerrit-Comment-Date: Sat, 15 Feb 2020 09:30:03 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 09:31:17 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 09:31:17 +0000 Subject: Change in pysim[master]: pySim-prog.py: add support for MSISDN programming In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16946 ) Change subject: pySim-prog.py: add support for MSISDN programming ...................................................................... Patch Set 11: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie033a0ffc3697ae562eaa7a241a0f6af6c2b0594 Gerrit-Change-Number: 16946 Gerrit-PatchSet: 11 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-Comment-Date: Sat, 15 Feb 2020 09:31:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 18:00:27 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 18:00:27 +0000 Subject: Change in libosmocore[master]: osmo-sim-test: Recurse through subdirectories References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17153 ) Change subject: osmo-sim-test: Recurse through subdirectories ...................................................................... osmo-sim-test: Recurse through subdirectories Don't just iterate over all files in the current working directory (cwd), but also recurse through all sub-directories. Change-Id: I737b01d9a845e37d8be9d4709ef0de04e749daec --- M utils/osmo-sim-test.c 1 file changed, 39 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/53/17153/1 diff --git a/utils/osmo-sim-test.c b/utils/osmo-sim-test.c index cd98397..ea3ce2a 100644 --- a/utils/osmo-sim-test.c +++ b/utils/osmo-sim-test.c @@ -374,6 +374,44 @@ } } + +static void iterate_fs(struct osim_chan_hdl *chan) +{ + const struct osim_file_desc *prev_cwd; + struct osim_file_desc *ofd; + + /* iterate over all files in current working directory */ + llist_for_each_entry(ofd, &chan->cwd->child_list, list) { + struct msgb *m; + printf("\n\n================ %s (%s) ==================\n", + ofd->short_name, ofd->long_name); + + m = select_file(chan, ofd->fid); + if (msgb_apdu_sw(m) != 0x9000) { + msgb_free(m); + continue; + } + dump_fcp_template_msg(m); + msgb_free(m); + + /* If this is a DF, recurse into it */ + switch (ofd->type) { + case TYPE_DF: + /* the select above has just changed into this directory */ + prev_cwd = chan->cwd; + chan->cwd = ofd; + iterate_fs(chan); + /* "pop" the directory from the stack */ + chan->cwd = prev_cwd; + break; + default: + dump_file(chan, ofd->fid); + break; + } + } +} + + int main(int argc, char **argv) { struct osim_reader_hdl *reader; @@ -410,19 +448,7 @@ dump_fcp_template_msg(msg); msgb_free(msg); - { - struct osim_file_desc *ofd; - llist_for_each_entry(ofd, &chan->cwd->child_list, list) { - struct msgb *m; - printf("\n\n================ %s (%s) ==================\n", - ofd->short_name, ofd->long_name); - - m = select_file(chan, ofd->fid); - dump_fcp_template_msg(m); - msgb_free(m); - dump_file(chan, ofd->fid); - } - } + iterate_fs(chan); exit(0); } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17153 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I737b01d9a845e37d8be9d4709ef0de04e749daec Gerrit-Change-Number: 17153 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 18:00:28 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 18:00:28 +0000 Subject: Change in libosmocore[master]: osmo-sim-test: Fall-back to classic SIM References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17154 ) Change subject: osmo-sim-test: Fall-back to classic SIM ...................................................................... osmo-sim-test: Fall-back to classic SIM If selection of ADF_USIM fails, let's fall-back to reading/dumping a classic TS 11.11 (51.011) SIM card. Change-Id: I5a986fc65de76c24c5af52ce7e8c699cf302fda9 --- M include/osmocom/sim/sim.h M utils/osmo-sim-test.c 2 files changed, 101 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/54/17154/1 diff --git a/include/osmocom/sim/sim.h b/include/osmocom/sim/sim.h index 2bc4715..8eb3f11 100644 --- a/include/osmocom/sim/sim.h +++ b/include/osmocom/sim/sim.h @@ -135,6 +135,7 @@ TYPE_ADF, /*!< Application Dedicated File */ TYPE_EF, /*!< Entry File */ TYPE_EF_INT, /*!< Internal Entry File */ + TYPE_MF, /*!< Master File */ }; enum osim_ef_type { diff --git a/utils/osmo-sim-test.c b/utils/osmo-sim-test.c index ea3ce2a..3cb1c59 100644 --- a/utils/osmo-sim-test.c +++ b/utils/osmo-sim-test.c @@ -33,6 +33,8 @@ /* FIXME: this needs to be moved to card_fs_uicc.c */ +static uint8_t g_class = 0x00; /* UICC/USIM */ + /* 11.1.1 */ static struct msgb *_select_file(struct osim_chan_hdl *st, uint8_t p1, uint8_t p2, const uint8_t *data, uint8_t data_len) @@ -40,7 +42,7 @@ struct msgb *msg; uint8_t *dst; - msg = osim_new_apdumsg(0x00, 0xA4, p1, p2, data_len, 256); + msg = osim_new_apdumsg(g_class, 0xA4, p1, p2, data_len, 256); dst = msgb_put(msg, data_len); memcpy(dst, data, data_len); @@ -60,7 +62,7 @@ { uint16_t cfid = htons(fid); - return _select_file(st, 0x00, 0x04, (uint8_t *)&cfid, 2); + return _select_file(st, 0x00, 0x00, (uint8_t *)&cfid, 2); } /* 11.1.9 */ @@ -72,7 +74,7 @@ if (strlen(pin) > 8) return -EINVAL; - msg = osim_new_apdumsg(0x00, 0x20, 0x00, pin_nr, 8, 0); + msg = osim_new_apdumsg(g_class, 0x20, 0x00, pin_nr, 8, 0); pindst = (char *) msgb_put(msg, 8); memset(pindst, 0xFF, 8); /* Do not copy the terminating \0 */ @@ -86,7 +88,7 @@ { struct msgb *msg; - msg = osim_new_apdumsg(0x00, 0xB2, rec_nr, 0x04, 0, rec_size); + msg = osim_new_apdumsg(g_class, 0xB2, rec_nr, 0x04, 0, rec_size); osim_transceive_apdu(st, msg); @@ -101,7 +103,7 @@ if (offset > 0x7fff || len > 256) return NULL; - msg = osim_new_apdumsg(0x00, 0xB0, offset >> 8, offset & 0xff, 0, len & 0xff); + msg = osim_new_apdumsg(g_class, 0xB0, offset >> 8, offset & 0xff, 0, len & 0xff); osim_transceive_apdu(st, msg); @@ -175,7 +177,61 @@ return 0; } +/* TS 51.011 Section 9.3 Type of File */ +static const enum osim_file_type sim2ftype[8] = { + [1] = TYPE_MF, + [2] = TYPE_DF, + [4] = TYPE_EF, +}; + +/* TS 51.011 Section 9.3 Structure of File */ +static const enum osim_ef_type sim2eftype[8] = { + [0] = EF_TYPE_TRANSP, + [1] = EF_TYPE_RECORD_FIXED, + [3] = EF_TYPE_RECORD_CYCLIC, +}; + +/* TS 51.011 Section 9.2.1 */ +static int osim_fcp_fd_decode_sim(struct osim_fcp_fd_decoded *ofd, const uint8_t *fcp, int fcp_len) +{ + memset(ofd, 0, sizeof(*ofd)); + + if (fcp_len < 14) + return -EINVAL; + + ofd->type = sim2ftype[fcp[6] & 7]; + switch (ofd->type) { + case TYPE_EF: + ofd->ef_type = sim2eftype[fcp[13] & 7]; + if (fcp_len < 13 + fcp[12]) + return -EINVAL; + switch (ofd->ef_type) { + case EF_TYPE_RECORD_FIXED: + case EF_TYPE_RECORD_CYCLIC: + if (fcp_len < 15) + return -EINVAL; + ofd->rec_len = fcp[14]; + ofd->num_rec = ntohs(*(uint16_t *)(fcp+2)) / ofd->rec_len; + break; + default: + break; + } + break; + case TYPE_MF: + case TYPE_DF: + if (fcp_len < 22) + return -EINVAL; + break; + default: + break; + } + + return 0; +} + +extern struct osim_card_profile *osim_cprof_sim(void *ctx); extern struct osim_card_profile *osim_cprof_usim(void *ctx); +extern struct osim_card_profile *osim_cprof_isim(void *ctx); static struct msgb *try_select_adf_usim(struct osim_chan_hdl *st) { @@ -186,9 +242,17 @@ int rc, i; msg = select_file(st, 0x2f00); - rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-2, 0, 0); - if (rc < 0) + if (!msg) return NULL; + /* return status word in case of error */ + if (msgb_apdu_sw(msg) != 0x9000) + return msg; + + rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-2, 0, 0); + if (rc < 0) { + msgb_free(msg); + return NULL; + } dump_fcp_template(&tp); @@ -266,20 +330,25 @@ goto out; } - rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-2, 0, 0); - if (rc < 0) { - printf("Unable to parse FCP\n"); - goto out; + if (g_class != 0xA0) { + rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-2, 0, 0); + if (rc < 0) { + printf("Unable to parse FCP: %s\n", msgb_hexdump(msg)); + goto out; + } + + if (!TLVP_PRESENT(&tp, UICC_FCP_T_FILE_DESC) || + TLVP_LEN(&tp, UICC_FCP_T_FILE_DESC) < 2) { + printf("No file descriptor present ?!?\n"); + goto out; + } + + rc = osim_fcp_fd_decode(&ffdd, TLVP_VAL(&tp, UICC_FCP_T_FILE_DESC), + TLVP_LEN(&tp, UICC_FCP_T_FILE_DESC)); + } else { + rc = osim_fcp_fd_decode_sim(&ffdd, msgb_apdu_de(msg), msgb_apdu_le(msg)); } - if (!TLVP_PRESENT(&tp, UICC_FCP_T_FILE_DESC) || - TLVP_LEN(&tp, UICC_FCP_T_FILE_DESC) < 2) { - printf("No file descriptor present ?!?\n"); - goto out; - } - - rc = osim_fcp_fd_decode(&ffdd, TLVP_VAL(&tp, UICC_FCP_T_FILE_DESC), - TLVP_LEN(&tp, UICC_FCP_T_FILE_DESC)); if (rc < 0) { printf("Unable to decode File Descriptor\n"); goto out; @@ -432,10 +501,19 @@ exit(3); msg = try_select_adf_usim(chan); - if (!msg || msgb_apdu_sw(msg) != 0x9000) + if (!msg) { exit(4); - dump_fcp_template_msg(msg); - msgb_free(msg); + } else if (msgb_apdu_sw(msg) == 0x6e00) { + /* CLA not supported: must be classic SIM, not USIM */ + g_class = 0xA0; + chan->card->prof = osim_cprof_sim(chan->card); + chan->cwd = chan->card->prof->mf; + msgb_free(msg); + } else if (msgb_apdu_sw(msg) == 0x9000) { + /* normal file */ + dump_fcp_template_msg(msg); + msgb_free(msg); + } msg = select_file(chan, 0x6fc5); dump_fcp_template_msg(msg); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17154 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5a986fc65de76c24c5af52ce7e8c699cf302fda9 Gerrit-Change-Number: 17154 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 18:05:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 18:05:50 +0000 Subject: Change in libosmocore[master]: osmo-sim-test: Fall-back to classic SIM In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/17154 to look at the new patch set (#2). Change subject: osmo-sim-test: Fall-back to classic SIM ...................................................................... osmo-sim-test: Fall-back to classic SIM If selection of ADF_USIM fails, let's fall-back to reading/dumping a classic TS 11.11 (51.011) SIM card. Change-Id: I5a986fc65de76c24c5af52ce7e8c699cf302fda9 --- M include/osmocom/sim/sim.h M utils/osmo-sim-test.c 2 files changed, 106 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/54/17154/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17154 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5a986fc65de76c24c5af52ce7e8c699cf302fda9 Gerrit-Change-Number: 17154 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:02:37 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:02:37 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Call an external script in specific situations In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/16629 to look at the new patch set (#6). Change subject: remsim-client: Call an external script in specific situations ...................................................................... remsim-client: Call an external script in specific situations There are some situations where remsim-client would want to make its surrounding system aware of, e.g. to take specific action. This is particularly important on platforms where the simtrace2 firmware doesn't have direct control over modem reset/poweron or the like. Change-Id: I61cf4d93c669db137de801f8b147dcffaa6f3abd Depends: libosmocore.git Ib24ac8a083db32e55402ce496a5eabd8749cc888 Closes: OS#4332 --- M doc/manuals/chapters/remsim-client.adoc M src/client/simtrace2-remsim_client.c 2 files changed, 141 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/29/16629/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16629 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I61cf4d93c669db137de801f8b147dcffaa6f3abd Gerrit-Change-Number: 16629 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:02:37 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:02:37 +0000 Subject: Change in osmo-remsim[master]: client: Adjust to API changes; enable build of remsim-client again References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17155 ) Change subject: client: Adjust to API changes; enable build of remsim-client again ...................................................................... client: Adjust to API changes; enable build of remsim-client again There were quite a bit of API changes that hadn't yet been applied to remsim_client.c (which was disabled and hence not compiled for quite some time). Change-Id: I0b3733f6851a951ee24ae87aa5db0ee8daa7a841 --- M src/client/Makefile.am M src/client/remsim_client.c 2 files changed, 22 insertions(+), 69 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/55/17155/1 diff --git a/src/client/Makefile.am b/src/client/Makefile.am index 106bc5e..3d4f355 100644 --- a/src/client/Makefile.am +++ b/src/client/Makefile.am @@ -4,7 +4,7 @@ $(OSMOSIMTRACE2_CFLAGS) \ -I$(top_srcdir)/include/osmocom/rspro -bin_PROGRAMS = osmo-remsim-client-st2 +bin_PROGRAMS = osmo-remsim-client-st2 remsim-client remsim_client_SOURCES = remsim_client.c ../rspro_client_fsm.c ../debug.c remsim_client_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ diff --git a/src/client/remsim_client.c b/src/client/remsim_client.c index ca6143e..41361c0 100644 --- a/src/client/remsim_client.c +++ b/src/client/remsim_client.c @@ -42,80 +42,25 @@ #include "client.h" #include "debug.h" -static int bankd_handle_msg(struct bankd_client *bc, struct msgb *msg) +static int bankd_handle_rx(struct rspro_server_conn *bankdc, const RsproPDU_t *pdu) { - RsproPDU_t *pdu = rspro_dec_msg(msg); - if (!pdu) { - LOGPFSML(bc->bankd_fi, LOGL_ERROR, "Error decoding PDU\n"); - return -1; - } - - LOGPFSM(bc->bankd_fi, "Rx RSPRO %s\n", rspro_msgt_name(pdu)); - switch (pdu->msg.present) { case RsproPDUchoice_PR_connectClientRes: /* Store 'identity' of bankd to in peer_comp_id */ - rspro_comp_id_retrieve(&bc->peer_comp_id, &pdu->msg.choice.connectClientRes.identity); - osmo_fsm_inst_dispatch(bc->bankd_fi, BDC_E_CLIENT_CONN_RES, pdu); + rspro_comp_id_retrieve(&bankdc->peer_comp_id, &pdu->msg.choice.connectClientRes.identity); + osmo_fsm_inst_dispatch(bankdc->fi, SRVC_E_CLIENT_CONN_RES, (void *) pdu); break; + case RsproPDUchoice_PR_tpduCardToModem: + case RsproPDUchoice_PR_setAtrReq: default: - LOGPFSML(bc->bankd_fi, LOGL_ERROR, "Unknown/Unsuppoerted RSPRO PDU %s: %s\n", - rspro_msgt_name(pdu), msgb_hexdump(msg)); + LOGPFSML(bankdc->fi, LOGL_ERROR, "Unknown/Unsupported RSPRO PDU %s\n", + rspro_msgt_name(pdu)); return -1; } return 0; } -int bankd_read_cb(struct ipa_client_conn *conn, struct msgb *msg) -{ - struct ipaccess_head *hh = (struct ipaccess_head *) msg->data; - struct ipaccess_head_ext *he = (struct ipaccess_head_ext *) msgb_l2(msg); - struct bankd_client *bc = conn->data; - int rc; - - if (msgb_length(msg) < sizeof(*hh)) - goto invalid; - msg->l2h = &hh->data[0]; - switch (hh->proto) { - case IPAC_PROTO_IPACCESS: - rc = ipaccess_bts_handle_ccm(conn, &bc->srv_conn.ipa_dev, msg); - if (rc < 0) - break; - switch (hh->data[0]) { - case IPAC_MSGT_PONG: - ipa_keepalive_fsm_pong_received(bc->srv_conn.keepalive_fi); - rc = 0; - break; - default: - break; - } - break; - case IPAC_PROTO_OSMO: - if (!he || msgb_l2len(msg) < sizeof(*he)) - goto invalid; - msg->l2h = &he->data[0]; - switch (he->proto) { - case IPAC_PROTO_EXT_RSPRO: - LOGPFSML(bc->bankd_fi, LOGL_DEBUG, "Received RSPRO %s\n", msgb_hexdump(msg)); - rc = bankd_handle_msg(bc, msg); - break; - default: - goto invalid; - } - break; - default: - goto invalid; - } - - msgb_free(msg); - return rc; - -invalid: - msgb_free(msg); - return -1; -} - static struct bankd_client *g_client; static void *g_tall_ctx; void __thread *talloc_asn1_ctx; @@ -137,18 +82,21 @@ if (!g_client->srv_conn.clslot) g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); *g_client->srv_conn.clslot = pdu->msg.choice.configClientIdReq.clientSlot; + if (!g_client->bankd_conn.clslot) + g_client->bankd_conn.clslot = talloc_zero(g_client, ClientSlot_t); + *g_client->bankd_conn.clslot = *g_client->srv_conn.clslot; /* send response to server */ resp = rspro_gen_ConfigClientIdRes(ResultCode_ok); server_conn_send_rspro(srvc, resp); break; case RsproPDUchoice_PR_configClientBankReq: /* store/set the bankd ip/port as instructed by the server */ - osmo_talloc_replace_string(g_client, &g_client->bankd_host, + osmo_talloc_replace_string(g_client, &g_client->bankd_conn.server_host, rspro_IpAddr2str(&pdu->msg.choice.configClientBankReq.bankd.ip)); - g_client->bankd_port = pdu->msg.choice.configClientBankReq.bankd.port; rspro2bank_slot(&g_client->bankd_slot, &pdu->msg.choice.configClientBankReq.bankSlot); + g_client->bankd_conn.server_port = pdu->msg.choice.configClientBankReq.bankd.port; /* instruct bankd FSM to connect */ - osmo_fsm_inst_dispatch(g_client->bankd_fi, BDC_E_ESTABLISH, NULL); + osmo_fsm_inst_dispatch(g_client->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); /* send response to server */ resp = rspro_gen_ConfigClientBankRes(ResultCode_ok); server_conn_send_rspro(srvc, resp); @@ -226,7 +174,7 @@ int main(int argc, char **argv) { - struct rspro_server_conn *srvc; + struct rspro_server_conn *srvc, *bankdc; int rc; g_tall_ctx = talloc_named_const(NULL, 0, "global"); @@ -259,8 +207,13 @@ asn_debug = 0; - if (bankd_conn_fsm_alloc(g_client) < 0) { - fprintf(stderr, "Unable to connect: %s\n", strerror(errno)); + bankdc = &g_client->bankd_conn; + /* server_host / server_port are configured from remsim-server */ + bankdc->handle_rx = bankd_handle_rx; + memcpy(&bankdc->own_comp_id, &srvc->own_comp_id, sizeof(bankdc->own_comp_id)); + rc = server_conn_fsm_alloc(g_client, bankdc); + if (rc < 0) { + fprintf(stderr, "Unable to connect bankd conn FSM: %s\n", strerror(errno)); exit(1); } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I0b3733f6851a951ee24ae87aa5db0ee8daa7a841 Gerrit-Change-Number: 17155 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:02:38 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:02:38 +0000 Subject: Change in osmo-remsim[master]: client: Add new osmo-remsim-client-shell binary References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17156 ) Change subject: client: Add new osmo-remsim-client-shell binary ...................................................................... client: Add new osmo-remsim-client-shell binary This is a remsim-client with an interactive 'shell', where the user can type in C-APDUs in hex formats, which will be sent to the bankd / SIM-card. Responses received from SIM Card via bankd will be printed in return. Change-Id: I636505fd9741833ccf5cbd1bcac30f7b9aa94425 --- M src/client/Makefile.am M src/client/client.h M src/client/remsim_client.c M src/client/simtrace2-remsim_client.c A src/client/user_shell.c 5 files changed, 182 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/56/17156/1 diff --git a/src/client/Makefile.am b/src/client/Makefile.am index 3d4f355..ec99818 100644 --- a/src/client/Makefile.am +++ b/src/client/Makefile.am @@ -4,10 +4,11 @@ $(OSMOSIMTRACE2_CFLAGS) \ -I$(top_srcdir)/include/osmocom/rspro -bin_PROGRAMS = osmo-remsim-client-st2 remsim-client +bin_PROGRAMS = osmo-remsim-client-st2 osmo-remsim-client-shell -remsim_client_SOURCES = remsim_client.c ../rspro_client_fsm.c ../debug.c -remsim_client_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ +osmo_remsim_client_shell_SOURCES = user_shell.c \ + remsim_client.c ../rspro_client_fsm.c ../debug.c +osmo_remsim_client_shell_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ $(top_builddir)/src/libosmo-rspro.la osmo_remsim_client_st2_SOURCES = simtrace2-remsim_client.c \ diff --git a/src/client/client.h b/src/client/client.h index 7cc7ec1..b3001ee 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -56,3 +56,10 @@ struct client_config *cfg; struct cardem_inst *cardem; }; + + +extern struct bankd_client *g_client; + +extern int client_user_bankd_handle_rx(struct rspro_server_conn *bankdc, const RsproPDU_t *pdu); + +extern int client_user_main(struct bankd_client *g_client); diff --git a/src/client/remsim_client.c b/src/client/remsim_client.c index 41361c0..dbe983b 100644 --- a/src/client/remsim_client.c +++ b/src/client/remsim_client.c @@ -52,6 +52,7 @@ break; case RsproPDUchoice_PR_tpduCardToModem: case RsproPDUchoice_PR_setAtrReq: + return client_user_bankd_handle_rx(bankdc, pdu); default: LOGPFSML(bankdc->fi, LOGL_ERROR, "Unknown/Unsupported RSPRO PDU %s\n", rspro_msgt_name(pdu)); @@ -61,7 +62,7 @@ return 0; } -static struct bankd_client *g_client; +struct bankd_client *g_client; static void *g_tall_ctx; void __thread *talloc_asn1_ctx; int asn_debug; @@ -161,7 +162,7 @@ g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); g_client->srv_conn.clslot->clientId = atoi(optarg); break; - case 's': + case 'n': if (!g_client->srv_conn.clslot) g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); g_client->srv_conn.clslot->slotNr = atoi(optarg); @@ -185,6 +186,7 @@ g_client = talloc_zero(g_tall_ctx, struct bankd_client); + /* create and [attempt to] establish connection to remsim-server */ srvc = &g_client->srv_conn; srvc->server_host = "localhost"; srvc->server_port = 9998; @@ -208,6 +210,11 @@ asn_debug = 0; bankdc = &g_client->bankd_conn; + if (srvc->clslot) { + bankdc->clslot = talloc_zero(g_client, ClientSlot_t); + *bankdc->clslot = *srvc->clslot; + } + /* server_host / server_port are configured from remsim-server */ bankdc->handle_rx = bankd_handle_rx; memcpy(&bankdc->own_comp_id, &srvc->own_comp_id, sizeof(bankdc->own_comp_id)); @@ -216,8 +223,7 @@ fprintf(stderr, "Unable to connect bankd conn FSM: %s\n", strerror(errno)); exit(1); } + osmo_fsm_inst_update_id(bankdc->fi, "bankd"); - while (1) { - osmo_select_main(0); - } + client_user_main(g_client); } diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c index ce8ea1d..bee8fc9 100644 --- a/src/client/simtrace2-remsim_client.c +++ b/src/client/simtrace2-remsim_client.c @@ -94,7 +94,7 @@ /* global GSMTAP instance */ static struct gsmtap_inst *g_gti; -static struct bankd_client *g_client; +struct bankd_client *g_client; static void *g_tall_ctx; void __thread *talloc_asn1_ctx; int asn_debug; diff --git a/src/client/user_shell.c b/src/client/user_shell.c new file mode 100644 index 0000000..db36aab --- /dev/null +++ b/src/client/user_shell.c @@ -0,0 +1,159 @@ +#include +#include + +#include + +#include "client.h" + +/* This is a remsim-client with an interactive 'shell', where the user + * can type in C-APDUs in hex formats, which will be sent to the bankd / + * SIM-card. Responses received from SIM Card via bankd will be printed + * in return. */ + + +/*********************************************************************** + * Incoming RSPRO messages from bank-daemon (SIM card) + ***********************************************************************/ + +static int bankd_handle_tpduCardToModem(struct bankd_client *bc, const RsproPDU_t *pdu) +{ + OSMO_ASSERT(pdu); + OSMO_ASSERT(RsproPDUchoice_PR_tpduCardToModem == pdu->msg.present); + + const struct TpduCardToModem *card2modem = &pdu->msg.choice.tpduCardToModem; + + printf("R-APDU: %s\n", osmo_hexdump(card2modem->data.buf, card2modem->data.size)); + + return 0; +} + +static int bankd_handle_setAtrReq(struct bankd_client *bc, const RsproPDU_t *pdu) +{ + RsproPDU_t *resp; + + OSMO_ASSERT(pdu); + OSMO_ASSERT(RsproPDUchoice_PR_setAtrReq == pdu->msg.present); + + printf("SET_ATR: %s\n", osmo_hexdump(pdu->msg.choice.setAtrReq.atr.buf, + pdu->msg.choice.setAtrReq.atr.size)); + + resp = rspro_gen_SetAtrRes(ResultCode_ok); + if (!resp) + return -ENOMEM; + server_conn_send_rspro(&bc->bankd_conn, resp); + + return 0; +} + + +int client_user_bankd_handle_rx(struct rspro_server_conn *bankdc, const RsproPDU_t *pdu) +{ + switch (pdu->msg.present) { + case RsproPDUchoice_PR_tpduCardToModem: + bankd_handle_tpduCardToModem(g_client, pdu); + break; + case RsproPDUchoice_PR_setAtrReq: + bankd_handle_setAtrReq(g_client, pdu); + break; + default: + OSMO_ASSERT(0); + } + return 0; +} + +/*********************************************************************** + * Incoming command from the user application (stdin shell in our case) + ***********************************************************************/ + +struct stdin_state { + struct osmo_fd ofd; + struct msgb *rx_msg; +}; + +/* called every time a command on stdin was received */ +static void handle_stdin_command(struct stdin_state *ss, char *cmd) +{ + RsproPDU_t *pdu; + BankSlot_t bslot; + uint8_t buf[1024]; + int rc; + + bank_slot2rspro(&bslot, &g_client->bankd_slot); + + OSMO_ASSERT(ss->rx_msg); + + printf("stdin: `%s'\n", cmd); + + if (!strcasecmp(cmd, "RESET")) { + /* reset the [remote] card */ + pdu = rspro_gen_ClientSlotStatusInd(g_client->srv_conn.clslot, &bslot, + true, false, false, true); + server_conn_send_rspro(&g_client->bankd_conn, pdu); + } else { + /* we assume the user has entered a C-APDU as hex string. parse + send */ + rc = osmo_hexparse(cmd, buf, sizeof(buf)); + if (rc < 0) { + fprintf(stderr, "ERROR parsing C-APDU `%s'!\n", cmd); + return; + } + if (!g_client->srv_conn.clslot) { + fprintf(stderr, "Cannot send command; no client slot\n"); + return; + } + + /* Send CMD APDU to [remote] card */ + pdu = rspro_gen_TpduModem2Card(g_client->srv_conn.clslot, &bslot, buf, rc); + server_conn_send_rspro(&g_client->bankd_conn, pdu); + } +} + +/* call-back function for stdin read. Gather bytes in buffer until CR/LF received */ +static int stdin_fd_cb(struct osmo_fd *ofd, unsigned int what) +{ + struct stdin_state *ss = ofd->data; + char *cur; + int rc, i; + + OSMO_ASSERT(what & OSMO_FD_READ); + + if (!ss->rx_msg) { + ss->rx_msg = msgb_alloc(1024, "stdin"); + OSMO_ASSERT(ss->rx_msg); + } + + cur = (char *) ss->rx_msg->tail; + rc = read(ofd->fd, cur, msgb_tailroom(ss->rx_msg)); + if (rc < 0) + return rc; + msgb_put(ss->rx_msg, rc); + + for (i = 0; i < rc; i++) { + if (cur[i] == '\r' || cur[i] == '\n') { + cur[i] = '\0'; + /* dispatch the command */ + handle_stdin_command(ss, cur); + /* FIXME: possibly other commands */ + msgb_free(ss->rx_msg); + ss->rx_msg = NULL; + } + } + + return 0; +} + + + +/* main function */ +int client_user_main(struct bankd_client *g_client) +{ + struct stdin_state ss; + + /* register stdin file descriptor with osmocom select loop abstraction */ + memset(&ss, 0, sizeof(ss)); + osmo_fd_setup(&ss.ofd, fileno(stdin), OSMO_FD_READ, &stdin_fd_cb, &ss, 0); + osmo_fd_register(&ss.ofd); + + while (1) { + osmo_select_main(0); + } +} -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I636505fd9741833ccf5cbd1bcac30f7b9aa94425 Gerrit-Change-Number: 17156 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:02:38 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:02:38 +0000 Subject: Change in osmo-remsim[master]: client: Work without global g_client variable References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17157 ) Change subject: client: Work without global g_client variable ...................................................................... client: Work without global g_client variable We may want to develop programs that include multiple instances of a remsim_client. Let's remove the global variable 'g_client' and instead de-reference the bankd_client using container_of() macros Change-Id: I456fb633561b88912be2f78c3e0264794d921255 --- M src/client/client.h M src/client/remsim_client.c M src/client/user_shell.c 3 files changed, 28 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/57/17157/1 diff --git a/src/client/client.h b/src/client/client.h index b3001ee..0239b55 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -57,8 +58,9 @@ struct cardem_inst *cardem; }; +#define srvc2bankd_client(srvc) container_of(srvc, struct bankd_client, srv_conn) +#define bankdc2bankd_client(bdc) container_of(bdc, struct bankd_client, bankd_conn) -extern struct bankd_client *g_client; extern int client_user_bankd_handle_rx(struct rspro_server_conn *bankdc, const RsproPDU_t *pdu); diff --git a/src/client/remsim_client.c b/src/client/remsim_client.c index dbe983b..496e1f4 100644 --- a/src/client/remsim_client.c +++ b/src/client/remsim_client.c @@ -62,7 +62,7 @@ return 0; } -struct bankd_client *g_client; +static struct bankd_client *g_client; static void *g_tall_ctx; void __thread *talloc_asn1_ctx; int asn_debug; @@ -70,6 +70,7 @@ /* handle incoming messages from server */ static int srvc_handle_rx(struct rspro_server_conn *srvc, const RsproPDU_t *pdu) { + struct bankd_client *bc = srvc2bankd_client(srvc); RsproPDU_t *resp; switch (pdu->msg.present) { @@ -80,24 +81,24 @@ break; case RsproPDUchoice_PR_configClientIdReq: /* store/set the clientID as instructed by the server */ - if (!g_client->srv_conn.clslot) - g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); - *g_client->srv_conn.clslot = pdu->msg.choice.configClientIdReq.clientSlot; - if (!g_client->bankd_conn.clslot) - g_client->bankd_conn.clslot = talloc_zero(g_client, ClientSlot_t); - *g_client->bankd_conn.clslot = *g_client->srv_conn.clslot; + if (!srvc->clslot) + srvc->clslot = talloc_zero(srvc, ClientSlot_t); + *srvc->clslot = pdu->msg.choice.configClientIdReq.clientSlot; + if (!bc->bankd_conn.clslot) + bc->bankd_conn.clslot = talloc_zero(bc, ClientSlot_t); + *bc->bankd_conn.clslot = *bc->srv_conn.clslot; /* send response to server */ resp = rspro_gen_ConfigClientIdRes(ResultCode_ok); server_conn_send_rspro(srvc, resp); break; case RsproPDUchoice_PR_configClientBankReq: /* store/set the bankd ip/port as instructed by the server */ - osmo_talloc_replace_string(g_client, &g_client->bankd_conn.server_host, + osmo_talloc_replace_string(bc, &bc->bankd_conn.server_host, rspro_IpAddr2str(&pdu->msg.choice.configClientBankReq.bankd.ip)); - rspro2bank_slot(&g_client->bankd_slot, &pdu->msg.choice.configClientBankReq.bankSlot); - g_client->bankd_conn.server_port = pdu->msg.choice.configClientBankReq.bankd.port; + rspro2bank_slot(&bc->bankd_slot, &pdu->msg.choice.configClientBankReq.bankSlot); + bc->bankd_conn.server_port = pdu->msg.choice.configClientBankReq.bankd.port; /* instruct bankd FSM to connect */ - osmo_fsm_inst_dispatch(g_client->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); + osmo_fsm_inst_dispatch(bc->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); /* send response to server */ resp = rspro_gen_ConfigClientBankRes(ResultCode_ok); server_conn_send_rspro(srvc, resp); diff --git a/src/client/user_shell.c b/src/client/user_shell.c index db36aab..d5cad7b 100644 --- a/src/client/user_shell.c +++ b/src/client/user_shell.c @@ -48,12 +48,13 @@ int client_user_bankd_handle_rx(struct rspro_server_conn *bankdc, const RsproPDU_t *pdu) { + struct bankd_client *client = bankdc2bankd_client(bankdc); switch (pdu->msg.present) { case RsproPDUchoice_PR_tpduCardToModem: - bankd_handle_tpduCardToModem(g_client, pdu); + bankd_handle_tpduCardToModem(client, pdu); break; case RsproPDUchoice_PR_setAtrReq: - bankd_handle_setAtrReq(g_client, pdu); + bankd_handle_setAtrReq(client, pdu); break; default: OSMO_ASSERT(0); @@ -68,17 +69,19 @@ struct stdin_state { struct osmo_fd ofd; struct msgb *rx_msg; + struct bankd_client *bc; }; /* called every time a command on stdin was received */ static void handle_stdin_command(struct stdin_state *ss, char *cmd) { + struct bankd_client *bc = ss->bc; RsproPDU_t *pdu; BankSlot_t bslot; uint8_t buf[1024]; int rc; - bank_slot2rspro(&bslot, &g_client->bankd_slot); + bank_slot2rspro(&bslot, &bc->bankd_slot); OSMO_ASSERT(ss->rx_msg); @@ -86,9 +89,9 @@ if (!strcasecmp(cmd, "RESET")) { /* reset the [remote] card */ - pdu = rspro_gen_ClientSlotStatusInd(g_client->srv_conn.clslot, &bslot, + pdu = rspro_gen_ClientSlotStatusInd(bc->srv_conn.clslot, &bslot, true, false, false, true); - server_conn_send_rspro(&g_client->bankd_conn, pdu); + server_conn_send_rspro(&bc->bankd_conn, pdu); } else { /* we assume the user has entered a C-APDU as hex string. parse + send */ rc = osmo_hexparse(cmd, buf, sizeof(buf)); @@ -96,14 +99,14 @@ fprintf(stderr, "ERROR parsing C-APDU `%s'!\n", cmd); return; } - if (!g_client->srv_conn.clslot) { + if (!bc->srv_conn.clslot) { fprintf(stderr, "Cannot send command; no client slot\n"); return; } /* Send CMD APDU to [remote] card */ - pdu = rspro_gen_TpduModem2Card(g_client->srv_conn.clslot, &bslot, buf, rc); - server_conn_send_rspro(&g_client->bankd_conn, pdu); + pdu = rspro_gen_TpduModem2Card(bc->srv_conn.clslot, &bslot, buf, rc); + server_conn_send_rspro(&bc->bankd_conn, pdu); } } @@ -144,7 +147,7 @@ /* main function */ -int client_user_main(struct bankd_client *g_client) +int client_user_main(struct bankd_client *bc) { struct stdin_state ss; @@ -152,6 +155,7 @@ memset(&ss, 0, sizeof(ss)); osmo_fd_setup(&ss.ofd, fileno(stdin), OSMO_FD_READ, &stdin_fd_cb, &ss, 0); osmo_fd_register(&ss.ofd); + ss.bc = bc; while (1) { osmo_select_main(0); -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I456fb633561b88912be2f78c3e0264794d921255 Gerrit-Change-Number: 17157 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:02:38 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:02:38 +0000 Subject: Change in osmo-remsim[master]: client: Remove g_client comopletely; separate 'main' code References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17158 ) Change subject: client: Remove g_client comopletely; separate 'main' code ...................................................................... client: Remove g_client comopletely; separate 'main' code We may want to use the entire client code independent of the current 'main' portion, so let's introduce separation via API. Change-Id: I6456317c3968551cd69ba379c746e4dd9690d02d --- M src/client/client.h M src/client/remsim_client.c 2 files changed, 92 insertions(+), 60 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/58/17158/1 diff --git a/src/client/client.h b/src/client/client.h index 0239b55..80381fa 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -61,6 +61,9 @@ #define srvc2bankd_client(srvc) container_of(srvc, struct bankd_client, srv_conn) #define bankdc2bankd_client(bdc) container_of(bdc, struct bankd_client, bankd_conn) +struct bankd_client *remsim_client_create(void *ctx, const char *name, const char *software); +void remsim_client_set_clslot(struct bankd_client *bc, int client_id, int slot_nr); + extern int client_user_bankd_handle_rx(struct rspro_server_conn *bankdc, const RsproPDU_t *pdu); diff --git a/src/client/remsim_client.c b/src/client/remsim_client.c index 496e1f4..7ff8f37 100644 --- a/src/client/remsim_client.c +++ b/src/client/remsim_client.c @@ -1,4 +1,4 @@ -/* (C) 2018-2019 by Harald Welte +/* (C) 2018-2020 by Harald Welte * * All Rights Reserved * @@ -22,21 +22,12 @@ #include #include -#include - -#define _GNU_SOURCE -#include #include -#include #include #include #include -#include - -#include -#include #include "rspro_util.h" #include "client.h" @@ -62,11 +53,6 @@ return 0; } -static struct bankd_client *g_client; -static void *g_tall_ctx; -void __thread *talloc_asn1_ctx; -int asn_debug; - /* handle incoming messages from server */ static int srvc_handle_rx(struct rspro_server_conn *srvc, const RsproPDU_t *pdu) { @@ -112,6 +98,82 @@ return 0; } +struct bankd_client *remsim_client_create(void *ctx, const char *name, const char *software) +{ + struct bankd_client *bc = talloc_zero(ctx, struct bankd_client); + struct rspro_server_conn *srvc, *bankdc; + int rc; + + if (!bc) + return NULL; + + /* create and [attempt to] establish connection to remsim-server */ + srvc = &bc->srv_conn; + srvc->server_host = "localhost"; + srvc->server_port = 9998; + srvc->handle_rx = srvc_handle_rx; + srvc->own_comp_id.type = ComponentType_remsimClient; + OSMO_STRLCPY_ARRAY(srvc->own_comp_id.name, name); + OSMO_STRLCPY_ARRAY(srvc->own_comp_id.software, software); + OSMO_STRLCPY_ARRAY(srvc->own_comp_id.sw_version, PACKAGE_VERSION); + + rc = server_conn_fsm_alloc(bc, srvc); + if (rc < 0) { + fprintf(stderr, "Unable to create Server conn FSM: %s\n", strerror(errno)); + exit(1); + } + + bankdc = &bc->bankd_conn; + /* server_host / server_port are configured from remsim-server */ + bankdc->handle_rx = bankd_handle_rx; + memcpy(&bankdc->own_comp_id, &srvc->own_comp_id, sizeof(bankdc->own_comp_id)); + rc = server_conn_fsm_alloc(bc, bankdc); + if (rc < 0) { + fprintf(stderr, "Unable to connect bankd conn FSM: %s\n", strerror(errno)); + exit(1); + } + osmo_fsm_inst_update_id(bankdc->fi, "bankd"); + + return bc; +} + +void remsim_client_set_clslot(struct bankd_client *bc, int client_id, int slot_nr) +{ + if (!bc->srv_conn.clslot) { + bc->srv_conn.clslot = talloc_zero(bc, ClientSlot_t); + OSMO_ASSERT(bc->srv_conn.clslot); + } + + if (!bc->bankd_conn.clslot) { + bc->bankd_conn.clslot = talloc_zero(bc, ClientSlot_t); + OSMO_ASSERT(bc->bankd_conn.clslot); + } + + if (client_id >= 0) { + bc->srv_conn.clslot->clientId = client_id; + bc->bankd_conn.clslot->clientId = client_id; + } + + if (slot_nr >= 0) { + bc->srv_conn.clslot->slotNr = slot_nr; + bc->bankd_conn.clslot->slotNr = slot_nr; + } +} + + + +#include +#include +#define _GNU_SOURCE +#include + +#include +#include + +static void *g_tall_ctx; +void __thread *talloc_asn1_ctx; +int asn_debug; + static void handle_sig_usr1(int signal) { OSMO_ASSERT(signal == SIGUSR1); @@ -129,7 +191,7 @@ ); } -static void handle_options(int argc, char **argv) +static void handle_options(struct bankd_client *bc, int argc, char **argv) { while (1) { int option_index = 0, c; @@ -153,20 +215,16 @@ exit(0); break; case 'i': - g_client->srv_conn.server_host = optarg; + bc->srv_conn.server_host = optarg; break; case 'p': - g_client->srv_conn.server_port = atoi(optarg); + bc->srv_conn.server_port = atoi(optarg); break; case 'c': - if (!g_client->srv_conn.clslot) - g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); - g_client->srv_conn.clslot->clientId = atoi(optarg); + remsim_client_set_clslot(bc, atoi(optarg), -1); break; case 'n': - if (!g_client->srv_conn.clslot) - g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); - g_client->srv_conn.clslot->slotNr = atoi(optarg); + remsim_client_set_clslot(bc, -1, atoi(optarg)); break; default: break; @@ -176,8 +234,10 @@ int main(int argc, char **argv) { - struct rspro_server_conn *srvc, *bankdc; - int rc; + struct bankd_client *g_client; + char hostname[256]; + + gethostname(hostname, sizeof(hostname)); g_tall_ctx = talloc_named_const(NULL, 0, "global"); talloc_asn1_ctx = talloc_named_const(g_tall_ctx, 0, "asn1"); @@ -185,46 +245,15 @@ osmo_init_logging2(g_tall_ctx, &log_info); - g_client = talloc_zero(g_tall_ctx, struct bankd_client); + g_client = remsim_client_create(g_tall_ctx, hostname, "remsim-client"); - /* create and [attempt to] establish connection to remsim-server */ - srvc = &g_client->srv_conn; - srvc->server_host = "localhost"; - srvc->server_port = 9998; - srvc->handle_rx = srvc_handle_rx; - srvc->own_comp_id.type = ComponentType_remsimClient; - OSMO_STRLCPY_ARRAY(srvc->own_comp_id.name, "fixme-name"); - OSMO_STRLCPY_ARRAY(srvc->own_comp_id.software, "remsim-client"); - OSMO_STRLCPY_ARRAY(srvc->own_comp_id.sw_version, PACKAGE_VERSION); + handle_options(g_client, argc, argv); - handle_options(argc, argv); + osmo_fsm_inst_dispatch(g_client->srv_conn.fi, SRVC_E_ESTABLISH, NULL); signal(SIGUSR1, handle_sig_usr1); - rc = server_conn_fsm_alloc(g_client, srvc); - if (rc < 0) { - fprintf(stderr, "Unable to create Server conn FSM: %s\n", strerror(errno)); - exit(1); - } - osmo_fsm_inst_dispatch(srvc->fi, SRVC_E_ESTABLISH, NULL); - asn_debug = 0; - bankdc = &g_client->bankd_conn; - if (srvc->clslot) { - bankdc->clslot = talloc_zero(g_client, ClientSlot_t); - *bankdc->clslot = *srvc->clslot; - } - - /* server_host / server_port are configured from remsim-server */ - bankdc->handle_rx = bankd_handle_rx; - memcpy(&bankdc->own_comp_id, &srvc->own_comp_id, sizeof(bankdc->own_comp_id)); - rc = server_conn_fsm_alloc(g_client, bankdc); - if (rc < 0) { - fprintf(stderr, "Unable to connect bankd conn FSM: %s\n", strerror(errno)); - exit(1); - } - osmo_fsm_inst_update_id(bankdc->fi, "bankd"); - client_user_main(g_client); } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I6456317c3968551cd69ba379c746e4dd9690d02d Gerrit-Change-Number: 17158 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:02:39 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:02:39 +0000 Subject: Change in osmo-remsim[master]: client: Split into remsim_client.c and remsim_client_main.c References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17159 ) Change subject: client: Split into remsim_client.c and remsim_client_main.c ...................................................................... client: Split into remsim_client.c and remsim_client_main.c Change-Id: Ie1d21c2cd84756d5c8aa2c41bcc37f5951a3a285 --- M src/client/Makefile.am M src/client/remsim_client.c A src/client/remsim_client_main.c 3 files changed, 99 insertions(+), 99 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/59/17159/1 diff --git a/src/client/Makefile.am b/src/client/Makefile.am index ec99818..ac0d707 100644 --- a/src/client/Makefile.am +++ b/src/client/Makefile.am @@ -6,7 +6,7 @@ bin_PROGRAMS = osmo-remsim-client-st2 osmo-remsim-client-shell -osmo_remsim_client_shell_SOURCES = user_shell.c \ +osmo_remsim_client_shell_SOURCES = user_shell.c remsim_client_main.c \ remsim_client.c ../rspro_client_fsm.c ../debug.c osmo_remsim_client_shell_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ $(top_builddir)/src/libosmo-rspro.la diff --git a/src/client/remsim_client.c b/src/client/remsim_client.c index 7ff8f37..07ffbde 100644 --- a/src/client/remsim_client.c +++ b/src/client/remsim_client.c @@ -159,101 +159,3 @@ bc->bankd_conn.clslot->slotNr = slot_nr; } } - - - -#include -#include -#define _GNU_SOURCE -#include - -#include -#include - -static void *g_tall_ctx; -void __thread *talloc_asn1_ctx; -int asn_debug; - -static void handle_sig_usr1(int signal) -{ - OSMO_ASSERT(signal == SIGUSR1); - talloc_report_full(g_tall_ctx, stderr); -} - -static void printf_help() -{ - printf( - " -h --help Print this help message\n" - " -i --server-ip A.B.C.D remsim-server IP address\n" - " -p --server-port 13245 remsim-server TCP port\n" - " -i --client-id <0-65535> RSPRO ClientId of this client\n" - " -n --client-slot <0-65535> RSPRO SlotNr of this client\n" - ); -} - -static void handle_options(struct bankd_client *bc, int argc, char **argv) -{ - while (1) { - int option_index = 0, c; - static const struct option long_options[] = { - { "help", 0, 0, 'h' }, - { "server-ip", 1, 0, 'i' }, - { "server-port", 1, 0, 'p' }, - { "client-id", 1, 0, 'c' }, - { "client-slot", 1, 0, 'n' }, - { 0, 0, 0, 0 } - }; - - c = getopt_long(argc, argv, "hi:p:c:n:", - long_options, &option_index); - if (c == -1) - break; - - switch (c) { - case 'h': - printf_help(); - exit(0); - break; - case 'i': - bc->srv_conn.server_host = optarg; - break; - case 'p': - bc->srv_conn.server_port = atoi(optarg); - break; - case 'c': - remsim_client_set_clslot(bc, atoi(optarg), -1); - break; - case 'n': - remsim_client_set_clslot(bc, -1, atoi(optarg)); - break; - default: - break; - } - } -} - -int main(int argc, char **argv) -{ - struct bankd_client *g_client; - char hostname[256]; - - gethostname(hostname, sizeof(hostname)); - - g_tall_ctx = talloc_named_const(NULL, 0, "global"); - talloc_asn1_ctx = talloc_named_const(g_tall_ctx, 0, "asn1"); - msgb_talloc_ctx_init(g_tall_ctx, 0); - - osmo_init_logging2(g_tall_ctx, &log_info); - - g_client = remsim_client_create(g_tall_ctx, hostname, "remsim-client"); - - handle_options(g_client, argc, argv); - - osmo_fsm_inst_dispatch(g_client->srv_conn.fi, SRVC_E_ESTABLISH, NULL); - - signal(SIGUSR1, handle_sig_usr1); - - asn_debug = 0; - - client_user_main(g_client); -} diff --git a/src/client/remsim_client_main.c b/src/client/remsim_client_main.c new file mode 100644 index 0000000..95eb089 --- /dev/null +++ b/src/client/remsim_client_main.c @@ -0,0 +1,98 @@ + +#include +#include +#define _GNU_SOURCE +#include + +#include +#include + +#include "client.h" + +static void *g_tall_ctx; +void __thread *talloc_asn1_ctx; +int asn_debug; + +static void handle_sig_usr1(int signal) +{ + OSMO_ASSERT(signal == SIGUSR1); + talloc_report_full(g_tall_ctx, stderr); +} + +static void printf_help() +{ + printf( + " -h --help Print this help message\n" + " -i --server-ip A.B.C.D remsim-server IP address\n" + " -p --server-port 13245 remsim-server TCP port\n" + " -i --client-id <0-65535> RSPRO ClientId of this client\n" + " -n --client-slot <0-65535> RSPRO SlotNr of this client\n" + ); +} + +static void handle_options(struct bankd_client *bc, int argc, char **argv) +{ + while (1) { + int option_index = 0, c; + static const struct option long_options[] = { + { "help", 0, 0, 'h' }, + { "server-ip", 1, 0, 'i' }, + { "server-port", 1, 0, 'p' }, + { "client-id", 1, 0, 'c' }, + { "client-slot", 1, 0, 'n' }, + { 0, 0, 0, 0 } + }; + + c = getopt_long(argc, argv, "hi:p:c:n:", + long_options, &option_index); + if (c == -1) + break; + + switch (c) { + case 'h': + printf_help(); + exit(0); + break; + case 'i': + bc->srv_conn.server_host = optarg; + break; + case 'p': + bc->srv_conn.server_port = atoi(optarg); + break; + case 'c': + remsim_client_set_clslot(bc, atoi(optarg), -1); + break; + case 'n': + remsim_client_set_clslot(bc, -1, atoi(optarg)); + break; + default: + break; + } + } +} + +int main(int argc, char **argv) +{ + struct bankd_client *g_client; + char hostname[256]; + + gethostname(hostname, sizeof(hostname)); + + g_tall_ctx = talloc_named_const(NULL, 0, "global"); + talloc_asn1_ctx = talloc_named_const(g_tall_ctx, 0, "asn1"); + msgb_talloc_ctx_init(g_tall_ctx, 0); + + osmo_init_logging2(g_tall_ctx, &log_info); + + g_client = remsim_client_create(g_tall_ctx, hostname, "remsim-client"); + + handle_options(g_client, argc, argv); + + osmo_fsm_inst_dispatch(g_client->srv_conn.fi, SRVC_E_ESTABLISH, NULL); + + signal(SIGUSR1, handle_sig_usr1); + + asn_debug = 0; + + client_user_main(g_client); +} -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ie1d21c2cd84756d5c8aa2c41bcc37f5951a3a285 Gerrit-Change-Number: 17159 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:02:39 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:02:39 +0000 Subject: Change in osmo-remsim[master]: client: ifd_handler (PC/SC reader driver) as remsim-client References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17160 ) Change subject: client: ifd_handler (PC/SC reader driver) as remsim-client ...................................................................... client: ifd_handler (PC/SC reader driver) as remsim-client This adds a "libifd_remsim_client.so" PC/SC driver that can be used to make normal PC/SC client programs (like pySim, sysmo-usim-tool, osmo-sim-test, osmo-usim-auth, ...) talk to a remote SIM bank. Change-Id: Ib8707c6e0e46407ab39a693adfec2fa71892f6ee --- M src/client/Makefile.am M src/client/client.h A src/client/user_ifdhandler.c 3 files changed, 948 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/60/17160/1 diff --git a/src/client/Makefile.am b/src/client/Makefile.am index ac0d707..5b88c50 100644 --- a/src/client/Makefile.am +++ b/src/client/Makefile.am @@ -6,13 +6,24 @@ bin_PROGRAMS = osmo-remsim-client-st2 osmo-remsim-client-shell +lib_LTLIBRARIES = libifd_remsim_client.la + osmo_remsim_client_shell_SOURCES = user_shell.c remsim_client_main.c \ remsim_client.c ../rspro_client_fsm.c ../debug.c +osmo_remsim_client_shell_CFLAGS = $(AM_CFLAGS) osmo_remsim_client_shell_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ $(top_builddir)/src/libosmo-rspro.la +libifd_remsim_client_la_SOURCES = user_ifdhandler.c \ + remsim_client.c ../rspro_client_fsm.c ../debug.c +libifd_remsim_client_la_LDFLAGS = -no-undefined +libifd_remsim_client_la_CPPFLAGS = $(PCSC_CFLAGS) +libifd_remsim_client_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ + $(top_builddir)/src/libosmo-rspro.la + osmo_remsim_client_st2_SOURCES = simtrace2-remsim_client.c \ ../rspro_client_fsm.c ../debug.c +osmo_remsim_client_st2_CFLAGS = $(AM_CFLAGS) osmo_remsim_client_st2_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ $(OSMOUSB_LIBS) $(OSMOSIMTRACE2_LIBS) \ $(USB_LIBS) $(OSMOSIM_LIBS) \ diff --git a/src/client/client.h b/src/client/client.h index 80381fa..0761255 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -56,6 +56,7 @@ struct client_config *cfg; struct cardem_inst *cardem; + void *data; }; #define srvc2bankd_client(srvc) container_of(srvc, struct bankd_client, srv_conn) diff --git a/src/client/user_ifdhandler.c b/src/client/user_ifdhandler.c new file mode 100644 index 0000000..677b781 --- /dev/null +++ b/src/client/user_ifdhandler.c @@ -0,0 +1,936 @@ +/* (C) 2020 by Harald Welte + * + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +/* This is a remsim-client that provides an IFD_Handler (reader driver) + * towards the PC/SC services. This effectively allows any local PC/SC client + * application to use a remote smartcard via osmo-remsim. + * + * In order to use this, you will need an /etc/reader.conf.d/osmo-remsim-client + * file with the following content: + * + * FRIENDLYNAME "osmo-remsim-client" + * DEVICENAME 0:0:192.168.11.10:9998 + * LIBPATH /usr/lib/pcsc/drivers/serial/libifd_remsim_client.so + * + * Where DEVICENAME has the following format: + * [ClientID:[SlotNr:[ServerIp:[ServerPort]]]] + * + */ + +#include +#include +#include + +#include +#include +extern int osmo_ctx_init(const char *id); + +#include "client.h" + +/* ensure this current thread has an osmo_ctx and hence can use OTC_GLOBAL and friends */ +static void ensure_osmo_ctx(void) +{ + if (!osmo_ctx) + osmo_ctx_init(""); +} + +/* inter-thread messages between IFD thread and remsim-client thread */ +enum itmsg_type { + ITMSG_TYPE_NONE, + + /* card present? */ + ITMSG_TYPE_CARD_PRES_REQ, + ITMSG_TYPE_CARD_PRES_RESP, + + /* obtain ATR */ + ITMSG_TYPE_ATR_REQ, + ITMSG_TYPE_ATR_RESP, + + /* transceive APDU: Send C-APDU, receive R-APDU */ + ITMSG_TYPE_C_APDU_REQ, + ITMSG_TYPE_R_APDU_IND, + + /* power off the card */ + ITMSG_TYPE_POWER_OFF_REQ, + ITMSG_TYPE_POWER_OFF_RESP, + + /* power on the card */ + ITMSG_TYPE_POWER_ON_REQ, + ITMSG_TYPE_POWER_ON_RESP, + + /* reset the card */ + ITMSG_TYPE_RESET_REQ, + ITMSG_TYPE_RESET_RESP, +}; + +struct itmsg { + enum itmsg_type type; + uint16_t status; /* 0 == success */ + uint16_t len; /* length of 'data' */ + uint8_t data[0]; +}; + +/* allocate + initialize msgb-wrapped inter-thread message (struct itmsg) */ +struct msgb *itmsg_alloc(enum itmsg_type type, uint16_t status, const uint8_t *data, uint16_t len) +{ + struct msgb *msg = msgb_alloc_c(OTC_GLOBAL, sizeof(struct itmsg)+len, "Tx itmsg"); + struct itmsg *im; + + if (!msg) + return NULL; + + im = (struct itmsg *) msgb_put(msg, sizeof(struct itmsg) + len); + im->type = type; + im->status = status; + im->len = len; + if (len) + memcpy(im->data, data, len); + + return msg; +} + +/*********************************************************************** + * remsim_client thread + ***********************************************************************/ + +void __thread *talloc_asn1_ctx; + +struct client_thread { + /* bankd client runningi inside this thread */ + struct bankd_client *bc; + + /* inter-thread osmo-fd; communication with IFD/PCSC thread */ + struct osmo_fd it_ofd; + struct llist_head it_msgq; + + /* ATR as received from remsim-bankd */ + uint8_t atr[ATR_SIZE_MAX]; + uint8_t atr_len; +}; + +/* configuration of client thread; passed in from IFD thread */ +struct client_thread_cfg { + const char *name; + const char *server_host; + int server_port; + int client_id; + int client_slot; + int it_sock_fd; +}; + +/* enqueue a msgb (containg 'struct itmsg') towards the IFD-handler thread */ +static void enqueue_to_ifd(struct client_thread *ct, struct msgb *msg) +{ + if (!msg) + return; + + msgb_enqueue(&ct->it_msgq, msg); + ct->it_ofd.when |= OSMO_FD_WRITE; +} + +/*********************************************************************** + * Incoming RSPRO messages from bank-daemon (SIM card) + ***********************************************************************/ + +static int bankd_handle_tpduCardToModem(struct bankd_client *bc, const RsproPDU_t *pdu) +{ + const struct TpduCardToModem *card2modem; + struct client_thread *ct = bc->data; + struct msgb *msg; + + OSMO_ASSERT(pdu); + OSMO_ASSERT(RsproPDUchoice_PR_tpduCardToModem == pdu->msg.present); + + card2modem = &pdu->msg.choice.tpduCardToModem; + DEBUGP(DMAIN, "R-APDU: %s\n", osmo_hexdump(card2modem->data.buf, card2modem->data.size)); + /* enqueue towards IFD thread */ + msg = itmsg_alloc(ITMSG_TYPE_R_APDU_IND, 0, card2modem->data.buf, card2modem->data.size); + OSMO_ASSERT(msg); + enqueue_to_ifd(ct, msg); + + return 0; +} + +static int bankd_handle_setAtrReq(struct bankd_client *bc, const RsproPDU_t *pdu) +{ + struct client_thread *ct = bc->data; + RsproPDU_t *resp; + unsigned int atr_len; + + OSMO_ASSERT(pdu); + OSMO_ASSERT(RsproPDUchoice_PR_setAtrReq == pdu->msg.present); + + DEBUGP(DMAIN, "SET_ATR: %s\n", osmo_hexdump(pdu->msg.choice.setAtrReq.atr.buf, + pdu->msg.choice.setAtrReq.atr.size)); + + /* store ATR in local data structure until somebody needs it */ + atr_len = pdu->msg.choice.setAtrReq.atr.size; + if (atr_len > sizeof(ct->atr)) + atr_len = sizeof(ct->atr); + memcpy(ct->atr, pdu->msg.choice.setAtrReq.atr.buf, atr_len); + ct->atr_len = atr_len; + + resp = rspro_gen_SetAtrRes(ResultCode_ok); + if (!resp) + return -ENOMEM; + server_conn_send_rspro(&bc->bankd_conn, resp); + + return 0; +} + + +int client_user_bankd_handle_rx(struct rspro_server_conn *bankdc, const RsproPDU_t *pdu) +{ + struct bankd_client *bc = bankdc2bankd_client(bankdc); + + switch (pdu->msg.present) { + case RsproPDUchoice_PR_tpduCardToModem: + bankd_handle_tpduCardToModem(bc, pdu); + break; + case RsproPDUchoice_PR_setAtrReq: + bankd_handle_setAtrReq(bc, pdu); + break; + default: + OSMO_ASSERT(0); + } + return 0; +} + +/*********************************************************************** + * Incoming command from the user application + ***********************************************************************/ + +/* handle a single msgb-wrapped 'struct itmsg' from the IFD-handler thread */ +static void handle_it_msg(struct client_thread *ct, struct itmsg *itmsg) +{ + struct bankd_client *bc = ct->bc; + struct msgb *tx = NULL; + RsproPDU_t *pdu; + BankSlot_t bslot; + + bank_slot2rspro(&bslot, &ct->bc->bankd_slot); + + switch (itmsg->type) { + case ITMSG_TYPE_CARD_PRES_REQ: + if (bc->bankd_conn.fi->state == 2 /*SRVC_ST_CONNECTED*/) + tx = itmsg_alloc(ITMSG_TYPE_CARD_PRES_RESP, 0, NULL, 0); + else + tx = itmsg_alloc(ITMSG_TYPE_CARD_PRES_RESP, 0xffff, NULL, 0); + OSMO_ASSERT(tx); + break; + + case ITMSG_TYPE_ATR_REQ: + /* respond to IFD */ + tx = itmsg_alloc(ITMSG_TYPE_ATR_RESP, 0, ct->atr, ct->atr_len); + OSMO_ASSERT(tx); + break; + + case ITMSG_TYPE_POWER_OFF_REQ: + pdu = rspro_gen_ClientSlotStatusInd(bc->srv_conn.clslot, &bslot, + true, false, false, true); + server_conn_send_rspro(&bc->bankd_conn, pdu); + /* respond to IFD */ + tx = itmsg_alloc(ITMSG_TYPE_POWER_OFF_RESP, 0, NULL, 0); + OSMO_ASSERT(tx); + break; + + case ITMSG_TYPE_POWER_ON_REQ: + pdu = rspro_gen_ClientSlotStatusInd(bc->srv_conn.clslot, &bslot, + false, true, true, true); + server_conn_send_rspro(&bc->bankd_conn, pdu); + /* respond to IFD */ + tx = itmsg_alloc(ITMSG_TYPE_POWER_ON_RESP, 0, NULL, 0); + OSMO_ASSERT(tx); + break; + + case ITMSG_TYPE_RESET_REQ: + /* reset the [remote] card */ + pdu = rspro_gen_ClientSlotStatusInd(bc->srv_conn.clslot, &bslot, + true, true, true, true); + server_conn_send_rspro(&bc->bankd_conn, pdu); + /* and take it out of reset again */ + pdu = rspro_gen_ClientSlotStatusInd(bc->srv_conn.clslot, &bslot, + false, true, true, true); + server_conn_send_rspro(&bc->bankd_conn, pdu); + /* respond to IFD */ + tx = itmsg_alloc(ITMSG_TYPE_RESET_RESP, 0, NULL, 0); + OSMO_ASSERT(tx); + break; + case ITMSG_TYPE_C_APDU_REQ: + if (!bc->srv_conn.clslot) { + LOGP(DMAIN, LOGL_ERROR, "Cannot send command; no client slot\n"); + /* FIXME: Response? */ + return; + } + + /* Send CMD APDU to [remote] card */ + pdu = rspro_gen_TpduModem2Card(bc->srv_conn.clslot, &bslot, itmsg->data, itmsg->len); + server_conn_send_rspro(&bc->bankd_conn, pdu); + /* response will come in asynchronously */ + break; + default: + LOGP(DMAIN, LOGL_ERROR, "Unknown inter-thread msg type %u\n", itmsg->type); + break; + } + + if (tx) + enqueue_to_ifd(ct, tx); + +} + +/* call-back function for inter-thread socket */ +static int it_sock_fd_cb(struct osmo_fd *ofd, unsigned int what) +{ + struct client_thread *ct = ofd->data; + int rc; + + if (what & OSMO_FD_READ) { + struct msgb *msg = msgb_alloc_c(OTC_GLOBAL, 1024, "Rx it_fd"); + struct itmsg *itmsg; + + OSMO_ASSERT(msg); + rc = read(ofd->fd, msg->tail, msgb_tailroom(msg)); + if (rc <= 0) { + LOGP(DMAIN, LOGL_ERROR, "Error reading from inter-thread fd: %d\n", rc); + pthread_exit(NULL); + } + msgb_put(msg, rc); + itmsg = (struct itmsg *) msgb_data(msg); + if (msgb_length(msg) < sizeof(*itmsg) || + msgb_length(msg) < sizeof(*itmsg) + itmsg->len) { + LOGP(DMAIN, LOGL_ERROR, "Dropping short inter-thread message\n"); + } else { + handle_it_msg(ct, itmsg); + } + msgb_free(msg); + } + + if (what & OSMO_FD_WRITE) { + struct msgb *msg = msgb_dequeue(&ct->it_msgq); + if (!msg) { + /* last message: disable write events */ + ofd->when &= ~OSMO_FD_WRITE; + } else { + unsigned int len = msgb_length(msg); + rc = write(ofd->fd, msgb_data(msg), len); + msgb_free(msg); + if (rc < len) { + LOGP(DMAIN, LOGL_ERROR, "Short write on inter-thread fd: %d < %d\n", + rc, len); + } + } + } + + + return 0; +} + +/* release all resources allocated by thread */ +static void client_pthread_cleanup(void *arg) +{ + struct client_thread *ct = arg; + + LOGP(DMAIN, LOGL_INFO, "Cleaning up remsim-client thread\n"); + //FIXME remsim_client_destroy(ct->bc); + ct->bc = NULL; + msgb_queue_free(&ct->it_msgq); + osmo_fd_unregister(&ct->it_ofd); + close(ct->it_ofd.fd); + ct->it_ofd.fd = -1; + talloc_free(ct); +} + +/* main function of remsim-client pthread */ +static void *client_pthread_main(void *arg) +{ + struct client_thread_cfg *cfg = arg; + struct client_thread *ct; + int rc; + + osmo_select_init(); + rc = osmo_ctx_init("client"); + OSMO_ASSERT(rc == 0); + + ct = talloc_zero(OTC_GLOBAL, struct client_thread); + OSMO_ASSERT(ct); + + if (!talloc_asn1_ctx) + talloc_asn1_ctx= talloc_named_const(ct, 0, "asn1"); + + ct->bc = remsim_client_create(ct, cfg->name, "remsim_ifdhandler"); + OSMO_ASSERT(ct->bc); + ct->bc->data = ct; + remsim_client_set_clslot(ct->bc, cfg->client_id, cfg->client_slot); + if (cfg->server_host) + ct->bc->srv_conn.server_host = (char *) cfg->server_host; + if (cfg->server_port >= 0) + ct->bc->srv_conn.server_port = cfg->server_port; + + INIT_LLIST_HEAD(&ct->it_msgq); + osmo_fd_setup(&ct->it_ofd, cfg->it_sock_fd, OSMO_FD_READ, &it_sock_fd_cb, ct, 0); + osmo_fd_register(&ct->it_ofd); + + /* ensure we get properly cleaned up if cancelled */ + pthread_cleanup_push(client_pthread_cleanup, ct); + + osmo_fsm_inst_dispatch(ct->bc->srv_conn.fi, SRVC_E_ESTABLISH, NULL); + + while (1) { + osmo_select_main(0); + } + + pthread_cleanup_pop(1); + return NULL; +} + +/*********************************************************************** + * PC/SC ifd_handler API functions + ***********************************************************************/ + +#include +#include + +#include +#include + +static const struct value_string ifd_status_names[] = { + OSMO_VALUE_STRING(IFD_SUCCESS), + OSMO_VALUE_STRING(IFD_ERROR_TAG), + OSMO_VALUE_STRING(IFD_ERROR_SET_FAILURE), + OSMO_VALUE_STRING(IFD_ERROR_VALUE_READ_ONLY), + OSMO_VALUE_STRING(IFD_ERROR_PTS_FAILURE), + OSMO_VALUE_STRING(IFD_ERROR_NOT_SUPPORTED), + OSMO_VALUE_STRING(IFD_PROTOCOL_NOT_SUPPORTED), + OSMO_VALUE_STRING(IFD_ERROR_POWER_ACTION), + OSMO_VALUE_STRING(IFD_ERROR_SWALLOW), + OSMO_VALUE_STRING(IFD_ERROR_EJECT), + OSMO_VALUE_STRING(IFD_ERROR_CONFISCATE), + OSMO_VALUE_STRING(IFD_COMMUNICATION_ERROR), + OSMO_VALUE_STRING(IFD_RESPONSE_TIMEOUT), + OSMO_VALUE_STRING(IFD_NOT_SUPPORTED), + OSMO_VALUE_STRING(IFD_ICC_PRESENT), + OSMO_VALUE_STRING(IFD_ICC_NOT_PRESENT), + OSMO_VALUE_STRING(IFD_NO_SUCH_DEVICE), + OSMO_VALUE_STRING(IFD_ERROR_INSUFFICIENT_BUFFER), + { 0, NULL } +}; + +static const struct value_string ifd_tag_names[] = { + OSMO_VALUE_STRING(TAG_IFD_ATR), + OSMO_VALUE_STRING(TAG_IFD_SLOTNUM), + OSMO_VALUE_STRING(TAG_IFD_SLOT_THREAD_SAFE), + OSMO_VALUE_STRING(TAG_IFD_THREAD_SAFE), + OSMO_VALUE_STRING(TAG_IFD_SLOTS_NUMBER), + OSMO_VALUE_STRING(TAG_IFD_SIMULTANEOUS_ACCESS), + OSMO_VALUE_STRING(TAG_IFD_POLLING_THREAD), + OSMO_VALUE_STRING(TAG_IFD_POLLING_THREAD_KILLABLE), + OSMO_VALUE_STRING(TAG_IFD_STOP_POLLING_THREAD), + OSMO_VALUE_STRING(TAG_IFD_POLLING_THREAD_WITH_TIMEOUT), + { 0, NULL } +}; + +#define LOG_EXIT(Lun, r) \ + Log4(r == IFD_SUCCESS || r == IFD_ICC_NOT_PRESENT ? PCSC_LOG_DEBUG : PCSC_LOG_ERROR, \ + "%s(0x%08lx) => %s\n", __func__, Lun, get_value_string(ifd_status_names, r)) + +#define LOG_EXITF(Lun, r, fmt, args...) \ + Log5(r == IFD_SUCCESS ? PCSC_LOG_DEBUG : PCSC_LOG_ERROR, \ + "%s(0x%08lx) "fmt" => %s\n", __func__, Lun, ## args, get_value_string(ifd_status_names, r)) + +/* IFD side handle for a remsim-client [thread] */ +struct ifd_client { + /* the client pthread itself */ + pthread_t pthread; + /* socket to talk to thread */ + int it_fd; + /* configuration passed into the thread */ + struct client_thread_cfg cfg; +}; + +static struct msgb *ifd_xceive_client(struct ifd_client *ic, struct msgb *tx) +{ + struct msgb *rx = msgb_alloc_c(OTC_GLOBAL, 1024, "ifd_rx itmsg"); + struct itmsg *rx_it; + int rc; + + rc = write(ic->it_fd, msgb_data(tx), msgb_length(tx)); + msgb_free(tx); + if (rc < msgb_length(tx)) { + Log2(PCSC_LOG_ERROR, "Short write IFD->client thread: %d\n", rc); + msgb_free(rx); + return NULL; + } + rc = read(ic->it_fd, rx->tail, msgb_tailroom(rx)); + if (rc <= 0) { + Log2(PCSC_LOG_ERROR, "Short read IFD<-client thread: %d\n", rc); + msgb_free(rx); + return NULL; + } + msgb_put(rx, rc); + rx_it = (struct itmsg *) msgb_data(rx); + if (msgb_length(rx) < sizeof(*rx_it) + rx_it->len) { + Log2(PCSC_LOG_ERROR, "Short itmsg IFD<-client thread: %d\n", msgb_length(rx)); + msgb_free(rx); + return NULL; + } + return rx; +} + +/* function called on IFD side to create socketpair + start remsim-client thread */ +static struct ifd_client *create_ifd_client(const struct client_thread_cfg *cfg) +{ + struct ifd_client *ic = talloc_zero(OTC_GLOBAL, struct ifd_client); + int sp[2]; + int rc; + + /* copy over configuration */ + ic->cfg = *cfg; + + /* create socket pair for communication between threads */ + rc = socketpair(AF_UNIX, SOCK_SEQPACKET, 0, sp); + if (rc != 0) { + talloc_free(ic); + return NULL; + } + + ic->it_fd = sp[0]; + ic->cfg.it_sock_fd = sp[1]; + + /* start the thread */ + rc = pthread_create(&ic->pthread, NULL, client_pthread_main, &ic->cfg); + if (rc != 0) { + Log1(PCSC_LOG_ERROR, "Error creating remsim-client pthread\n"); + close(sp[0]); + close(sp[1]); + talloc_free(ic); + return NULL; + } + + return ic; +} + +/* function called on IFD side to destroy (terminate) remsim-client thread */ +static void destroy_ifd_client(struct ifd_client *ic) +{ + if (!ic) + return; + + pthread_cancel(ic->pthread); + pthread_join(ic->pthread, NULL); +} + +#define MAX_SLOTS 256 +static struct ifd_client *ifd_client[MAX_SLOTS]; + +#define LUN2SLOT(lun) ((lun) & 0xffff) +#define LUN2RDR(lun) ((lun) >> 16) + + +RESPONSECODE IFDHCreateChannel(DWORD Lun, DWORD Channel) +{ + return IFD_COMMUNICATION_ERROR; +} + +RESPONSECODE IFDHCreateChannelByName(DWORD Lun, LPSTR DeviceName) +{ + struct ifd_client *ic; + struct client_thread_cfg cfg = { + .name = "fixme-name", + .server_host = "127.0.0.1", + .server_port = -1, + .client_id = 0, + .client_slot = 0, + }; + char *r, *client_id, *slot_nr, *host, *port; + + if (LUN2RDR(Lun) != 0) + return IFD_NO_SUCH_DEVICE; + + if (LUN2SLOT(Lun) >= ARRAY_SIZE(ifd_client)) + return IFD_NO_SUCH_DEVICE; + + ensure_osmo_ctx(); + + client_id = strtok_r(DeviceName, ":", &r); + if (!client_id) + goto end_parse; + cfg.client_id = atoi(client_id); + + slot_nr = strtok_r(NULL, ":", &r); + if (!slot_nr) + goto end_parse; + cfg.client_slot = atoi(slot_nr); + + host = strtok_r(NULL, ":", &r); + if (!host) + goto end_parse; + cfg.server_host = strdup(host); + + port = strtok_r(NULL, ":", &r); + cfg.server_port = atoi(port); + + +end_parse: + LOGP(DMAIN, LOGL_NOTICE, "remsim-client C%d:%d bankd=%s:%d\n", + cfg.client_id, cfg.client_slot, cfg.server_host, cfg.server_port); + + ic = create_ifd_client(&cfg); + if (ic) { + ifd_client[LUN2SLOT(Lun)] = ic; + return IFD_SUCCESS; + } else + return IFD_COMMUNICATION_ERROR; +} + +RESPONSECODE IFDHControl(DWORD Lun, DWORD dwControlCode, PUCHAR TxBuffer, DWORD TxLength, + PUCHAR RxBuffer, DWORD RxLength, LPDWORD pdwBytesReturned) +{ + RESPONSECODE r = IFD_COMMUNICATION_ERROR; + + ensure_osmo_ctx(); + + if (LUN2RDR(Lun) != 0) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + if (LUN2SLOT(Lun) >= ARRAY_SIZE(ifd_client)) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + if (pdwBytesReturned) + *pdwBytesReturned = 0; + + r = IFD_ERROR_NOT_SUPPORTED; +err: + LOG_EXIT(Lun, r); + return r; +} + +RESPONSECODE IFDHCloseChannel(DWORD Lun) +{ + RESPONSECODE r = IFD_COMMUNICATION_ERROR; + + ensure_osmo_ctx(); + + if (LUN2RDR(Lun) != 0) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + if (LUN2SLOT(Lun) >= ARRAY_SIZE(ifd_client)) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + destroy_ifd_client(ifd_client[LUN2SLOT(Lun)]); + ifd_client[LUN2SLOT(Lun)] = NULL; + + r = IFD_SUCCESS; +err: + LOG_EXIT(Lun, r); + return r; +} + +RESPONSECODE IFDHGetCapabilities(DWORD Lun, DWORD Tag, PDWORD Length, PUCHAR Value) +{ + RESPONSECODE r = IFD_COMMUNICATION_ERROR; + struct ifd_client *ic; + struct msgb *rx, *tx; + struct itmsg *rx_it; + + ensure_osmo_ctx(); + + if (LUN2RDR(Lun) != 0) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + if (LUN2SLOT(Lun) >= ARRAY_SIZE(ifd_client)) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + ic = ifd_client[LUN2SLOT(Lun)]; + if (!ic) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + if (!Length || !Value) + goto err; + + switch (Tag) { + case TAG_IFD_ATR: + /* Return the ATR and its size */ + tx = itmsg_alloc(ITMSG_TYPE_ATR_REQ, 0, NULL, 0); + OSMO_ASSERT(tx); + rx = ifd_xceive_client(ic, tx); + if (!rx) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + rx_it = (struct itmsg *)msgb_data(rx); + if (*Length > rx_it->len) + *Length = rx_it->len; + memcpy(Value, rx_it->data, *Length); + msgb_free(rx); + break; + case TAG_IFD_SIMULTANEOUS_ACCESS: + /* Return the number of sessions (readers) the driver + * can handle in Value[0]. This is used for multiple + * readers sharing the same driver. */ + if (*Length < 1) + goto err; + *Value = 1; + *Length = 1; + break; + case TAG_IFD_SLOTS_NUMBER: + /* Return the number of slots in this reader in Value[0] */ + if (*Length < 1) + goto err; + *Value = 1; + *Length = 1; + break; + case TAG_IFD_THREAD_SAFE: + /* If the driver supports more than one reader (see + * TAG_IFD_SIMULTANEOUS_ACCESS above) this tag indicates + * if the driver supports access to multiple readers at + * the same time. */ + if (*Length < 1) + goto err; + *Value = 0; + *Length = 1; + break; + case TAG_IFD_SLOT_THREAD_SAFE: + /* If the reader has more than one slot (see + * TAG_IFD_SLOTS_NUMBER above) this tag indicates if the + * driver supports access to multiple slots of the same + * reader at the same time. */ + if (*Length < 1) + goto err; + *Value = 0; + *Length = 1; + break; + default: + r = IFD_ERROR_TAG; + goto err; + } + + r = IFD_SUCCESS; + +err: + if (r != IFD_SUCCESS && Length) + *Length = 0; + + LOG_EXITF(Lun, r, "%s", get_value_string(ifd_tag_names, Tag)); + return r; +} + +RESPONSECODE IFDHSetCapabilities(DWORD Lun, DWORD Tag, DWORD Length, PUCHAR Value) +{ + ensure_osmo_ctx(); + + if (LUN2RDR(Lun) != 0) + return IFD_NO_SUCH_DEVICE; + + if (LUN2SLOT(Lun) >= ARRAY_SIZE(ifd_client)) + return IFD_NO_SUCH_DEVICE; + + + LOG_EXIT(Lun, IFD_NOT_SUPPORTED); + return IFD_NOT_SUPPORTED; +} + +RESPONSECODE IFDHSetProtocolParameters(DWORD Lun, DWORD Protocol, UCHAR Flags, UCHAR PTS1, + UCHAR PTS2, UCHAR PTS3) +{ + ensure_osmo_ctx(); + + if (LUN2RDR(Lun) != 0) + return IFD_NO_SUCH_DEVICE; + + if (LUN2SLOT(Lun) >= ARRAY_SIZE(ifd_client)) + return IFD_NO_SUCH_DEVICE; + + LOG_EXIT(Lun, IFD_SUCCESS); + return IFD_SUCCESS; +} + +RESPONSECODE IFDHPowerICC(DWORD Lun, DWORD Action, PUCHAR Atr, PDWORD AtrLength) +{ + RESPONSECODE r = IFD_COMMUNICATION_ERROR; + struct ifd_client *ic; + struct msgb *rx, *tx; + + ensure_osmo_ctx(); + + if (LUN2RDR(Lun) != 0) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + if (LUN2SLOT(Lun) >= ARRAY_SIZE(ifd_client)) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + ic = ifd_client[LUN2SLOT(Lun)]; + if (!ic) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + switch (Action) { + case IFD_POWER_DOWN: + tx = itmsg_alloc(ITMSG_TYPE_POWER_OFF_REQ, 0, NULL, 0); + break; + case IFD_POWER_UP: + tx = itmsg_alloc(ITMSG_TYPE_POWER_ON_REQ, 0, NULL, 0); + break; + case IFD_RESET: + tx = itmsg_alloc(ITMSG_TYPE_RESET_REQ, 0, NULL, 0); + break; + default: + r = IFD_NOT_SUPPORTED; + goto err; + } + + rx = ifd_xceive_client(ic, tx); + if (!rx) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + r = IFD_SUCCESS; + msgb_free(rx); + +err: + if (r != IFD_SUCCESS && AtrLength) + *AtrLength = 0; + else + r = IFDHGetCapabilities(Lun, TAG_IFD_ATR, AtrLength, Atr); + + LOG_EXIT(Lun, r); + return r; +} + +RESPONSECODE IFDHTransmitToICC(DWORD Lun, SCARD_IO_HEADER SendPci, PUCHAR TxBuffer, + DWORD TxLength, PUCHAR RxBuffer, PDWORD RxLength, + PSCARD_IO_HEADER RecvPci) +{ + RESPONSECODE r = IFD_COMMUNICATION_ERROR; + struct ifd_client *ic; + struct msgb *rx, *tx; + struct itmsg *rx_it; + + ensure_osmo_ctx(); + + if (LUN2RDR(Lun) != 0) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + if (LUN2SLOT(Lun) >= ARRAY_SIZE(ifd_client)) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + ic = ifd_client[LUN2SLOT(Lun)]; + if (!ic) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + tx = itmsg_alloc(ITMSG_TYPE_C_APDU_REQ, 0, TxBuffer, TxLength); + OSMO_ASSERT(tx); + /* transmit C-APDU to remote reader + blocking wait for response from peer */ + rx = ifd_xceive_client(ic, tx); + if (!rx) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + rx_it = (struct itmsg *) msgb_data(rx); + if (*RxLength > rx_it->len) + *RxLength = rx_it->len; + memcpy(RxBuffer, rx_it->data, *RxLength); + msgb_free(rx); + + r = IFD_SUCCESS; +err: + if (r != IFD_SUCCESS && RxLength) + *RxLength = 0; + + LOG_EXIT(Lun, r); + return r; +} + +RESPONSECODE IFDHICCPresence(DWORD Lun) +{ + RESPONSECODE r = IFD_COMMUNICATION_ERROR; + struct ifd_client *ic; + struct msgb *rx, *tx; + struct itmsg *rx_it; + + ensure_osmo_ctx(); + + if (LUN2RDR(Lun) != 0) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + if (LUN2SLOT(Lun) >= ARRAY_SIZE(ifd_client)) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + ic = ifd_client[LUN2SLOT(Lun)]; + if (!ic) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + + tx = itmsg_alloc(ITMSG_TYPE_CARD_PRES_REQ, 0, NULL, 0); + OSMO_ASSERT(tx); + rx = ifd_xceive_client(ic, tx); + if (!rx) { + r = IFD_NO_SUCH_DEVICE; + goto err; + } + rx_it = (struct itmsg *) msgb_data(rx); + if (rx_it->status == 0) + r = IFD_SUCCESS; + else + r = IFD_ICC_NOT_PRESENT; + +err: + LOG_EXIT(Lun, r); + return r; +} + +static __attribute__((constructor)) void on_dso_load_ifd(void) +{ + void *g_tall_ctx = NULL; + ensure_osmo_ctx(); + osmo_init_logging2(g_tall_ctx, &log_info); +} -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ib8707c6e0e46407ab39a693adfec2fa71892f6ee Gerrit-Change-Number: 17160 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:15 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:15 +0000 Subject: Change in pysim[master]: pySim-read.py: print meaningful message when SPN is not set In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16981 ) Change subject: pySim-read.py: print meaningful message when SPN is not set ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1d98520f33a8564c7d69f50a0811204f138f9dca Gerrit-Change-Number: 16981 Gerrit-PatchSet: 5 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-Comment-Date: Sat, 15 Feb 2020 19:11:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:18 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:18 +0000 Subject: Change in pysim[master]: pySim-prog.py: add presence/length checks for user-provided SPN In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16977 ) Change subject: pySim-prog.py: add presence/length checks for user-provided SPN ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16977 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I35fab9a85efda2b83f221a460d31c7d41db582b0 Gerrit-Change-Number: 16977 Gerrit-PatchSet: 6 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:11:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:22 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:22 +0000 Subject: Change in pysim[master]: cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16945 ) Change subject: cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act() ...................................................................... Patch Set 10: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I35848059d6082c379246c8d695cb094c20780d15 Gerrit-Change-Number: 16945 Gerrit-PatchSet: 10 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-Comment-Date: Sat, 15 Feb 2020 19:11:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:28 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:28 +0000 Subject: Change in pysim[master]: Fix MCC and MCC representation in the output of pySim-read In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16944 ) Change subject: Fix MCC and MCC representation in the output of pySim-read ...................................................................... Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16944 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie699c0a38d5ae90e4d6109e4574ce860e4044096 Gerrit-Change-Number: 16944 Gerrit-PatchSet: 9 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:11:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:31 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:31 +0000 Subject: Change in pysim[master]: pySim-read.py: fix reading and parsing of EF.MSISDN In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16947 ) Change subject: pySim-read.py: fix reading and parsing of EF.MSISDN ...................................................................... Patch Set 19: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 Gerrit-Change-Number: 16947 Gerrit-PatchSet: 19 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: dexter Gerrit-Comment-Date: Sat, 15 Feb 2020 19:11:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:34 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:34 +0000 Subject: Change in pysim[master]: pySim-prog.py: add support for MSISDN programming In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/16946 ) Change subject: pySim-prog.py: add support for MSISDN programming ...................................................................... Patch Set 11: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie033a0ffc3697ae562eaa7a241a0f6af6c2b0594 Gerrit-Change-Number: 16946 Gerrit-PatchSet: 11 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-Comment-Date: Sat, 15 Feb 2020 19:11:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:35 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:35 +0000 Subject: Change in pysim[master]: pySim-read.py: print meaningful message when SPN is not set In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/16981 ) Change subject: pySim-read.py: print meaningful message when SPN is not set ...................................................................... pySim-read.py: print meaningful message when SPN is not set Change-Id: I1d98520f33a8564c7d69f50a0811204f138f9dca --- M pySim-read.py M pysim-testdata/sysmoISIM-SJA2.ok M pysim-testdata/sysmosim-gr1.ok 3 files changed, 5 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim-read.py b/pySim-read.py index 853e924..d753c8b 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -126,7 +126,9 @@ (res, sw) = scc.read_binary(EF['SPN']) if sw == '9000': spn_res = dec_spn(res) - print("SPN: %s\nDisplay HPLMN: %s\nDisplay OPLMN: %s" % (spn_res[0], spn_res[1], spn_res[2],)) + print("SPN: %s" % (spn_res[0] or "Not available")) + print("Display HPLMN: %s" % (spn_res[1],)) + print("Display OPLMN: %s" % (spn_res[2],)) else: print("SPN: Can't read, response code = %s" % (sw,)) except Exception as e: diff --git a/pysim-testdata/sysmoISIM-SJA2.ok b/pysim-testdata/sysmoISIM-SJA2.ok index 7346134..77c4878 100644 --- a/pysim-testdata/sysmoISIM-SJA2.ok +++ b/pysim-testdata/sysmoISIM-SJA2.ok @@ -3,7 +3,7 @@ ICCID: 8988211900000000004 IMSI: 001010000000102 SMSP: ffffffffffffffffffffffffffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000 -SPN: +SPN: Not available Display HPLMN: False Display OPLMN: False PLMNsel: fff11fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/pysim-testdata/sysmosim-gr1.ok b/pysim-testdata/sysmosim-gr1.ok index b306f4d..f7df5cf 100644 --- a/pysim-testdata/sysmosim-gr1.ok +++ b/pysim-testdata/sysmosim-gr1.ok @@ -3,7 +3,7 @@ ICCID: 1122334455667788990 IMSI: 001010000000102 SMSP: ffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000 -SPN: +SPN: Not available Display HPLMN: False Display OPLMN: False PLMNsel: fff11fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I1d98520f33a8564c7d69f50a0811204f138f9dca Gerrit-Change-Number: 16981 Gerrit-PatchSet: 5 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:36 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:36 +0000 Subject: Change in pysim[master]: pySim-prog.py: add presence/length checks for user-provided SPN In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/16977 ) Change subject: pySim-prog.py: add presence/length checks for user-provided SPN ...................................................................... pySim-prog.py: add presence/length checks for user-provided SPN Change-Id: I35fab9a85efda2b83f221a460d31c7d41db582b0 --- M pySim-prog.py M pySim/cards.py 2 files changed, 7 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim-prog.py b/pySim-prog.py index bfb40b2..09a5d70 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -274,6 +274,10 @@ # Digitize MCC/MNC (5 or 6 digits) plmn_digits = _mcc_mnc_digits(mcc, mnc) + if opts.name is not None: + if len(opts.name) > 16: + raise ValueError('Service Provider Name must max 16 characters!'); + # ICCID (19 digits, E.118), though some phase1 vendors use 20 :( if opts.iccid is not None: iccid = opts.iccid diff --git a/pySim/cards.py b/pySim/cards.py index faaeca3..022182c 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -613,8 +613,9 @@ data, sw = self._scc.update_binary('00F7', content) # set Service Provider Name - content = enc_spn(p['name'], True, True) - data, sw = self._scc.update_binary('6F46', rpad(content, 32)) + if p.get('name') is not None: + content = enc_spn(p['name'], True, True) + data, sw = self._scc.update_binary('6F46', rpad(content, 32)) # write EF.IMSI data, sw = self._scc.update_binary('6f07', enc_imsi(p['imsi'])) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16977 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I35fab9a85efda2b83f221a460d31c7d41db582b0 Gerrit-Change-Number: 16977 Gerrit-PatchSet: 6 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:37 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:37 +0000 Subject: Change in pysim[master]: cards: cosmetic/indentation fix: use tabs, not spaces In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/17149 ) Change subject: cards: cosmetic/indentation fix: use tabs, not spaces ...................................................................... cards: cosmetic/indentation fix: use tabs, not spaces Change-Id: I5d9cbdb0ecbee783729d0a208d12f8e59ca957ff --- M pySim/cards.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/cards.py b/pySim/cards.py index 022182c..a49fe43 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -175,7 +175,7 @@ each possible provider uses a specific record number in each EF. The indexes used are ( where N is the number of providers supported ) : - [2 .. N+1] for the operator name - - [1 .. N] for the programable EFs + - [1 .. N] for the programable EFs * 3f00/7f4d/8f0c : Operator Name -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17149 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5d9cbdb0ecbee783729d0a208d12f8e59ca957ff Gerrit-Change-Number: 17149 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:37 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:37 +0000 Subject: Change in pysim[master]: cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/16945 ) Change subject: cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act() ...................................................................... cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act() Change-Id: I35848059d6082c379246c8d695cb094c20780d15 --- M pySim/cards.py 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/cards.py b/pySim/cards.py index a49fe43..1552ff1 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -76,8 +76,8 @@ access_tech = 'FFFF' # All technologues selected, even Reserved for Future Use ones """ # get size and write EF.HPLMNwAcT - r = self._scc.select_file(EF['HPLMNwAcT']) - size = int(r[-1][4:8], 16) + data = self._scc.read_binary(EF['HPLMNwAcT'], length=None, offset=0) + size = len(data[0])/2 hplmn = enc_plmn(mcc, mnc) content = hplmn + access_tech data, sw = self._scc.update_binary(EF['HPLMNwAcT'], content + 'ffffff0000' * (size/5-1)) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I35848059d6082c379246c8d695cb094c20780d15 Gerrit-Change-Number: 16945 Gerrit-PatchSet: 10 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:38 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:38 +0000 Subject: Change in pysim[master]: cards/sysmoUSIM-SJS1: support programming of ACC bits In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/16950 ) Change subject: cards/sysmoUSIM-SJS1: support programming of ACC bits ...................................................................... cards/sysmoUSIM-SJS1: support programming of ACC bits Change-Id: Id0ed9e5654dc0a70a4732bbe5787f1900789d580 --- M pySim/cards.py 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/cards.py b/pySim/cards.py index 1552ff1..bc1ebf7 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -617,6 +617,9 @@ content = enc_spn(p['name'], True, True) data, sw = self._scc.update_binary('6F46', rpad(content, 32)) + if p.get('acc') is not None: + self.update_acc(p['acc']) + # write EF.IMSI data, sw = self._scc.update_binary('6f07', enc_imsi(p['imsi'])) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16950 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Id0ed9e5654dc0a70a4732bbe5787f1900789d580 Gerrit-Change-Number: 16950 Gerrit-PatchSet: 8 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:38 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:38 +0000 Subject: Change in pysim[master]: cards/sysmoUSIM-SJS1: support programming of EF.HPLMNwAcT In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/16972 ) Change subject: cards/sysmoUSIM-SJS1: support programming of EF.HPLMNwAcT ...................................................................... cards/sysmoUSIM-SJS1: support programming of EF.HPLMNwAcT Change-Id: Ida93f4a00fe3b1d0f05d6eeda0e7873ce16d4c17 --- M pySim/cards.py 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/cards.py b/pySim/cards.py index bc1ebf7..802ad69 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -641,6 +641,12 @@ if sw != '9000': print("Programming OPLMNwAcT failed with code %s"%sw) + # EF.HPLMNwAcT + if p.get('mcc') and p.get('mnc'): + sw = self.update_hplmn_act(p['mcc'], p['mnc']) + if sw != '9000': + print("Programming HPLMNwAcT failed with code %s"%sw) + # EF.AD if p.get('mcc') and p.get('mnc'): sw = self.update_ad(p['mnc']) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16972 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ida93f4a00fe3b1d0f05d6eeda0e7873ce16d4c17 Gerrit-Change-Number: 16972 Gerrit-PatchSet: 8 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:38 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:38 +0000 Subject: Change in pysim[master]: Fix MCC and MCC representation in the output of pySim-read In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/16944 ) Change subject: Fix MCC and MCC representation in the output of pySim-read ...................................................................... Fix MCC and MCC representation in the output of pySim-read Change-Id: Ie699c0a38d5ae90e4d6109e4574ce860e4044096 --- M pySim/utils.py M pysim-testdata/Fairwaves-SIM.ok M pysim-testdata/Wavemobile-SIM.ok M pysim-testdata/sysmoISIM-SJA2.ok M pysim-testdata/sysmoUSIM-SJS1.ok 5 files changed, 48 insertions(+), 23 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/utils.py b/pySim/utils.py index e8dd531..af4a491 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -124,10 +124,7 @@ digit3 = ia[1] & 0x0F # 2nd byte, LSB if digit3 == 0xF and digit2 == 0xF and digit1 == 0xF: return 0xFFF # 4095 - mcc = digit1 * 100 - mcc += digit2 * 10 - mcc += digit3 - return mcc + return derive_mcc(digit1, digit2, digit3) def dec_mnc_from_plmn(plmn): ia = h2i(plmn) @@ -136,16 +133,7 @@ digit3 = (ia[1] & 0xF0) >> 4 # 2nd byte, MSB if digit3 == 0xF and digit2 == 0xF and digit1 == 0xF: return 0xFFF # 4095 - mnc = 0 - # signifies two digit MNC - if digit3 == 0xF: - mnc += digit1 * 10 - mnc += digit2 - else: - mnc += digit1 * 100 - mnc += digit2 * 10 - mnc += digit3 - return mnc + return derive_mnc(digit1, digit2, digit3) def dec_act(twohexbytes): act_list = [ @@ -182,7 +170,7 @@ if rec_info['mcc'] == 0xFFF and rec_info['mnc'] == 0xFFF: rec_str = "unused" else: - rec_str = "MCC: %3s MNC: %3s AcT: %s" % (rec_info['mcc'], rec_info['mnc'], ", ".join(rec_info['act'])) + rec_str = "MCC: %03d MNC: %03d AcT: %s" % (rec_info['mcc'], rec_info['mnc'], ", ".join(rec_info['act'])) s += "\t%s # %s\n" % (rec_data, rec_str) return s @@ -233,3 +221,40 @@ return imsi[3:5] else: return None + +def derive_mcc(digit1, digit2, digit3): + """ + Derive decimal representation of the MCC (Mobile Country Code) + from three given digits. + """ + + mcc = 0 + + if digit1 != 0x0f: + mcc += digit1 * 100 + if digit2 != 0x0f: + mcc += digit2 * 10 + if digit3 != 0x0f: + mcc += digit3 + + return mcc + +def derive_mnc(digit1, digit2, digit3=0x0f): + """ + Derive decimal representation of the MNC (Mobile Network Code) + from two or (optionally) three given digits. + """ + + mnc = 0 + + # 3-rd digit is optional for the MNC. If present + # the algorythm is the same as for the MCC. + if digit3 != 0x0f: + return derive_mcc(digit1, digit2, digit3) + + if digit1 != 0x0f: + mnc += digit1 * 10 + if digit2 != 0x0f: + mnc += digit2 + + return mnc diff --git a/pysim-testdata/Fairwaves-SIM.ok b/pysim-testdata/Fairwaves-SIM.ok index 94df376..cd6e33b 100644 --- a/pysim-testdata/Fairwaves-SIM.ok +++ b/pysim-testdata/Fairwaves-SIM.ok @@ -28,7 +28,7 @@ ffffff0000 # unused HPLMNAcT: - fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + fff11fffff # MCC: 001 MNC: 001 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT ffffff0000 # unused ffffff0000 # unused ffffff0000 # unused diff --git a/pysim-testdata/Wavemobile-SIM.ok b/pysim-testdata/Wavemobile-SIM.ok index 8b14a30..30aeed8 100644 --- a/pysim-testdata/Wavemobile-SIM.ok +++ b/pysim-testdata/Wavemobile-SIM.ok @@ -8,7 +8,7 @@ Display OPLMN: False PLMNsel: fff11fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff PLMNwAcT: - fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + fff11fffff # MCC: 001 MNC: 001 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT ffffff0000 # unused ffffff0000 # unused ffffff0000 # unused @@ -26,7 +26,7 @@ ffffff0000 # unused OPLMNwAcT: - fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + fff11fffff # MCC: 001 MNC: 001 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT ffffff0000 # unused ffffff0000 # unused ffffff0000 # unused diff --git a/pysim-testdata/sysmoISIM-SJA2.ok b/pysim-testdata/sysmoISIM-SJA2.ok index 77c4878..a64aa8b 100644 --- a/pysim-testdata/sysmoISIM-SJA2.ok +++ b/pysim-testdata/sysmoISIM-SJA2.ok @@ -8,7 +8,7 @@ Display OPLMN: False PLMNsel: fff11fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff PLMNwAcT: - fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + fff11fffff # MCC: 001 MNC: 001 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT ffffff0000 # unused ffffff0000 # unused ffffff0000 # unused @@ -22,7 +22,7 @@ ffffff0000 # unused OPLMNwAcT: - fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + fff11fffff # MCC: 001 MNC: 001 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT ffffff0000 # unused ffffff0000 # unused ffffff0000 # unused diff --git a/pysim-testdata/sysmoUSIM-SJS1.ok b/pysim-testdata/sysmoUSIM-SJS1.ok index d0523f8..8def4e3 100644 --- a/pysim-testdata/sysmoUSIM-SJS1.ok +++ b/pysim-testdata/sysmoUSIM-SJS1.ok @@ -8,7 +8,7 @@ Display OPLMN: True PLMNsel: fff11fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff PLMNwAcT: - fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + fff11fffff # MCC: 001 MNC: 001 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT ffffff0000 # unused ffffff0000 # unused ffffff0000 # unused @@ -22,7 +22,7 @@ ffffff0000 # unused OPLMNwAcT: - fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + fff11fffff # MCC: 001 MNC: 001 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT ffffff0000 # unused ffffff0000 # unused ffffff0000 # unused @@ -36,7 +36,7 @@ ffffff0000 # unused HPLMNAcT: - fff11fffff # MCC: 1651 MNC: 151 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT + fff11fffff # MCC: 001 MNC: 001 AcT: UTRAN, E-UTRAN, GSM, GSM COMPACT, cdma2000 HRPD, cdma2000 1xRTT ffffff0000 # unused ffffff0000 # unused ffffff0000 # unused -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16944 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie699c0a38d5ae90e4d6109e4574ce860e4044096 Gerrit-Change-Number: 16944 Gerrit-PatchSet: 9 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:39 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:39 +0000 Subject: Change in pysim[master]: pySim-read.py: fix reading and parsing of EF.MSISDN In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/16947 ) Change subject: pySim-read.py: fix reading and parsing of EF.MSISDN ...................................................................... pySim-read.py: fix reading and parsing of EF.MSISDN This change implements parsing of EF.MSISDN (and thus EF.ADN) as per 3GPP TS 31.102, sections 4.2.26 and 4.4.2.3. Example (commercial SIM card from 401/02): EF.MSISDN: ffffffffffffffffffffffffffff07917787028982f7ffffffffffff Decoded (NPI=1 ToN=1): +77782098287 Note that sysmoUSIM-SJS1 in the test setup has malformed EF.MSISDN, so that's why the test output is changed. Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 --- M pySim-read.py M pySim/utils.py M pysim-testdata/sysmoISIM-SJA2.ok M pysim-testdata/sysmoUSIM-SJS1.ok 4 files changed, 48 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim-read.py b/pySim-read.py index d753c8b..ce5f8a5 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -37,7 +37,7 @@ import simplejson as json from pySim.commands import SimCardCommands -from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, format_xplmn_w_act, dec_spn +from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, dec_msisdn, format_xplmn_w_act, dec_spn def parse_options(): @@ -186,8 +186,10 @@ # print(scc.record_size(['3f00', '7f10', '6f40'])) (res, sw) = scc.read_record(['3f00', '7f10', '6f40'], 1) if sw == '9000': - if res[1] != 'f': - print("MSISDN: %s" % (res,)) + res_dec = dec_msisdn(res) + if res_dec is not None: + # (npi, ton, msisdn) = res_dec + print("MSISDN (NPI=%d ToN=%d): %s" % res_dec) else: print("MSISDN: Not available") else: diff --git a/pySim/utils.py b/pySim/utils.py index af4a491..12f66b9 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -258,3 +258,44 @@ mnc += digit2 return mnc + +def dec_msisdn(ef_msisdn): + """ + Decode MSISDN from EF.MSISDN or EF.ADN (same structure). + See 3GPP TS 31.102, section 4.2.26 and 4.4.2.3. + """ + + # Convert from str to (kind of) 'bytes' + ef_msisdn = h2b(ef_msisdn) + + # Make sure mandatory fields are present + if len(ef_msisdn) < 14: + raise ValueError("EF.MSISDN is too short") + + # Skip optional Alpha Identifier + xlen = len(ef_msisdn) - 14 + msisdn_lhv = ef_msisdn[xlen:] + + # Parse the length (in bytes) of the BCD encoded number + bcd_len = ord(msisdn_lhv[0]) + # BCD length = length of dial num (max. 10 bytes) + 1 byte ToN and NPI + if bcd_len == 0xff: + return None + elif bcd_len > 11 or bcd_len < 1: + raise ValueError("Length of MSISDN (%d bytes) is out of range" % bcd_len) + + # Parse ToN / NPI + ton = (ord(msisdn_lhv[1]) >> 4) & 0x07 + npi = ord(msisdn_lhv[1]) & 0x0f + bcd_len -= 1 + + # No MSISDN? + if not bcd_len: + return (npi, ton, None) + + msisdn = swap_nibbles(b2h(msisdn_lhv[2:][:bcd_len])).rstrip('f') + # International number 10.5.118/3GPP TS 24.008 + if (ton & 0x01) == 0x01: + msisdn = '+' + msisdn + + return (npi, ton, msisdn) diff --git a/pysim-testdata/sysmoISIM-SJA2.ok b/pysim-testdata/sysmoISIM-SJA2.ok index a64aa8b..bfef882 100644 --- a/pysim-testdata/sysmoISIM-SJA2.ok +++ b/pysim-testdata/sysmoISIM-SJA2.ok @@ -50,7 +50,7 @@ ffffff0000 # unused ACC: 0001 -MSISDN: Not available +MSISDN (NPI=1 ToN=1): +1234 AD: 00000002 Done ! diff --git a/pysim-testdata/sysmoUSIM-SJS1.ok b/pysim-testdata/sysmoUSIM-SJS1.ok index 8def4e3..6d85f38 100644 --- a/pysim-testdata/sysmoUSIM-SJS1.ok +++ b/pysim-testdata/sysmoUSIM-SJS1.ok @@ -50,7 +50,7 @@ ffffff0000 # unused ACC: 0008 -MSISDN: Not available +MSISDN: Can't read file -- Length of MSISDN (136 bytes) is out of range AD: 00000002 Done ! -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie914ae83d787e3f1a90f9f305bffd45053b8c863 Gerrit-Change-Number: 16947 Gerrit-PatchSet: 19 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: herlesupreeth Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: dexter Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:40 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:40 +0000 Subject: Change in pysim[master]: pySim-prog.py: add support for MSISDN programming In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/16946 ) Change subject: pySim-prog.py: add support for MSISDN programming ...................................................................... pySim-prog.py: add support for MSISDN programming This change implements programming of EF.MSISDN as per 3GPP TS 31.102, sections 4.2.26 and 4.4.2.3, excluding the following fields: - Alpha Identifier (currently 'FF'O * 20), - Capability/Configuration1 Record Identifier ('FF'O), - Extension1 Record Identifier ('FF'O). This feature is introduced exclusively for sysmoUSIM-SJS1. Othere SIM card types need to be tested. Change-Id: Ie033a0ffc3697ae562eaa7a241a0f6af6c2b0594 --- M pySim-prog.py M pySim/cards.py M pySim/utils.py M pysim-testdata/sysmoUSIM-SJS1.data M pysim-testdata/sysmoUSIM-SJS1.ok M tests/pysim-test.sh M tests/sysmoUSIM-SJS1.data.example 7 files changed, 57 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim-prog.py b/pySim-prog.py index 09a5d70..a7081ff 100755 --- a/pySim-prog.py +++ b/pySim-prog.py @@ -119,6 +119,9 @@ parser.add_option("-i", "--imsi", dest="imsi", help="International Mobile Subscriber Identity", ) + parser.add_option("--msisdn", dest="msisdn", + help="Mobile Subscriber Integrated Services Digital Number", + ) parser.add_option("-k", "--ki", dest="ki", help="Ki (default is to randomize)", ) @@ -165,7 +168,6 @@ parser.add_option("--dry-run", dest="dry_run", help="Perform a 'dry run', don't actually program the card", default=False, action="store_true") - parser.add_option("--card_handler", dest="card_handler", metavar="FILE", help="Use automatic card handling machine") @@ -278,6 +280,17 @@ if len(opts.name) > 16: raise ValueError('Service Provider Name must max 16 characters!'); + if opts.msisdn is not None: + msisdn = opts.msisdn + if msisdn[0] == '+': + msisdn = msisdn[1:] + if not msisdn.isdigit(): + raise ValueError('MSISDN must be digits only! ' + 'Start with \'+\' for international numbers.') + if len(msisdn) > 10 * 2: + # TODO: Support MSISDN of length > 20 (10 Bytes) + raise ValueError('MSISDNs longer than 20 digits are not (yet) supported.') + # ICCID (19 digits, E.118), though some phase1 vendors use 20 :( if opts.iccid is not None: iccid = opts.iccid @@ -426,6 +439,7 @@ 'opc' : opc, 'acc' : acc, 'pin_adm' : pin_adm, + 'msisdn' : opts.msisdn, } diff --git a/pySim/cards.py b/pySim/cards.py index 802ad69..b4b5fdf 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -658,6 +658,17 @@ r = self._scc.select_file(['3f00', '7f10']) data, sw = self._scc.update_record('6f42', 1, lpad(p['smsp'], 104), force_len=True) + # EF.MSISDN + # TODO: Alpha Identifier (currently 'ff'O * 20) + # TODO: Capability/Configuration1 Record Identifier + # TODO: Extension1 Record Identifier + if p.get('msisdn') is not None: + msisdn = enc_msisdn(p['msisdn']) + data = 'ff' * 20 + msisdn + 'ff' * 2 + + r = self._scc.select_file(['3f00', '7f10']) + data, sw = self._scc.update_record('6F40', 1, data, force_len=True) + def erase(self): return diff --git a/pySim/utils.py b/pySim/utils.py index 12f66b9..8420b23 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -299,3 +299,29 @@ msisdn = '+' + msisdn return (npi, ton, msisdn) + +def enc_msisdn(msisdn, npi=0x01, ton=0x03): + """ + Encode MSISDN as LHV so it can be stored to EF.MSISDN. + See 3GPP TS 31.102, section 4.2.26 and 4.4.2.3. + + Default NPI / ToN values: + - NPI: ISDN / telephony numbering plan (E.164 / E.163), + - ToN: network specific or international number (if starts with '+'). + """ + + # Leading '+' indicates International Number + if msisdn[0] == '+': + msisdn = msisdn[1:] + ton = 0x01 + + # Append 'f' padding if number of digits is odd + if len(msisdn) % 2 > 0: + msisdn += 'f' + + # BCD length also includes NPI/ToN header + bcd_len = len(msisdn) // 2 + 1 + npi_ton = (npi & 0x0f) | ((ton & 0x07) << 4) | 0x80 + bcd = rpad(swap_nibbles(msisdn), 10 * 2) # pad to 10 octets + + return ('%02x' % bcd_len) + ('%02x' % npi_ton) + bcd diff --git a/pysim-testdata/sysmoUSIM-SJS1.data b/pysim-testdata/sysmoUSIM-SJS1.data index b7c1e81..c23f9f1 100644 --- a/pysim-testdata/sysmoUSIM-SJS1.data +++ b/pysim-testdata/sysmoUSIM-SJS1.data @@ -4,4 +4,5 @@ KI=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF OPC=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF IMSI=001010000000102 +MSISDN=+77776336143 ADM=55538407 diff --git a/pysim-testdata/sysmoUSIM-SJS1.ok b/pysim-testdata/sysmoUSIM-SJS1.ok index 6d85f38..290c470 100644 --- a/pysim-testdata/sysmoUSIM-SJS1.ok +++ b/pysim-testdata/sysmoUSIM-SJS1.ok @@ -50,7 +50,7 @@ ffffff0000 # unused ACC: 0008 -MSISDN: Can't read file -- Length of MSISDN (136 bytes) is out of range +MSISDN (NPI=1 ToN=1): +77776336143 AD: 00000002 Done ! diff --git a/tests/pysim-test.sh b/tests/pysim-test.sh index 0d469c9..a22c372 100755 --- a/tests/pysim-test.sh +++ b/tests/pysim-test.sh @@ -162,6 +162,7 @@ KI=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF OPC=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF IMSI=001010000000001 + MSISDN=6766266 ADM=00000000 ADM_HEX="" ADM_OPT="-a" @@ -171,7 +172,7 @@ ADM_OPT="-A" ADM=$ADM_HEX fi - python $PYSIM_PROG -p $I -t $CARD_NAME -o $OPC -k $KI -x $MCC -y $MNC -i $IMSI -s $ICCID $ADM_OPT $ADM + python $PYSIM_PROG -p $I -t $CARD_NAME -o $OPC -k $KI -x $MCC -y $MNC -i $IMSI -s $ICCID --msisdn $MSISDN $ADM_OPT $ADM check_card $I $CARD_NAME echo "" done diff --git a/tests/sysmoUSIM-SJS1.data.example b/tests/sysmoUSIM-SJS1.data.example index d711dcb..19efd15 100644 --- a/tests/sysmoUSIM-SJS1.data.example +++ b/tests/sysmoUSIM-SJS1.data.example @@ -4,4 +4,5 @@ KI=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF OPC=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF IMSI=001010000000102 +MSISDN=+77776336143 ADM=12345678 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ie033a0ffc3697ae562eaa7a241a0f6af6c2b0594 Gerrit-Change-Number: 16946 Gerrit-PatchSet: 11 Gerrit-Owner: herlesupreeth Gerrit-Assignee: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-CC: dexter Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:46 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:46 +0000 Subject: Change in pysim[master]: Py2 -> Py3: use the floor division operator // where possible In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/17152 ) Change subject: Py2 -> Py3: use the floor division operator // where possible ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5565eb64a1ddea7075cbb142eaacaa5d494c87bb Gerrit-Change-Number: 17152 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:11:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:50 +0000 Subject: Change in pysim[master]: pySim-read.py: do not import json, it is not needed In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/17151 ) Change subject: pySim-read.py: do not import json, it is not needed ...................................................................... pySim-read.py: do not import json, it is not needed Change-Id: I4ae1d71c5695c9cd8ddebea514847b0be6a24c6c --- M pySim-read.py 1 file changed, 0 insertions(+), 6 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim-read.py b/pySim-read.py index ce5f8a5..8c137e7 100755 --- a/pySim-read.py +++ b/pySim-read.py @@ -30,12 +30,6 @@ import sys from pySim.ts_51_011 import EF, DF -try: - import json -except ImportError: - # Python < 2.5 - import simplejson as json - from pySim.commands import SimCardCommands from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, dec_msisdn, format_xplmn_w_act, dec_spn -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4ae1d71c5695c9cd8ddebea514847b0be6a24c6c Gerrit-Change-Number: 17151 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:11:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:11:50 +0000 Subject: Change in pysim[master]: Py2 -> Py3: use the floor division operator // where possible In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/17152 ) Change subject: Py2 -> Py3: use the floor division operator // where possible ...................................................................... Py2 -> Py3: use the floor division operator // where possible In Python 3, traditional division operator returns a float, while we need a floor integer in the most cases. Change-Id: I5565eb64a1ddea7075cbb142eaacaa5d494c87bb --- M pySim/cards.py M pySim/commands.py M pySim/transport/serial.py 3 files changed, 12 insertions(+), 12 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/pySim/cards.py b/pySim/cards.py index b4b5fdf..053ea98 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -89,7 +89,7 @@ """ # get size and write EF.OPLMNwAcT data = self._scc.read_binary(EF['OPLMNwAcT'], length=None, offset=0) - size = len(data[0])/2 + size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) content = hplmn + access_tech data, sw = self._scc.update_binary(EF['OPLMNwAcT'], content + 'ffffff0000' * (size/5-1)) @@ -101,7 +101,7 @@ """ # get size and write EF.PLMNwAcT data = self._scc.read_binary(EF['PLMNwAcT'], length=None, offset=0) - size = len(data[0])/2 + size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) content = hplmn + access_tech data, sw = self._scc.update_binary(EF['PLMNwAcT'], content + 'ffffff0000' * (size/5-1)) @@ -109,7 +109,7 @@ def update_plmnsel(self, mcc, mnc): data = self._scc.read_binary(EF['PLMNsel'], length=None, offset=0) - size = len(data[0])/2 + size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) data, sw = self._scc.update_binary(EF['PLMNsel'], hplmn + 'ff' * (size-3)) return sw @@ -127,7 +127,7 @@ raise RuntimeError('unable to calculate proper mnclen') data = self._scc.read_binary(EF['AD'], length=None, offset=0) - size = len(data[0])/2 + size = len(data[0]) // 2 content = data[0][0:6] + "%02X" % mnclen data, sw = self._scc.update_binary(EF['AD'], content) return sw diff --git a/pySim/commands.py b/pySim/commands.py index 385cacf..ff64ed2 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -49,11 +49,11 @@ # what we get in the length field. # See also ETSI TS 102 221, chapter 11.1.1.3.0 Base coding. exp_tlv_len = int(fcp[2:4], 16) - if len(fcp[4:])/2 == exp_tlv_len: + if len(fcp[4:]) // 2 == exp_tlv_len: skip = 4 else: exp_tlv_len = int(fcp[2:6], 16) - if len(fcp[4:])/2 == exp_tlv_len: + if len(fcp[4:]) // 2 == exp_tlv_len: skip = 6 # Skip FCP tag and length @@ -108,7 +108,7 @@ return rv def select_adf(self, aid): - aidlen = ("0" + format(len(aid)/2, 'x'))[-2:] + aidlen = ("0" + format(len(aid) // 2, 'x'))[-2:] return self._tp.send_apdu_checksw(self.cla_byte + "a4" + "0404" + aidlen + aid) def read_binary(self, ef, length=None, offset=0): @@ -126,7 +126,7 @@ if not hasattr(type(ef), '__iter__'): ef = [ef] self.select_file(ef) - pdu = self.cla_byte + 'd6%04x%02x' % (offset, len(data)/2) + data + pdu = self.cla_byte + 'd6%04x%02x' % (offset, len(data) // 2) + data return self._tp.send_apdu_checksw(pdu) def read_record(self, ef, rec_no): @@ -143,10 +143,10 @@ r = self.select_file(ef) if not force_len: rec_length = self.__record_len(r) - if (len(data)/2 != rec_length): - raise ValueError('Invalid data length (expected %d, got %d)' % (rec_length, len(data)/2)) + if (len(data) // 2 != rec_length): + raise ValueError('Invalid data length (expected %d, got %d)' % (rec_length, len(data) // 2)) else: - rec_length = len(data)/2 + rec_length = len(data) // 2 pdu = (self.cla_byte + 'dc%02x04%02x' % (rec_no, rec_length)) + data return self._tp.send_apdu_checksw(pdu) diff --git a/pySim/transport/serial.py b/pySim/transport/serial.py index f672be2..11fcd6a 100644 --- a/pySim/transport/serial.py +++ b/pySim/transport/serial.py @@ -213,7 +213,7 @@ self._tx_string(pdu[5:]) # Receive data (including SW !) - # length = [P3 - tx_data (=len(pdu)-len(hdr)) + 2 (SW1/2) ] + # length = [P3 - tx_data (=len(pdu)-len(hdr)) + 2 (SW1//2) ] to_recv = data_len - len(pdu) + 5 + 2 data = '' -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17152 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5565eb64a1ddea7075cbb142eaacaa5d494c87bb Gerrit-Change-Number: 17152 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:12:33 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:12:33 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Introduce 'struct client_config' In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16621 ) Change subject: remsim-client: Introduce 'struct client_config' ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16621 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I59980a78f0344602f9fa5b2277c99dfbf0b7815c Gerrit-Change-Number: 16621 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:12:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:12:43 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:12:43 +0000 Subject: Change in osmo-remsim[master]: remsim_client: Move body of main() loop to separate function In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16622 ) Change subject: remsim_client: Move body of main() loop to separate function ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16622 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I85c166e8aa95bb3f2e5d60d14f60caa94f3116fb Gerrit-Change-Number: 16622 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:12:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:12:52 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:12:52 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Fix the -k/ --keep-running option In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16623 ) Change subject: remsim-client: Fix the -k/ --keep-running option ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16623 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I67a3a5941434f09f7099c2cdb19c126cea305a73 Gerrit-Change-Number: 16623 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:12:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:13:45 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:13:45 +0000 Subject: Change in osmo-remsim[master]: client: Enable talloc NULL context tracking In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16592 ) Change subject: client: Enable talloc NULL context tracking ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16592 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I41ac5437e9262cf9e5a6e92db9b733902c91755b Gerrit-Change-Number: 16592 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:13:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:13:49 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:13:49 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Introduce 'struct client_config' In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16621 ) Change subject: remsim-client: Introduce 'struct client_config' ...................................................................... remsim-client: Introduce 'struct client_config' Introduce a dedicated structure for the parsed command line options converted into the configuration for the client. This reduces the amount of spaghetti code and paves the way for a later VTY / config file. Change-Id: I59980a78f0344602f9fa5b2277c99dfbf0b7815c --- M src/simtrace2-remsim_client.c 1 file changed, 142 insertions(+), 79 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/simtrace2-remsim_client.c b/src/simtrace2-remsim_client.c index 1798df9..79eb32b 100644 --- a/src/simtrace2-remsim_client.c +++ b/src/simtrace2-remsim_client.c @@ -840,44 +840,83 @@ ); } -static const struct option opts[] = { - { "server-host", 1, 0, 's' }, - { "server-port", 1, 0, 'p' }, - { "client-id", 1, 0, 'c' }, - { "client-slot", 1, 0, 'n' }, - { "help", 0, 0, 'h' }, - { "version", 0, 0, 'v' }, - { "gsmtap-ip", 1, 0, 'i' }, - { "keep-running", 0, 0, 'k' }, - { "usb-vendor", 1, 0, 'V' }, - { "usb-product", 1, 0, 'P' }, - { "usb-config", 1, 0, 'C' }, - { "usb-interface", 1, 0, 'I' }, - { "usb-altsetting", 1, 0, 'S' }, - { "usb-address", 1, 0, 'A' }, - { "usb-path", 1, 0, 'H' }, - { "atr", 1, 0, 'a' }, - { NULL, 0, 0, 0 } +#define ATR_SIZE_MAX 55 +struct client_config { + char *server_host; + int server_port; + + int client_id; + int client_slot; + + char *gsmtap_host; + bool keep_running; + + struct { + uint8_t data[ATR_SIZE_MAX]; + uint8_t len; + } atr; + + struct { + int vendor_id; + int product_id; + int config_id; + int if_num; + int altsetting; + int addr; + char *path; + } usb; }; -int main(int argc, char **argv) +static struct client_config *client_config_init(void *ctx) { - struct rspro_server_conn *srvc, *bankdc; - struct st_transport *transp = ci->slot->transp; - char *gsmtap_host = "127.0.0.1"; - int rc; - int c, ret = 1; - int keep_running = 0; - int server_port = 9998; - int if_num = 0, vendor_id = -1, product_id = -1; - int config_id = -1, altsetting = 0, addr = -1; - int client_id = -1, client_slot = -1; - char *server_host = "127.0.0.1"; - char *path = NULL; - uint8_t atr_data[33] = { 0x3B, 0x00 }; // the shortest simplest ATR possible - uint8_t atr_len = 2; + struct client_config *cfg = talloc_zero(ctx, struct client_config); + if (!cfg) + return NULL; - print_welcome(); + cfg->server_host = talloc_strdup(cfg, "127.0.0.1"); + cfg->server_port = 9998; + cfg->client_id = -1; + cfg->client_slot = -1; + cfg->gsmtap_host = talloc_strdup(cfg, "127.0.0.1"); + cfg->keep_running = false; + + cfg->usb.vendor_id = -1; + cfg->usb.product_id = -1; + cfg->usb.config_id = -1; + cfg->usb.if_num = -1; + cfg->usb.altsetting = 0; + cfg->usb.addr = -1; + cfg->usb.path = NULL; + + cfg->atr.data[0] = 0x3B; + cfg->atr.data[1] = 0x00; // the shortest simplest ATR possible + cfg->atr.len = 2; + + return cfg; +}; + +static void handle_options(struct client_config *cfg, int argc, char **argv) +{ + const struct option opts[] = { + { "server-host", 1, 0, 's' }, + { "server-port", 1, 0, 'p' }, + { "client-id", 1, 0, 'c' }, + { "client-slot", 1, 0, 'n' }, + { "help", 0, 0, 'h' }, + { "version", 0, 0, 'v' }, + { "gsmtap-ip", 1, 0, 'i' }, + { "keep-running", 0, 0, 'k' }, + { "usb-vendor", 1, 0, 'V' }, + { "usb-product", 1, 0, 'P' }, + { "usb-config", 1, 0, 'C' }, + { "usb-interface", 1, 0, 'I' }, + { "usb-altsetting", 1, 0, 'S' }, + { "usb-address", 1, 0, 'A' }, + { "usb-path", 1, 0, 'H' }, + { "atr", 1, 0, 'a' }, + { NULL, 0, 0, 0 } + }; + int c, rc; while (1) { int option_index = 0; @@ -887,16 +926,16 @@ break; switch (c) { case 's': - server_host = optarg; + osmo_talloc_replace_string(cfg, &cfg->server_host, optarg); break; case 'p': - server_port = atoi(optarg); + cfg->server_port = atoi(optarg); break; case 'c': - client_id = atoi(optarg); + cfg->client_id = atoi(optarg); break; case 'n': - client_slot = atoi(optarg); + cfg->client_slot = atoi(optarg); break; case 'h': print_help(); @@ -907,62 +946,82 @@ exit(0); break; case 'i': - gsmtap_host = optarg; + osmo_talloc_replace_string(cfg, &cfg->gsmtap_host, optarg); break; case 'k': - keep_running = 1; + cfg->keep_running = 1; break; case 'V': - vendor_id = strtol(optarg, NULL, 16); + cfg->usb.vendor_id = strtol(optarg, NULL, 16); break; case 'P': - product_id = strtol(optarg, NULL, 16); + cfg->usb.product_id = strtol(optarg, NULL, 16); break; case 'C': - config_id = atoi(optarg); + cfg->usb.config_id = atoi(optarg); break; case 'I': - if_num = atoi(optarg); + cfg->usb.if_num = atoi(optarg); break; case 'S': - altsetting = atoi(optarg); + cfg->usb.altsetting = atoi(optarg); break; case 'A': - addr = atoi(optarg); + cfg->usb.addr = atoi(optarg); break; case 'H': - path = optarg; + cfg->usb.path = optarg; break; case 'a': - rc = osmo_hexparse(optarg, atr_data, ARRAY_SIZE(atr_data)); - if (rc < 2 || rc > ARRAY_SIZE(atr_data)) { - fprintf(stderr, "ATR matlformed\n"); - goto do_exit; + rc = osmo_hexparse(optarg, cfg->atr.data, ARRAY_SIZE(cfg->atr.data)); + if (rc < 2 || rc > ARRAY_SIZE(cfg->atr.data)) { + fprintf(stderr, "ATR malformed\n"); + exit(2); } - atr_len = rc; + cfg->atr.len = rc; break; } } - if (vendor_id < 0 || product_id < 0) { - fprintf(stderr, "You have to specify the vendor and product ID\n"); - goto do_exit; + if (argc > optind) { + fprintf(stderr, "Unsupported positional arguments on command line\n"); + exit(2); } +} - signal(SIGUSR1, handle_sig_usr1); + +int main(int argc, char **argv) +{ + struct rspro_server_conn *srvc, *bankdc; + struct st_transport *transp = ci->slot->transp; + struct client_config *cfg; + int rc; + int ret = 1; + + print_welcome(); g_tall_ctx = talloc_named_const(NULL, 0, "global"); talloc_asn1_ctx = talloc_named_const(g_tall_ctx, 0, "asn1"); msgb_talloc_ctx_init(g_tall_ctx, 0); osmo_init_logging2(g_tall_ctx, &log_info); + cfg = client_config_init(g_tall_ctx); + handle_options(cfg, argc, argv); + + if (cfg->usb.vendor_id < 0 || cfg->usb.product_id < 0) { + fprintf(stderr, "You have to specify the vendor and product ID\n"); + goto do_exit; + } + + signal(SIGUSR1, handle_sig_usr1); + rc = osmo_libusb_init(NULL); if (rc < 0) { fprintf(stderr, "libusb initialization failed\n"); goto do_exit; } - g_gti = gsmtap_source_init(gsmtap_host, GSMTAP_UDP_PORT, 0); + g_gti = gsmtap_source_init(cfg->gsmtap_host, GSMTAP_UDP_PORT, 0); if (!g_gti) { perror("unable to open GSMTAP"); goto close_exit; @@ -975,20 +1034,22 @@ g_client = talloc_zero(g_tall_ctx, struct bankd_client); - if (client_id != -1) { - /* default to client slot 0 */ - if (client_slot == -1) - client_slot = 0; + if (cfg->client_id != -1) { g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); - g_client->srv_conn.clslot->clientId = client_id; - g_client->srv_conn.clslot->slotNr = client_slot; + g_client->srv_conn.clslot->clientId = cfg->client_id; + /* default to client slot 0 */ + if (cfg->client_slot == -1) + g_client->srv_conn.clslot->slotNr = 0; + else + g_client->srv_conn.clslot->slotNr = cfg->client_slot; g_client->bankd_conn.clslot = talloc_zero(g_client, ClientSlot_t); *g_client->bankd_conn.clslot = *g_client->srv_conn.clslot; } + /* create and [attempt to] establish connection to remsim-server */ srvc = &g_client->srv_conn; - srvc->server_host = server_host; - srvc->server_port = server_port; + srvc->server_host = cfg->server_host; + srvc->server_port = cfg->server_port; srvc->handle_rx = srvc_handle_rx; srvc->own_comp_id.type = ComponentType_remsimClient; OSMO_STRLCPY_ARRAY(srvc->own_comp_id.name, "simtrace2-remsim-client"); @@ -1001,6 +1062,8 @@ } osmo_fsm_inst_dispatch(srvc->fi, SRVC_E_ESTABLISH, NULL); + /* create and not yet establish connection to remsim-bankd */ + srvc = &g_client->srv_conn; bankdc = &g_client->bankd_conn; /* server_host / server_port are configured from remsim-server */ bankdc->handle_rx = bankd_handle_rx; @@ -1017,27 +1080,27 @@ // connect to SIMtrace2 cardem do { struct usb_interface_match _ifm, *ifm = &_ifm; - ifm->vendor = vendor_id; - ifm->product = product_id; - ifm->configuration = config_id; - ifm->interface = if_num; - ifm->altsetting = altsetting; - ifm->addr = addr; - if (path) - osmo_strlcpy(ifm->path, path, sizeof(ifm->path)); + ifm->vendor = cfg->usb.vendor_id; + ifm->product = cfg->usb.product_id; + ifm->configuration = cfg->usb.config_id; + ifm->interface = cfg->usb.if_num; + ifm->altsetting = cfg->usb.altsetting; + ifm->addr = cfg->usb.addr; + if (cfg->usb.path) + osmo_strlcpy(ifm->path, cfg->usb.path, sizeof(ifm->path)); transp->usb_devh = osmo_libusb_open_claim_interface(NULL, NULL, ifm); if (!transp->usb_devh) { fprintf(stderr, "can't open USB device\n"); goto close_exit; } - rc = libusb_claim_interface(transp->usb_devh, if_num); + rc = libusb_claim_interface(transp->usb_devh, cfg->usb.if_num); if (rc < 0) { - fprintf(stderr, "can't claim interface %d; rc=%d\n", if_num, rc); + fprintf(stderr, "can't claim interface %d; rc=%d\n", cfg->usb.if_num, rc); goto close_exit; } - rc = osmo_libusb_get_ep_addrs(transp->usb_devh, if_num, &transp->usb_ep.out, + rc = osmo_libusb_get_ep_addrs(transp->usb_devh, cfg->usb.if_num, &transp->usb_ep.out, &transp->usb_ep.in, &transp->usb_ep.irq_in); if (rc < 0) { fprintf(stderr, "can't obtain EP addrs; rc=%d\n", rc); @@ -1101,7 +1164,7 @@ /* set the ATR */ //atr_update_csum(real_atr, sizeof(real_atr)); - cardem_request_set_atr(ci, atr_data, atr_len); + cardem_request_set_atr(ci, cfg->atr.data, cfg->atr.len); /* select remote (forwarded) SIM */ st_modem_reset_pulse(ci->slot, 300); @@ -1121,9 +1184,9 @@ close_exit: if (transp->usb_devh) libusb_close(transp->usb_devh); - if (keep_running) + if (cfg->keep_running) sleep(1); - } while (keep_running); + } while (cfg->keep_running); libusb_exit(NULL); do_exit: -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16621 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I59980a78f0344602f9fa5b2277c99dfbf0b7815c Gerrit-Change-Number: 16621 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:13:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:13:50 +0000 Subject: Change in osmo-remsim[master]: client: Enable talloc NULL context tracking In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16592 ) Change subject: client: Enable talloc NULL context tracking ...................................................................... client: Enable talloc NULL context tracking Change-Id: I41ac5437e9262cf9e5a6e92db9b733902c91755b --- M src/simtrace2-remsim_client.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/simtrace2-remsim_client.c b/src/simtrace2-remsim_client.c index 79eb32b..077275a 100644 --- a/src/simtrace2-remsim_client.c +++ b/src/simtrace2-remsim_client.c @@ -809,6 +809,8 @@ { OSMO_ASSERT(signal == SIGUSR1); talloc_report_full(g_tall_ctx, stderr); + printf("===== NULL\n"); + talloc_report_full(NULL, stderr); } static void print_welcome(void) @@ -1000,6 +1002,7 @@ print_welcome(); + talloc_enable_null_tracking(); g_tall_ctx = talloc_named_const(NULL, 0, "global"); talloc_asn1_ctx = talloc_named_const(g_tall_ctx, 0, "asn1"); msgb_talloc_ctx_init(g_tall_ctx, 0); -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16592 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I41ac5437e9262cf9e5a6e92db9b733902c91755b Gerrit-Change-Number: 16592 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:13:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:13:50 +0000 Subject: Change in osmo-remsim[master]: remsim_client: Move body of main() loop to separate function In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16622 ) Change subject: remsim_client: Move body of main() loop to separate function ...................................................................... remsim_client: Move body of main() loop to separate function I rally don't like the existing spaghetti-style code. Change-Id: I85c166e8aa95bb3f2e5d60d14f60caa94f3116fb --- M src/simtrace2-remsim_client.c 1 file changed, 115 insertions(+), 109 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/simtrace2-remsim_client.c b/src/simtrace2-remsim_client.c index 077275a..ac78dd4 100644 --- a/src/simtrace2-remsim_client.c +++ b/src/simtrace2-remsim_client.c @@ -992,10 +992,120 @@ } +static void main_body(struct client_config *cfg) +{ + struct st_transport *transp = ci->slot->transp; + struct usb_interface_match _ifm, *ifm = &_ifm; + int rc; + + ifm->vendor = cfg->usb.vendor_id; + ifm->product = cfg->usb.product_id; + ifm->configuration = cfg->usb.config_id; + ifm->interface = cfg->usb.if_num; + ifm->altsetting = cfg->usb.altsetting; + ifm->addr = cfg->usb.addr; + if (cfg->usb.path) + osmo_strlcpy(ifm->path, cfg->usb.path, sizeof(ifm->path)); + transp->usb_devh = osmo_libusb_open_claim_interface(NULL, NULL, ifm); + if (!transp->usb_devh) { + fprintf(stderr, "can't open USB device\n"); + return; + } + + rc = libusb_claim_interface(transp->usb_devh, cfg->usb.if_num); + if (rc < 0) { + fprintf(stderr, "can't claim interface %d; rc=%d\n", cfg->usb.if_num, rc); + goto close_exit; + } + + rc = osmo_libusb_get_ep_addrs(transp->usb_devh, cfg->usb.if_num, &transp->usb_ep.out, + &transp->usb_ep.in, &transp->usb_ep.irq_in); + if (rc < 0) { + fprintf(stderr, "can't obtain EP addrs; rc=%d\n", rc); + goto close_exit; + } + + // switch modem SIM port to emulated SIM on OWHW + if (USB_VENDOR_OPENMOKO == ifm->vendor && USB_PRODUCT_OWHW_SAM3 == ifm->product) { // we are on the OWHW + int modem = -1; + switch (ifm->interface) { // the USB interface indicates for which modem we want to emulate the SIM + case 0: + modem = 1; + break; + case 1: + modem = 2; + break; + default: + fprintf(stderr, "unknown GPIO for SIMtrace interface %d\n", ifm->interface); + goto close_exit; + } + // + char gpio_path[PATH_MAX]; + snprintf(gpio_path, sizeof(gpio_path), "/dev/gpio/connect_st_usim%d/value", modem); + int connec_st_usim = open(gpio_path, O_WRONLY); + if (-1 == connec_st_usim) { + fprintf(stderr, "can't open GPIO %s to switch modem %d to emulated USIM\n", gpio_path, modem); + goto close_exit; + } + if (1 != write(connec_st_usim, "1", 1)) { + fprintf(stderr, "can't write GPIO %s to switch modem %d to emulated USIM\n", gpio_path, modem); + goto close_exit; + } + printf("switched modem %d to emulated USIM\n", modem); + + snprintf(gpio_path, sizeof(gpio_path), "/dev/gpio/mdm%d_rst/value", modem); + int mdm_rst = open(gpio_path, O_WRONLY); + if (-1 == mdm_rst) { + fprintf(stderr, "can't open GPIO %s to reset modem %d\n", gpio_path, modem); + goto close_exit; + } + if (1 != write(mdm_rst, "1", 1)) { + fprintf(stderr, "can't write GPIO %s to reset modem %d\n", gpio_path, modem); + goto close_exit; + } + sleep(1); // wait a bit to ensure reset is effective + if (1 != write(mdm_rst, "0", 1)) { + fprintf(stderr, "can't write GPIO %s to reset modem %d\n", gpio_path, modem); + goto close_exit; + } + printf("modem %d reset\n", modem); + } + + /* request firmware to generate STATUS on IRQ endpoint */ + cardem_request_config(ci, CEMU_FEAT_F_STATUS_IRQ); + + /* simulate card-insert to modem (owhw, not qmod) */ + cardem_request_card_insert(ci, true); + + /* select remote (forwarded) SIM */ + st_modem_sim_select_remote(ci->slot); + + /* set the ATR */ + //atr_update_csum(real_atr, sizeof(real_atr)); + cardem_request_set_atr(ci, cfg->atr.data, cfg->atr.len); + + /* select remote (forwarded) SIM */ + st_modem_reset_pulse(ci->slot, 300); + + printf("Entering main loop\n"); + + allocate_and_submit_irq(ci); + allocate_and_submit_in(ci); + + while (1) { + osmo_select_main(false); + } + + libusb_release_interface(transp->usb_devh, 0); + +close_exit: + if (transp->usb_devh) + libusb_close(transp-> usb_devh); +} + int main(int argc, char **argv) { struct rspro_server_conn *srvc, *bankdc; - struct st_transport *transp = ci->slot->transp; struct client_config *cfg; int rc; int ret = 1; @@ -1082,116 +1192,12 @@ // connect to SIMtrace2 cardem do { - struct usb_interface_match _ifm, *ifm = &_ifm; - ifm->vendor = cfg->usb.vendor_id; - ifm->product = cfg->usb.product_id; - ifm->configuration = cfg->usb.config_id; - ifm->interface = cfg->usb.if_num; - ifm->altsetting = cfg->usb.altsetting; - ifm->addr = cfg->usb.addr; - if (cfg->usb.path) - osmo_strlcpy(ifm->path, cfg->usb.path, sizeof(ifm->path)); - transp->usb_devh = osmo_libusb_open_claim_interface(NULL, NULL, ifm); - if (!transp->usb_devh) { - fprintf(stderr, "can't open USB device\n"); - goto close_exit; - } - - rc = libusb_claim_interface(transp->usb_devh, cfg->usb.if_num); - if (rc < 0) { - fprintf(stderr, "can't claim interface %d; rc=%d\n", cfg->usb.if_num, rc); - goto close_exit; - } - - rc = osmo_libusb_get_ep_addrs(transp->usb_devh, cfg->usb.if_num, &transp->usb_ep.out, - &transp->usb_ep.in, &transp->usb_ep.irq_in); - if (rc < 0) { - fprintf(stderr, "can't obtain EP addrs; rc=%d\n", rc); - goto close_exit; - } - - // switch modem SIM port to emulated SIM on OWHW - if (USB_VENDOR_OPENMOKO == ifm->vendor && USB_PRODUCT_OWHW_SAM3 == ifm->product) { // we are on the OWHW - int modem = -1; - switch (ifm->interface) { // the USB interface indicates for which modem we want to emulate the SIM - case 0: - modem = 1; - break; - case 1: - modem = 2; - break; - default: - fprintf(stderr, "unknown GPIO for SIMtrace interface %d\n", ifm->interface); - goto close_exit; - } - // - char gpio_path[PATH_MAX]; - snprintf(gpio_path, sizeof(gpio_path), "/dev/gpio/connect_st_usim%d/value", modem); - int connec_st_usim = open(gpio_path, O_WRONLY); - if (-1 == connec_st_usim) { - fprintf(stderr, "can't open GPIO %s to switch modem %d to emulated USIM\n", gpio_path, modem); - goto close_exit; - } - if (1 != write(connec_st_usim, "1", 1)) { - fprintf(stderr, "can't write GPIO %s to switch modem %d to emulated USIM\n", gpio_path, modem); - goto close_exit; - } - printf("switched modem %d to emulated USIM\n", modem); - - snprintf(gpio_path, sizeof(gpio_path), "/dev/gpio/mdm%d_rst/value", modem); - int mdm_rst = open(gpio_path, O_WRONLY); - if (-1 == mdm_rst) { - fprintf(stderr, "can't open GPIO %s to reset modem %d\n", gpio_path, modem); - goto close_exit; - } - if (1 != write(mdm_rst, "1", 1)) { - fprintf(stderr, "can't write GPIO %s to reset modem %d\n", gpio_path, modem); - goto close_exit; - } - sleep(1); // wait a bit to ensure reset is effective - if (1 != write(mdm_rst, "0", 1)) { - fprintf(stderr, "can't write GPIO %s to reset modem %d\n", gpio_path, modem); - goto close_exit; - } - printf("modem %d reset\n", modem); - } - - /* request firmware to generate STATUS on IRQ endpoint */ - cardem_request_config(ci, CEMU_FEAT_F_STATUS_IRQ); - - /* simulate card-insert to modem (owhw, not qmod) */ - cardem_request_card_insert(ci, true); - - /* select remote (forwarded) SIM */ - st_modem_sim_select_remote(ci->slot); - - /* set the ATR */ - //atr_update_csum(real_atr, sizeof(real_atr)); - cardem_request_set_atr(ci, cfg->atr.data, cfg->atr.len); - - /* select remote (forwarded) SIM */ - st_modem_reset_pulse(ci->slot, 300); - - printf("Entering main loop\n"); - - allocate_and_submit_irq(ci); - allocate_and_submit_in(ci); - - while (1) { - osmo_select_main(false); - } - - ret = 0; - - libusb_release_interface(transp->usb_devh, 0); -close_exit: - if (transp->usb_devh) - libusb_close(transp->usb_devh); - if (cfg->keep_running) - sleep(1); + main_body(cfg); + sleep(1); } while (cfg->keep_running); - libusb_exit(NULL); +close_exit: + osmo_libusb_exit(NULL); do_exit: return ret; } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16622 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I85c166e8aa95bb3f2e5d60d14f60caa94f3116fb Gerrit-Change-Number: 16622 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:13:55 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:13:55 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Fix the -k/ --keep-running option In-Reply-To: References: Message-ID: laforge has removed a vote from this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16623 ) Change subject: remsim-client: Fix the -k/ --keep-running option ...................................................................... Removed Code-Review+2 by laforge -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16623 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I67a3a5941434f09f7099c2cdb19c126cea305a73 Gerrit-Change-Number: 16623 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: deleteVote -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:14:26 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:14:26 +0000 Subject: Change in osmo-remsim[master]: client: Adjust to API changes; enable build of remsim-client again In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17155 ) Change subject: client: Adjust to API changes; enable build of remsim-client again ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I0b3733f6851a951ee24ae87aa5db0ee8daa7a841 Gerrit-Change-Number: 17155 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:14:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:14:30 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:14:30 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Query + Store the USB device path In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16628 ) Change subject: remsim-client: Query + Store the USB device path ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16628 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I7e707c74647f4c5db06d495d369b2e69e2fc7c97 Gerrit-Change-Number: 16628 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:14:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:14:34 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:14:34 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Call an external script in specific situations In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16629 ) Change subject: remsim-client: Call an external script in specific situations ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16629 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I61cf4d93c669db137de801f8b147dcffaa6f3abd Gerrit-Change-Number: 16629 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:14:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:15:11 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:15:11 +0000 Subject: Change in osmo-remsim[master]: client: Add new osmo-remsim-client-shell binary In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17156 ) Change subject: client: Add new osmo-remsim-client-shell binary ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I636505fd9741833ccf5cbd1bcac30f7b9aa94425 Gerrit-Change-Number: 17156 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:15:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:15:25 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:15:25 +0000 Subject: Change in osmo-remsim[master]: client: Work without global g_client variable In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17157 ) Change subject: client: Work without global g_client variable ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I456fb633561b88912be2f78c3e0264794d921255 Gerrit-Change-Number: 17157 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:15:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:15:42 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:15:42 +0000 Subject: Change in osmo-remsim[master]: client: Remove g_client completely; separate 'main' code In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17158 to look at the new patch set (#2). Change subject: client: Remove g_client completely; separate 'main' code ...................................................................... client: Remove g_client completely; separate 'main' code We may want to use the entire client code independent of the current 'main' portion, so let's introduce separation via API. Change-Id: I6456317c3968551cd69ba379c746e4dd9690d02d --- M src/client/client.h M src/client/remsim_client.c 2 files changed, 92 insertions(+), 60 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/58/17158/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I6456317c3968551cd69ba379c746e4dd9690d02d Gerrit-Change-Number: 17158 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:15:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:15:59 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Move client_config from .c to .h file In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/16626 to look at the new patch set (#7). Change subject: remsim-client: Move client_config from .c to .h file ...................................................................... remsim-client: Move client_config from .c to .h file Change-Id: I158fe0f2791c164adc74cf851d5a139990bce852 --- M src/client/client.h M src/client/simtrace2-remsim_client.c 2 files changed, 31 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/26/16626/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16626 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I158fe0f2791c164adc74cf851d5a139990bce852 Gerrit-Change-Number: 16626 Gerrit-PatchSet: 7 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:16:15 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:16:15 +0000 Subject: Change in osmo-remsim[master]: client: Remove g_client completely; separate 'main' code In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17158 ) Change subject: client: Remove g_client completely; separate 'main' code ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I6456317c3968551cd69ba379c746e4dd9690d02d Gerrit-Change-Number: 17158 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:16:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 19:16:26 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 15 Feb 2020 19:16:26 +0000 Subject: Change in osmo-remsim[master]: client: Split into remsim_client.c and remsim_client_main.c In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17159 ) Change subject: client: Split into remsim_client.c and remsim_client_main.c ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ie1d21c2cd84756d5c8aa2c41bcc37f5951a3a285 Gerrit-Change-Number: 17159 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 15 Feb 2020 19:16:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 22:12:05 2020 From: gerrit-no-reply at lists.osmocom.org (roox) Date: Sat, 15 Feb 2020 22:12:05 +0000 Subject: Change in osmo-iuh[master]: tests: Missing return statement References: Message-ID: roox has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/17161 ) Change subject: tests: Missing return statement ...................................................................... tests: Missing return statement Change-Id: I4fae9f84a83af280846b07eaa139ff4a05784a2e --- M src/tests/hnb-test.c M src/tests/test_common.c 2 files changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/61/17161/1 diff --git a/src/tests/hnb-test.c b/src/tests/hnb-test.c index 446a14a..27959ec 100644 --- a/src/tests/hnb-test.c +++ b/src/tests/hnb-test.c @@ -326,7 +326,7 @@ if (len < sizeof(*ar)) { printf("GSM48 Auth Req does not fit.\n"); - return; + return -1; } printf(" :) Authentication Request :)\n"); diff --git a/src/tests/test_common.c b/src/tests/test_common.c index eeb0bec..701d581 100644 --- a/src/tests/test_common.c +++ b/src/tests/test_common.c @@ -88,6 +88,7 @@ log_set_print_filename(osmo_stderr_target, 0); log_set_use_color(osmo_stderr_target, 0); + return rc; } void test_common_cleanup(void) -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/17161 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I4fae9f84a83af280846b07eaa139ff4a05784a2e Gerrit-Change-Number: 17161 Gerrit-PatchSet: 1 Gerrit-Owner: roox Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 15 22:14:09 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sat, 15 Feb 2020 22:14:09 +0000 Subject: Change in osmo-iuh[master]: tests: Missing return statement In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/17161 ) Change subject: tests: Missing return statement ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/17161 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I4fae9f84a83af280846b07eaa139ff4a05784a2e Gerrit-Change-Number: 17161 Gerrit-PatchSet: 1 Gerrit-Owner: roox Gerrit-Reviewer: fixeria Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Sat, 15 Feb 2020 22:14:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 09:24:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 09:24:59 +0000 Subject: Change in osmo-iuh[master]: tests: Missing return statement In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/17161 ) Change subject: tests: Missing return statement ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/17161 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I4fae9f84a83af280846b07eaa139ff4a05784a2e Gerrit-Change-Number: 17161 Gerrit-PatchSet: 1 Gerrit-Owner: roox Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 16 Feb 2020 09:24:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 09:25:01 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 09:25:01 +0000 Subject: Change in osmo-iuh[master]: tests: Missing return statement In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/17161 ) Change subject: tests: Missing return statement ...................................................................... tests: Missing return statement Change-Id: I4fae9f84a83af280846b07eaa139ff4a05784a2e --- M src/tests/hnb-test.c M src/tests/test_common.c 2 files changed, 2 insertions(+), 1 deletion(-) Approvals: fixeria: Looks good to me, approved laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/tests/hnb-test.c b/src/tests/hnb-test.c index 446a14a..27959ec 100644 --- a/src/tests/hnb-test.c +++ b/src/tests/hnb-test.c @@ -326,7 +326,7 @@ if (len < sizeof(*ar)) { printf("GSM48 Auth Req does not fit.\n"); - return; + return -1; } printf(" :) Authentication Request :)\n"); diff --git a/src/tests/test_common.c b/src/tests/test_common.c index eeb0bec..701d581 100644 --- a/src/tests/test_common.c +++ b/src/tests/test_common.c @@ -88,6 +88,7 @@ log_set_print_filename(osmo_stderr_target, 0); log_set_use_color(osmo_stderr_target, 0); + return rc; } void test_common_cleanup(void) -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/17161 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I4fae9f84a83af280846b07eaa139ff4a05784a2e Gerrit-Change-Number: 17161 Gerrit-PatchSet: 1 Gerrit-Owner: roox Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 09:48:43 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 09:48:43 +0000 Subject: Change in docker-playground[master]: update gerrit to 2.16.16 References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/17177 ) Change subject: update gerrit to 2.16.16 ...................................................................... update gerrit to 2.16.16 We want to stay on the 2.16.x branch so we cannot use 'lastest' Change-Id: I20d81678a2d759bb3ac2a31945e684bf4065a8ff --- M gerrit/Dockerfile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/77/17177/1 diff --git a/gerrit/Dockerfile b/gerrit/Dockerfile index 98599f0..af11345 100644 --- a/gerrit/Dockerfile +++ b/gerrit/Dockerfile @@ -1,4 +1,4 @@ -FROM gerritcodereview/gerrit +FROM gerritcodereview/gerrit:2.16.16 USER root RUN yum -y install zip unzip patch -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17177 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I20d81678a2d759bb3ac2a31945e684bf4065a8ff Gerrit-Change-Number: 17177 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 09:48:43 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 09:48:43 +0000 Subject: Change in docker-playground[master]: redmine: We no longer need the hmac diff References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/17178 ) Change subject: redmine: We no longer need the hmac diff ...................................................................... redmine: We no longer need the hmac diff The upstream redmine container/image has meanwhile upgraded to a more recent version of the ruby base modules which don't require to be patched anymore. Change-Id: I0fd7684bdab55eece889a7d9e524ec2a25b30a3b --- M redmine/Dockerfile 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/78/17178/1 diff --git a/redmine/Dockerfile b/redmine/Dockerfile index 6402236..2dfb100 100644 --- a/redmine/Dockerfile +++ b/redmine/Dockerfile @@ -8,5 +8,6 @@ patch && \ apt-get clean -ADD hmac.diff /tmp/hmac.diff -RUN cd / && patch -p0 < /tmp/hmac.diff +# no longer needed after ruby-openid-2.9.2 is used +#ADD hmac.diff /tmp/hmac.diff +#RUN cd / && patch -p0 < /tmp/hmac.diff -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17178 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I0fd7684bdab55eece889a7d9e524ec2a25b30a3b Gerrit-Change-Number: 17178 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 09:50:02 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 09:50:02 +0000 Subject: Change in docker-playground[master]: redmine: We no longer need the hmac diff In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/17178 ) Change subject: redmine: We no longer need the hmac diff ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17178 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I0fd7684bdab55eece889a7d9e524ec2a25b30a3b Gerrit-Change-Number: 17178 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 16 Feb 2020 09:50:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 09:50:35 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 09:50:35 +0000 Subject: Change in docker-playground[master]: update gerrit to 2.16.16 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/17177 ) Change subject: update gerrit to 2.16.16 ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17177 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I20d81678a2d759bb3ac2a31945e684bf4065a8ff Gerrit-Change-Number: 17177 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 16 Feb 2020 09:50:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 09:50:40 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 09:50:40 +0000 Subject: Change in docker-playground[master]: update gerrit to 2.16.16 In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/17177 ) Change subject: update gerrit to 2.16.16 ...................................................................... update gerrit to 2.16.16 We want to stay on the 2.16.x branch so we cannot use 'lastest' Change-Id: I20d81678a2d759bb3ac2a31945e684bf4065a8ff --- M gerrit/Dockerfile 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/gerrit/Dockerfile b/gerrit/Dockerfile index 98599f0..af11345 100644 --- a/gerrit/Dockerfile +++ b/gerrit/Dockerfile @@ -1,4 +1,4 @@ -FROM gerritcodereview/gerrit +FROM gerritcodereview/gerrit:2.16.16 USER root RUN yum -y install zip unzip patch -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17177 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I20d81678a2d759bb3ac2a31945e684bf4065a8ff Gerrit-Change-Number: 17177 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 09:50:41 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 09:50:41 +0000 Subject: Change in docker-playground[master]: redmine: We no longer need the hmac diff In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/17178 ) Change subject: redmine: We no longer need the hmac diff ...................................................................... redmine: We no longer need the hmac diff The upstream redmine container/image has meanwhile upgraded to a more recent version of the ruby base modules which don't require to be patched anymore. Change-Id: I0fd7684bdab55eece889a7d9e524ec2a25b30a3b --- M redmine/Dockerfile 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/redmine/Dockerfile b/redmine/Dockerfile index 6402236..2dfb100 100644 --- a/redmine/Dockerfile +++ b/redmine/Dockerfile @@ -8,5 +8,6 @@ patch && \ apt-get clean -ADD hmac.diff /tmp/hmac.diff -RUN cd / && patch -p0 < /tmp/hmac.diff +# no longer needed after ruby-openid-2.9.2 is used +#ADD hmac.diff /tmp/hmac.diff +#RUN cd / && patch -p0 < /tmp/hmac.diff -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17178 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I0fd7684bdab55eece889a7d9e524ec2a25b30a3b Gerrit-Change-Number: 17178 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:07 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Move client_config from .c to .h file In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/16626 to look at the new patch set (#8). Change subject: remsim-client: Move client_config from .c to .h file ...................................................................... remsim-client: Move client_config from .c to .h file Change-Id: I158fe0f2791c164adc74cf851d5a139990bce852 --- M src/client/client.h M src/client/simtrace2-remsim_client.c 2 files changed, 31 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/26/16626/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16626 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I158fe0f2791c164adc74cf851d5a139990bce852 Gerrit-Change-Number: 16626 Gerrit-PatchSet: 8 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:07 +0000 Subject: Change in osmo-remsim[master]: remsim-client: store last 'status' In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/16627 to look at the new patch set (#7). Change subject: remsim-client: store last 'status' ...................................................................... remsim-client: store last 'status' Keep a local copy of the last status message of the cardem firmware. Change-Id: I5b348035da8f0905364b67f21f5c7be112b20e70 --- M src/client/simtrace2-remsim_client.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/27/16627/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16627 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I5b348035da8f0905364b67f21f5c7be112b20e70 Gerrit-Change-Number: 16627 Gerrit-PatchSet: 7 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:07 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Query + Store the USB device path In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/16628 to look at the new patch set (#7). Change subject: remsim-client: Query + Store the USB device path ...................................................................... remsim-client: Query + Store the USB device path While the user may have specified a USB path at the command line (or not), let's make sure we obtain the actual path after opening the respective USB device. Change-Id: I7e707c74647f4c5db06d495d369b2e69e2fc7c97 --- M src/client/simtrace2-remsim_client.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/28/16628/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16628 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I7e707c74647f4c5db06d495d369b2e69e2fc7c97 Gerrit-Change-Number: 16628 Gerrit-PatchSet: 7 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:07 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Call an external script in specific situations In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/16629 to look at the new patch set (#7). Change subject: remsim-client: Call an external script in specific situations ...................................................................... remsim-client: Call an external script in specific situations There are some situations where remsim-client would want to make its surrounding system aware of, e.g. to take specific action. This is particularly important on platforms where the simtrace2 firmware doesn't have direct control over modem reset/poweron or the like. Change-Id: I61cf4d93c669db137de801f8b147dcffaa6f3abd Depends: libosmocore.git Ib24ac8a083db32e55402ce496a5eabd8749cc888 Closes: OS#4332 --- M doc/manuals/chapters/remsim-client.adoc M src/client/simtrace2-remsim_client.c 2 files changed, 141 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/29/16629/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16629 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I61cf4d93c669db137de801f8b147dcffaa6f3abd Gerrit-Change-Number: 16629 Gerrit-PatchSet: 7 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:07 +0000 Subject: Change in osmo-remsim[master]: client: Adjust to API changes; enable build of remsim-client again In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17155 to look at the new patch set (#2). Change subject: client: Adjust to API changes; enable build of remsim-client again ...................................................................... client: Adjust to API changes; enable build of remsim-client again There were quite a bit of API changes that hadn't yet been applied to remsim_client.c (which was disabled and hence not compiled for quite some time). Change-Id: I0b3733f6851a951ee24ae87aa5db0ee8daa7a841 --- M src/client/Makefile.am M src/client/remsim_client.c 2 files changed, 22 insertions(+), 69 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/55/17155/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I0b3733f6851a951ee24ae87aa5db0ee8daa7a841 Gerrit-Change-Number: 17155 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:07 +0000 Subject: Change in osmo-remsim[master]: client: Add new osmo-remsim-client-shell binary In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17156 to look at the new patch set (#2). Change subject: client: Add new osmo-remsim-client-shell binary ...................................................................... client: Add new osmo-remsim-client-shell binary This is a remsim-client with an interactive 'shell', where the user can type in C-APDUs in hex formats, which will be sent to the bankd / SIM-card. Responses received from SIM Card via bankd will be printed in return. Change-Id: I636505fd9741833ccf5cbd1bcac30f7b9aa94425 --- M src/client/Makefile.am M src/client/client.h M src/client/remsim_client.c M src/client/simtrace2-remsim_client.c A src/client/user_shell.c 5 files changed, 182 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/56/17156/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I636505fd9741833ccf5cbd1bcac30f7b9aa94425 Gerrit-Change-Number: 17156 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:07 +0000 Subject: Change in osmo-remsim[master]: client: Work without global g_client variable In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17157 to look at the new patch set (#2). Change subject: client: Work without global g_client variable ...................................................................... client: Work without global g_client variable We may want to develop programs that include multiple instances of a remsim_client. Let's remove the global variable 'g_client' and instead de-reference the bankd_client using container_of() macros Change-Id: I456fb633561b88912be2f78c3e0264794d921255 --- M src/client/client.h M src/client/remsim_client.c M src/client/user_shell.c 3 files changed, 28 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/57/17157/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I456fb633561b88912be2f78c3e0264794d921255 Gerrit-Change-Number: 17157 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:07 +0000 Subject: Change in osmo-remsim[master]: client: Remove g_client completely; separate 'main' code In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17158 to look at the new patch set (#3). Change subject: client: Remove g_client completely; separate 'main' code ...................................................................... client: Remove g_client completely; separate 'main' code We may want to use the entire client code independent of the current 'main' portion, so let's introduce separation via API. Change-Id: I6456317c3968551cd69ba379c746e4dd9690d02d --- M src/client/client.h M src/client/remsim_client.c 2 files changed, 92 insertions(+), 60 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/58/17158/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I6456317c3968551cd69ba379c746e4dd9690d02d Gerrit-Change-Number: 17158 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:07 +0000 Subject: Change in osmo-remsim[master]: client: Split into remsim_client.c and remsim_client_main.c In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17159 to look at the new patch set (#2). Change subject: client: Split into remsim_client.c and remsim_client_main.c ...................................................................... client: Split into remsim_client.c and remsim_client_main.c Change-Id: Ie1d21c2cd84756d5c8aa2c41bcc37f5951a3a285 --- M src/client/Makefile.am M src/client/remsim_client.c A src/client/remsim_client_main.c 3 files changed, 99 insertions(+), 99 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/59/17159/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ie1d21c2cd84756d5c8aa2c41bcc37f5951a3a285 Gerrit-Change-Number: 17159 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:07 +0000 Subject: Change in osmo-remsim[master]: client: ifd_handler (PC/SC reader driver) as remsim-client In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17160 to look at the new patch set (#2). Change subject: client: ifd_handler (PC/SC reader driver) as remsim-client ...................................................................... client: ifd_handler (PC/SC reader driver) as remsim-client This adds a "libifd_remsim_client.so" PC/SC driver that can be used to make normal PC/SC client programs (like pySim, sysmo-usim-tool, osmo-sim-test, osmo-usim-auth, ...) talk to a remote SIM bank. Change-Id: Ib8707c6e0e46407ab39a693adfec2fa71892f6ee --- M src/client/Makefile.am M src/client/client.h A src/client/user_ifdhandler.c 3 files changed, 948 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/60/17160/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ib8707c6e0e46407ab39a693adfec2fa71892f6ee Gerrit-Change-Number: 17160 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:11 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:11 +0000 Subject: Change in osmo-remsim[master]: server: don't dereference map before OSMO_ASSERT() in _update_client_... References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17183 ) Change subject: server: don't dereference map before OSMO_ASSERT() in _update_client_for_slotmap() ...................................................................... server: don't dereference map before OSMO_ASSERT() in _update_client_for_slotmap() Change-Id: Ib36d2ba7928ea17a508cb68748e6c50f22784227 --- M src/server/rspro_server.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/83/17183/1 diff --git a/src/server/rspro_server.c b/src/server/rspro_server.c index 0d059fa..723aac8 100644 --- a/src/server/rspro_server.c +++ b/src/server/rspro_server.c @@ -219,7 +219,7 @@ static void _update_client_for_slotmap(struct slot_mapping *map, struct rspro_server *srv, struct rspro_client_conn *bankd_conn) { - struct rspro_client_conn *conn = client_conn_by_slot(srv, &map->client); + struct rspro_client_conn *conn; char ip_str[INET6_ADDRSTRLEN]; char port_str[6]; uint32_t bankd_ip; @@ -230,6 +230,7 @@ OSMO_ASSERT(map); OSMO_ASSERT(srv); + conn = client_conn_by_slot(srv, &map->client); if (!conn) LOGP(DMAIN, LOGL_DEBUG, "%s\n", __func__); else -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ib36d2ba7928ea17a508cb68748e6c50f22784227 Gerrit-Change-Number: 17183 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:12 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:12 +0000 Subject: Change in osmo-remsim[master]: rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17184 ) Change subject: rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server ...................................................................... rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server This is in preparation of other patches which will actually issue the SRVC_E_DISCONNET event towards this FSM. Related: OS#4399 Change-Id: I080f9e85987bbbe7aef84c32ce84b69d949ff561 --- M src/rspro_client_fsm.c M src/rspro_client_fsm.h 2 files changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/84/17184/1 diff --git a/src/rspro_client_fsm.c b/src/rspro_client_fsm.c index d5cf04b..7df1d17 100644 --- a/src/rspro_client_fsm.c +++ b/src/rspro_client_fsm.c @@ -110,6 +110,7 @@ static const struct value_string server_conn_fsm_event_names[] = { OSMO_VALUE_STRING(SRVC_E_ESTABLISH), + OSMO_VALUE_STRING(SRVC_E_DISCONNECT), OSMO_VALUE_STRING(SRVC_E_TCP_UP), OSMO_VALUE_STRING(SRVC_E_TCP_DOWN), OSMO_VALUE_STRING(SRVC_E_KA_TIMEOUT), @@ -330,10 +331,26 @@ static void srvc_allstate_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct rspro_server_conn *srvc = (struct rspro_server_conn *) fi->priv; + switch (event) { case SRVC_E_ESTABLISH: osmo_fsm_inst_state_chg(fi, SRVC_ST_REESTABLISH, T2_RECONNECT, 2); break; + case SRVC_E_DISCONNECT: + if (srvc->keepalive_fi) { + ipa_keepalive_fsm_stop(srvc->keepalive_fi); + osmo_fsm_inst_term(srvc->keepalive_fi, OSMO_FSM_TERM_REGULAR, NULL); + srvc->keepalive_fi = NULL; + } + if (srvc->conn) { + LOGPFSML(fi, LOGL_INFO, "Destroying existing connection to server\n"); + ipa_client_conn_close(srvc->conn); + ipa_client_conn_destroy(srvc->conn); + srvc->conn = NULL; + } + osmo_fsm_inst_state_chg(fi, SRVC_ST_INIT, 0, 0); + break; default: OSMO_ASSERT(0); } diff --git a/src/rspro_client_fsm.h b/src/rspro_client_fsm.h index 2f3f7fc..c1ae764 100644 --- a/src/rspro_client_fsm.h +++ b/src/rspro_client_fsm.h @@ -8,6 +8,7 @@ enum server_conn_fsm_event { SRVC_E_ESTABLISH, /* instruct SRVC to (re)etablish TCP connection to bankd */ + SRVC_E_DISCONNECT, /* instruct SRVC to disconnect TCP connection to bankd */ SRVC_E_TCP_UP, SRVC_E_TCP_DOWN, SRVC_E_KA_TIMEOUT, -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I080f9e85987bbbe7aef84c32ce84b69d949ff561 Gerrit-Change-Number: 17184 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:12 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:12 +0000 Subject: Change in osmo-remsim[master]: client: Make ConfigClientBankReq with bankd_port == 0 trigger SRVC_E_... References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17185 ) Change subject: client: Make ConfigClientBankReq with bankd_port == 0 trigger SRVC_E_DISCONNECT ...................................................................... client: Make ConfigClientBankReq with bankd_port == 0 trigger SRVC_E_DISCONNECT If the server sends us ConfigClientBankReq with bankd_port == 0, then this means that we shall disconnect from the bankd. Translate this to the SRVC_E_DISCONNECT event towards the RSPRO connection FSM. Change-Id: Idbfbfa0e84fa14dcb913b4dcbd943bc80ec175ac Related: OS#4399 --- M src/client/remsim_client.c M src/client/simtrace2-remsim_client.c 2 files changed, 12 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/85/17185/1 diff --git a/src/client/remsim_client.c b/src/client/remsim_client.c index 07ffbde..dd78c8e 100644 --- a/src/client/remsim_client.c +++ b/src/client/remsim_client.c @@ -83,8 +83,11 @@ rspro_IpAddr2str(&pdu->msg.choice.configClientBankReq.bankd.ip)); rspro2bank_slot(&bc->bankd_slot, &pdu->msg.choice.configClientBankReq.bankSlot); bc->bankd_conn.server_port = pdu->msg.choice.configClientBankReq.bankd.port; - /* instruct bankd FSM to connect */ - osmo_fsm_inst_dispatch(bc->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); + /* bankd port 0 is a magic value to indicate "no bankd" */ + if (bc->bankd_conn.server_port == 0) + osmo_fsm_inst_dispatch(bc->bankd_conn.fi, SRVC_E_DISCONNECT, NULL); + else + osmo_fsm_inst_dispatch(bc->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); /* send response to server */ resp = rspro_gen_ConfigClientBankRes(ResultCode_ok); server_conn_send_rspro(srvc, resp); diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c index bee8fc9..2929574 100644 --- a/src/client/simtrace2-remsim_client.c +++ b/src/client/simtrace2-remsim_client.c @@ -1,4 +1,4 @@ -/* (C) 2018-2019 by Harald Welte +/* (C) 2018-2020 by Harald Welte * (C) 2018 by sysmocom - s.f.m.c. GmbH, Author: Kevin Redon * * All Rights Reserved @@ -874,8 +874,11 @@ rspro_IpAddr2str(&pdu->msg.choice.configClientBankReq.bankd.ip)); rspro2bank_slot(&g_client->bankd_slot, &pdu->msg.choice.configClientBankReq.bankSlot); g_client->bankd_conn.server_port = pdu->msg.choice.configClientBankReq.bankd.port; - /* instruct bankd FSM to connect */ - osmo_fsm_inst_dispatch(g_client->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); + /* bankd port 0 is a magic value to indicate "no bankd" */ + if (g_client->bankd_conn.server_port == 0) + osmo_fsm_inst_dispatch(g_client->bankd_conn.fi, SRVC_E_DISCONNECT, NULL); + else + osmo_fsm_inst_dispatch(g_client->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); /* send response to server */ resp = rspro_gen_ConfigClientBankRes(ResultCode_ok); server_conn_send_rspro(srvc, resp); @@ -901,7 +904,7 @@ static void print_welcome(void) { printf("simtrace2-remsim-client - Remote SIM card client for SIMtrace\n" - "(C) 2010-2019, Harald Welte \n" + "(C) 2010-2020, Harald Welte \n" "(C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon \n\n"); } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17185 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Idbfbfa0e84fa14dcb913b4dcbd943bc80ec175ac Gerrit-Change-Number: 17185 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:35:12 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:35:12 +0000 Subject: Change in osmo-remsim[master]: server: Send ConfigClientBankReq with bankd_port==0 on map delete References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17186 ) Change subject: server: Send ConfigClientBankReq with bankd_port==0 on map delete ...................................................................... server: Send ConfigClientBankReq with bankd_port==0 on map delete If a slotmap is deleted via the REST API, don't only remove it from the bankd, but also remove it from the client. Change-Id: Ia2fc2a098471add56cb35e74639417d865704989 Closes: OS#4399 --- M src/server/rspro_server.c 1 file changed, 20 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/86/17186/1 diff --git a/src/server/rspro_server.c b/src/server/rspro_server.c index 723aac8..b35800f 100644 --- a/src/server/rspro_server.c +++ b/src/server/rspro_server.c @@ -250,20 +250,25 @@ /* if caller didn't provide bankd_conn, resolve it from map */ if (!bankd_conn) bankd_conn = bankd_conn_by_id(srv, map->bank.bank_id); - if (!bankd_conn) - return; - - /* obtain IP and port of bankd */ - rc = osmo_sock_get_ip_and_port(bankd_conn->peer->ofd.fd, ip_str, sizeof(ip_str), - port_str, sizeof(port_str), false); - if (rc < 0) { - LOGPFSM(bankd_conn->fi, "Error during getpeername\n"); - return; + if (map->state == SLMAP_S_DELETING || !bankd_conn) { + bankd_ip = 0; + bankd_port = 0; + } else { + /* obtain IP and port of bankd */ + rc = osmo_sock_get_ip_and_port(bankd_conn->peer->ofd.fd, ip_str, sizeof(ip_str), + port_str, sizeof(port_str), false); + if (rc < 0) { + LOGPFSM(bankd_conn->fi, "Error during getpeername\n"); + return; + } + bankd_ip = ntohl(inet_addr(ip_str)); + bankd_port = 9999; /* TODO: configurable */ } - bankd_ip = ntohl(inet_addr(ip_str)); - bankd_port = 9999; /* TODO: configurable */ + + /* determine if IP/port of bankd have changed */ if (conn->client.bankd.port != bankd_port || conn->client.bankd.ip != bankd_ip) { - LOGPFSM(conn->fi, "Bankd IP/Port changed to %s:%s\n", ip_str, port_str); + struct in_addr ia = { .s_addr = bankd_ip }; + LOGPFSM(conn->fi, "Bankd IP/Port changed to %s:%u\n", inet_ntoa(ia), bankd_port); conn->client.bankd.ip = bankd_ip; conn->client.bankd.port = bankd_port; changed = true; @@ -371,9 +376,11 @@ break; } slotmaps_unlock(slotmaps); + /* update client! */ + OSMO_ASSERT(map->state == SLMAP_S_DELETING); + _update_client_for_slotmap(map, conn->srv, conn); /* slotmap_del() will remove it from both global and bank list */ slotmap_del(map->maps, map); - /* FIXME: update client! */ break; case CLNTC_E_PUSH: /* check if any create or delete requests are pending */ slotmaps_wrlock(slotmaps); -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ia2fc2a098471add56cb35e74639417d865704989 Gerrit-Change-Number: 17186 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:37:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:37:07 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: New TC_slotmap_del_active_client() test References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17187 ) Change subject: remsim: New TC_slotmap_del_active_client() test ...................................................................... remsim: New TC_slotmap_del_active_client() test This test verifies that a slotmap delete via REST will not only delete it from the bankd, but also from the client. Change-Id: I8c4e53231b5386b00fe2938cde2091aa8b2e2027 Related: OS#4399 --- M remsim/RemsimServer_Tests.ttcn 1 file changed, 54 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/87/17187/1 diff --git a/remsim/RemsimServer_Tests.ttcn b/remsim/RemsimServer_Tests.ttcn index f0589ef..f2dbc25 100644 --- a/remsim/RemsimServer_Tests.ttcn +++ b/remsim/RemsimServer_Tests.ttcn @@ -390,7 +390,7 @@ f_ensure_slotmaps({}); } -/* simple delete of a 'ACTIVE' slotmap */ +/* simple delete of a 'ACTIVE' slotmap from server + bankd */ testcase TC_slotmap_del_active() runs on test_CT { var ComponentIdentity rspro_id := valueof(ts_CompId(remsimBankd, testcasename())); f_rspro_init(rspro[0], mp_server_ip, mp_server_port, rspro_id, 0); @@ -429,6 +429,58 @@ } +/* simple delete of a 'ACTIVE' slotmap from client */ +testcase TC_slotmap_del_active_client() runs on test_CT { + var ComponentIdentity rspro_id := valueof(ts_CompId(remsimBankd, testcasename())); + f_rspro_init(rspro[0], mp_server_ip, mp_server_port, rspro_id, 0); + rspro[0].rspro_bank_id := 1; + rspro[0].rspro_bank_nslots := 8; + + rspro_id := valueof(ts_CompId(remsimClient, testcasename())); + f_rspro_init(rspro[1], mp_server_ip, mp_server_port, rspro_id, 1); + rspro[1].rspro_client_slot := valueof(ts_ClientSlot(3,4)); + + f_rsres_init(); + var JsSlotmap sm := valueof(ts_JsSlotmap(ts_BankSlot(1,2), ts_ClientSlot(3,4))); + var HTTPResponse res; + + /* Create a new slotmap via HTTP */ + res := f_rsres_post_slotmap(sm); + + /* verify that the slotmap exists and is NEW */ + f_ensure_slotmap_exists_only(sm.client, sm.bank, NEW); + + /* connect a bankd for that slotmap */ + f_rspro_connect_client(0); + + /* connect a client for that slotmap */ + f_rspro_connect_client(1); + + /* expect the slotmap to be pushed to bank and ACK it */ + as_rspro_create_mapping(0, sm.client, sm.bank); + + /* verify that the slotmap exists and is ACTIVE */ + f_ensure_slotmap_exists_only(sm.client, sm.bank, ACTIVE); + + /* expect the client to be configured with bankd side settings */ + as_rspro_cfg_client_bank(1, sm.bank, ?/*FIXME*/); + + f_sleep(1.0); + + /* delete the slotmap via REST */ + res := f_rsres_delete_slotmap(sm.bank); + + /* verify the slotmap is gone from REST interface immediately */ + f_ensure_slotmaps({}); + + /* verify the slotmap is removed from bankd */ + as_rspro_remove_mapping(0, sm.client, sm.bank); + + /* verify the slotmap is removed from client by setting IP/port to '0' */ + as_rspro_cfg_client_bank(1, ?, tr_IpPort(ts_IPv4("0.0.0.0"), 0)); +} + + /* Add a slotmap to a currently active bank */ testcase TC_slotmap_add_active_bank() runs on test_CT { var ComponentIdentity rspro_id := valueof(ts_CompId(remsimBankd, testcasename())); @@ -478,6 +530,7 @@ execute( TC_slotmap_del_new() ); execute( TC_slotmap_del_unack() ); execute( TC_slotmap_del_active() ); + execute( TC_slotmap_del_active_client() ); execute( TC_slotmap_add_active_bank() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17187 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: I8c4e53231b5386b00fe2938cde2091aa8b2e2027 Gerrit-Change-Number: 17187 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Avoid using 'ci' global variable In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/16625 to look at the new patch set (#7). Change subject: remsim-client: Avoid using 'ci' global variable ...................................................................... remsim-client: Avoid using 'ci' global variable Rather, pass it around between functions and attach it to other state. Also, make it a talloc contxt so other objects can be allocated off it. Change-Id: I25f592581382238d5640c1f6326dec745f8d1d40 --- M src/client/client.h M src/client/simtrace2-remsim_client.c 2 files changed, 16 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/25/16625/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16625 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I25f592581382238d5640c1f6326dec745f8d1d40 Gerrit-Change-Number: 16625 Gerrit-PatchSet: 7 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Move client_config from .c to .h file In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/16626 to look at the new patch set (#9). Change subject: remsim-client: Move client_config from .c to .h file ...................................................................... remsim-client: Move client_config from .c to .h file Change-Id: I158fe0f2791c164adc74cf851d5a139990bce852 --- M src/client/client.h M src/client/simtrace2-remsim_client.c 2 files changed, 31 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/26/16626/9 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16626 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I158fe0f2791c164adc74cf851d5a139990bce852 Gerrit-Change-Number: 16626 Gerrit-PatchSet: 9 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: remsim-client: store last 'status' In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/16627 to look at the new patch set (#8). Change subject: remsim-client: store last 'status' ...................................................................... remsim-client: store last 'status' Keep a local copy of the last status message of the cardem firmware. Change-Id: I5b348035da8f0905364b67f21f5c7be112b20e70 --- M src/client/simtrace2-remsim_client.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/27/16627/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16627 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I5b348035da8f0905364b67f21f5c7be112b20e70 Gerrit-Change-Number: 16627 Gerrit-PatchSet: 8 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Query + Store the USB device path In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/16628 to look at the new patch set (#8). Change subject: remsim-client: Query + Store the USB device path ...................................................................... remsim-client: Query + Store the USB device path While the user may have specified a USB path at the command line (or not), let's make sure we obtain the actual path after opening the respective USB device. Change-Id: I7e707c74647f4c5db06d495d369b2e69e2fc7c97 --- M src/client/simtrace2-remsim_client.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/28/16628/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16628 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I7e707c74647f4c5db06d495d369b2e69e2fc7c97 Gerrit-Change-Number: 16628 Gerrit-PatchSet: 8 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Call an external script in specific situations In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/16629 to look at the new patch set (#8). Change subject: remsim-client: Call an external script in specific situations ...................................................................... remsim-client: Call an external script in specific situations There are some situations where remsim-client would want to make its surrounding system aware of, e.g. to take specific action. This is particularly important on platforms where the simtrace2 firmware doesn't have direct control over modem reset/poweron or the like. Change-Id: I61cf4d93c669db137de801f8b147dcffaa6f3abd Depends: libosmocore.git Ib24ac8a083db32e55402ce496a5eabd8749cc888 Closes: OS#4332 --- M doc/manuals/chapters/remsim-client.adoc M src/client/simtrace2-remsim_client.c 2 files changed, 141 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/29/16629/8 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16629 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I61cf4d93c669db137de801f8b147dcffaa6f3abd Gerrit-Change-Number: 16629 Gerrit-PatchSet: 8 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: client: Adjust to API changes; enable build of remsim-client again In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17155 to look at the new patch set (#3). Change subject: client: Adjust to API changes; enable build of remsim-client again ...................................................................... client: Adjust to API changes; enable build of remsim-client again There were quite a bit of API changes that hadn't yet been applied to remsim_client.c (which was disabled and hence not compiled for quite some time). Change-Id: I0b3733f6851a951ee24ae87aa5db0ee8daa7a841 --- M src/client/Makefile.am M src/client/remsim_client.c 2 files changed, 22 insertions(+), 69 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/55/17155/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I0b3733f6851a951ee24ae87aa5db0ee8daa7a841 Gerrit-Change-Number: 17155 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: client: Add new osmo-remsim-client-shell binary In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17156 to look at the new patch set (#3). Change subject: client: Add new osmo-remsim-client-shell binary ...................................................................... client: Add new osmo-remsim-client-shell binary This is a remsim-client with an interactive 'shell', where the user can type in C-APDUs in hex formats, which will be sent to the bankd / SIM-card. Responses received from SIM Card via bankd will be printed in return. Change-Id: I636505fd9741833ccf5cbd1bcac30f7b9aa94425 --- M src/client/Makefile.am M src/client/client.h M src/client/remsim_client.c M src/client/simtrace2-remsim_client.c A src/client/user_shell.c 5 files changed, 182 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/56/17156/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I636505fd9741833ccf5cbd1bcac30f7b9aa94425 Gerrit-Change-Number: 17156 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: client: Work without global g_client variable In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17157 to look at the new patch set (#3). Change subject: client: Work without global g_client variable ...................................................................... client: Work without global g_client variable We may want to develop programs that include multiple instances of a remsim_client. Let's remove the global variable 'g_client' and instead de-reference the bankd_client using container_of() macros Change-Id: I456fb633561b88912be2f78c3e0264794d921255 --- M src/client/client.h M src/client/remsim_client.c M src/client/user_shell.c 3 files changed, 28 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/57/17157/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I456fb633561b88912be2f78c3e0264794d921255 Gerrit-Change-Number: 17157 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: client: Remove g_client completely; separate 'main' code In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17158 to look at the new patch set (#4). Change subject: client: Remove g_client completely; separate 'main' code ...................................................................... client: Remove g_client completely; separate 'main' code We may want to use the entire client code independent of the current 'main' portion, so let's introduce separation via API. Change-Id: I6456317c3968551cd69ba379c746e4dd9690d02d --- M src/client/client.h M src/client/remsim_client.c 2 files changed, 92 insertions(+), 60 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/58/17158/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I6456317c3968551cd69ba379c746e4dd9690d02d Gerrit-Change-Number: 17158 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: client: Split into remsim_client.c and remsim_client_main.c In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17159 to look at the new patch set (#3). Change subject: client: Split into remsim_client.c and remsim_client_main.c ...................................................................... client: Split into remsim_client.c and remsim_client_main.c Change-Id: Ie1d21c2cd84756d5c8aa2c41bcc37f5951a3a285 --- M src/client/Makefile.am M src/client/remsim_client.c A src/client/remsim_client_main.c 3 files changed, 99 insertions(+), 99 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/59/17159/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ie1d21c2cd84756d5c8aa2c41bcc37f5951a3a285 Gerrit-Change-Number: 17159 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: client: ifd_handler (PC/SC reader driver) as remsim-client In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17160 to look at the new patch set (#3). Change subject: client: ifd_handler (PC/SC reader driver) as remsim-client ...................................................................... client: ifd_handler (PC/SC reader driver) as remsim-client This adds a "libifd_remsim_client.so" PC/SC driver that can be used to make normal PC/SC client programs (like pySim, sysmo-usim-tool, osmo-sim-test, osmo-usim-auth, ...) talk to a remote SIM bank. Change-Id: Ib8707c6e0e46407ab39a693adfec2fa71892f6ee --- M src/client/Makefile.am M src/client/client.h A src/client/user_ifdhandler.c 3 files changed, 948 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/60/17160/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17160 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ib8707c6e0e46407ab39a693adfec2fa71892f6ee Gerrit-Change-Number: 17160 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: server: don't dereference map before OSMO_ASSERT() in _update_client_... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17183 to look at the new patch set (#2). Change subject: server: don't dereference map before OSMO_ASSERT() in _update_client_for_slotmap() ...................................................................... server: don't dereference map before OSMO_ASSERT() in _update_client_for_slotmap() Change-Id: Ib36d2ba7928ea17a508cb68748e6c50f22784227 --- M src/server/rspro_server.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/83/17183/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ib36d2ba7928ea17a508cb68748e6c50f22784227 Gerrit-Change-Number: 17183 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17184 to look at the new patch set (#2). Change subject: rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server ...................................................................... rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server This is in preparation of other patches which will actually issue the SRVC_E_DISCONNET event towards this FSM. Related: OS#4399 Change-Id: I080f9e85987bbbe7aef84c32ce84b69d949ff561 --- M src/rspro_client_fsm.c M src/rspro_client_fsm.h 2 files changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/84/17184/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I080f9e85987bbbe7aef84c32ce84b69d949ff561 Gerrit-Change-Number: 17184 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: client: Make ConfigClientBankReq with bankd_port == 0 trigger SRVC_E_... In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17185 to look at the new patch set (#2). Change subject: client: Make ConfigClientBankReq with bankd_port == 0 trigger SRVC_E_DISCONNECT ...................................................................... client: Make ConfigClientBankReq with bankd_port == 0 trigger SRVC_E_DISCONNECT If the server sends us ConfigClientBankReq with bankd_port == 0, then this means that we shall disconnect from the bankd. Translate this to the SRVC_E_DISCONNECT event towards the RSPRO connection FSM. Change-Id: Idbfbfa0e84fa14dcb913b4dcbd943bc80ec175ac Related: OS#4399 --- M src/client/remsim_client.c M src/client/simtrace2-remsim_client.c 2 files changed, 12 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/85/17185/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17185 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Idbfbfa0e84fa14dcb913b4dcbd943bc80ec175ac Gerrit-Change-Number: 17185 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:03 +0000 Subject: Change in osmo-remsim[master]: server: Send ConfigClientBankReq with bankd_port==0 on map delete In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17186 to look at the new patch set (#2). Change subject: server: Send ConfigClientBankReq with bankd_port==0 on map delete ...................................................................... server: Send ConfigClientBankReq with bankd_port==0 on map delete If a slotmap is deleted via the REST API, don't only remove it from the bankd, but also remove it from the client. Change-Id: Ia2fc2a098471add56cb35e74639417d865704989 Closes: OS#4399 --- M src/server/rspro_server.c 1 file changed, 20 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/86/17186/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ia2fc2a098471add56cb35e74639417d865704989 Gerrit-Change-Number: 17186 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:43:09 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:43:09 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Fix the -k/ --keep-running option References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17188 ) Change subject: remsim-client: Fix the -k/ --keep-running option ...................................................................... remsim-client: Fix the -k/ --keep-running option When introducing asynchronous USB support in Change-Id Ic18690b3c2cbc5e99de0665c0b68b7555433b3cd, we accidentially broke the --keep-running behavior, where even a disappearing USB device will not terminate the remsim-client process. Change-Id: I19cca9f7953d61058a36856b2fc4c97a3b93e15d --- M src/client/simtrace2-remsim_client.c 1 file changed, 14 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/88/17188/1 diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c index ac78dd4..1af3274 100644 --- a/src/client/simtrace2-remsim_client.c +++ b/src/client/simtrace2-remsim_client.c @@ -96,6 +96,9 @@ void __thread *talloc_asn1_ctx; int asn_debug; +/* should we leave main loop processing? */ +bool g_leave_main = false; + __attribute__((unused)) static int gsmtap_send_sim(const uint8_t *apdu, unsigned int len) { struct gsmtap_hdr *gh; @@ -152,10 +155,11 @@ break; case LIBUSB_TRANSFER_NO_DEVICE: fprintf(stderr, "USB device disappeared\n"); - exit(23); + g_leave_main = true; break; default: - osmo_panic("USB OUT transfer failed, status=%u\n", xfer->status); + fprintf(stderr, "USB OUT transfer failed, status=%u\n", xfer->status); + g_leave_main = true; break; } @@ -577,10 +581,11 @@ break; case LIBUSB_TRANSFER_NO_DEVICE: fprintf(stderr, "USB device disappeared\n"); - exit(23); + g_leave_main = true; break; default: - osmo_panic("USB IN transfer failed, status=%u\n", xfer->status); + fprintf(stderr, "USB IN transfer failed, status=%u\n", xfer->status); + g_leave_main = true; break; } @@ -627,10 +632,11 @@ break; case LIBUSB_TRANSFER_NO_DEVICE: fprintf(stderr, "USB device disappeared\n"); - exit(23); + g_leave_main = true; break; default: - osmo_panic("USB IRQ transfer failed, status=%u\n", xfer->status); + fprintf(stderr, "USB IRQ transfer failed, status=%u\n", xfer->status); + g_leave_main = true; break; } @@ -1092,9 +1098,10 @@ allocate_and_submit_irq(ci); allocate_and_submit_in(ci); - while (1) { + while (!g_leave_main) { osmo_select_main(false); } + g_leave_main = false; libusb_release_interface(transp->usb_devh, 0); -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17188 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I19cca9f7953d61058a36856b2fc4c97a3b93e15d Gerrit-Change-Number: 17188 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:44:13 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:44:13 +0000 Subject: Change in osmo-remsim[master]: remsim-client: move from common 'src' directory to 'src/client' In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16623 ) Change subject: remsim-client: move from common 'src' directory to 'src/client' ...................................................................... Patch Set 6: Code-Review+2 This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16623 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I67a3a5941434f09f7099c2cdb19c126cea305a73 Gerrit-Change-Number: 16623 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 16 Feb 2020 14:44:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:44:24 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:44:24 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Fix the -k/ --keep-running option In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17188 ) Change subject: remsim-client: Fix the -k/ --keep-running option ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17188 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I19cca9f7953d61058a36856b2fc4c97a3b93e15d Gerrit-Change-Number: 17188 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Sun, 16 Feb 2020 14:44:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:44:29 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:44:29 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Avoid using 'ci' global variable In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16625 ) Change subject: remsim-client: Avoid using 'ci' global variable ...................................................................... Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16625 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I25f592581382238d5640c1f6326dec745f8d1d40 Gerrit-Change-Number: 16625 Gerrit-PatchSet: 7 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 16 Feb 2020 14:44:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:44:32 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:44:32 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Move client_config from .c to .h file In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16626 ) Change subject: remsim-client: Move client_config from .c to .h file ...................................................................... Patch Set 9: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16626 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I158fe0f2791c164adc74cf851d5a139990bce852 Gerrit-Change-Number: 16626 Gerrit-PatchSet: 9 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 16 Feb 2020 14:44:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:44:35 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:44:35 +0000 Subject: Change in osmo-remsim[master]: remsim-client: store last 'status' In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16627 ) Change subject: remsim-client: store last 'status' ...................................................................... Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16627 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I5b348035da8f0905364b67f21f5c7be112b20e70 Gerrit-Change-Number: 16627 Gerrit-PatchSet: 8 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 16 Feb 2020 14:44:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:45:30 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:45:30 +0000 Subject: Change in osmo-remsim[master]: server: don't dereference map before OSMO_ASSERT() in _update_client_... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17183 ) Change subject: server: don't dereference map before OSMO_ASSERT() in _update_client_for_slotmap() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ib36d2ba7928ea17a508cb68748e6c50f22784227 Gerrit-Change-Number: 17183 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 16 Feb 2020 14:45:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:45:55 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:45:55 +0000 Subject: Change in osmo-remsim[master]: rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17184 ) Change subject: rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I080f9e85987bbbe7aef84c32ce84b69d949ff561 Gerrit-Change-Number: 17184 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 16 Feb 2020 14:45:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:46:48 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:46:48 +0000 Subject: Change in osmo-remsim[master]: remsim-client: move from common 'src' directory to 'src/client' In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16623 ) Change subject: remsim-client: move from common 'src' directory to 'src/client' ...................................................................... remsim-client: move from common 'src' directory to 'src/client' As both the bankd and the server already are in src/bankd and src/server, respectively: Let's unify this and have the client also in its own sub-directory. Change-Id: I67a3a5941434f09f7099c2cdb19c126cea305a73 --- M configure.ac M src/Makefile.am M src/bankd/bankd.h A src/client/Makefile.am R src/client/client.h R src/client/remsim_client.c R src/client/simtrace2-remsim_client.c M src/rspro_client_fsm.c M src/rspro_client_fsm.h 9 files changed, 44 insertions(+), 23 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 31af887..1c9cd72 100644 --- a/configure.ac +++ b/configure.ac @@ -38,10 +38,6 @@ PKG_CHECK_MODULES(OSMOCORE, libosmocore >= 1.3.0) PKG_CHECK_MODULES(OSMOGSM, libosmogsm >= 0.11.0) PKG_CHECK_MODULES(OSMOABIS, libosmoabis) -PKG_CHECK_MODULES(OSMOSIM, libosmosim) -PKG_CHECK_MODULES(OSMOUSB, libosmousb) -PKG_CHECK_MODULES(OSMOSIMTRACE2, libosmo-simtrace2) -PKG_CHECK_MODULES(USB, libusb-1.0) AC_ARG_ENABLE([remsim-server],[AS_HELP_STRING([--disable-remsim-server], [Build osmo-remsim-server])], [osmo_ac_build_server="$enableval"],[osmo_ac_build_server="yes"]) @@ -58,11 +54,24 @@ [osmo_ac_build_bankd="$enableval"],[osmo_ac_build_bankd="yes"]) if test "$osmo_ac_build_bankd" = "yes"; then AC_DEFINE(BUILD_BANKD, 1, [Define if we want to build osmo-remsim-bankd]) + PKG_CHECK_MODULES(OSMOSIM, libosmosim) + PKG_CHECK_MODULES(PCSC, libpcsclite) fi AM_CONDITIONAL(BUILD_BANKD, test "x$osmo_ac_build_bankd" = "xyes") - PKG_CHECK_MODULES(PCSC, libpcsclite) AC_SUBST(BUILD_BANKD) +AC_ARG_ENABLE([remsim-client],[AS_HELP_STRING([--disable-remsim-client], [Build osmo-remsim-client])], + [osmo_ac_build_client="$enableval"],[osmo_ac_build_client="yes"]) +if test "$osmo_ac_build_client" = "yes"; then + AC_DEFINE(BUILD_CLIENT, 1, [Define if we want to build osmo-remsim-client]) + PKG_CHECK_MODULES(OSMOSIM, libosmosim) + PKG_CHECK_MODULES(OSMOUSB, libosmousb) + PKG_CHECK_MODULES(OSMOSIMTRACE2, libosmo-simtrace2) + PKG_CHECK_MODULES(USB, libusb-1.0) +fi +AM_CONDITIONAL(BUILD_CLIENT, test "x$osmo_ac_build_client" = "xyes") +AC_SUBST(BUILD_CLIENT) + AC_CONFIG_MACRO_DIR([m4]) @@ -155,6 +164,7 @@ src/Makefile src/rspro/Makefile src/bankd/Makefile + src/client/Makefile src/server/Makefile include/Makefile include/osmocom/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 58f02e8..c954db2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,11 +5,12 @@ if BUILD_SERVER SUBDIRS += server endif +if BUILD_CLIENT +SUBDIRS += client +endif AM_CFLAGS = -Wall -I$(top_srcdir)/include -I$(top_builddir)/include \ $(OSMOCORE_CFLAGS) $(OSMOGSM_CFLAGS) $(OSMOABIS_CFLAGS) \ - $(PCSC_CFLAGS) $(USB_CFLAGS) $(OSMOSIM_CFLAGS) \ - $(OSMOSIMTRACE2_CFLAGS) \ -I$(top_srcdir)/include/osmocom/rspro RSPRO_LIBVERSION=1:0:0 @@ -19,17 +20,5 @@ rspro/libosmo-asn1-rspro.la libosmo_rspro_la_SOURCES = rspro_util.c asn1c_helpers.c -noinst_HEADERS = debug.h client.h rspro_util.h slotmap.h rspro_client_fsm.h \ +noinst_HEADERS = debug.h rspro_util.h slotmap.h rspro_client_fsm.h \ asn1c_helpers.h - -bin_PROGRAMS = osmo-remsim-client-st2 - -remsim_client_SOURCES = remsim_client.c rspro_client_fsm.c debug.c -remsim_client_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ - libosmo-rspro.la - -osmo_remsim_client_st2_SOURCES = simtrace2-remsim_client.c \ - rspro_client_fsm.c debug.c -osmo_remsim_client_st2_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ - $(OSMOUSB_LIBS) $(OSMOSIMTRACE2_LIBS) \ - $(USB_LIBS) $(OSMOSIM_LIBS) libosmo-rspro.la diff --git a/src/bankd/bankd.h b/src/bankd/bankd.h index d713ed1..6de3213 100644 --- a/src/bankd/bankd.h +++ b/src/bankd/bankd.h @@ -14,7 +14,7 @@ #include "rspro_util.h" #include "slotmap.h" -#include "client.h" +#include "rspro_client_fsm.h" #include "debug.h" extern struct value_string worker_state_names[]; diff --git a/src/client/Makefile.am b/src/client/Makefile.am new file mode 100644 index 0000000..106bc5e --- /dev/null +++ b/src/client/Makefile.am @@ -0,0 +1,20 @@ +AM_CFLAGS = -Wall -I$(top_srcdir)/include -I/$(top_builddir)/include -I$(top_srcdir)/src \ + $(OSMOCORE_CFLAGS) $(OSMOGSM_CFLAGS) $(OSMOABIS_CFLAGS) \ + $(PCSC_CFLAGS) $(USB_CFLAGS) $(OSMOSIM_CFLAGS) \ + $(OSMOSIMTRACE2_CFLAGS) \ + -I$(top_srcdir)/include/osmocom/rspro + +bin_PROGRAMS = osmo-remsim-client-st2 + +remsim_client_SOURCES = remsim_client.c ../rspro_client_fsm.c ../debug.c +remsim_client_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ + $(top_builddir)/src/libosmo-rspro.la + +osmo_remsim_client_st2_SOURCES = simtrace2-remsim_client.c \ + ../rspro_client_fsm.c ../debug.c +osmo_remsim_client_st2_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ + $(OSMOUSB_LIBS) $(OSMOSIMTRACE2_LIBS) \ + $(USB_LIBS) $(OSMOSIM_LIBS) \ + $(top_builddir)/src/libosmo-rspro.la + +noinst_HEADERS = client.h diff --git a/src/client.h b/src/client/client.h similarity index 100% rename from src/client.h rename to src/client/client.h diff --git a/src/remsim_client.c b/src/client/remsim_client.c similarity index 100% rename from src/remsim_client.c rename to src/client/remsim_client.c diff --git a/src/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c similarity index 100% rename from src/simtrace2-remsim_client.c rename to src/client/simtrace2-remsim_client.c diff --git a/src/rspro_client_fsm.c b/src/rspro_client_fsm.c index 758bde7..d5cf04b 100644 --- a/src/rspro_client_fsm.c +++ b/src/rspro_client_fsm.c @@ -35,8 +35,8 @@ #include #include -#include "client.h" -#include "rspro_util.h" +#include "debug.h" +#include "rspro_client_fsm.h" #define S(x) (1 << (x)) diff --git a/src/rspro_client_fsm.h b/src/rspro_client_fsm.h index ca59c77..2f3f7fc 100644 --- a/src/rspro_client_fsm.h +++ b/src/rspro_client_fsm.h @@ -4,6 +4,8 @@ #include #include +#include "rspro_util.h" + enum server_conn_fsm_event { SRVC_E_ESTABLISH, /* instruct SRVC to (re)etablish TCP connection to bankd */ SRVC_E_TCP_UP, -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16623 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I67a3a5941434f09f7099c2cdb19c126cea305a73 Gerrit-Change-Number: 16623 Gerrit-PatchSet: 6 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:46:48 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:46:48 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Fix the -k/ --keep-running option In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17188 ) Change subject: remsim-client: Fix the -k/ --keep-running option ...................................................................... remsim-client: Fix the -k/ --keep-running option When introducing asynchronous USB support in Change-Id Ic18690b3c2cbc5e99de0665c0b68b7555433b3cd, we accidentially broke the --keep-running behavior, where even a disappearing USB device will not terminate the remsim-client process. Change-Id: I19cca9f7953d61058a36856b2fc4c97a3b93e15d --- M src/client/simtrace2-remsim_client.c 1 file changed, 14 insertions(+), 7 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c index ac78dd4..1af3274 100644 --- a/src/client/simtrace2-remsim_client.c +++ b/src/client/simtrace2-remsim_client.c @@ -96,6 +96,9 @@ void __thread *talloc_asn1_ctx; int asn_debug; +/* should we leave main loop processing? */ +bool g_leave_main = false; + __attribute__((unused)) static int gsmtap_send_sim(const uint8_t *apdu, unsigned int len) { struct gsmtap_hdr *gh; @@ -152,10 +155,11 @@ break; case LIBUSB_TRANSFER_NO_DEVICE: fprintf(stderr, "USB device disappeared\n"); - exit(23); + g_leave_main = true; break; default: - osmo_panic("USB OUT transfer failed, status=%u\n", xfer->status); + fprintf(stderr, "USB OUT transfer failed, status=%u\n", xfer->status); + g_leave_main = true; break; } @@ -577,10 +581,11 @@ break; case LIBUSB_TRANSFER_NO_DEVICE: fprintf(stderr, "USB device disappeared\n"); - exit(23); + g_leave_main = true; break; default: - osmo_panic("USB IN transfer failed, status=%u\n", xfer->status); + fprintf(stderr, "USB IN transfer failed, status=%u\n", xfer->status); + g_leave_main = true; break; } @@ -627,10 +632,11 @@ break; case LIBUSB_TRANSFER_NO_DEVICE: fprintf(stderr, "USB device disappeared\n"); - exit(23); + g_leave_main = true; break; default: - osmo_panic("USB IRQ transfer failed, status=%u\n", xfer->status); + fprintf(stderr, "USB IRQ transfer failed, status=%u\n", xfer->status); + g_leave_main = true; break; } @@ -1092,9 +1098,10 @@ allocate_and_submit_irq(ci); allocate_and_submit_in(ci); - while (1) { + while (!g_leave_main) { osmo_select_main(false); } + g_leave_main = false; libusb_release_interface(transp->usb_devh, 0); -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17188 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I19cca9f7953d61058a36856b2fc4c97a3b93e15d Gerrit-Change-Number: 17188 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:46:48 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:46:48 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Avoid using 'ci' global variable In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16625 ) Change subject: remsim-client: Avoid using 'ci' global variable ...................................................................... remsim-client: Avoid using 'ci' global variable Rather, pass it around between functions and attach it to other state. Also, make it a talloc contxt so other objects can be allocated off it. Change-Id: I25f592581382238d5640c1f6326dec745f8d1d40 --- M src/client/client.h M src/client/simtrace2-remsim_client.c 2 files changed, 16 insertions(+), 12 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/client/client.h b/src/client/client.h index 96a454f..f36e2e3 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -11,6 +11,8 @@ /* main.c */ +struct cardem_inst; + struct bankd_client { /* connection to the remsim-server (control) */ struct rspro_server_conn srv_conn; @@ -21,4 +23,6 @@ struct app_comp_id peer_comp_id; struct bank_slot bankd_slot; + + struct cardem_inst *cardem; }; diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c index 1af3274..190eb90 100644 --- a/src/client/simtrace2-remsim_client.c +++ b/src/client/simtrace2-remsim_client.c @@ -679,17 +679,13 @@ .slot_nr = 0, }; -struct cardem_inst _ci = { - .slot = &_slot, -}; - -struct cardem_inst *ci = &_ci; +static struct cardem_inst *g_ci; static void signal_handler(int signal) { switch (signal) { case SIGINT: - cardem_request_card_insert(ci, false); + cardem_request_card_insert(g_ci, false); exit(0); break; default: @@ -714,9 +710,9 @@ ac.sw[1] = card2modem->data.buf[card2modem->data.size - 1]; printf("SIMtrace <= SW=0x%02x%02x, len_rx=%d\n", ac.sw[0], ac.sw[1], card2modem->data.size - 2); if (card2modem->data.size > 2) { // send PB and data to modem - cardem_request_pb_and_tx(ci, ac.hdr.ins, card2modem->data.buf, card2modem->data.size - 2); + cardem_request_pb_and_tx(bc->cardem, ac.hdr.ins, card2modem->data.buf, card2modem->data.size - 2); } - cardem_request_sw_tx(ci, ac.sw); // send SW to modem + cardem_request_sw_tx(bc->cardem, ac.sw); // send SW to modem return 0; } @@ -730,7 +726,7 @@ OSMO_ASSERT(RsproPDUchoice_PR_setAtrReq == pdu->msg.present); /* FIXME: is this permitted at any time by the SIMtrace2 cardemfirmware? */ - rc = cardem_request_set_atr(ci, pdu->msg.choice.setAtrReq.atr.buf, + rc = cardem_request_set_atr(bc->cardem, pdu->msg.choice.setAtrReq.atr.buf, pdu->msg.choice.setAtrReq.atr.size); if (rc == 0) resp = rspro_gen_SetAtrRes(ResultCode_ok); @@ -998,7 +994,7 @@ } -static void main_body(struct client_config *cfg) +static void main_body(struct cardem_inst *ci, struct client_config *cfg) { struct st_transport *transp = ci->slot->transp; struct usb_interface_match _ifm, *ifm = &_ifm; @@ -1125,7 +1121,10 @@ msgb_talloc_ctx_init(g_tall_ctx, 0); osmo_init_logging2(g_tall_ctx, &log_info); - cfg = client_config_init(g_tall_ctx); + g_ci = talloc_zero(g_tall_ctx, struct cardem_inst); + g_ci->slot = &_slot; + + cfg = client_config_init(g_ci); handle_options(cfg, argc, argv); if (cfg->usb.vendor_id < 0 || cfg->usb.product_id < 0) { @@ -1153,6 +1152,7 @@ // initialize remote SIM client g_client = talloc_zero(g_tall_ctx, struct bankd_client); + g_client->cardem = g_ci; if (cfg->client_id != -1) { g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); @@ -1199,7 +1199,7 @@ // connect to SIMtrace2 cardem do { - main_body(cfg); + main_body(g_ci, cfg); sleep(1); } while (cfg->keep_running); -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16625 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I25f592581382238d5640c1f6326dec745f8d1d40 Gerrit-Change-Number: 16625 Gerrit-PatchSet: 7 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:46:49 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:46:49 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Move client_config from .c to .h file In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16626 ) Change subject: remsim-client: Move client_config from .c to .h file ...................................................................... remsim-client: Move client_config from .c to .h file Change-Id: I158fe0f2791c164adc74cf851d5a139990bce852 --- M src/client/client.h M src/client/simtrace2-remsim_client.c 2 files changed, 31 insertions(+), 27 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/client/client.h b/src/client/client.h index f36e2e3..7cc7ec1 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -13,6 +13,35 @@ struct cardem_inst; +#define ATR_SIZE_MAX 55 +struct client_config { + char *server_host; + int server_port; + + int client_id; + int client_slot; + + char *gsmtap_host; + bool keep_running; + + char *event_script; + + struct { + uint8_t data[ATR_SIZE_MAX]; + uint8_t len; + } atr; + + struct { + int vendor_id; + int product_id; + int config_id; + int if_num; + int altsetting; + int addr; + char *path; + } usb; +}; + struct bankd_client { /* connection to the remsim-server (control) */ struct rspro_server_conn srv_conn; @@ -24,5 +53,6 @@ struct bank_slot bankd_slot; + struct client_config *cfg; struct cardem_inst *cardem; }; diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c index 190eb90..515fd50 100644 --- a/src/client/simtrace2-remsim_client.c +++ b/src/client/simtrace2-remsim_client.c @@ -844,33 +844,6 @@ ); } -#define ATR_SIZE_MAX 55 -struct client_config { - char *server_host; - int server_port; - - int client_id; - int client_slot; - - char *gsmtap_host; - bool keep_running; - - struct { - uint8_t data[ATR_SIZE_MAX]; - uint8_t len; - } atr; - - struct { - int vendor_id; - int product_id; - int config_id; - int if_num; - int altsetting; - int addr; - char *path; - } usb; -}; - static struct client_config *client_config_init(void *ctx) { struct client_config *cfg = talloc_zero(ctx, struct client_config); @@ -1152,6 +1125,7 @@ // initialize remote SIM client g_client = talloc_zero(g_tall_ctx, struct bankd_client); + g_client->cfg = cfg; g_client->cardem = g_ci; if (cfg->client_id != -1) { -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16626 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I158fe0f2791c164adc74cf851d5a139990bce852 Gerrit-Change-Number: 16626 Gerrit-PatchSet: 9 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:46:49 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:46:49 +0000 Subject: Change in osmo-remsim[master]: remsim-client: store last 'status' In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16627 ) Change subject: remsim-client: store last 'status' ...................................................................... remsim-client: store last 'status' Keep a local copy of the last status message of the cardem firmware. Change-Id: I5b348035da8f0905364b67f21f5c7be112b20e70 --- M src/client/simtrace2-remsim_client.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c index 515fd50..173b890 100644 --- a/src/client/simtrace2-remsim_client.c +++ b/src/client/simtrace2-remsim_client.c @@ -86,6 +86,7 @@ struct cardem_inst { /* slot on which this card emulation instance runs */ struct st_slot *slot; + struct cardemu_usb_msg_status last_status; }; /* global GSMTAP instance */ @@ -544,6 +545,11 @@ -1 /* FIXME: make this dependent on board */); server_conn_send_rspro(&g_client->bankd_conn, pdu); + if (ci->last_status.flags != status->flags) { + ci->last_status = *status; + } else + ci->last_status = *status; + return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16627 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I5b348035da8f0905364b67f21f5c7be112b20e70 Gerrit-Change-Number: 16627 Gerrit-PatchSet: 8 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:46:49 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:46:49 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Query + Store the USB device path In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16628 ) Change subject: remsim-client: Query + Store the USB device path ...................................................................... remsim-client: Query + Store the USB device path While the user may have specified a USB path at the command line (or not), let's make sure we obtain the actual path after opening the respective USB device. Change-Id: I7e707c74647f4c5db06d495d369b2e69e2fc7c97 --- M src/client/simtrace2-remsim_client.c 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c index 173b890..846ce85 100644 --- a/src/client/simtrace2-remsim_client.c +++ b/src/client/simtrace2-remsim_client.c @@ -87,6 +87,7 @@ /* slot on which this card emulation instance runs */ struct st_slot *slot; struct cardemu_usb_msg_status last_status; + char *usb_path; }; /* global GSMTAP instance */ @@ -993,6 +994,10 @@ return; } + /* (re)determine the USB path of the opened device */ + talloc_free(ci->usb_path); + ci->usb_path = osmo_libusb_dev_get_path_c(ci, libusb_get_device(transp->usb_devh)); + rc = libusb_claim_interface(transp->usb_devh, cfg->usb.if_num); if (rc < 0) { fprintf(stderr, "can't claim interface %d; rc=%d\n", cfg->usb.if_num, rc); -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16628 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I7e707c74647f4c5db06d495d369b2e69e2fc7c97 Gerrit-Change-Number: 16628 Gerrit-PatchSet: 8 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:46:49 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:46:49 +0000 Subject: Change in osmo-remsim[master]: remsim-client: Call an external script in specific situations In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16629 ) Change subject: remsim-client: Call an external script in specific situations ...................................................................... remsim-client: Call an external script in specific situations There are some situations where remsim-client would want to make its surrounding system aware of, e.g. to take specific action. This is particularly important on platforms where the simtrace2 firmware doesn't have direct control over modem reset/poweron or the like. Change-Id: I61cf4d93c669db137de801f8b147dcffaa6f3abd Depends: libosmocore.git Ib24ac8a083db32e55402ce496a5eabd8749cc888 Closes: OS#4332 --- M doc/manuals/chapters/remsim-client.adoc M src/client/simtrace2-remsim_client.c 2 files changed, 141 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/doc/manuals/chapters/remsim-client.adoc b/doc/manuals/chapters/remsim-client.adoc index 8f90a1a..7416b05 100644 --- a/doc/manuals/chapters/remsim-client.adoc +++ b/doc/manuals/chapters/remsim-client.adoc @@ -82,6 +82,10 @@ Specify the initial ATR to be communicated to the modem/phone. Can and will later be overridden by the ATR as specified by `osmo-remsim-bankd` once a card has been mapped to this client. +*-e, --event-script COMMAND*:: + Specify the shell command to be execute when the client wants to call its + helper script + ==== Examples .remsim-server is on 10.2.3.4, sysmoQMOD on usb bus, all 4 modems: @@ -97,3 +101,55 @@ `osmo-remsim-client` currently logs to stdout only, and the logging verbosity is not yet configurable. However, as the libosmocore logging framework is used, extending this is an easy modification. + +=== Helper Script + +`osmo-remsim-client` can call an external shell command / script / program at specific +instances of time. This serves two purposes: + +* To keep external system integration posted about the overall status of remsim-client, + such as whether or not it is connected to a server and/or bankd. +* To request the external system to perform specific actions, such as triggering the reset + of the modem - in case the hardware doesn't allow the simtrace2 firmware to do that itself. + +==== Script Environment Variables + +The environment passed to the helper script contains a number of variables to provide inormation +to the external script: + +.Environment Variables +[options="header",cols="27%,18%,55%"] +|=== +| Name | Example Value | Description +| REMSIM_CLIENT_VERSION | 0.2.2.37-5406a | Compile version of the software +| REMSIM_SERVER_ADDR | 1.2.3.4:1234 | Address and port of the remsim-server +| REMSIM_SERVER_STATE | CONNECTED | FSM state of the connection to remsim-server +| REMSIM_BANKD_ADDR | 1.2.3.4:1234 | Address and port of the remsim-bankd +| REMSIM_BANKD_STATE | CONNECTED | FSM state of the connection to remsim-bankd +| REMSIM_CLIENT_SLOT | 23:42 | Client ID and Client Slot Number +| REMSIM_BANKD_SLOT | 55:33 | Bank ID and Bank Slot Number +| REMSIM_USB_PATH | 2-1.1 | USB path of the USB device with simtrace2 cardem firmware +| REMSIM_USB_INTERFACE | 1 | Interface number of the USB device with simtrace2 cardem firmware +| REMSIM_SIM_VCC | 1 | Whether or not the modem currently applies SIM VCC (0/1) +| REMSIM_SIM_RST | 1 | Whether or not the modem currently asserts SIM RST (0=inactive, 1=active) +| REMSIM_CAUSE | request-card-insert | The cause why this script has been called +|=== + +==== REMSIM_CAUSE values + +The REMSIM_CAUSE environment variable (as well as the first argument) passed to the helper +script indicated why the script has been called. + +[options="header",cols="25%,75%"] +|=== +| Name | Description +| event-modem-status | The SIM card interface status has changed (e.g. VCC/RST change) +| event-bankd-connect | A logical RSPRO connection to a bankd has been established +| event-server-connect | A logical RSPRO connection to a server has been established +| event-config-bankd | The server has instructed the client of the bankd address +| request-card-insert | The client asks the system to simulate SIM card insertion to the modem +| request-card-remove | The client asks the system to simulate SIM card removal from the modem +| request-sim-remote | The client asks the system to switch to remote SIM +| request-sim-local | The client asks the system to switch to local SIM +| request-modem-reset | The client asks the system to perform a modem reset +|=== diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c index 846ce85..ce8ea1d 100644 --- a/src/client/simtrace2-remsim_client.c +++ b/src/client/simtrace2-remsim_client.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -130,6 +131,77 @@ return 0; } +/* build the (additional) environment for executing a script */ +static char **build_script_env(struct bankd_client *clnt, const char *cause) +{ + struct cardem_inst *ci = clnt->cardem; + char **env = talloc_zero_size(clnt, 256*sizeof(char *)); + int i = 0; + + if (!env) + return NULL; + + env[i++] = talloc_asprintf(env, "REMSIM_CLIENT_VERSION=%s", VERSION); + + env[i++] = talloc_asprintf(env, "REMSIM_SERVER_ADDR=%s:%u", + clnt->srv_conn.server_host, clnt->srv_conn.server_port); + env[i++] = talloc_asprintf(env, "REMSIM_SERVER_STATE=%s", + osmo_fsm_inst_state_name(clnt->srv_conn.fi)); + + env[i++] = talloc_asprintf(env, "REMSIM_BANKD_ADDR=%s:%u", + clnt->bankd_conn.server_host, clnt->bankd_conn.server_port); + env[i++] = talloc_asprintf(env, "REMSIM_BANKD_STATE=%s", + osmo_fsm_inst_state_name(clnt->bankd_conn.fi)); + + + if (clnt->srv_conn.clslot) { + env[i++] = talloc_asprintf(env, "REMSIM_CLIENT_SLOT=%lu:%lu", + g_client->srv_conn.clslot->clientId, + g_client->srv_conn.clslot->slotNr); + } + env[i++] = talloc_asprintf(env, "REMSIM_BANKD_SLOT=%u:%u", + clnt->bankd_slot.bank_id, clnt->bankd_slot.slot_nr); + + env[i++] = talloc_asprintf(env, "REMSIM_USB_PATH=%s", ci->usb_path); + env[i++] = talloc_asprintf(env, "REMSIM_USB_INTERFACE=%u", clnt->cfg->usb.if_num); + + /* TODO: SIM card state VCC/CLK/RST */ + env[i++] = talloc_asprintf(env, "REMSIM_SIM_VCC=%u", + !!(ci->last_status.flags & CEMU_STATUS_F_VCC_PRESENT)); + env[i++] = talloc_asprintf(env, "REMSIM_SIM_RST=%u", + !!(ci->last_status.flags & CEMU_STATUS_F_RESET_ACTIVE)); + + env[i++] = talloc_asprintf(env, "REMSIM_CAUSE=%s", cause); + + /* terminate last entry */ + env[i++] = NULL; + return env; +} + +static int call_script(struct bankd_client *clnt, const char *cause) +{ + char **env, *cmd; + int rc; + + if (!clnt->cfg->event_script) + return 0; + + env = build_script_env(clnt, cause); + if (!env) + return -ENOMEM; + + cmd = talloc_asprintf(env, "%s %s", clnt->cfg->event_script, cause); + if (!cmd) { + talloc_free(env); + return -ENOMEM; + } + + rc = osmo_system_nowait(cmd, osmo_environment_whitelist, env); + talloc_free(env); + + return rc; +} + /*********************************************************************** * SIMTRACE core protocol ***********************************************************************/ @@ -548,6 +620,7 @@ if (ci->last_status.flags != status->flags) { ci->last_status = *status; + call_script(g_client, "event-modem-status"); } else ci->last_status = *status; @@ -754,6 +827,7 @@ /* Store 'identity' of bankd to in peer_comp_id */ rspro_comp_id_retrieve(&bankdc->peer_comp_id, &pdu->msg.choice.connectClientRes.identity); osmo_fsm_inst_dispatch(bankdc->fi, SRVC_E_CLIENT_CONN_RES, (void *) pdu); + call_script(g_client, "event-bankd-connect"); break; case RsproPDUchoice_PR_tpduCardToModem: // APDU response from card received bankd_handle_tpduCardToModem(g_client, pdu); @@ -780,6 +854,7 @@ /* Store 'identity' of server in srvc->peer_comp_id */ rspro_comp_id_retrieve(&srvc->peer_comp_id, &pdu->msg.choice.connectClientRes.identity); osmo_fsm_inst_dispatch(srvc->fi, SRVC_E_CLIENT_CONN_RES, (void *) pdu); + call_script(g_client, "event-server-connect"); break; case RsproPDUchoice_PR_configClientIdReq: /* store/set the clientID as instructed by the server */ @@ -804,6 +879,7 @@ /* send response to server */ resp = rspro_gen_ConfigClientBankRes(ResultCode_ok); server_conn_send_rspro(srvc, resp); + call_script(g_client, "event-config-bankd"); break; default: LOGPFSML(srvc->fi, LOGL_ERROR, "Unknown/Unsupported RSPRO PDU type: %s\n", @@ -847,6 +923,7 @@ "\t-A\t--usb-address\tADDRESS\n" "\t-H\t--usb-path\tPATH\n" "\t-a\t--atr\tATR\n" + "\t-e\t--event-script\tPATH\n" "\n" ); } @@ -898,6 +975,7 @@ { "usb-address", 1, 0, 'A' }, { "usb-path", 1, 0, 'H' }, { "atr", 1, 0, 'a' }, + { "event-script", 1, 0, 'e' }, { NULL, 0, 0, 0 } }; int c, rc; @@ -905,7 +983,7 @@ while (1) { int option_index = 0; - c = getopt_long(argc, argv, "s:p:c:n:hvi:kV:P:C:I:S:A:H:a:", opts, &option_index); + c = getopt_long(argc, argv, "s:p:c:n:hvi:kV:P:C:I:S:A:H:a:e:", opts, &option_index); if (c == -1) break; switch (c) { @@ -964,6 +1042,9 @@ } cfg->atr.len = rc; break; + case 'e': + osmo_talloc_replace_string(cfg, &cfg->event_script, optarg); + break; } } @@ -1062,9 +1143,11 @@ /* simulate card-insert to modem (owhw, not qmod) */ cardem_request_card_insert(ci, true); + call_script(g_client, "request-card-insert"); /* select remote (forwarded) SIM */ st_modem_sim_select_remote(ci->slot); + call_script(g_client, "request-sim-remote"); /* set the ATR */ //atr_update_csum(real_atr, sizeof(real_atr)); @@ -1072,6 +1155,7 @@ /* select remote (forwarded) SIM */ st_modem_reset_pulse(ci->slot, 300); + call_script(g_client, "request-modem-reset"); printf("Entering main loop\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16629 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I61cf4d93c669db137de801f8b147dcffaa6f3abd Gerrit-Change-Number: 16629 Gerrit-PatchSet: 8 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:46:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:46:50 +0000 Subject: Change in osmo-remsim[master]: client: Adjust to API changes; enable build of remsim-client again In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17155 ) Change subject: client: Adjust to API changes; enable build of remsim-client again ...................................................................... client: Adjust to API changes; enable build of remsim-client again There were quite a bit of API changes that hadn't yet been applied to remsim_client.c (which was disabled and hence not compiled for quite some time). Change-Id: I0b3733f6851a951ee24ae87aa5db0ee8daa7a841 --- M src/client/Makefile.am M src/client/remsim_client.c 2 files changed, 22 insertions(+), 69 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/client/Makefile.am b/src/client/Makefile.am index 106bc5e..3d4f355 100644 --- a/src/client/Makefile.am +++ b/src/client/Makefile.am @@ -4,7 +4,7 @@ $(OSMOSIMTRACE2_CFLAGS) \ -I$(top_srcdir)/include/osmocom/rspro -bin_PROGRAMS = osmo-remsim-client-st2 +bin_PROGRAMS = osmo-remsim-client-st2 remsim-client remsim_client_SOURCES = remsim_client.c ../rspro_client_fsm.c ../debug.c remsim_client_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ diff --git a/src/client/remsim_client.c b/src/client/remsim_client.c index ca6143e..41361c0 100644 --- a/src/client/remsim_client.c +++ b/src/client/remsim_client.c @@ -42,80 +42,25 @@ #include "client.h" #include "debug.h" -static int bankd_handle_msg(struct bankd_client *bc, struct msgb *msg) +static int bankd_handle_rx(struct rspro_server_conn *bankdc, const RsproPDU_t *pdu) { - RsproPDU_t *pdu = rspro_dec_msg(msg); - if (!pdu) { - LOGPFSML(bc->bankd_fi, LOGL_ERROR, "Error decoding PDU\n"); - return -1; - } - - LOGPFSM(bc->bankd_fi, "Rx RSPRO %s\n", rspro_msgt_name(pdu)); - switch (pdu->msg.present) { case RsproPDUchoice_PR_connectClientRes: /* Store 'identity' of bankd to in peer_comp_id */ - rspro_comp_id_retrieve(&bc->peer_comp_id, &pdu->msg.choice.connectClientRes.identity); - osmo_fsm_inst_dispatch(bc->bankd_fi, BDC_E_CLIENT_CONN_RES, pdu); + rspro_comp_id_retrieve(&bankdc->peer_comp_id, &pdu->msg.choice.connectClientRes.identity); + osmo_fsm_inst_dispatch(bankdc->fi, SRVC_E_CLIENT_CONN_RES, (void *) pdu); break; + case RsproPDUchoice_PR_tpduCardToModem: + case RsproPDUchoice_PR_setAtrReq: default: - LOGPFSML(bc->bankd_fi, LOGL_ERROR, "Unknown/Unsuppoerted RSPRO PDU %s: %s\n", - rspro_msgt_name(pdu), msgb_hexdump(msg)); + LOGPFSML(bankdc->fi, LOGL_ERROR, "Unknown/Unsupported RSPRO PDU %s\n", + rspro_msgt_name(pdu)); return -1; } return 0; } -int bankd_read_cb(struct ipa_client_conn *conn, struct msgb *msg) -{ - struct ipaccess_head *hh = (struct ipaccess_head *) msg->data; - struct ipaccess_head_ext *he = (struct ipaccess_head_ext *) msgb_l2(msg); - struct bankd_client *bc = conn->data; - int rc; - - if (msgb_length(msg) < sizeof(*hh)) - goto invalid; - msg->l2h = &hh->data[0]; - switch (hh->proto) { - case IPAC_PROTO_IPACCESS: - rc = ipaccess_bts_handle_ccm(conn, &bc->srv_conn.ipa_dev, msg); - if (rc < 0) - break; - switch (hh->data[0]) { - case IPAC_MSGT_PONG: - ipa_keepalive_fsm_pong_received(bc->srv_conn.keepalive_fi); - rc = 0; - break; - default: - break; - } - break; - case IPAC_PROTO_OSMO: - if (!he || msgb_l2len(msg) < sizeof(*he)) - goto invalid; - msg->l2h = &he->data[0]; - switch (he->proto) { - case IPAC_PROTO_EXT_RSPRO: - LOGPFSML(bc->bankd_fi, LOGL_DEBUG, "Received RSPRO %s\n", msgb_hexdump(msg)); - rc = bankd_handle_msg(bc, msg); - break; - default: - goto invalid; - } - break; - default: - goto invalid; - } - - msgb_free(msg); - return rc; - -invalid: - msgb_free(msg); - return -1; -} - static struct bankd_client *g_client; static void *g_tall_ctx; void __thread *talloc_asn1_ctx; @@ -137,18 +82,21 @@ if (!g_client->srv_conn.clslot) g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); *g_client->srv_conn.clslot = pdu->msg.choice.configClientIdReq.clientSlot; + if (!g_client->bankd_conn.clslot) + g_client->bankd_conn.clslot = talloc_zero(g_client, ClientSlot_t); + *g_client->bankd_conn.clslot = *g_client->srv_conn.clslot; /* send response to server */ resp = rspro_gen_ConfigClientIdRes(ResultCode_ok); server_conn_send_rspro(srvc, resp); break; case RsproPDUchoice_PR_configClientBankReq: /* store/set the bankd ip/port as instructed by the server */ - osmo_talloc_replace_string(g_client, &g_client->bankd_host, + osmo_talloc_replace_string(g_client, &g_client->bankd_conn.server_host, rspro_IpAddr2str(&pdu->msg.choice.configClientBankReq.bankd.ip)); - g_client->bankd_port = pdu->msg.choice.configClientBankReq.bankd.port; rspro2bank_slot(&g_client->bankd_slot, &pdu->msg.choice.configClientBankReq.bankSlot); + g_client->bankd_conn.server_port = pdu->msg.choice.configClientBankReq.bankd.port; /* instruct bankd FSM to connect */ - osmo_fsm_inst_dispatch(g_client->bankd_fi, BDC_E_ESTABLISH, NULL); + osmo_fsm_inst_dispatch(g_client->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); /* send response to server */ resp = rspro_gen_ConfigClientBankRes(ResultCode_ok); server_conn_send_rspro(srvc, resp); @@ -226,7 +174,7 @@ int main(int argc, char **argv) { - struct rspro_server_conn *srvc; + struct rspro_server_conn *srvc, *bankdc; int rc; g_tall_ctx = talloc_named_const(NULL, 0, "global"); @@ -259,8 +207,13 @@ asn_debug = 0; - if (bankd_conn_fsm_alloc(g_client) < 0) { - fprintf(stderr, "Unable to connect: %s\n", strerror(errno)); + bankdc = &g_client->bankd_conn; + /* server_host / server_port are configured from remsim-server */ + bankdc->handle_rx = bankd_handle_rx; + memcpy(&bankdc->own_comp_id, &srvc->own_comp_id, sizeof(bankdc->own_comp_id)); + rc = server_conn_fsm_alloc(g_client, bankdc); + if (rc < 0) { + fprintf(stderr, "Unable to connect bankd conn FSM: %s\n", strerror(errno)); exit(1); } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17155 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I0b3733f6851a951ee24ae87aa5db0ee8daa7a841 Gerrit-Change-Number: 17155 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:46:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:46:50 +0000 Subject: Change in osmo-remsim[master]: client: Add new osmo-remsim-client-shell binary In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17156 ) Change subject: client: Add new osmo-remsim-client-shell binary ...................................................................... client: Add new osmo-remsim-client-shell binary This is a remsim-client with an interactive 'shell', where the user can type in C-APDUs in hex formats, which will be sent to the bankd / SIM-card. Responses received from SIM Card via bankd will be printed in return. Change-Id: I636505fd9741833ccf5cbd1bcac30f7b9aa94425 --- M src/client/Makefile.am M src/client/client.h M src/client/remsim_client.c M src/client/simtrace2-remsim_client.c A src/client/user_shell.c 5 files changed, 182 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/client/Makefile.am b/src/client/Makefile.am index 3d4f355..ec99818 100644 --- a/src/client/Makefile.am +++ b/src/client/Makefile.am @@ -4,10 +4,11 @@ $(OSMOSIMTRACE2_CFLAGS) \ -I$(top_srcdir)/include/osmocom/rspro -bin_PROGRAMS = osmo-remsim-client-st2 remsim-client +bin_PROGRAMS = osmo-remsim-client-st2 osmo-remsim-client-shell -remsim_client_SOURCES = remsim_client.c ../rspro_client_fsm.c ../debug.c -remsim_client_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ +osmo_remsim_client_shell_SOURCES = user_shell.c \ + remsim_client.c ../rspro_client_fsm.c ../debug.c +osmo_remsim_client_shell_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ $(top_builddir)/src/libosmo-rspro.la osmo_remsim_client_st2_SOURCES = simtrace2-remsim_client.c \ diff --git a/src/client/client.h b/src/client/client.h index 7cc7ec1..b3001ee 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -56,3 +56,10 @@ struct client_config *cfg; struct cardem_inst *cardem; }; + + +extern struct bankd_client *g_client; + +extern int client_user_bankd_handle_rx(struct rspro_server_conn *bankdc, const RsproPDU_t *pdu); + +extern int client_user_main(struct bankd_client *g_client); diff --git a/src/client/remsim_client.c b/src/client/remsim_client.c index 41361c0..dbe983b 100644 --- a/src/client/remsim_client.c +++ b/src/client/remsim_client.c @@ -52,6 +52,7 @@ break; case RsproPDUchoice_PR_tpduCardToModem: case RsproPDUchoice_PR_setAtrReq: + return client_user_bankd_handle_rx(bankdc, pdu); default: LOGPFSML(bankdc->fi, LOGL_ERROR, "Unknown/Unsupported RSPRO PDU %s\n", rspro_msgt_name(pdu)); @@ -61,7 +62,7 @@ return 0; } -static struct bankd_client *g_client; +struct bankd_client *g_client; static void *g_tall_ctx; void __thread *talloc_asn1_ctx; int asn_debug; @@ -161,7 +162,7 @@ g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); g_client->srv_conn.clslot->clientId = atoi(optarg); break; - case 's': + case 'n': if (!g_client->srv_conn.clslot) g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); g_client->srv_conn.clslot->slotNr = atoi(optarg); @@ -185,6 +186,7 @@ g_client = talloc_zero(g_tall_ctx, struct bankd_client); + /* create and [attempt to] establish connection to remsim-server */ srvc = &g_client->srv_conn; srvc->server_host = "localhost"; srvc->server_port = 9998; @@ -208,6 +210,11 @@ asn_debug = 0; bankdc = &g_client->bankd_conn; + if (srvc->clslot) { + bankdc->clslot = talloc_zero(g_client, ClientSlot_t); + *bankdc->clslot = *srvc->clslot; + } + /* server_host / server_port are configured from remsim-server */ bankdc->handle_rx = bankd_handle_rx; memcpy(&bankdc->own_comp_id, &srvc->own_comp_id, sizeof(bankdc->own_comp_id)); @@ -216,8 +223,7 @@ fprintf(stderr, "Unable to connect bankd conn FSM: %s\n", strerror(errno)); exit(1); } + osmo_fsm_inst_update_id(bankdc->fi, "bankd"); - while (1) { - osmo_select_main(0); - } + client_user_main(g_client); } diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c index ce8ea1d..bee8fc9 100644 --- a/src/client/simtrace2-remsim_client.c +++ b/src/client/simtrace2-remsim_client.c @@ -94,7 +94,7 @@ /* global GSMTAP instance */ static struct gsmtap_inst *g_gti; -static struct bankd_client *g_client; +struct bankd_client *g_client; static void *g_tall_ctx; void __thread *talloc_asn1_ctx; int asn_debug; diff --git a/src/client/user_shell.c b/src/client/user_shell.c new file mode 100644 index 0000000..db36aab --- /dev/null +++ b/src/client/user_shell.c @@ -0,0 +1,159 @@ +#include +#include + +#include + +#include "client.h" + +/* This is a remsim-client with an interactive 'shell', where the user + * can type in C-APDUs in hex formats, which will be sent to the bankd / + * SIM-card. Responses received from SIM Card via bankd will be printed + * in return. */ + + +/*********************************************************************** + * Incoming RSPRO messages from bank-daemon (SIM card) + ***********************************************************************/ + +static int bankd_handle_tpduCardToModem(struct bankd_client *bc, const RsproPDU_t *pdu) +{ + OSMO_ASSERT(pdu); + OSMO_ASSERT(RsproPDUchoice_PR_tpduCardToModem == pdu->msg.present); + + const struct TpduCardToModem *card2modem = &pdu->msg.choice.tpduCardToModem; + + printf("R-APDU: %s\n", osmo_hexdump(card2modem->data.buf, card2modem->data.size)); + + return 0; +} + +static int bankd_handle_setAtrReq(struct bankd_client *bc, const RsproPDU_t *pdu) +{ + RsproPDU_t *resp; + + OSMO_ASSERT(pdu); + OSMO_ASSERT(RsproPDUchoice_PR_setAtrReq == pdu->msg.present); + + printf("SET_ATR: %s\n", osmo_hexdump(pdu->msg.choice.setAtrReq.atr.buf, + pdu->msg.choice.setAtrReq.atr.size)); + + resp = rspro_gen_SetAtrRes(ResultCode_ok); + if (!resp) + return -ENOMEM; + server_conn_send_rspro(&bc->bankd_conn, resp); + + return 0; +} + + +int client_user_bankd_handle_rx(struct rspro_server_conn *bankdc, const RsproPDU_t *pdu) +{ + switch (pdu->msg.present) { + case RsproPDUchoice_PR_tpduCardToModem: + bankd_handle_tpduCardToModem(g_client, pdu); + break; + case RsproPDUchoice_PR_setAtrReq: + bankd_handle_setAtrReq(g_client, pdu); + break; + default: + OSMO_ASSERT(0); + } + return 0; +} + +/*********************************************************************** + * Incoming command from the user application (stdin shell in our case) + ***********************************************************************/ + +struct stdin_state { + struct osmo_fd ofd; + struct msgb *rx_msg; +}; + +/* called every time a command on stdin was received */ +static void handle_stdin_command(struct stdin_state *ss, char *cmd) +{ + RsproPDU_t *pdu; + BankSlot_t bslot; + uint8_t buf[1024]; + int rc; + + bank_slot2rspro(&bslot, &g_client->bankd_slot); + + OSMO_ASSERT(ss->rx_msg); + + printf("stdin: `%s'\n", cmd); + + if (!strcasecmp(cmd, "RESET")) { + /* reset the [remote] card */ + pdu = rspro_gen_ClientSlotStatusInd(g_client->srv_conn.clslot, &bslot, + true, false, false, true); + server_conn_send_rspro(&g_client->bankd_conn, pdu); + } else { + /* we assume the user has entered a C-APDU as hex string. parse + send */ + rc = osmo_hexparse(cmd, buf, sizeof(buf)); + if (rc < 0) { + fprintf(stderr, "ERROR parsing C-APDU `%s'!\n", cmd); + return; + } + if (!g_client->srv_conn.clslot) { + fprintf(stderr, "Cannot send command; no client slot\n"); + return; + } + + /* Send CMD APDU to [remote] card */ + pdu = rspro_gen_TpduModem2Card(g_client->srv_conn.clslot, &bslot, buf, rc); + server_conn_send_rspro(&g_client->bankd_conn, pdu); + } +} + +/* call-back function for stdin read. Gather bytes in buffer until CR/LF received */ +static int stdin_fd_cb(struct osmo_fd *ofd, unsigned int what) +{ + struct stdin_state *ss = ofd->data; + char *cur; + int rc, i; + + OSMO_ASSERT(what & OSMO_FD_READ); + + if (!ss->rx_msg) { + ss->rx_msg = msgb_alloc(1024, "stdin"); + OSMO_ASSERT(ss->rx_msg); + } + + cur = (char *) ss->rx_msg->tail; + rc = read(ofd->fd, cur, msgb_tailroom(ss->rx_msg)); + if (rc < 0) + return rc; + msgb_put(ss->rx_msg, rc); + + for (i = 0; i < rc; i++) { + if (cur[i] == '\r' || cur[i] == '\n') { + cur[i] = '\0'; + /* dispatch the command */ + handle_stdin_command(ss, cur); + /* FIXME: possibly other commands */ + msgb_free(ss->rx_msg); + ss->rx_msg = NULL; + } + } + + return 0; +} + + + +/* main function */ +int client_user_main(struct bankd_client *g_client) +{ + struct stdin_state ss; + + /* register stdin file descriptor with osmocom select loop abstraction */ + memset(&ss, 0, sizeof(ss)); + osmo_fd_setup(&ss.ofd, fileno(stdin), OSMO_FD_READ, &stdin_fd_cb, &ss, 0); + osmo_fd_register(&ss.ofd); + + while (1) { + osmo_select_main(0); + } +} -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17156 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I636505fd9741833ccf5cbd1bcac30f7b9aa94425 Gerrit-Change-Number: 17156 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:46:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:46:50 +0000 Subject: Change in osmo-remsim[master]: client: Work without global g_client variable In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17157 ) Change subject: client: Work without global g_client variable ...................................................................... client: Work without global g_client variable We may want to develop programs that include multiple instances of a remsim_client. Let's remove the global variable 'g_client' and instead de-reference the bankd_client using container_of() macros Change-Id: I456fb633561b88912be2f78c3e0264794d921255 --- M src/client/client.h M src/client/remsim_client.c M src/client/user_shell.c 3 files changed, 28 insertions(+), 21 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/client/client.h b/src/client/client.h index b3001ee..0239b55 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -57,8 +58,9 @@ struct cardem_inst *cardem; }; +#define srvc2bankd_client(srvc) container_of(srvc, struct bankd_client, srv_conn) +#define bankdc2bankd_client(bdc) container_of(bdc, struct bankd_client, bankd_conn) -extern struct bankd_client *g_client; extern int client_user_bankd_handle_rx(struct rspro_server_conn *bankdc, const RsproPDU_t *pdu); diff --git a/src/client/remsim_client.c b/src/client/remsim_client.c index dbe983b..496e1f4 100644 --- a/src/client/remsim_client.c +++ b/src/client/remsim_client.c @@ -62,7 +62,7 @@ return 0; } -struct bankd_client *g_client; +static struct bankd_client *g_client; static void *g_tall_ctx; void __thread *talloc_asn1_ctx; int asn_debug; @@ -70,6 +70,7 @@ /* handle incoming messages from server */ static int srvc_handle_rx(struct rspro_server_conn *srvc, const RsproPDU_t *pdu) { + struct bankd_client *bc = srvc2bankd_client(srvc); RsproPDU_t *resp; switch (pdu->msg.present) { @@ -80,24 +81,24 @@ break; case RsproPDUchoice_PR_configClientIdReq: /* store/set the clientID as instructed by the server */ - if (!g_client->srv_conn.clslot) - g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); - *g_client->srv_conn.clslot = pdu->msg.choice.configClientIdReq.clientSlot; - if (!g_client->bankd_conn.clslot) - g_client->bankd_conn.clslot = talloc_zero(g_client, ClientSlot_t); - *g_client->bankd_conn.clslot = *g_client->srv_conn.clslot; + if (!srvc->clslot) + srvc->clslot = talloc_zero(srvc, ClientSlot_t); + *srvc->clslot = pdu->msg.choice.configClientIdReq.clientSlot; + if (!bc->bankd_conn.clslot) + bc->bankd_conn.clslot = talloc_zero(bc, ClientSlot_t); + *bc->bankd_conn.clslot = *bc->srv_conn.clslot; /* send response to server */ resp = rspro_gen_ConfigClientIdRes(ResultCode_ok); server_conn_send_rspro(srvc, resp); break; case RsproPDUchoice_PR_configClientBankReq: /* store/set the bankd ip/port as instructed by the server */ - osmo_talloc_replace_string(g_client, &g_client->bankd_conn.server_host, + osmo_talloc_replace_string(bc, &bc->bankd_conn.server_host, rspro_IpAddr2str(&pdu->msg.choice.configClientBankReq.bankd.ip)); - rspro2bank_slot(&g_client->bankd_slot, &pdu->msg.choice.configClientBankReq.bankSlot); - g_client->bankd_conn.server_port = pdu->msg.choice.configClientBankReq.bankd.port; + rspro2bank_slot(&bc->bankd_slot, &pdu->msg.choice.configClientBankReq.bankSlot); + bc->bankd_conn.server_port = pdu->msg.choice.configClientBankReq.bankd.port; /* instruct bankd FSM to connect */ - osmo_fsm_inst_dispatch(g_client->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); + osmo_fsm_inst_dispatch(bc->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); /* send response to server */ resp = rspro_gen_ConfigClientBankRes(ResultCode_ok); server_conn_send_rspro(srvc, resp); diff --git a/src/client/user_shell.c b/src/client/user_shell.c index db36aab..d5cad7b 100644 --- a/src/client/user_shell.c +++ b/src/client/user_shell.c @@ -48,12 +48,13 @@ int client_user_bankd_handle_rx(struct rspro_server_conn *bankdc, const RsproPDU_t *pdu) { + struct bankd_client *client = bankdc2bankd_client(bankdc); switch (pdu->msg.present) { case RsproPDUchoice_PR_tpduCardToModem: - bankd_handle_tpduCardToModem(g_client, pdu); + bankd_handle_tpduCardToModem(client, pdu); break; case RsproPDUchoice_PR_setAtrReq: - bankd_handle_setAtrReq(g_client, pdu); + bankd_handle_setAtrReq(client, pdu); break; default: OSMO_ASSERT(0); @@ -68,17 +69,19 @@ struct stdin_state { struct osmo_fd ofd; struct msgb *rx_msg; + struct bankd_client *bc; }; /* called every time a command on stdin was received */ static void handle_stdin_command(struct stdin_state *ss, char *cmd) { + struct bankd_client *bc = ss->bc; RsproPDU_t *pdu; BankSlot_t bslot; uint8_t buf[1024]; int rc; - bank_slot2rspro(&bslot, &g_client->bankd_slot); + bank_slot2rspro(&bslot, &bc->bankd_slot); OSMO_ASSERT(ss->rx_msg); @@ -86,9 +89,9 @@ if (!strcasecmp(cmd, "RESET")) { /* reset the [remote] card */ - pdu = rspro_gen_ClientSlotStatusInd(g_client->srv_conn.clslot, &bslot, + pdu = rspro_gen_ClientSlotStatusInd(bc->srv_conn.clslot, &bslot, true, false, false, true); - server_conn_send_rspro(&g_client->bankd_conn, pdu); + server_conn_send_rspro(&bc->bankd_conn, pdu); } else { /* we assume the user has entered a C-APDU as hex string. parse + send */ rc = osmo_hexparse(cmd, buf, sizeof(buf)); @@ -96,14 +99,14 @@ fprintf(stderr, "ERROR parsing C-APDU `%s'!\n", cmd); return; } - if (!g_client->srv_conn.clslot) { + if (!bc->srv_conn.clslot) { fprintf(stderr, "Cannot send command; no client slot\n"); return; } /* Send CMD APDU to [remote] card */ - pdu = rspro_gen_TpduModem2Card(g_client->srv_conn.clslot, &bslot, buf, rc); - server_conn_send_rspro(&g_client->bankd_conn, pdu); + pdu = rspro_gen_TpduModem2Card(bc->srv_conn.clslot, &bslot, buf, rc); + server_conn_send_rspro(&bc->bankd_conn, pdu); } } @@ -144,7 +147,7 @@ /* main function */ -int client_user_main(struct bankd_client *g_client) +int client_user_main(struct bankd_client *bc) { struct stdin_state ss; @@ -152,6 +155,7 @@ memset(&ss, 0, sizeof(ss)); osmo_fd_setup(&ss.ofd, fileno(stdin), OSMO_FD_READ, &stdin_fd_cb, &ss, 0); osmo_fd_register(&ss.ofd); + ss.bc = bc; while (1) { osmo_select_main(0); -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17157 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I456fb633561b88912be2f78c3e0264794d921255 Gerrit-Change-Number: 17157 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:46:51 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:46:51 +0000 Subject: Change in osmo-remsim[master]: client: Remove g_client completely; separate 'main' code In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17158 ) Change subject: client: Remove g_client completely; separate 'main' code ...................................................................... client: Remove g_client completely; separate 'main' code We may want to use the entire client code independent of the current 'main' portion, so let's introduce separation via API. Change-Id: I6456317c3968551cd69ba379c746e4dd9690d02d --- M src/client/client.h M src/client/remsim_client.c 2 files changed, 92 insertions(+), 60 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/client/client.h b/src/client/client.h index 0239b55..80381fa 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -61,6 +61,9 @@ #define srvc2bankd_client(srvc) container_of(srvc, struct bankd_client, srv_conn) #define bankdc2bankd_client(bdc) container_of(bdc, struct bankd_client, bankd_conn) +struct bankd_client *remsim_client_create(void *ctx, const char *name, const char *software); +void remsim_client_set_clslot(struct bankd_client *bc, int client_id, int slot_nr); + extern int client_user_bankd_handle_rx(struct rspro_server_conn *bankdc, const RsproPDU_t *pdu); diff --git a/src/client/remsim_client.c b/src/client/remsim_client.c index 496e1f4..7ff8f37 100644 --- a/src/client/remsim_client.c +++ b/src/client/remsim_client.c @@ -1,4 +1,4 @@ -/* (C) 2018-2019 by Harald Welte +/* (C) 2018-2020 by Harald Welte * * All Rights Reserved * @@ -22,21 +22,12 @@ #include #include -#include - -#define _GNU_SOURCE -#include #include -#include #include #include #include -#include - -#include -#include #include "rspro_util.h" #include "client.h" @@ -62,11 +53,6 @@ return 0; } -static struct bankd_client *g_client; -static void *g_tall_ctx; -void __thread *talloc_asn1_ctx; -int asn_debug; - /* handle incoming messages from server */ static int srvc_handle_rx(struct rspro_server_conn *srvc, const RsproPDU_t *pdu) { @@ -112,6 +98,82 @@ return 0; } +struct bankd_client *remsim_client_create(void *ctx, const char *name, const char *software) +{ + struct bankd_client *bc = talloc_zero(ctx, struct bankd_client); + struct rspro_server_conn *srvc, *bankdc; + int rc; + + if (!bc) + return NULL; + + /* create and [attempt to] establish connection to remsim-server */ + srvc = &bc->srv_conn; + srvc->server_host = "localhost"; + srvc->server_port = 9998; + srvc->handle_rx = srvc_handle_rx; + srvc->own_comp_id.type = ComponentType_remsimClient; + OSMO_STRLCPY_ARRAY(srvc->own_comp_id.name, name); + OSMO_STRLCPY_ARRAY(srvc->own_comp_id.software, software); + OSMO_STRLCPY_ARRAY(srvc->own_comp_id.sw_version, PACKAGE_VERSION); + + rc = server_conn_fsm_alloc(bc, srvc); + if (rc < 0) { + fprintf(stderr, "Unable to create Server conn FSM: %s\n", strerror(errno)); + exit(1); + } + + bankdc = &bc->bankd_conn; + /* server_host / server_port are configured from remsim-server */ + bankdc->handle_rx = bankd_handle_rx; + memcpy(&bankdc->own_comp_id, &srvc->own_comp_id, sizeof(bankdc->own_comp_id)); + rc = server_conn_fsm_alloc(bc, bankdc); + if (rc < 0) { + fprintf(stderr, "Unable to connect bankd conn FSM: %s\n", strerror(errno)); + exit(1); + } + osmo_fsm_inst_update_id(bankdc->fi, "bankd"); + + return bc; +} + +void remsim_client_set_clslot(struct bankd_client *bc, int client_id, int slot_nr) +{ + if (!bc->srv_conn.clslot) { + bc->srv_conn.clslot = talloc_zero(bc, ClientSlot_t); + OSMO_ASSERT(bc->srv_conn.clslot); + } + + if (!bc->bankd_conn.clslot) { + bc->bankd_conn.clslot = talloc_zero(bc, ClientSlot_t); + OSMO_ASSERT(bc->bankd_conn.clslot); + } + + if (client_id >= 0) { + bc->srv_conn.clslot->clientId = client_id; + bc->bankd_conn.clslot->clientId = client_id; + } + + if (slot_nr >= 0) { + bc->srv_conn.clslot->slotNr = slot_nr; + bc->bankd_conn.clslot->slotNr = slot_nr; + } +} + + + +#include +#include +#define _GNU_SOURCE +#include + +#include +#include + +static void *g_tall_ctx; +void __thread *talloc_asn1_ctx; +int asn_debug; + static void handle_sig_usr1(int signal) { OSMO_ASSERT(signal == SIGUSR1); @@ -129,7 +191,7 @@ ); } -static void handle_options(int argc, char **argv) +static void handle_options(struct bankd_client *bc, int argc, char **argv) { while (1) { int option_index = 0, c; @@ -153,20 +215,16 @@ exit(0); break; case 'i': - g_client->srv_conn.server_host = optarg; + bc->srv_conn.server_host = optarg; break; case 'p': - g_client->srv_conn.server_port = atoi(optarg); + bc->srv_conn.server_port = atoi(optarg); break; case 'c': - if (!g_client->srv_conn.clslot) - g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); - g_client->srv_conn.clslot->clientId = atoi(optarg); + remsim_client_set_clslot(bc, atoi(optarg), -1); break; case 'n': - if (!g_client->srv_conn.clslot) - g_client->srv_conn.clslot = talloc_zero(g_client, ClientSlot_t); - g_client->srv_conn.clslot->slotNr = atoi(optarg); + remsim_client_set_clslot(bc, -1, atoi(optarg)); break; default: break; @@ -176,8 +234,10 @@ int main(int argc, char **argv) { - struct rspro_server_conn *srvc, *bankdc; - int rc; + struct bankd_client *g_client; + char hostname[256]; + + gethostname(hostname, sizeof(hostname)); g_tall_ctx = talloc_named_const(NULL, 0, "global"); talloc_asn1_ctx = talloc_named_const(g_tall_ctx, 0, "asn1"); @@ -185,46 +245,15 @@ osmo_init_logging2(g_tall_ctx, &log_info); - g_client = talloc_zero(g_tall_ctx, struct bankd_client); + g_client = remsim_client_create(g_tall_ctx, hostname, "remsim-client"); - /* create and [attempt to] establish connection to remsim-server */ - srvc = &g_client->srv_conn; - srvc->server_host = "localhost"; - srvc->server_port = 9998; - srvc->handle_rx = srvc_handle_rx; - srvc->own_comp_id.type = ComponentType_remsimClient; - OSMO_STRLCPY_ARRAY(srvc->own_comp_id.name, "fixme-name"); - OSMO_STRLCPY_ARRAY(srvc->own_comp_id.software, "remsim-client"); - OSMO_STRLCPY_ARRAY(srvc->own_comp_id.sw_version, PACKAGE_VERSION); + handle_options(g_client, argc, argv); - handle_options(argc, argv); + osmo_fsm_inst_dispatch(g_client->srv_conn.fi, SRVC_E_ESTABLISH, NULL); signal(SIGUSR1, handle_sig_usr1); - rc = server_conn_fsm_alloc(g_client, srvc); - if (rc < 0) { - fprintf(stderr, "Unable to create Server conn FSM: %s\n", strerror(errno)); - exit(1); - } - osmo_fsm_inst_dispatch(srvc->fi, SRVC_E_ESTABLISH, NULL); - asn_debug = 0; - bankdc = &g_client->bankd_conn; - if (srvc->clslot) { - bankdc->clslot = talloc_zero(g_client, ClientSlot_t); - *bankdc->clslot = *srvc->clslot; - } - - /* server_host / server_port are configured from remsim-server */ - bankdc->handle_rx = bankd_handle_rx; - memcpy(&bankdc->own_comp_id, &srvc->own_comp_id, sizeof(bankdc->own_comp_id)); - rc = server_conn_fsm_alloc(g_client, bankdc); - if (rc < 0) { - fprintf(stderr, "Unable to connect bankd conn FSM: %s\n", strerror(errno)); - exit(1); - } - osmo_fsm_inst_update_id(bankdc->fi, "bankd"); - client_user_main(g_client); } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17158 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I6456317c3968551cd69ba379c746e4dd9690d02d Gerrit-Change-Number: 17158 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:46:51 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:46:51 +0000 Subject: Change in osmo-remsim[master]: client: Split into remsim_client.c and remsim_client_main.c In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17159 ) Change subject: client: Split into remsim_client.c and remsim_client_main.c ...................................................................... client: Split into remsim_client.c and remsim_client_main.c Change-Id: Ie1d21c2cd84756d5c8aa2c41bcc37f5951a3a285 --- M src/client/Makefile.am M src/client/remsim_client.c A src/client/remsim_client_main.c 3 files changed, 99 insertions(+), 99 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/client/Makefile.am b/src/client/Makefile.am index ec99818..ac0d707 100644 --- a/src/client/Makefile.am +++ b/src/client/Makefile.am @@ -6,7 +6,7 @@ bin_PROGRAMS = osmo-remsim-client-st2 osmo-remsim-client-shell -osmo_remsim_client_shell_SOURCES = user_shell.c \ +osmo_remsim_client_shell_SOURCES = user_shell.c remsim_client_main.c \ remsim_client.c ../rspro_client_fsm.c ../debug.c osmo_remsim_client_shell_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ $(top_builddir)/src/libosmo-rspro.la diff --git a/src/client/remsim_client.c b/src/client/remsim_client.c index 7ff8f37..07ffbde 100644 --- a/src/client/remsim_client.c +++ b/src/client/remsim_client.c @@ -159,101 +159,3 @@ bc->bankd_conn.clslot->slotNr = slot_nr; } } - - - -#include -#include -#define _GNU_SOURCE -#include - -#include -#include - -static void *g_tall_ctx; -void __thread *talloc_asn1_ctx; -int asn_debug; - -static void handle_sig_usr1(int signal) -{ - OSMO_ASSERT(signal == SIGUSR1); - talloc_report_full(g_tall_ctx, stderr); -} - -static void printf_help() -{ - printf( - " -h --help Print this help message\n" - " -i --server-ip A.B.C.D remsim-server IP address\n" - " -p --server-port 13245 remsim-server TCP port\n" - " -i --client-id <0-65535> RSPRO ClientId of this client\n" - " -n --client-slot <0-65535> RSPRO SlotNr of this client\n" - ); -} - -static void handle_options(struct bankd_client *bc, int argc, char **argv) -{ - while (1) { - int option_index = 0, c; - static const struct option long_options[] = { - { "help", 0, 0, 'h' }, - { "server-ip", 1, 0, 'i' }, - { "server-port", 1, 0, 'p' }, - { "client-id", 1, 0, 'c' }, - { "client-slot", 1, 0, 'n' }, - { 0, 0, 0, 0 } - }; - - c = getopt_long(argc, argv, "hi:p:c:n:", - long_options, &option_index); - if (c == -1) - break; - - switch (c) { - case 'h': - printf_help(); - exit(0); - break; - case 'i': - bc->srv_conn.server_host = optarg; - break; - case 'p': - bc->srv_conn.server_port = atoi(optarg); - break; - case 'c': - remsim_client_set_clslot(bc, atoi(optarg), -1); - break; - case 'n': - remsim_client_set_clslot(bc, -1, atoi(optarg)); - break; - default: - break; - } - } -} - -int main(int argc, char **argv) -{ - struct bankd_client *g_client; - char hostname[256]; - - gethostname(hostname, sizeof(hostname)); - - g_tall_ctx = talloc_named_const(NULL, 0, "global"); - talloc_asn1_ctx = talloc_named_const(g_tall_ctx, 0, "asn1"); - msgb_talloc_ctx_init(g_tall_ctx, 0); - - osmo_init_logging2(g_tall_ctx, &log_info); - - g_client = remsim_client_create(g_tall_ctx, hostname, "remsim-client"); - - handle_options(g_client, argc, argv); - - osmo_fsm_inst_dispatch(g_client->srv_conn.fi, SRVC_E_ESTABLISH, NULL); - - signal(SIGUSR1, handle_sig_usr1); - - asn_debug = 0; - - client_user_main(g_client); -} diff --git a/src/client/remsim_client_main.c b/src/client/remsim_client_main.c new file mode 100644 index 0000000..95eb089 --- /dev/null +++ b/src/client/remsim_client_main.c @@ -0,0 +1,98 @@ + +#include +#include +#define _GNU_SOURCE +#include + +#include +#include + +#include "client.h" + +static void *g_tall_ctx; +void __thread *talloc_asn1_ctx; +int asn_debug; + +static void handle_sig_usr1(int signal) +{ + OSMO_ASSERT(signal == SIGUSR1); + talloc_report_full(g_tall_ctx, stderr); +} + +static void printf_help() +{ + printf( + " -h --help Print this help message\n" + " -i --server-ip A.B.C.D remsim-server IP address\n" + " -p --server-port 13245 remsim-server TCP port\n" + " -i --client-id <0-65535> RSPRO ClientId of this client\n" + " -n --client-slot <0-65535> RSPRO SlotNr of this client\n" + ); +} + +static void handle_options(struct bankd_client *bc, int argc, char **argv) +{ + while (1) { + int option_index = 0, c; + static const struct option long_options[] = { + { "help", 0, 0, 'h' }, + { "server-ip", 1, 0, 'i' }, + { "server-port", 1, 0, 'p' }, + { "client-id", 1, 0, 'c' }, + { "client-slot", 1, 0, 'n' }, + { 0, 0, 0, 0 } + }; + + c = getopt_long(argc, argv, "hi:p:c:n:", + long_options, &option_index); + if (c == -1) + break; + + switch (c) { + case 'h': + printf_help(); + exit(0); + break; + case 'i': + bc->srv_conn.server_host = optarg; + break; + case 'p': + bc->srv_conn.server_port = atoi(optarg); + break; + case 'c': + remsim_client_set_clslot(bc, atoi(optarg), -1); + break; + case 'n': + remsim_client_set_clslot(bc, -1, atoi(optarg)); + break; + default: + break; + } + } +} + +int main(int argc, char **argv) +{ + struct bankd_client *g_client; + char hostname[256]; + + gethostname(hostname, sizeof(hostname)); + + g_tall_ctx = talloc_named_const(NULL, 0, "global"); + talloc_asn1_ctx = talloc_named_const(g_tall_ctx, 0, "asn1"); + msgb_talloc_ctx_init(g_tall_ctx, 0); + + osmo_init_logging2(g_tall_ctx, &log_info); + + g_client = remsim_client_create(g_tall_ctx, hostname, "remsim-client"); + + handle_options(g_client, argc, argv); + + osmo_fsm_inst_dispatch(g_client->srv_conn.fi, SRVC_E_ESTABLISH, NULL); + + signal(SIGUSR1, handle_sig_usr1); + + asn_debug = 0; + + client_user_main(g_client); +} -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17159 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ie1d21c2cd84756d5c8aa2c41bcc37f5951a3a285 Gerrit-Change-Number: 17159 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:47:49 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:47:49 +0000 Subject: Change in osmo-remsim[master]: server: Send ConfigClientBankReq with bankd_port == 0 on map delete In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17186 to look at the new patch set (#3). Change subject: server: Send ConfigClientBankReq with bankd_port == 0 on map delete ...................................................................... server: Send ConfigClientBankReq with bankd_port == 0 on map delete If a slotmap is deleted via the REST API, don't only remove it from the bankd, but also remove it from the client. Change-Id: Ia2fc2a098471add56cb35e74639417d865704989 Closes: OS#4399 --- M src/server/rspro_server.c 1 file changed, 20 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/86/17186/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ia2fc2a098471add56cb35e74639417d865704989 Gerrit-Change-Number: 17186 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:48:24 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:48:24 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: New TC_slotmap_del_active_client() test In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17187 ) Change subject: remsim: New TC_slotmap_del_active_client() test ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17187 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: I8c4e53231b5386b00fe2938cde2091aa8b2e2027 Gerrit-Change-Number: 17187 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 16 Feb 2020 14:48:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:48:27 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:48:27 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: New TC_slotmap_del_active_client() test In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17187 ) Change subject: remsim: New TC_slotmap_del_active_client() test ...................................................................... remsim: New TC_slotmap_del_active_client() test This test verifies that a slotmap delete via REST will not only delete it from the bankd, but also from the client. Change-Id: I8c4e53231b5386b00fe2938cde2091aa8b2e2027 Related: OS#4399 --- M remsim/RemsimServer_Tests.ttcn 1 file changed, 54 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/remsim/RemsimServer_Tests.ttcn b/remsim/RemsimServer_Tests.ttcn index f0589ef..f2dbc25 100644 --- a/remsim/RemsimServer_Tests.ttcn +++ b/remsim/RemsimServer_Tests.ttcn @@ -390,7 +390,7 @@ f_ensure_slotmaps({}); } -/* simple delete of a 'ACTIVE' slotmap */ +/* simple delete of a 'ACTIVE' slotmap from server + bankd */ testcase TC_slotmap_del_active() runs on test_CT { var ComponentIdentity rspro_id := valueof(ts_CompId(remsimBankd, testcasename())); f_rspro_init(rspro[0], mp_server_ip, mp_server_port, rspro_id, 0); @@ -429,6 +429,58 @@ } +/* simple delete of a 'ACTIVE' slotmap from client */ +testcase TC_slotmap_del_active_client() runs on test_CT { + var ComponentIdentity rspro_id := valueof(ts_CompId(remsimBankd, testcasename())); + f_rspro_init(rspro[0], mp_server_ip, mp_server_port, rspro_id, 0); + rspro[0].rspro_bank_id := 1; + rspro[0].rspro_bank_nslots := 8; + + rspro_id := valueof(ts_CompId(remsimClient, testcasename())); + f_rspro_init(rspro[1], mp_server_ip, mp_server_port, rspro_id, 1); + rspro[1].rspro_client_slot := valueof(ts_ClientSlot(3,4)); + + f_rsres_init(); + var JsSlotmap sm := valueof(ts_JsSlotmap(ts_BankSlot(1,2), ts_ClientSlot(3,4))); + var HTTPResponse res; + + /* Create a new slotmap via HTTP */ + res := f_rsres_post_slotmap(sm); + + /* verify that the slotmap exists and is NEW */ + f_ensure_slotmap_exists_only(sm.client, sm.bank, NEW); + + /* connect a bankd for that slotmap */ + f_rspro_connect_client(0); + + /* connect a client for that slotmap */ + f_rspro_connect_client(1); + + /* expect the slotmap to be pushed to bank and ACK it */ + as_rspro_create_mapping(0, sm.client, sm.bank); + + /* verify that the slotmap exists and is ACTIVE */ + f_ensure_slotmap_exists_only(sm.client, sm.bank, ACTIVE); + + /* expect the client to be configured with bankd side settings */ + as_rspro_cfg_client_bank(1, sm.bank, ?/*FIXME*/); + + f_sleep(1.0); + + /* delete the slotmap via REST */ + res := f_rsres_delete_slotmap(sm.bank); + + /* verify the slotmap is gone from REST interface immediately */ + f_ensure_slotmaps({}); + + /* verify the slotmap is removed from bankd */ + as_rspro_remove_mapping(0, sm.client, sm.bank); + + /* verify the slotmap is removed from client by setting IP/port to '0' */ + as_rspro_cfg_client_bank(1, ?, tr_IpPort(ts_IPv4("0.0.0.0"), 0)); +} + + /* Add a slotmap to a currently active bank */ testcase TC_slotmap_add_active_bank() runs on test_CT { var ComponentIdentity rspro_id := valueof(ts_CompId(remsimBankd, testcasename())); @@ -478,6 +530,7 @@ execute( TC_slotmap_del_new() ); execute( TC_slotmap_del_unack() ); execute( TC_slotmap_del_active() ); + execute( TC_slotmap_del_active_client() ); execute( TC_slotmap_add_active_bank() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17187 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: I8c4e53231b5386b00fe2938cde2091aa8b2e2027 Gerrit-Change-Number: 17187 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:49:30 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:49:30 +0000 Subject: Change in osmo-remsim[master]: server: Send ConfigClientBankReq with bankd_port == 0 on map delete In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17186 ) Change subject: server: Send ConfigClientBankReq with bankd_port == 0 on map delete ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ia2fc2a098471add56cb35e74639417d865704989 Gerrit-Change-Number: 17186 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 16 Feb 2020 14:49:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:51:06 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:51:06 +0000 Subject: Change in osmo-remsim[master]: server: don't dereference map before OSMO_ASSERT() in _update_client_... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17183 ) Change subject: server: don't dereference map before OSMO_ASSERT() in _update_client_for_slotmap() ...................................................................... server: don't dereference map before OSMO_ASSERT() in _update_client_for_slotmap() Change-Id: Ib36d2ba7928ea17a508cb68748e6c50f22784227 --- M src/server/rspro_server.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/server/rspro_server.c b/src/server/rspro_server.c index 0d059fa..723aac8 100644 --- a/src/server/rspro_server.c +++ b/src/server/rspro_server.c @@ -219,7 +219,7 @@ static void _update_client_for_slotmap(struct slot_mapping *map, struct rspro_server *srv, struct rspro_client_conn *bankd_conn) { - struct rspro_client_conn *conn = client_conn_by_slot(srv, &map->client); + struct rspro_client_conn *conn; char ip_str[INET6_ADDRSTRLEN]; char port_str[6]; uint32_t bankd_ip; @@ -230,6 +230,7 @@ OSMO_ASSERT(map); OSMO_ASSERT(srv); + conn = client_conn_by_slot(srv, &map->client); if (!conn) LOGP(DMAIN, LOGL_DEBUG, "%s\n", __func__); else -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ib36d2ba7928ea17a508cb68748e6c50f22784227 Gerrit-Change-Number: 17183 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 14:51:06 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 14:51:06 +0000 Subject: Change in osmo-remsim[master]: server: Send ConfigClientBankReq with bankd_port == 0 on map delete In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17186 ) Change subject: server: Send ConfigClientBankReq with bankd_port == 0 on map delete ...................................................................... server: Send ConfigClientBankReq with bankd_port == 0 on map delete If a slotmap is deleted via the REST API, don't only remove it from the bankd, but also remove it from the client. Change-Id: Ia2fc2a098471add56cb35e74639417d865704989 Closes: OS#4399 --- M src/server/rspro_server.c 1 file changed, 20 insertions(+), 13 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/server/rspro_server.c b/src/server/rspro_server.c index 723aac8..b35800f 100644 --- a/src/server/rspro_server.c +++ b/src/server/rspro_server.c @@ -250,20 +250,25 @@ /* if caller didn't provide bankd_conn, resolve it from map */ if (!bankd_conn) bankd_conn = bankd_conn_by_id(srv, map->bank.bank_id); - if (!bankd_conn) - return; - - /* obtain IP and port of bankd */ - rc = osmo_sock_get_ip_and_port(bankd_conn->peer->ofd.fd, ip_str, sizeof(ip_str), - port_str, sizeof(port_str), false); - if (rc < 0) { - LOGPFSM(bankd_conn->fi, "Error during getpeername\n"); - return; + if (map->state == SLMAP_S_DELETING || !bankd_conn) { + bankd_ip = 0; + bankd_port = 0; + } else { + /* obtain IP and port of bankd */ + rc = osmo_sock_get_ip_and_port(bankd_conn->peer->ofd.fd, ip_str, sizeof(ip_str), + port_str, sizeof(port_str), false); + if (rc < 0) { + LOGPFSM(bankd_conn->fi, "Error during getpeername\n"); + return; + } + bankd_ip = ntohl(inet_addr(ip_str)); + bankd_port = 9999; /* TODO: configurable */ } - bankd_ip = ntohl(inet_addr(ip_str)); - bankd_port = 9999; /* TODO: configurable */ + + /* determine if IP/port of bankd have changed */ if (conn->client.bankd.port != bankd_port || conn->client.bankd.ip != bankd_ip) { - LOGPFSM(conn->fi, "Bankd IP/Port changed to %s:%s\n", ip_str, port_str); + struct in_addr ia = { .s_addr = bankd_ip }; + LOGPFSM(conn->fi, "Bankd IP/Port changed to %s:%u\n", inet_ntoa(ia), bankd_port); conn->client.bankd.ip = bankd_ip; conn->client.bankd.port = bankd_port; changed = true; @@ -371,9 +376,11 @@ break; } slotmaps_unlock(slotmaps); + /* update client! */ + OSMO_ASSERT(map->state == SLMAP_S_DELETING); + _update_client_for_slotmap(map, conn->srv, conn); /* slotmap_del() will remove it from both global and bank list */ slotmap_del(map->maps, map); - /* FIXME: update client! */ break; case CLNTC_E_PUSH: /* check if any create or delete requests are pending */ slotmaps_wrlock(slotmaps); -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17186 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ia2fc2a098471add56cb35e74639417d865704989 Gerrit-Change-Number: 17186 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 15:34:11 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 15:34:11 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: More comments in RemsimClient_Tests References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17189 ) Change subject: remsim: More comments in RemsimClient_Tests ...................................................................... remsim: More comments in RemsimClient_Tests Change-Id: I02363eaaaae6d7b849cd2a1d2b07f1343d58c2f2 --- M remsim/RemsimClient_Tests.ttcn 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/17189/1 diff --git a/remsim/RemsimClient_Tests.ttcn b/remsim/RemsimClient_Tests.ttcn index d5520ab..7bee899 100644 --- a/remsim/RemsimClient_Tests.ttcn +++ b/remsim/RemsimClient_Tests.ttcn @@ -36,6 +36,7 @@ /* ConnectClientReq from client to remsim-server */ testcase TC_srv_connectClient() runs on client_test_CT { f_init(); + /* expect inbound connectClientReq */ as_connectClientReq(); setverdict(pass); f_sleep(1.0); @@ -44,6 +45,7 @@ /* ConnectClientReq from client to remsim-server */ testcase TC_srv_connectClient_reject() runs on client_test_CT { f_init(); + /* expect inbound connectClientReq */ as_connectClientReq(res := illegalClientId); /* expect disconnect by client */ RSPRO_SRV[0].receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_DOWN)); @@ -55,9 +57,13 @@ testcase TC_srv_connectClient_configClientBank() runs on client_test_CT { var BankSlot bslot := { 1, 0 }; f_init(); + /* expect inbound connectClientReq */ as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ as_connectClientReq(i := 1); setverdict(pass); f_sleep(1.0); @@ -67,11 +73,13 @@ testcase TC_srv_reconnect() runs on client_test_CT { var BankSlot bslot := { 1, 0 }; f_init(); + /* expect inbound connectClientReq */ as_connectClientReq(); /* disconnect the client from server and expect re-establish + re-connect */ f_rspro_srv_fini(0); f_rspro_srv_init(0, mp_server_ip, mp_server_port, g_srv_comp_id, exp_connect := true); + /* expect inbound connectClientReq */ as_connectClientReq(i := 0); setverdict(pass); @@ -82,14 +90,19 @@ testcase TC_bank_reconnect() runs on client_test_CT { var BankSlot bslot := { 1, 0 }; f_init(); + /* expect inbound connectClientReq */ as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ as_connectClientReq(i := 1); /* disconnect the client from bankd and expect re-establish + re-connect */ f_rspro_srv_fini(1); f_rspro_srv_init(1, mp_bankd_ip, mp_bankd_port, g_bankd_comp_id, exp_connect := true); + /* expect inbound connectClientReq on simulated bankd */ as_connectClientReq(i := 1); setverdict(pass); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17189 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: I02363eaaaae6d7b849cd2a1d2b07f1343d58c2f2 Gerrit-Change-Number: 17189 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 15:34:12 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sun, 16 Feb 2020 15:34:12 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add client TC_bank_disconnect + TC_bank_disconnect_reconnect References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17190 ) Change subject: remsim: Add client TC_bank_disconnect + TC_bank_disconnect_reconnect ...................................................................... remsim: Add client TC_bank_disconnect + TC_bank_disconnect_reconnect This extends remsim-client test coverage to situations where the server removes an existing/established mapping, and possibly later establishes a new mapping. Change-Id: I8df29a91718b6b2829415fc040b647a58eb71292 Related: OS#4399 --- M remsim/RemsimClient_Tests.ttcn 1 file changed, 62 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/17190/1 diff --git a/remsim/RemsimClient_Tests.ttcn b/remsim/RemsimClient_Tests.ttcn index 7bee899..d950152 100644 --- a/remsim/RemsimClient_Tests.ttcn +++ b/remsim/RemsimClient_Tests.ttcn @@ -109,6 +109,66 @@ f_sleep(1.0); } +/* Test if client disconnects from bankd after slotmap delete on server */ +testcase TC_bank_disconnect() runs on client_test_CT { + var BankSlot bslot := { 1, 0 }; + f_init(); + /* expect inbound connectClientReq */ + as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ + as_connectClientReq(i := 1); + + f_sleep(1.0); + + /* configure client to disconnect from [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4("0.0.0.0"), 0)); + + /* expect disconnect of client on simulated bankd side */ + RSPRO_SRV[1].receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_DOWN)); + setverdict(pass); +} + +/* Test if client connects to bankd after disconnects from bankd after slotmap delete on server */ +testcase TC_bank_disconnect_reconnect() runs on client_test_CT { + var BankSlot bslot := { 1, 0 }; + f_init(); + /* expect inbound connectClientReq */ + as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ + as_connectClientReq(i := 1); + + f_sleep(1.0); + + /* configure client to disconnect from [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4("0.0.0.0"), 0)); + + /* expect disconnect of client on simulated bankd side */ + RSPRO_SRV[1].receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_DOWN)); + + /* re-start the IPA emulation (which terminated itself on the TCP disconnect */ + f_rspro_srv_init(1, mp_bankd_ip, mp_bankd_port, g_bankd_comp_id, exp_connect := false); + + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + + /* expect inbound connect on simulated bankd */ + as_connectClientReq(i := 1); + + setverdict(pass); +} + + /* TODO: * send a configClientBankIpReq and change the bank of an active client * send a configClientBankSlotReq and chagne the bank slot of an active client @@ -125,6 +185,8 @@ execute( TC_srv_connectClient_configClientBank() ); execute( TC_srv_reconnect() ); execute( TC_bank_reconnect() ); + execute( TC_bank_disconnect() ); + execute( TC_bank_disconnect_reconnect() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17190 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: I8df29a91718b6b2829415fc040b647a58eb71292 Gerrit-Change-Number: 17190 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 16:53:49 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 16 Feb 2020 16:53:49 +0000 Subject: Change in osmo-pcu[master]: csn1: fix existNextElement(): use bitvec_get_bit_pos() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17191 ) Change subject: csn1: fix existNextElement(): use bitvec_get_bit_pos() ...................................................................... csn1: fix existNextElement(): use bitvec_get_bit_pos() As was discovered recently (see OS#4388), bitvec_read_field() would never return a negative value because its return type is unsigned (uint64_t). We don't really need to get more than one bit, so let's just use the bitvec_get_bit_pos() instead. Change-Id: I763a295cd955cd33f542292c85d97ff82f6b49bc Related: OS#4388 --- M src/csn1.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/91/17191/1 diff --git a/src/csn1.cpp b/src/csn1.cpp index 5928d69..7be28a1 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -137,7 +137,7 @@ static gboolean existNextElement(bitvec *vector, unsigned& readIndex, guint8 Tag) { - guint8 res = bitvec_read_field(vector, &readIndex, 1); + int res = bitvec_get_bit_pos(vector, readIndex++); if (Tag == STANDARD_TAG) { return (res > 0); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17191 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I763a295cd955cd33f542292c85d97ff82f6b49bc Gerrit-Change-Number: 17191 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 17:43:13 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 16 Feb 2020 17:43:13 +0000 Subject: Change in osmo-pcu[master]: csn1: get rid of C++ specific code, compile with GCC In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17010 ) Change subject: csn1: get rid of C++ specific code, compile with GCC ...................................................................... Patch Set 3: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I56d8b7fbd2f9f4e0bdd6b09d0366fe7eb7aa327a Gerrit-Change-Number: 17010 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 16 Feb 2020 17:43:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 18:42:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 16 Feb 2020 18:42:20 +0000 Subject: Change in osmo-pcu[master]: csn1: get rid of C++ specific code, compile with GCC In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17010 to look at the new patch set (#4). Change subject: csn1: get rid of C++ specific code, compile with GCC ...................................................................... csn1: get rid of C++ specific code, compile with GCC The implementation of CSN.1 codec was taken from Wireshark, where it's implemented in pure C. For some reason it was mixed with C++ specific features, mostly using references in parameter declaration. Not sure what are the benefits. Change-Id: I56d8b7fbd2f9f4e0bdd6b09d0366fe7eb7aa327a --- M src/Makefile.am R src/csn1.c M src/csn1.h M src/gsm_rlcmac.cpp M src/gsm_rlcmac.h M tests/rlcmac/RLCMACTest.cpp 6 files changed, 209 insertions(+), 213 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/10/17010/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I56d8b7fbd2f9f4e0bdd6b09d0366fe7eb7aa327a Gerrit-Change-Number: 17010 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 18:42:21 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 16 Feb 2020 18:42:21 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: additionally match debug output of the CSN.1 codec References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17192 ) Change subject: tests/rlcmac: additionally match debug output of the CSN.1 codec ...................................................................... tests/rlcmac: additionally match debug output of the CSN.1 codec This would allow us to catch more bugs. Note that I had to remove printing of pointer address to make the output deterministic. Change-Id: I1a77441eb957353c919bc73f8e3a2e38f4a383a9 --- M src/csn1.cpp M tests/rlcmac/RLCMACTest.cpp A tests/rlcmac/RLCMACTest.err M tests/testsuite.at 4 files changed, 42 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/92/17192/1 diff --git a/src/csn1.cpp b/src/csn1.cpp index 7be28a1..b2ae1f2 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -564,7 +564,7 @@ csnStreamInit(&arT, bit_offset, length > 0 ? length : remaining_bits_len); arT.direction = 1; - LOGPC(DCSN1, LOGL_NOTICE, "ptr = %p | offset = %d | ", (void *)data, (int)pDescr->offset); + LOGPC(DCSN1, LOGL_NOTICE, "offset = %d | ", (int)pDescr->offset); Status = serialize(&arT, vector, readIndex, pvDATA(data, pDescr->offset)); if (Status >= 0) diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp index 1f74e41..0cc3347 100644 --- a/tests/rlcmac/RLCMACTest.cpp +++ b/tests/rlcmac/RLCMACTest.cpp @@ -256,7 +256,13 @@ { void *ctx = talloc_named_const(NULL, 1, "RLCMACTest"); osmo_init_logging2(ctx, &gprs_log_info); - log_parse_category_mask(osmo_stderr_target, "DPCU,3:DLGLOBAL,1:"); + log_parse_category_mask(osmo_stderr_target, "DPCU,3:DLGLOBAL,1:DCSN1,2:"); + + log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE); + log_set_print_category_hex(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 1); + log_set_print_level(osmo_stderr_target, 1); + log_set_use_color(osmo_stderr_target, 0); //printSizeofRLCMAC(); testRlcMacDownlink(ctx); diff --git a/tests/rlcmac/RLCMACTest.err b/tests/rlcmac/RLCMACTest.err new file mode 100644 index 0000000..33643f3 --- /dev/null +++ b/tests/rlcmac/RLCMACTest.err @@ -0,0 +1,32 @@ +DCSN1 INFO csnStreamDecoder (type=2): MESSAGE_TYPE = 2 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketDownlinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 5 | : End u.Global_TFI | : End ID | 0x00 = 0 | MAC_MODE = 0 | RLC_MODE = 0 | CONTROL_ACK = 0 | TIMESLOT_ALLOCATION = 28 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 15 | TIMING_ADVANCE_TIMESLOT_NUMBER = 4 | : End Packet_Timing_Advance | Exist_P0_and_BTS_PWR_CTRL_MODE = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 5 | u.Indirect_encoding = 1 | : u.Indirect_encoding | MAIO = 0 | MA_NUMBER = 14 | Exist_CHANGE_MARK = 1 | : CHANGE_MARK | CHANGE_MARK_1 = 0 | Exist_CHANGE_MARK_2 = 0 | : End CHANGE_MARK | : End u.Indirect_encoding | : End Frequency_Parameters | Exist_DOWNLINK_TFI_ASSIGNMENT = 0 | Exist_Power_Control_Parameters = 1 | : Power_Control_Parameters | ALPHA = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 1 | Slot[3].GAMMA_TN = 0 | Slot[4].Exist = 1 | Slot[4].GAMMA_TN = 0 | Slot[5].Exist = 1 | Slot[5].GAMMA_TN = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Power_Control_Parameters | Exist_TBF_Starting_Time = 0 | Exist_Measurement_Mapping = 0 | Exist_AdditionsR99 = 0 | Padding = 11|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=2): MESSAGE_TYPE = 2 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 5 | : End u.Global_TFI | : End ID | 0x00 = 0 | MAC_MODE = 0 | RLC_MODE = 0 | CONTROL_ACK = 0 | TIMESLOT_ALLOCATION = 28 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 15 | TIMING_ADVANCE_TIMESLOT_NUMBER = 4 | : End Packet_Timing_Advance | Exist_P0_and_BTS_PWR_CTRL_MODE = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 5 | u.Indirect_encoding = 1 | : u.Indirect_encoding | MAIO = 0 | MA_NUMBER = 14 | Exist_CHANGE_MARK = 1 | : CHANGE_MARK | CHANGE_MARK_1 = 0 | Exist_CHANGE_MARK_2 = 0 | : End CHANGE_MARK | : End u.Indirect_encoding | : End Frequency_Parameters | Exist_DOWNLINK_TFI_ASSIGNMENT = 0 | Exist_Power_Control_Parameters = 1 | : Power_Control_Parameters | ALPHA = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 1 | Slot[3].GAMMA_TN = 0 | Slot[4].Exist = 1 | Slot[4].GAMMA_TN = 0 | Slot[5].Exist = 1 | Slot[5].GAMMA_TN = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Power_Control_Parameters | Exist_TBF_Starting_Time = 0 | Exist_Measurement_Mapping = 0 | Exist_AdditionsR99 = 0 | Padding = 11|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketUplinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 4 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | TLLI_BLOCK_CHANNEL_CODING = 0 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 14 | TIMING_ADVANCE_TIMESLOT_NUMBER = 4 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 5 | u.Indirect_encoding = 1 | : u.Indirect_encoding | MAIO = 0 | MA_NUMBER = 14 | Exist_CHANGE_MARK = 1 | : CHANGE_MARK | CHANGE_MARK_1 = 0 | Exist_CHANGE_MARK_2 = 0 | : End CHANGE_MARK | : End u.Indirect_encoding | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 7 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 1 | Slot[4].USF_TN = 0 | Slot[4].GAMMA_TN = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 3|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 4 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | TLLI_BLOCK_CHANNEL_CODING = 0 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 14 | TIMING_ADVANCE_TIMESLOT_NUMBER = 4 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 5 | u.Indirect_encoding = 1 | : u.Indirect_encoding | MAIO = 0 | MA_NUMBER = 14 | Exist_CHANGE_MARK = 1 | : CHANGE_MARK | CHANGE_MARK_1 = 0 | Exist_CHANGE_MARK_2 = 0 | : End CHANGE_MARK | : End u.Indirect_encoding | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 7 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 1 | Slot[4].USF_TN = 0 | Slot[4].GAMMA_TN = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 3|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 6 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 0xcf59564a | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 0 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 6 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = -816228790 | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 0 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketUplinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 28 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 1 | TLLI_BLOCK_CHANNEL_CODING = 1 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 9 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 2 | u.ARFCN = 0 | u.ARFCN = 631 | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 19 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 8 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].USF_TN = 0 | Slot[6].GAMMA_TN = 9 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 28 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 1 | TLLI_BLOCK_CHANNEL_CODING = 1 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 9 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 2 | u.ARFCN = 0 | u.ARFCN = 631 | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 19 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 8 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].USF_TN = 0 | Slot[6].GAMMA_TN = 9 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=2): MESSAGE_TYPE = 2 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketDownlinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 0 | : End u.Global_TFI | : End ID | 0x00 = 0 | MAC_MODE = 0 | RLC_MODE = 0 | CONTROL_ACK = 0 | TIMESLOT_ALLOCATION = 3 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 1 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_P0_and_BTS_PWR_CTRL_MODE = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 0 | u.ARFCN = 0 | u.ARFCN = 623 | : End Frequency_Parameters | Exist_DOWNLINK_TFI_ASSIGNMENT = 1 | DOWNLINK_TFI_ASSIGNMENT = 0 | Exist_Power_Control_Parameters = 1 | : Power_Control_Parameters | ALPHA = 10 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].GAMMA_TN = 27 | Slot[7].Exist = 1 | Slot[7].GAMMA_TN = 27 | : End Power_Control_Parameters | Exist_TBF_Starting_Time = 0 | Exist_Measurement_Mapping = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_Params = 1 | EGPRS_WindowSize = 6 | LINK_QUALITY_MEASUREMENT_MODE = 0 | Exist_BEP_PERIOD2 = 0 | Exist_Packet_Extended_Timing_Advance = 0 | Exist_COMPACT_ReducedMA = 0 | : End AdditionsR99 | Padding = 11|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=2): MESSAGE_TYPE = 2 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 0 | : End u.Global_TFI | : End ID | 0x00 = 0 | MAC_MODE = 0 | RLC_MODE = 0 | CONTROL_ACK = 0 | TIMESLOT_ALLOCATION = 3 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 1 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_P0_and_BTS_PWR_CTRL_MODE = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 0 | u.ARFCN = 0 | u.ARFCN = 623 | : End Frequency_Parameters | Exist_DOWNLINK_TFI_ASSIGNMENT = 1 | DOWNLINK_TFI_ASSIGNMENT = 0 | Exist_Power_Control_Parameters = 1 | : Power_Control_Parameters | ALPHA = 10 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].GAMMA_TN = 27 | Slot[7].Exist = 1 | Slot[7].GAMMA_TN = 27 | : End Power_Control_Parameters | Exist_TBF_Starting_Time = 0 | Exist_Measurement_Mapping = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_Params = 1 | EGPRS_WindowSize = 6 | LINK_QUALITY_MEASUREMENT_MODE = 0 | Exist_BEP_PERIOD2 = 0 | Exist_Packet_Extended_Timing_Advance = 0 | Exist_COMPACT_ReducedMA = 0 | : End AdditionsR99 | Padding = 11|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketUplinkID = 2 | u.TLLI = 0x78000000 | : End ID | u.PUA_EGPRS_Struct = 1 | : u.PUA_EGPRS_Struct | u.PUA_EGPRS_00 = 0 | : u.PUA_EGPRS_00 | Exist_CONTENTION_RESOLUTION_TLLI = 0 | Exist_COMPACT_ReducedMA = 0 | EGPRS_CHANNEL_CODING_COMMAND = 0 | RESEGMENT = 1 | EGPRS_WindowSize = 6 | AccessTechnologyType = 0 | ARAC_RETRANSMISSION_REQUEST = 0 | TLLI_BLOCK_CHANNEL_CODING = 0 | Exist_BEP_PERIOD2 = 0 | : PacketTimingAdvance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 0 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End PacketTimingAdvance | Exist_Packet_Extended_Timing_Advance = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 0 | u.ARFCN = 0 | u.ARFCN = 623 | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 0 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 10 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].USF_TN = 1 | Slot[6].GAMMA_TN = 27 | Slot[7].Exist = 1 | Slot[7].USF_TN = 1 | Slot[7].GAMMA_TN = 27 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | : End u.PUA_EGPRS_00 | : End u.PUA_EGPRS_Struct | Padding = 11|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.TLLI = 2 | u.TLLI = 2013265920 | : End ID | u.PUA_EGPRS_Struct = 1 | : u.PUA_EGPRS_Struct | u.PUA_EGPRS_00 = 0 | : u.PUA_EGPRS_00 | Exist_CONTENTION_RESOLUTION_TLLI = 0 | Exist_COMPACT_ReducedMA = 0 | EGPRS_CHANNEL_CODING_COMMAND = 0 | RESEGMENT = 1 | EGPRS_WindowSize = 6 | AccessTechnologyType = 0 | ARAC_RETRANSMISSION_REQUEST = 0 | TLLI_BLOCK_CHANNEL_CODING = 0 | Exist_BEP_PERIOD2 = 0 | : PacketTimingAdvance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 0 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End PacketTimingAdvance | Exist_Packet_Extended_Timing_Advance = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 0 | u.ARFCN = 0 | u.ARFCN = 623 | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 0 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 10 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].USF_TN = 1 | Slot[6].GAMMA_TN = 27 | Slot[7].Exist = 1 | Slot[7].USF_TN = 1 | Slot[7].GAMMA_TN = 27 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | : End u.PUA_EGPRS_00 | : End u.PUA_EGPRS_Struct | Padding = 11|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 1 | u.PU_AckNack_EGPRS_Struct = 1 | : u.PU_AckNack_EGPRS_Struct | u.PU_AckNack_EGPRS_00 = 0 | : u.PU_AckNack_EGPRS_00 | EGPRS_ChannelCodingCommand = 3 | RESEGMENT = 1 | PRE_EMPTIVE_TRANSMISSION = 1 | PRR_RETRANSMISSION_REQUEST = 0 | ARAC_RETRANSMISSION_REQUEST = 0 | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 0x78000000 | TBF_EST = 0 | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Exist_Packet_Extended_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | Desc length = 15 | offset = 0 | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | : End Desc | : End EGPRS_AckNack | : End u.PU_AckNack_EGPRS_00 | : End u.PU_AckNack_EGPRS_Struct | Padding = 43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 1 | u.PU_AckNack_EGPRS_Struct = 1 | : u.PU_AckNack_EGPRS_Struct | u.PU_AckNack_EGPRS_00 = 0 | : u.PU_AckNack_EGPRS_00 | EGPRS_ChannelCodingCommand = 3 | RESEGMENT = 1 | PRE_EMPTIVE_TRANSMISSION = 1 | PRR_RETRANSMISSION_REQUEST = 0 | ARAC_RETRANSMISSION_REQUEST = 0 | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 2013265920 | TBF_EST = 0 | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Exist_Packet_Extended_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | Desc length = 15 | : End Desc | : End EGPRS_AckNack | : End u.PU_AckNack_EGPRS_00 | : End u.PU_AckNack_EGPRS_Struct | Padding = 43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=4): MESSAGE_TYPE = 4 | PAGE_MODE = 3 | : ID | DCSN1 ERROR csnStreamDecoder: error STREAM_NOT_SUPPORTED (-8) at PacketPollingID (idx 16): End ID | +DCSN1 INFO csnStreamEncoder (type=4): MESSAGE_TYPE = 4 | PAGE_MODE = 3 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.UPLINK_TFI = 0 | u.UPLINK_TFI = 0 | : End u.Global_TFI | : End ID | TYPE_OF_ACK = 0 | Padding = 43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 24 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 255 | RECEIVED_BLOCK_BITMAP[1] = 255 | RECEIVED_BLOCK_BITMAP[2] = 255 | RECEIVED_BLOCK_BITMAP[3] = 255 | RECEIVED_BLOCK_BITMAP[4] = 255 | RECEIVED_BLOCK_BITMAP[5] = 255 | RECEIVED_BLOCK_BITMAP[6] = 255 | RECEIVED_BLOCK_BITMAP[7] = 255 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 0x7e8ce3dd | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 1 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 24 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 255 | RECEIVED_BLOCK_BITMAP[1] = 255 | RECEIVED_BLOCK_BITMAP[2] = 255 | RECEIVED_BLOCK_BITMAP[3] = 255 | RECEIVED_BLOCK_BITMAP[4] = 255 | RECEIVED_BLOCK_BITMAP[5] = 255 | RECEIVED_BLOCK_BITMAP[6] = 255 | RECEIVED_BLOCK_BITMAP[7] = 255 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 2123162589 | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 1 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=37): MESSAGE_TYPE = 37 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | Padding = 43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=37): MESSAGE_TYPE = 37 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | Padding = 43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=3): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 3 | TLLI = 0x87987447 | Padding = 1|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=3): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 3 | TLLI = -2020051897 | Padding = 1|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 28 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 0 | : Channel_Quality_Report | C_VALUE = 18 | RXQUAL = 0 | SIGN_VAR = 7 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 0 | Padding = 3|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 28 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 0 | : Channel_Quality_Report | C_VALUE = 18 | RXQUAL = 0 | SIGN_VAR = 7 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 0 | Padding = 3|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | Choice PacketResourceRequestID = 1 | u.TLLI = 0xc4f70250 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 3 | u.Content length = 67 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| +DCSN1 INFO csnStreamEncoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | u.TLLI = 1 | u.TLLI = -990444976 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | u.Content = 3 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | u.Content length = 67 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| +DCSN1 INFO csnStreamDecoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 1 | MEAN_BEP_GMSK = 31 | CV_BEP_GMSK = 7 | Exist_MEAN_CV_BEP_8PSK = 0 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 0 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 0 | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | Desc length = 15 | offset = 0 | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | : End Desc | : End EGPRS_AckNack | Padding = 11|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 1 | MEAN_BEP_GMSK = 31 | CV_BEP_GMSK = 7 | Exist_MEAN_CV_BEP_8PSK = 0 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 0 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 0 | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | Desc length = 15 | : End Desc | : End EGPRS_AckNack | Padding = 11|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 0 | Exist_MEAN_CV_BEP_8PSK = 1 | MEAN_BEP_8PSK = 31 | CV_BEP_8PSK = 7 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 58 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 1 | : ChannelRequestDescription | PEAK_THROUGHPUT_CLASS = 6 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 62 | : End ChannelRequestDescription | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 0 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 1187 | Exist_CRBB = 0 | URBB = 127 | URBB = 255 | URBB = 255 | URBB = 238 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | : End Desc | : End EGPRS_AckNack | Padding = +DCSN1 INFO csnStreamEncoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 21 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | DCSN1 ERROR csnStreamDecoder: error NEED_MORE BITS TO UNPACK (-5) at EGPRS_multislot_class (idx 31): End Multislot_capability | diff --git a/tests/testsuite.at b/tests/testsuite.at index fe87ff9..8a319bd 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -5,7 +5,8 @@ AT_SETUP([rlcmac]) AT_KEYWORDS([rlcmac]) cat $abs_srcdir/rlcmac/RLCMACTest.ok > expout -AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/rlcmac/RLCMACTest], [0], [expout], [ignore]) +cat $abs_srcdir/rlcmac/RLCMACTest.err > experr +AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/rlcmac/RLCMACTest], [0], [expout], [experr]) AT_CLEANUP AT_SETUP([multi_slot]) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1a77441eb957353c919bc73f8e3a2e38f4a383a9 Gerrit-Change-Number: 17192 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 16 19:31:39 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 16 Feb 2020 19:31:39 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: additionally match debug output of the CSN.1 codec In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17192 to look at the new patch set (#2). Change subject: tests/rlcmac: additionally match debug output of the CSN.1 codec ...................................................................... tests/rlcmac: additionally match debug output of the CSN.1 codec This would allow us to catch more bugs. Note that I had to remove printing of pointer address to make the output deterministic. Change-Id: I1a77441eb957353c919bc73f8e3a2e38f4a383a9 --- M src/csn1.cpp M tests/Makefile.am M tests/rlcmac/RLCMACTest.cpp A tests/rlcmac/RLCMACTest.err M tests/testsuite.at 5 files changed, 43 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/92/17192/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1a77441eb957353c919bc73f8e3a2e38f4a383a9 Gerrit-Change-Number: 17192 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 09:22:50 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 09:22:50 +0000 Subject: Change in libosmocore[master]: osmo-sim-test: Recurse through subdirectories In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17153 ) Change subject: osmo-sim-test: Recurse through subdirectories ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17153 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I737b01d9a845e37d8be9d4709ef0de04e749daec Gerrit-Change-Number: 17153 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 09:22:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 09:27:44 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 09:27:44 +0000 Subject: Change in osmo-pcu[master]: csn1: fix existNextElement(): use bitvec_get_bit_pos() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17191 ) Change subject: csn1: fix existNextElement(): use bitvec_get_bit_pos() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17191 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I763a295cd955cd33f542292c85d97ff82f6b49bc Gerrit-Change-Number: 17191 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 09:27:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 09:29:43 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 09:29:43 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: additionally match debug output of the CSN.1 codec In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17192 ) Change subject: tests/rlcmac: additionally match debug output of the CSN.1 codec ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1a77441eb957353c919bc73f8e3a2e38f4a383a9 Gerrit-Change-Number: 17192 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 09:29:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 09:34:08 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 09:34:08 +0000 Subject: Change in osmo-pcu[master]: csn1: get rid of C++ specific code, compile with GCC In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17010 ) Change subject: csn1: get rid of C++ specific code, compile with GCC ...................................................................... Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I56d8b7fbd2f9f4e0bdd6b09d0366fe7eb7aa327a Gerrit-Change-Number: 17010 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 09:34:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 09:45:07 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 17 Feb 2020 09:45:07 +0000 Subject: Change in osmo-bsc[master]: bssap: Avoid logging error if no optional Global Call Ref IE received In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/17138 ) Change subject: bssap: Avoid logging error if no optional Global Call Ref IE received ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/17138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I27ee9c6112f96d6839b8b6141888ac8fe377db65 Gerrit-Change-Number: 17138 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 09:45:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 09:46:46 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 09:46:46 +0000 Subject: Change in osmo-bsc[master]: bssap: Avoid logging error if no optional Global Call Ref IE received In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/17138 ) Change subject: bssap: Avoid logging error if no optional Global Call Ref IE received ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/17138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I27ee9c6112f96d6839b8b6141888ac8fe377db65 Gerrit-Change-Number: 17138 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 09:46:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 09:46:50 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 09:46:50 +0000 Subject: Change in osmo-bsc[master]: bssap: Avoid logging error if no optional Global Call Ref IE received In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/17138 ) Change subject: bssap: Avoid logging error if no optional Global Call Ref IE received ...................................................................... bssap: Avoid logging error if no optional Global Call Ref IE received Also take the chance to simplify related code and print erroneous IE data. Change-Id: I27ee9c6112f96d6839b8b6141888ac8fe377db65 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 14 insertions(+), 10 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, approved diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 74faae1..1ba490f 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -568,20 +568,24 @@ static void bssmap_handle_ass_req_lcls(struct gsm_subscriber_connection *conn, const struct tlv_parsed *tp) { - const uint8_t *config, *control, *gcr, gcr_len = TLVP_LEN(tp, GSM0808_IE_GLOBAL_CALL_REF); + const uint8_t *config, *control, *gcr; + uint8_t gcr_len; - if (gcr_len > sizeof(conn->lcls.global_call_ref)) - LOGPFSML(conn->fi, LOGL_ERROR, "Global Call Ref IE of %u bytes is too long\n", - gcr_len); - else { - gcr = TLVP_VAL_MINLEN(tp, GSM0808_IE_GLOBAL_CALL_REF, 13); - if (gcr) { + /* TS 48.008 sec 3.2.2.115 Global Call Reference */ + if (TLVP_PRESENT(tp, GSM0808_IE_GLOBAL_CALL_REF)) { + gcr = TLVP_VAL(tp, GSM0808_IE_GLOBAL_CALL_REF); + gcr_len = TLVP_LEN(tp, GSM0808_IE_GLOBAL_CALL_REF); + if (gcr_len > sizeof(conn->lcls.global_call_ref)) { + LOGPFSML(conn->fi, LOGL_ERROR, "Global Call Ref IE of %u bytes is too long: %s\n", + gcr_len, osmo_hexdump_nospc(gcr, gcr_len)); + } else if (gcr_len < 13) { /* FIXME: document this magic value 13 */ + LOGPFSML(conn->fi, LOGL_ERROR, "Global Call Ref IE of %u bytes is too short: %s\n", + gcr_len, osmo_hexdump_nospc(gcr, gcr_len)); + } else { LOGPFSM(conn->fi, "Setting GCR to %s\n", osmo_hexdump_nospc(gcr, gcr_len)); memcpy(&conn->lcls.global_call_ref, gcr, gcr_len); conn->lcls.global_call_ref_len = gcr_len; - } else - LOGPFSML(conn->fi, LOGL_ERROR, "Global Call Ref IE of %u bytes is too short\n", - gcr_len); + } } config = TLVP_VAL_MINLEN(tp, GSM0808_IE_LCLS_CONFIG, 1); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/17138 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I27ee9c6112f96d6839b8b6141888ac8fe377db65 Gerrit-Change-Number: 17138 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 10:30:58 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 10:30:58 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Install correct version of Soapdysdr lms module ... References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17193 ) Change subject: ansible: gsm-tester: Install correct version of Soapdysdr lms module for srsLTE ...................................................................... ansible: gsm-tester: Install correct version of Soapdysdr lms module for srsLTE At runtime, srsLTE expects that newer version of the module instead of old 0.5.2 one. Change-Id: I1a66a1c4ba819c6c4887facc99045d099f2ccc53 --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/93/17193/1 diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index ef51178..9f3fd25 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -58,6 +58,7 @@ - libuhd-dev - libczmq-dev - libsoapysdr-dev + - soapysdr0.7-module-lms7 - name: install ofono build dependencies apt: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1a66a1c4ba819c6c4887facc99045d099f2ccc53 Gerrit-Change-Number: 17193 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 10:35:53 2020 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 17 Feb 2020 10:35:53 +0000 Subject: Change in osmo-bts[master]: osmo-bts-sysmo: merge measurement data and payload In-Reply-To: References: Message-ID: Hello pespin, fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/17146 to look at the new patch set (#2). Change subject: osmo-bts-sysmo: merge measurement data and payload ...................................................................... osmo-bts-sysmo: merge measurement data and payload For osmo-bts-sysmo the MPH INFO MEAS IND indication is still sent separately. Lets merge the measurement information into the PH DATA and TCH indication like we already did it for osmo-bts-trx Also lets remove the check for PCU_direct. For osmo-bts-sysmo the pcu_direct flag is set, which means that the values for ber10k, ta_offs_256Bits and rssi are normally not populated. Those valus were originally inteneded to be used when the PCU is not directly attached to the phy and attached through pcu_sock instead. In cases pcu_sock is used the values are needed, if the PCU is directly attached the PCU gets its data directly from the phy and the data does not go through osmo-bts. So it is safe to remove the check. Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Related: OS#2977 --- M include/osmo-bts/l1sap.h M src/common/l1sap.c M src/osmo-bts-litecell15/tch.c M src/osmo-bts-oc2g/tch.c M src/osmo-bts-octphy/l1_tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/main.c M src/osmo-bts-sysmo/tch.c 8 files changed, 27 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/17146/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Gerrit-Change-Number: 17146 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 10:36:56 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 10:36:56 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Install correct version of Soapdysdr lms module ... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17193 ) Change subject: ansible: gsm-tester: Install correct version of Soapdysdr lms module for srsLTE ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1a66a1c4ba819c6c4887facc99045d099f2ccc53 Gerrit-Change-Number: 17193 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 10:36:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 10:43:17 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 10:43:17 +0000 Subject: Change in osmo-bts[master]: osmo-bts-sysmo: merge measurement data and payload In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17146 ) Change subject: osmo-bts-sysmo: merge measurement data and payload ...................................................................... Patch Set 2: (2 comments) https://gerrit.osmocom.org/c/osmo-bts/+/17146/2//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/17146/2//COMMIT_MSG at 13 PS2, Line 13: Also lets remove the check for PCU_direct. For osmo-bts-sysmo the I'm not sure I'm following you here. So iiuc you say that we can remove the check because we don't expect to be using pcu_sock in the osmo-bts-sysmo case? IF that's the point, then I don't like the idea, it should be fine to have the possibility to run osmo-bts-sysmo with a pcu_sock. In any case, I'm not sure this change really relates to this patch and probably can be moved and discussed in a different patch. https://gerrit.osmocom.org/c/osmo-bts/+/17146/2/src/common/l1sap.c File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/17146/2/src/common/l1sap.c at 179 PS2, Line 179: int add_l1sap_header(struct gsm_bts_trx *trx, struct msgb *rmsg, I'd perhaps take the chance to document the function and explain that last params may be 0 when unknown or something similar. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Gerrit-Change-Number: 17146 Gerrit-PatchSet: 2 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 10:43:17 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 11:36:28 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 17 Feb 2020 11:36:28 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): do not subtract no_of_bits twice References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17194 ) Change subject: csn1: fix csnStreamDecoder(): do not subtract no_of_bits twice ...................................................................... csn1: fix csnStreamDecoder(): do not subtract no_of_bits twice Found while doing differential analysis (comparison against the original implementation from Wireshark). Change-Id: Id2a4f03035cd8354d3fba0ad37571453d3986d21 --- M src/csn1.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/94/17194/1 diff --git a/src/csn1.c b/src/csn1.c index eedad75..a766bd3 100644 --- a/src/csn1.c +++ b/src/csn1.c @@ -306,7 +306,6 @@ if (remaining_bits_len >= no_of_bits) { - remaining_bits_len -= no_of_bits; if (no_of_bits <= 8) { guint8 ui8 = get_masked_bits8(vector, readIndex, bit_offset, no_of_bits); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id2a4f03035cd8354d3fba0ad37571453d3986d21 Gerrit-Change-Number: 17194 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 11:36:28 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 17 Feb 2020 11:36:28 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): always keep remaining_bits_len updated References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17195 ) Change subject: csn1: fix csnStreamDecoder(): always keep remaining_bits_len updated ...................................................................... csn1: fix csnStreamDecoder(): always keep remaining_bits_len updated Found while doing differential analysis (comparison against the original implementation from Wireshark). Change-Id: I9f7fa9c3f2f4ff5213dded930cee7ec509b9d799 --- M src/csn1.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/95/17195/1 diff --git a/src/csn1.c b/src/csn1.c index a766bd3..31b8e00 100644 --- a/src/csn1.c +++ b/src/csn1.c @@ -656,8 +656,6 @@ guint8 no_of_bits = (guint8) pDescr->i; if (remaining_bits_len >= no_of_bits) { - remaining_bits_len -= no_of_bits; - if (no_of_bits <= 8) { guint8 ui8 = bitvec_read_field(vector, readIndex, no_of_bits); @@ -689,6 +687,7 @@ return ProcessError(readIndex,"csnStreamDecoder", CSN_ERROR_GENERAL, pDescr); } + remaining_bits_len -= no_of_bits; bit_offset += no_of_bits; pDescr++; break; @@ -731,6 +730,7 @@ return ProcessError(readIndex,"csnStreamDecoder", CSN_ERROR_NEED_MORE_BITS_TO_UNPACK, pDescr); } + remaining_bits_len -= no_of_bits; bit_offset += no_of_bits; pDescr++; break; @@ -759,6 +759,7 @@ return ProcessError(readIndex,"csnStreamDecoder", CSN_ERROR_NEED_MORE_BITS_TO_UNPACK, pDescr); } + remaining_bits_len -= no_of_bits; bit_offset += no_of_bits; pDescr++; break; @@ -1310,6 +1311,7 @@ LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , bitvec_get_uint(vector, 1)); /* existNextElement() returned FALSE, 1 bit consumed */ + remaining_bits_len--; bit_offset++; /* Store the counted number of elements of the array */ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17195 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I9f7fa9c3f2f4ff5213dded930cee7ec509b9d799 Gerrit-Change-Number: 17195 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 11:36:28 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 17 Feb 2020 11:36:28 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): update bit_offset in CSN_EXIST{_LH} References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17196 ) Change subject: csn1: fix csnStreamDecoder(): update bit_offset in CSN_EXIST{_LH} ...................................................................... csn1: fix csnStreamDecoder(): update bit_offset in CSN_EXIST{_LH} Found while doing differential analysis (comparison against the original implementation from Wireshark). Change-Id: Ibd0b7400d78f7873c2a8d45267332f511b5c6fbb --- M src/csn1.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/96/17196/1 diff --git a/src/csn1.c b/src/csn1.c index 31b8e00..2f05327 100644 --- a/src/csn1.c +++ b/src/csn1.c @@ -950,6 +950,7 @@ *pui8 = fExist; LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pDescr++; + bit_offset++; remaining_bits_len -= 1; if (!fExist) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17196 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ibd0b7400d78f7873c2a8d45267332f511b5c6fbb Gerrit-Change-Number: 17196 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 11:38:01 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 17 Feb 2020 11:38:01 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): do not subtract no_of_bits twice In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17194 ) Change subject: csn1: fix csnStreamDecoder(): do not subtract no_of_bits twice ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17194/1/src/csn1.c File src/csn1.c: https://gerrit.osmocom.org/c/osmo-pcu/+/17194/1/src/csn1.c at 326 PS1, Line 326: remaining_bits_len -= no_of_bits; ... because it's already done here. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id2a4f03035cd8354d3fba0ad37571453d3986d21 Gerrit-Change-Number: 17194 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Mon, 17 Feb 2020 11:38:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 11:40:29 2020 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 17 Feb 2020 11:40:29 +0000 Subject: Change in osmo-bts[master]: osmo-bts-sysmo: merge measurement data and payload In-Reply-To: References: Message-ID: Hello pespin, fixeria, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/17146 to look at the new patch set (#3). Change subject: osmo-bts-sysmo: merge measurement data and payload ...................................................................... osmo-bts-sysmo: merge measurement data and payload For osmo-bts-sysmo the MPH INFO MEAS IND indication is still sent separately. Lets merge the measurement information into the PH DATA Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Related: OS#2977 --- M include/osmo-bts/l1sap.h M src/common/l1sap.c M src/osmo-bts-litecell15/tch.c M src/osmo-bts-oc2g/tch.c M src/osmo-bts-octphy/l1_tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/main.c M src/osmo-bts-sysmo/tch.c 8 files changed, 28 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/46/17146/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Gerrit-Change-Number: 17146 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 11:40:30 2020 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Mon, 17 Feb 2020 11:40:30 +0000 Subject: Change in osmo-bts[master]: Do not depend on pcu_direct flag when populating ph_data_ind References: Message-ID: dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17197 ) Change subject: Do not depend on pcu_direct flag when populating ph_data_ind ...................................................................... Do not depend on pcu_direct flag when populating ph_data_ind The struct members ber10k, ta_offs_256bits and lqual_cb in ph_data_ind are only populated when the pcu_direct flag is not set. The pcu_direct flag is set when the pcu is directly attached to the phy and all pcu related traffic (pdtch) is handled without sending it through osmo-bts-sysmo. For those cases osmo_bts_sysmo will not make use of those struct members, even if they were populated. When the PCU is not directly attached the data is needed because it is sent through the pcu_sock to the PCU. Lets remove the check because it is not required. Also in future patches where measurement indications and data / tch indicatins are merged the struct members are also needed to carry the measurement information for SACCH as well. Change-Id: Iaa37bb62af4f5eb4b6e684cb754e68d11e6fd676 --- M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-oc2g/l1_if.c M src/osmo-bts-sysmo/l1_if.c 3 files changed, 12 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/97/17197/1 diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index 989cc10..abf48bc 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -1024,11 +1024,10 @@ l1sap->u.data.chan_nr = chan_nr; l1sap->u.data.fn = fn; l1sap->u.data.rssi = rssi; - if (!pcu_direct) { - l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; - l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming*64; - l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; - } + l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; + l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming*64; + l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; + return l1sap_up(trx, l1sap); } diff --git a/src/osmo-bts-oc2g/l1_if.c b/src/osmo-bts-oc2g/l1_if.c index 9816979..b46c528 100644 --- a/src/osmo-bts-oc2g/l1_if.c +++ b/src/osmo-bts-oc2g/l1_if.c @@ -1081,11 +1081,10 @@ l1sap->u.data.chan_nr = chan_nr; l1sap->u.data.fn = fn; l1sap->u.data.rssi = rssi; - if (!pcu_direct) { - l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; - l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming*64; - l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; - } + l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; + l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming*64; + l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; + return l1sap_up(trx, l1sap); } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index db0dfb5..a891f48 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1010,11 +1010,10 @@ l1sap->u.data.chan_nr = chan_nr; l1sap->u.data.fn = fn; l1sap->u.data.rssi = (int8_t) (data_ind->measParam.fRssi); - if (!pcu_direct) { /* FIXME: if pcu_direct=1, then this is not set, what to do in pcu_tx_data_ind() in this case ?*/ - l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; - l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming * 64; - l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; - } + l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; + l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming * 64; + l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; + /* copy data from L1 primitive to L1SAP primitive */ sap_msg->l2h = msgb_put(sap_msg, data_ind->msgUnitParam.u8Size); memcpy(sap_msg->l2h, data_ind->msgUnitParam.u8Buffer, -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17197 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iaa37bb62af4f5eb4b6e684cb754e68d11e6fd676 Gerrit-Change-Number: 17197 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 11:43:55 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 11:43:55 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): do not subtract no_of_bits twice In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17194 ) Change subject: csn1: fix csnStreamDecoder(): do not subtract no_of_bits twice ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id2a4f03035cd8354d3fba0ad37571453d3986d21 Gerrit-Change-Number: 17194 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 11:43:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 11:44:21 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 11:44:21 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): always keep remaining_bits_len updated In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17195 ) Change subject: csn1: fix csnStreamDecoder(): always keep remaining_bits_len updated ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17195 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I9f7fa9c3f2f4ff5213dded930cee7ec509b9d799 Gerrit-Change-Number: 17195 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 11:44:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 11:44:58 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 11:44:58 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): update bit_offset in CSN_EXIST{_LH} In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17196 ) Change subject: csn1: fix csnStreamDecoder(): update bit_offset in CSN_EXIST{_LH} ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17196 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ibd0b7400d78f7873c2a8d45267332f511b5c6fbb Gerrit-Change-Number: 17196 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 11:44:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 12:04:00 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 12:04:00 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: add some tags to tasks References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17198 ) Change subject: ansible: gsm-tester: add some tags to tasks ...................................................................... ansible: gsm-tester: add some tags to tasks Change-Id: I1fe26d519d4d63d4bef33c1db2abf98a40913f98 --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 88 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/98/17198/1 diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 9f3fd25..1492305 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -35,6 +35,8 @@ - libasound2-dev - liblua5.3-dev - lua-socket + tags: + - osmocom # mdbus2 is not available in debian10. TODO: compile it for >9 - name: install mdbus2 @@ -43,6 +45,9 @@ with_items: - mdbus2 when: ansible_distribution == 'Debian' and ansible_distribution_version <= '9' + tags: + - ofono + - modem - name: install srsLTE runtime dependencies apt: @@ -59,21 +64,31 @@ - libczmq-dev - libsoapysdr-dev - soapysdr0.7-module-lms7 + tags: + - srs - name: install ofono build dependencies apt: name: ofono state: build-dep + tags: + - ofono + - modem - name: install libqmi-glib a dependency of sysmocom ofono apt: name: libqmi-glib-dev + tags: + - ofono + - modem - name: install uhub dependencies apt: name: "{{ item }}" with_items: - libusb-1.0-0-dev + tags: + - modem - name: setup uhubctl repository git: @@ -82,6 +97,8 @@ version: master clone: yes update: no + tags: + - modem - name: build uhubctl shell: | @@ -90,6 +107,8 @@ args: chdir: /root/uhubctl creates: /usr/sbin/uhubctl + tags: + - modem # TODO: move this into restart-modems.d directory - name: copy quad_modem_power_cycle.sh @@ -98,7 +117,7 @@ dest: /usr/local/bin/quad_modem_power_cycle.sh mode: 0755 tags: - - ofono + - modem - name: setup ofono repository git: @@ -109,6 +128,7 @@ update: no tags: - ofono + - modem - name: build ofono shell: | @@ -122,6 +142,7 @@ creates: /usr/local/sbin/ofonod tags: - ofono + - modem - name: ensure ofono is started service: @@ -130,6 +151,7 @@ enabled: yes tags: - ofono + - modem # patchelf 0.9 available in debian has bugs with certain binaries. Version 0.10 # fails on other binaries, so we need both 0.9 and 0.10 versions installed. @@ -142,6 +164,7 @@ update: no tags: - patchelf + - osmo-gsm-tester-proc - name: build patchelf v0.10 shell: | @@ -155,13 +178,12 @@ creates: /opt/bin/patchelf-v0.10 tags: - patchelf + - osmo-gsm-tester-proc -- name: install gsm tester dependencies +- name: install gsm tester dependencies (main) apt: name: "{{ item }}" with_items: - - dbus - - tcpdump - sqlite3 - python3 - python3-setuptools @@ -170,11 +192,23 @@ - python3-gi - ofono - patchelf - - sudo - libcap2-bin - python3-pip - udhcpc + tags: + - osmo-gsm-tester-main + +- name: install gsm tester dependencies (proc) + apt: + name: "{{ item }}" + with_items: + - tcpdump + - patchelf + - libcap2-bin - iperf3 + - sudo + tags: + - osmo-gsm-tester-proc - name: install gsm tester pip dependencies pip: @@ -186,11 +220,16 @@ - pydbus - pyusb - pysispm - tags: [pip] + tags: + - pip + - osmo-gsm-tester-main - name: create group osmo-gsm-tester group: name: osmo-gsm-tester + tags: + - osmo-gsm-tester-main + - osmo-gsm-tester-proc - name: add jenkins to osmo-gsm-tester and systemd-journal user: @@ -202,6 +241,8 @@ - systemd-journal - osmo-gsm-tester - dialout + tags: + - osmo-gsm-tester-main - name: setup state directory file: @@ -209,10 +250,14 @@ state: directory group: osmo-gsm-tester mode: g+rwxs + tags: + - osmo-gsm-tester-main - name: install acl apt: name: acl + tags: + - osmo-gsm-tester-main # Ensure the group always has access to all files - name: add acl to state directory @@ -223,6 +268,8 @@ entity: osmo-gsm-tester default: yes permissions: rwx + tags: + - osmo-gsm-tester-main - name: create trials directory file: @@ -230,39 +277,57 @@ state: directory group: osmo-gsm-tester mode: g+rwxs + tags: + - osmo-gsm-tester-main - name: allow osmo-gsm-tester to access ofono copy: src: dbus_osmo-gsm-tester.conf dest: /etc/dbus-1/system.d/osmo-gsm-tester.conf + tags: + - ofono + - modem - name: ensure tcpdump can be called by osmo-gsm-tester file: path: /usr/sbin/tcpdump group: osmo-gsm-tester mode: 0750 + tags: + - osmo-gsm-tester-proc + - tcpdump - name: create a symlink for tcpdump file: src: /usr/sbin/tcpdump dest: /usr/local/bin/tcpdump state: link + tags: + - osmo-gsm-tester-proc + - tcpdump - name: add correct capabilities to tcpdump capabilities: path: /usr/sbin/tcpdump capability: cap_net_raw,cap_net_admin=eip state: present + tags: + - osmo-gsm-tester-proc + - tcpdump - name: allow core files for the group osmo-gsm-tester copy: content: "@osmo-gsm-tester - core unlimited" dest: /etc/security/limits.d/osmo-gsm-tester_allowcore.conf + tags: + - osmo-gsm-tester-proc - name: allow rt priority for the group osmo-gsm-tester copy: content: "@osmo-gsm-tester - rtprio 99" dest: /etc/security/limits.d/osmo-gsm-tester_rtprio.conf + tags: + - osmo-gsm-tester-proc - name: setup osmo-gsm-tester repository git: @@ -272,7 +337,7 @@ clone: yes update: no tags: - - osmo-gsm-tester + - osmo-gsm-tester-proc - name: Install osmo-gsm-tester script helpers to /usr/local/bin (PATH) shell: | @@ -281,7 +346,7 @@ args: chdir: /root/osmo-gsm-tester tags: - - osmo-gsm-tester + - osmo-gsm-tester-proc - name: Install osmo-gsm-tester sudoers.d files to /etc/sudoers.d/ (PATH) shell: | @@ -290,37 +355,51 @@ args: chdir: /root/osmo-gsm-tester tags: - - osmo-gsm-tester + - osmo-gsm-tester-proc - name: logrotate limit filesizes to 10M copy: content: "maxsize 10M" dest: /etc/logrotate.d/maxsize + tags: + - osmo-gsm-tester-main - name: install sispmctl (usb power socket) apt: name: sispmctl + tags: + - sispm - name: allow group osmo-gsm-tester to access sispm devices copy: src: 60-sispmctl.rules dest: /etc/udev/rules.d/ notify: restart udev + tags: + - sispm - name: allow group osmo-gsm-tester to access LMS devices copy: src: 64-limesuite.rules dest: /etc/udev/rules.d/ notify: restart udev + tags: + - lms - name: use persistent naming for modem network interfaces copy: src: 70-net-setup-link-modems.rules dest: /etc/udev/rules.d/ notify: restart udev + tags: + - modem - name: avoid dhcpcd managing modem interfaces and racing with udev rename lineinfile: path: /etc/dhcpcd.conf regexp: '^denyinterfaces' line: 'denyinterfaces ww* r*' + tags: + tags: + - osmo-gsm-tester-main + - dhcpcd -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1fe26d519d4d63d4bef33c1db2abf98a40913f98 Gerrit-Change-Number: 17198 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 12:04:01 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 12:04:01 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Allow install srs related packages in Ubuntu References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17199 ) Change subject: ansible: gsm-tester: Allow install srs related packages in Ubuntu ...................................................................... ansible: gsm-tester: Allow install srs related packages in Ubuntu Change-Id: I3fdf2f4f390d27c53f073b38c1716da07f933b6d --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 18 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/99/17199/1 diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 1492305..97ce7e2 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -49,7 +49,7 @@ - ofono - modem -- name: install srsLTE runtime dependencies +- name: install srsLTE build-only dependencies apt: name: "{{ item }}" with_items: @@ -63,7 +63,24 @@ - libuhd-dev - libczmq-dev - libsoapysdr-dev + tags: + - srs + +- name: install srsLTE runtime extra dependencies (Debian) + apt: + name: "{{ item }}" + with_items: - soapysdr0.7-module-lms7 + when: ansible_distribution == 'Debian' + tags: + - srs + +- name: install srsLTE runtime extra dependencies (Ubuntu) + apt: + name: "{{ item }}" + with_items: + - soapysdr0.6-module-lms7 + when: ansible_distribution == 'Ubuntu' tags: - srs -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3fdf2f4f390d27c53f073b38c1716da07f933b6d Gerrit-Change-Number: 17199 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 12:04:01 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 12:04:01 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Install patchelf's build dep autoconf References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17200 ) Change subject: ansible: gsm-tester: Install patchelf's build dep autoconf ...................................................................... ansible: gsm-tester: Install patchelf's build dep autoconf Change-Id: Ibe0e9b10d87c3630e2f12c9c32196e26213530ca --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/00/17200/1 diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 97ce7e2..ecdd254 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -170,6 +170,15 @@ - ofono - modem +- name: install patchelf build dependencies + apt: + name: "{{ item }}" + with_items: + - autoconf + tags: + - patchelf + - osmo-gsm-tester-proc + # patchelf 0.9 available in debian has bugs with certain binaries. Version 0.10 # fails on other binaries, so we need both 0.9 and 0.10 versions installed. - name: setup patchelf v0.10 repository -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibe0e9b10d87c3630e2f12c9c32196e26213530ca Gerrit-Change-Number: 17200 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 12:04:01 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 12:04:01 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Use file module instead of manual mkdir References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17201 ) Change subject: ansible: gsm-tester: Use file module instead of manual mkdir ...................................................................... ansible: gsm-tester: Use file module instead of manual mkdir >From ansible: [WARNING]: Consider using the file module with state=directory rather than running 'mkdir'. Change-Id: I2c541878033360a9d427d13b62c1cc075d5f92b7 --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/01/17201/1 diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index ecdd254..db2a16c 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -365,18 +365,22 @@ tags: - osmo-gsm-tester-proc +- name: Install osmo-gsm-tester script helpers to /usr/local/bin (PATH) (mkdir) + file: path=/usr/local/bin state=directory + - name: Install osmo-gsm-tester script helpers to /usr/local/bin (PATH) shell: | - mkdir -p /usr/local/bin/ && \ cp utils/bin/*.sh /usr/local/bin/ args: chdir: /root/osmo-gsm-tester tags: - osmo-gsm-tester-proc +- name: Install osmo-gsm-tester sudoers.d files to /etc/sudoers.d/ (PATH (mkdir) + file: path=/etc/sudoers.d/ state=directory + - name: Install osmo-gsm-tester sudoers.d files to /etc/sudoers.d/ (PATH) shell: | - mkdir -p /etc/sudoers.d/ && \ cp utils/sudoers.d/* /etc/sudoers.d/ args: chdir: /root/osmo-gsm-tester -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c541878033360a9d427d13b62c1cc075d5f92b7 Gerrit-Change-Number: 17201 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 12:40:28 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 17 Feb 2020 12:40:28 +0000 Subject: Change in osmo-pcu[master]: csn1: bitvec_get_uint() may return a negative, use %d References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17202 ) Change subject: csn1: bitvec_get_uint() may return a negative, use %d ...................................................................... csn1: bitvec_get_uint() may return a negative, use %d Change-Id: I3cfd66643ec140150a4089b0e1c493d911d3d7d4 --- M src/csn1.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/02/17202/1 diff --git a/src/csn1.c b/src/csn1.c index 2f05327..7464ac3 100644 --- a/src/csn1.c +++ b/src/csn1.c @@ -1309,7 +1309,7 @@ } } - LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , bitvec_get_uint(vector, 1)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , bitvec_get_uint(vector, 1)); /* existNextElement() returned FALSE, 1 bit consumed */ remaining_bits_len--; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I3cfd66643ec140150a4089b0e1c493d911d3d7d4 Gerrit-Change-Number: 17202 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 12:40:29 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 17 Feb 2020 12:40:29 +0000 Subject: Change in osmo-pcu[master]: csn1: use proper format specifier for unsigned integers References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17203 ) Change subject: csn1: use proper format specifier for unsigned integers ...................................................................... csn1: use proper format specifier for unsigned integers Change-Id: I33f86b79e72394bdb7d99762f8ec21d80e06dc30 --- M src/csn1.c M tests/rlcmac/RLCMACTest.err 2 files changed, 23 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/03/17203/1 diff --git a/src/csn1.c b/src/csn1.c index 7464ac3..594e8ec 100644 --- a/src/csn1.c +++ b/src/csn1.c @@ -111,7 +111,7 @@ { /* Don't add trailing newline, top caller is responsible for appending it */ if (err != CSN_OK) - LOGPSRC(DCSN1, LOGL_ERROR, file, line, "%s: error %s (%d) at %s (idx %d)", + LOGPSRC(DCSN1, LOGL_ERROR, file, line, "%s: error %s (%d) at %s (idx %u)", sz, get_value_string(csn1_error_names, err), err, pDescr ? pDescr->sz : "-", *readIndex); return err; @@ -213,7 +213,7 @@ guint16 ui16 = bitvec_read_field(vector, readIndex, no_of_bits); pui16 = pui16DATA(data, pDescr->offset); *pui16 = ui16; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { @@ -275,14 +275,14 @@ guint16 ui16 = bitvec_read_field(vector, readIndex, no_of_bits); pui16 = pui16DATA(data, pDescr->offset); *pui16 = ui16 + (guint16)pDescr->descr.value; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { guint32 ui32 = bitvec_read_field(vector, readIndex, no_of_bits); pui32 = pui32DATA(data, pDescr->offset); *pui32 = ui32 + (guint16)pDescr->descr.value; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui32); } else { @@ -553,13 +553,13 @@ guint8 length = bitvec_read_field(vector, readIndex, length_len); - LOGPC(DCSN1, LOGL_NOTICE, "%s length = %d | ", pDescr->sz , (int)length); + LOGPC(DCSN1, LOGL_NOTICE, "%s length = %u | ", pDescr->sz , length); bit_offset += length_len; remaining_bits_len -= length_len; csnStreamInit(&arT, bit_offset, length > 0 ? length : remaining_bits_len); arT.direction = 1; - LOGPC(DCSN1, LOGL_NOTICE, "offset = %d | ", (int)pDescr->offset); + LOGPC(DCSN1, LOGL_NOTICE, "offset = %u | ", pDescr->offset); Status = serialize(&arT, vector, readIndex, pvDATA(data, pDescr->offset)); if (Status >= 0) @@ -668,14 +668,14 @@ guint16 ui16 = bitvec_read_field(vector, readIndex, no_of_bits); pui16 = pui16DATA(data, pDescr->offset); *pui16 = ui16; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { guint32 ui32 = bitvec_read_field(vector, readIndex, no_of_bits); pui32 = pui32DATA(data, pDescr->offset); *pui32 = ui32; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui32); } else { @@ -711,14 +711,14 @@ guint16 ui16 = bitvec_read_field(vector, readIndex, no_of_bits); pui16 = pui16DATA(data, pDescr->offset); *pui16 = ui16 + (guint16)pDescr->descr.value; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { guint32 ui32 = bitvec_read_field(vector, readIndex, no_of_bits); pui32 = pui32DATA(data, pDescr->offset); *pui32 = ui32 + (guint16)pDescr->descr.value; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui32); } else { @@ -1403,7 +1403,7 @@ return ProcessError(readIndex,"csnStreamDecoder FIXED value does not match", -1, pDescr); } - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned int)ui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned int)ui32); remaining_bits_len -= no_of_bits; bit_offset += no_of_bits; pDescr++; @@ -1511,13 +1511,13 @@ { pui16 = pui16DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui16, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { pui32 = pui32DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui32, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui32); } else { @@ -1556,13 +1556,13 @@ { pui16 = pui16DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui16 - (guint16)pDescr->descr.value, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned short)(*pui16 - (guint16)pDescr->descr.value)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned short)(*pui16 - (guint16)pDescr->descr.value)); } else if (no_of_bits <= 32) { pui32 = pui32DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui32 - (guint16)pDescr->descr.value, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned int)(*pui32 - (guint16)pDescr->descr.value)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned int)(*pui32 - (guint16)pDescr->descr.value)); } else { @@ -1932,13 +1932,13 @@ { pui16 = pui16DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui16, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { pui32 = pui32DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui32, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui32); } else { @@ -1972,13 +1972,13 @@ { pui16 = pui16DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui16 - (guint16)pDescr->descr.value, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned short)(*pui16 - (guint16)pDescr->descr.value)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned short)(*pui16 - (guint16)pDescr->descr.value)); } else if (no_of_bits <= 32) { pui32 = pui32DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui32 - (guint16)pDescr->descr.value, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned int)(*pui32 - (guint16)pDescr->descr.value)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned int)(*pui32 - (guint16)pDescr->descr.value)); } else { @@ -2132,7 +2132,7 @@ { pui32 = pui32DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui32, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui32); } else if (no_of_bits <= 64) { diff --git a/tests/rlcmac/RLCMACTest.err b/tests/rlcmac/RLCMACTest.err index 33643f3..a1e5e3f 100644 --- a/tests/rlcmac/RLCMACTest.err +++ b/tests/rlcmac/RLCMACTest.err @@ -3,7 +3,7 @@ DCSN1 INFO csnStreamDecoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketUplinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 4 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | TLLI_BLOCK_CHANNEL_CODING = 0 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 14 | TIMING_ADVANCE_TIMESLOT_NUMBER = 4 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 5 | u.Indirect_encoding = 1 | : u.Indirect_encoding | MAIO = 0 | MA_NUMBER = 14 | Exist_CHANGE_MARK = 1 | : CHANGE_MARK | CHANGE_MARK_1 = 0 | Exist_CHANGE_MARK_2 = 0 | : End CHANGE_MARK | : End u.Indirect_encoding | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 7 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 1 | Slot[4].USF_TN = 0 | Slot[4].GAMMA_TN = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 3|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 4 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | TLLI_BLOCK_CHANNEL_CODING = 0 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 14 | TIMING_ADVANCE_TIMESLOT_NUMBER = 4 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 5 | u.Indirect_encoding = 1 | : u.Indirect_encoding | MAIO = 0 | MA_NUMBER = 14 | Exist_CHANGE_MARK = 1 | : CHANGE_MARK | CHANGE_MARK_1 = 0 | Exist_CHANGE_MARK_2 = 0 | : End CHANGE_MARK | : End u.Indirect_encoding | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 7 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 1 | Slot[4].USF_TN = 0 | Slot[4].GAMMA_TN = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 3|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 6 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 0xcf59564a | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 0 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| -DCSN1 INFO csnStreamEncoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 6 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = -816228790 | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 0 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 6 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 3478738506 | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 0 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketUplinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 28 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 1 | TLLI_BLOCK_CHANNEL_CODING = 1 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 9 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 2 | u.ARFCN = 0 | u.ARFCN = 631 | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 19 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 8 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].USF_TN = 0 | Slot[6].GAMMA_TN = 9 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 28 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 1 | TLLI_BLOCK_CHANNEL_CODING = 1 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 9 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 2 | u.ARFCN = 0 | u.ARFCN = 631 | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 19 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 8 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].USF_TN = 0 | Slot[6].GAMMA_TN = 9 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=2): MESSAGE_TYPE = 2 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketDownlinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 0 | : End u.Global_TFI | : End ID | 0x00 = 0 | MAC_MODE = 0 | RLC_MODE = 0 | CONTROL_ACK = 0 | TIMESLOT_ALLOCATION = 3 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 1 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_P0_and_BTS_PWR_CTRL_MODE = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 0 | u.ARFCN = 0 | u.ARFCN = 623 | : End Frequency_Parameters | Exist_DOWNLINK_TFI_ASSIGNMENT = 1 | DOWNLINK_TFI_ASSIGNMENT = 0 | Exist_Power_Control_Parameters = 1 | : Power_Control_Parameters | ALPHA = 10 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].GAMMA_TN = 27 | Slot[7].Exist = 1 | Slot[7].GAMMA_TN = 27 | : End Power_Control_Parameters | Exist_TBF_Starting_Time = 0 | Exist_Measurement_Mapping = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_Params = 1 | EGPRS_WindowSize = 6 | LINK_QUALITY_MEASUREMENT_MODE = 0 | Exist_BEP_PERIOD2 = 0 | Exist_Packet_Extended_Timing_Advance = 0 | Exist_COMPACT_ReducedMA = 0 | : End AdditionsR99 | Padding = 11|43|43|43|43|43|43|43|43|43| @@ -19,11 +19,11 @@ DCSN1 INFO csnStreamDecoder (type=37): MESSAGE_TYPE = 37 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | Padding = 43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=37): MESSAGE_TYPE = 37 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | Padding = 43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=3): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 3 | TLLI = 0x87987447 | Padding = 1|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| -DCSN1 INFO csnStreamEncoder (type=3): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 3 | TLLI = -2020051897 | Padding = 1|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=3): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 3 | TLLI = 2274915399 | Padding = 1|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 28 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 0 | : Channel_Quality_Report | C_VALUE = 18 | RXQUAL = 0 | SIGN_VAR = 7 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 0 | Padding = 3|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 28 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 0 | : Channel_Quality_Report | C_VALUE = 18 | RXQUAL = 0 | SIGN_VAR = 7 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 0 | Padding = 3|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | Choice PacketResourceRequestID = 1 | u.TLLI = 0xc4f70250 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 3 | u.Content length = 67 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| -DCSN1 INFO csnStreamEncoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | u.TLLI = 1 | u.TLLI = -990444976 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | u.Content = 3 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | u.Content length = 67 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| +DCSN1 INFO csnStreamEncoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | u.TLLI = 1 | u.TLLI = 3304522320 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | u.Content = 3 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | u.Content length = 67 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| DCSN1 INFO csnStreamDecoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 1 | MEAN_BEP_GMSK = 31 | CV_BEP_GMSK = 7 | Exist_MEAN_CV_BEP_8PSK = 0 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 0 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 0 | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | Desc length = 15 | offset = 0 | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | : End Desc | : End EGPRS_AckNack | Padding = 11|43|43|43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 1 | MEAN_BEP_GMSK = 31 | CV_BEP_GMSK = 7 | Exist_MEAN_CV_BEP_8PSK = 0 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 0 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 0 | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | Desc length = 15 | : End Desc | : End EGPRS_AckNack | Padding = 11|43|43|43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I33f86b79e72394bdb7d99762f8ec21d80e06dc30 Gerrit-Change-Number: 17203 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 13:37:13 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 13:37:13 +0000 Subject: Change in osmo-pcu[master]: csn1: bitvec_get_uint() may return a negative, use %d In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17202 ) Change subject: csn1: bitvec_get_uint() may return a negative, use %d ...................................................................... Patch Set 1: Code-Review+1 OMG all these bitvec APIs are so broken. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I3cfd66643ec140150a4089b0e1c493d911d3d7d4 Gerrit-Change-Number: 17202 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 13:37:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 13:38:42 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 13:38:42 +0000 Subject: Change in osmo-pcu[master]: csn1: use proper format specifier for unsigned integers In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17203 ) Change subject: csn1: use proper format specifier for unsigned integers ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I33f86b79e72394bdb7d99762f8ec21d80e06dc30 Gerrit-Change-Number: 17203 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 13:38:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 16:17:19 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 16:17:19 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Create remote rundir directories References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17204 ) Change subject: ansible: gsm-tester: Create remote rundir directories ...................................................................... ansible: gsm-tester: Create remote rundir directories These directories are needed by osmo-gsm-tester to copy in some binaries and helper files required in the remote run node. Change-Id: I802bdcc79e7787052364f6518e868d741cb040ac --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/04/17204/1 diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index db2a16c..eff4939 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -424,6 +424,22 @@ tags: - modem +- name: create remote rundir directories + file: + path: "/osmo-gsm-tester-{{ item }}" + state: directory + group: osmo-gsm-tester + mode: g+rwxs + with_items: + - srsenb + - srsepc + - srsue + - trx + tags: + - osmo-gsm-tester-proc + - osmocom + - srs + - name: avoid dhcpcd managing modem interfaces and racing with udev rename lineinfile: path: /etc/dhcpcd.conf -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I802bdcc79e7787052364f6518e868d741cb040ac Gerrit-Change-Number: 17204 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 17:13:28 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 17:13:28 +0000 Subject: Change in osmo-gsm-tester[master]: contrib: Fix default variable value syntax References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17205 ) Change subject: contrib: Fix default variable value syntax ...................................................................... contrib: Fix default variable value syntax Change-Id: I23abf33881f64dd89c0bf5ef970972908d337366 --- M contrib/jenkins-build-common.sh M contrib/jenkins-build-srslte.sh 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/05/17205/1 diff --git a/contrib/jenkins-build-common.sh b/contrib/jenkins-build-common.sh index d64f92d..ca8bf02 100644 --- a/contrib/jenkins-build-common.sh +++ b/contrib/jenkins-build-common.sh @@ -42,16 +42,16 @@ exit 1 fi -git_url="${git_url-"git://git.osmocom.org"}" -prefix="${prefix-"$base/inst-$name"}" +git_url="${git_url:-git://git.osmocom.org}" +prefix="${prefix:-$base/inst-$name}" # prefix_real is usually identical with prefix, except when installing to a # different $DESTDIR than /, which is the case for example when building # osmo-bts within the sysmoBTS SDK -prefix_real="${prefix_real-"$prefix"}" +prefix_real="${prefix_real:-$prefix}" # Flag to be used to enable ASAN in builds. Defaults to enable ASAN builds and # it can be disabled by passing SANITIZE_FLAGS="" to the build. -SANITIZE_FLAGS="${SANITIZE_FLAGS---enable-sanitize}" +SANITIZE_FLAGS="${SANITIZE_FLAGS:---enable-sanitize}" export PKG_CONFIG_PATH="$prefix_real/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$prefix_real/lib:$LD_LIBRARY_PATH" diff --git a/contrib/jenkins-build-srslte.sh b/contrib/jenkins-build-srslte.sh index 77d5bc4..29a6ffc 100755 --- a/contrib/jenkins-build-srslte.sh +++ b/contrib/jenkins-build-srslte.sh @@ -3,7 +3,7 @@ base="$PWD" name="srslte" -git_url="${git_url-"https://github.com/pespin/"}" +git_url="${git_url:-https://github.com/srsLTE}" . "$(dirname "$0")/jenkins-build-common.sh" #TODO: make sure libconfig, zeroMQ is installed -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I23abf33881f64dd89c0bf5ef970972908d337366 Gerrit-Change-Number: 17205 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 17:13:29 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 17 Feb 2020 17:13:29 +0000 Subject: Change in osmo-gsm-tester[master]: contrib: srslte: Allow changing repo name References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17206 ) Change subject: contrib: srslte: Allow changing repo name ...................................................................... contrib: srslte: Allow changing repo name Change-Id: I06e6566ac3df9369b391bc88f288f72588088ef1 --- M contrib/jenkins-build-srslte.sh 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/06/17206/1 diff --git a/contrib/jenkins-build-srslte.sh b/contrib/jenkins-build-srslte.sh index 29a6ffc..dd75e86 100755 --- a/contrib/jenkins-build-srslte.sh +++ b/contrib/jenkins-build-srslte.sh @@ -4,9 +4,10 @@ base="$PWD" name="srslte" git_url="${git_url:-https://github.com/srsLTE}" +project_name="${project_name:-srsLTE}" . "$(dirname "$0")/jenkins-build-common.sh" #TODO: make sure libconfig, zeroMQ is installed -build_repo srsLTE +build_repo $project_name create_bin_tgz "srsue srsenb srsepc" -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I06e6566ac3df9369b391bc88f288f72588088ef1 Gerrit-Change-Number: 17206 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:50:16 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:50:16 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Integrate VPCD test port into RemsimBankd_Tests.ttcn References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17207 ) Change subject: remsim: Integrate VPCD test port into RemsimBankd_Tests.ttcn ...................................................................... remsim: Integrate VPCD test port into RemsimBankd_Tests.ttcn VPCD (specifically ifd-vpcd) is an ifd-handler (reader driver) for a virtual smart card reader integrated with pcsc-lite. It is part of the virtualsmartcard project. Using this ifd-vpcd, we can implementa virtual smart card reader beneath osmo-remsim-bankd, which allows us to implement both the smart card [reader] below osmo-remsim-bankd as well as the osmo-remsim-server + client above osmo-remsim-bankd - in other words a fully virtualized test fixture for bankd. Change-Id: I967f2d526f4ef1278bd2ac1d590a8dce732379d5 --- M remsim/RemsimBankd_Tests.ttcn M remsim/gen_links.sh M remsim/regen_makefile.sh 3 files changed, 41 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/07/17207/1 diff --git a/remsim/RemsimBankd_Tests.ttcn b/remsim/RemsimBankd_Tests.ttcn index e9e3b31..fd3f907 100644 --- a/remsim/RemsimBankd_Tests.ttcn +++ b/remsim/RemsimBankd_Tests.ttcn @@ -17,6 +17,10 @@ import from IPA_Emulation all; import from Misc_Helpers all; +import from VPCD_Types all; +import from VPCD_CodecPort all; +import from VPCD_Adapter all; + import from RSPRO all; import from RSRES all; import from RSPRO_Types all; @@ -30,7 +34,7 @@ /* We implement a RSPRO server to simulate the remsim-server and a RSPRO client to simulate a remsim-client connecting to bankd */ -type component bankd_test_CT extends rspro_server_CT, rspro_client_CT { +type component bankd_test_CT extends rspro_server_CT, rspro_client_CT, VPCD_Adapter_CT { } private function f_init(boolean start_client := false) runs on bankd_test_CT { @@ -332,11 +336,43 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); } +private altstep as_vpcd() runs on VPCD_Adapter_CT { + [] VPCD.receive(tr_VPCD_Recv(g_vpcd_conn_id, tr_VPCD_CTRL_ATR)) { + f_vpcd_send(ts_VPCD_DATA('3B9F96801FC78031A073BE21136743200718000001A5'O)); + repeat; + } + [] VPCD.receive(tr_VPCD_Recv(g_vpcd_conn_id, tr_VPCD_CTRL_OFF)) { + repeat; + } + [] VPCD.receive(tr_VPCD_Recv(g_vpcd_conn_id, tr_VPCD_CTRL_ON)) { + repeat; + } +} + +/* transceive a TPDU from modem to card (and back) */ +function f_rspro_xceive_mdm2card_vpcd(integer idx, BankSlot bs, template (value) octetstring data, + template (value) TpduFlags flags, template (value) octetstring res) runs on bankd_test_CT return octetstring { + var RsproPDU rx; + RSPRO[idx].send(ts_RSPRO_TpduModemToCard(rspro[idx].rspro_client_slot, bs, flags, data)); + f_vpcd_exp(tr_VPCD_DATA(data)); + f_vpcd_send(ts_VPCD_DATA(res)); + rx := f_rspro_exp(tr_RSPRO_TpduCardToModem(bs, rspro[idx].rspro_client_slot, ?, ?)); + if (rx.msg.tpduCardToModem.data != valueof(res)) { + setverdict(fail, "Expected ", res, " from card, but got ", rx.msg.tpduCardToModem.data); + } + return rx.msg.tpduCardToModem.data; +} + + /* first add mapping, then connect matching client and exchange some TPDUs */ testcase TC_createMapping_exchangeTPDU() runs on bankd_test_CT { /* FIXME: this would only be done in f_init_client(), but we need it before */ rspro[0].rspro_client_slot := { clientId := 23+0, slotNr := 0 }; + VPCD_Adapter.f_connect(); + activate(as_vpcd()); + f_sleep(2.0); + f_init(); as_connectBankReq(bid := mp_bank_id, nslots := mp_num_slots); f_rspro_srv_reset_state(ok); @@ -354,7 +390,7 @@ var TpduFlags f := {tpduHeaderPresent:=true, finalPart:=true, procByteContinueTx:=false, procByteContinueRx:=false}; for (var integer i := 0; i < 10; i:=i+1) { - f_rspro_xceive_mdm2card(0, bs, 'A0A40000023F00'O, f); + f_rspro_xceive_mdm2card_vpcd(0, bs, 'A0A40000023F00'O, f, '9000'O); } Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); } diff --git a/remsim/gen_links.sh b/remsim/gen_links.sh index 7c234ec..366a8e6 100755 --- a/remsim/gen_links.sh +++ b/remsim/gen_links.sh @@ -38,6 +38,8 @@ FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp IPA_CodecPort.ttcn " #RSL_Types.ttcn RSL_Emulation.ttcn " FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn " FILES+="Native_Functions.ttcn Native_FunctionDefs.cc " +FILES+="VPCD_Types.ttcn VPCD_CodecPort.ttcn VPCD_CodecPort_CtrlFunct.ttcn VPCD_CodecPort_CtrlFunctDef.cc +VPCD_Adapter.ttcn " gen_links $DIR $FILES ignore_pp_results diff --git a/remsim/regen_makefile.sh b/remsim/regen_makefile.sh index e398360..6f7d209 100755 --- a/remsim/regen_makefile.sh +++ b/remsim/regen_makefile.sh @@ -1,6 +1,6 @@ #!/bin/sh -FILES="*.ttcn *.ttcnpp *.asn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc TELNETasp_PT.cc Native_FunctionDefs.cc RSPRO_EncDec.cc Abstract_Socket.cc HTTPmsg_PT.cc HTTPmsg_MessageLen_Function.cc JSON_EncDec.cc" +FILES="*.ttcn *.ttcnpp *.asn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc TELNETasp_PT.cc Native_FunctionDefs.cc RSPRO_EncDec.cc Abstract_Socket.cc HTTPmsg_PT.cc HTTPmsg_MessageLen_Function.cc JSON_EncDec.cc VPCD_CodecPort_CtrlFunctDef.cc " export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSPRO -DIPA_EMULATION_CTRL" -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17207 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: I967f2d526f4ef1278bd2ac1d590a8dce732379d5 Gerrit-Change-Number: 17207 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:52:25 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:52:25 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: More comments in RemsimClient_Tests In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17189 ) Change subject: remsim: More comments in RemsimClient_Tests ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17189 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: I02363eaaaae6d7b849cd2a1d2b07f1343d58c2f2 Gerrit-Change-Number: 17189 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 17 Feb 2020 21:52:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:52:32 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:52:32 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add client TC_bank_disconnect + TC_bank_disconnect_reconnect In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17190 ) Change subject: remsim: Add client TC_bank_disconnect + TC_bank_disconnect_reconnect ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17190 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: I8df29a91718b6b2829415fc040b647a58eb71292 Gerrit-Change-Number: 17190 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 17 Feb 2020 21:52:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:52:37 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:52:37 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: More comments in RemsimClient_Tests In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17189 ) Change subject: remsim: More comments in RemsimClient_Tests ...................................................................... remsim: More comments in RemsimClient_Tests Change-Id: I02363eaaaae6d7b849cd2a1d2b07f1343d58c2f2 --- M remsim/RemsimClient_Tests.ttcn 1 file changed, 13 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/remsim/RemsimClient_Tests.ttcn b/remsim/RemsimClient_Tests.ttcn index d5520ab..7bee899 100644 --- a/remsim/RemsimClient_Tests.ttcn +++ b/remsim/RemsimClient_Tests.ttcn @@ -36,6 +36,7 @@ /* ConnectClientReq from client to remsim-server */ testcase TC_srv_connectClient() runs on client_test_CT { f_init(); + /* expect inbound connectClientReq */ as_connectClientReq(); setverdict(pass); f_sleep(1.0); @@ -44,6 +45,7 @@ /* ConnectClientReq from client to remsim-server */ testcase TC_srv_connectClient_reject() runs on client_test_CT { f_init(); + /* expect inbound connectClientReq */ as_connectClientReq(res := illegalClientId); /* expect disconnect by client */ RSPRO_SRV[0].receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_DOWN)); @@ -55,9 +57,13 @@ testcase TC_srv_connectClient_configClientBank() runs on client_test_CT { var BankSlot bslot := { 1, 0 }; f_init(); + /* expect inbound connectClientReq */ as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ as_connectClientReq(i := 1); setverdict(pass); f_sleep(1.0); @@ -67,11 +73,13 @@ testcase TC_srv_reconnect() runs on client_test_CT { var BankSlot bslot := { 1, 0 }; f_init(); + /* expect inbound connectClientReq */ as_connectClientReq(); /* disconnect the client from server and expect re-establish + re-connect */ f_rspro_srv_fini(0); f_rspro_srv_init(0, mp_server_ip, mp_server_port, g_srv_comp_id, exp_connect := true); + /* expect inbound connectClientReq */ as_connectClientReq(i := 0); setverdict(pass); @@ -82,14 +90,19 @@ testcase TC_bank_reconnect() runs on client_test_CT { var BankSlot bslot := { 1, 0 }; f_init(); + /* expect inbound connectClientReq */ as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ as_connectClientReq(i := 1); /* disconnect the client from bankd and expect re-establish + re-connect */ f_rspro_srv_fini(1); f_rspro_srv_init(1, mp_bankd_ip, mp_bankd_port, g_bankd_comp_id, exp_connect := true); + /* expect inbound connectClientReq on simulated bankd */ as_connectClientReq(i := 1); setverdict(pass); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17189 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: I02363eaaaae6d7b849cd2a1d2b07f1343d58c2f2 Gerrit-Change-Number: 17189 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:52:38 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:52:38 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add client TC_bank_disconnect + TC_bank_disconnect_reconnect In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17190 ) Change subject: remsim: Add client TC_bank_disconnect + TC_bank_disconnect_reconnect ...................................................................... remsim: Add client TC_bank_disconnect + TC_bank_disconnect_reconnect This extends remsim-client test coverage to situations where the server removes an existing/established mapping, and possibly later establishes a new mapping. Change-Id: I8df29a91718b6b2829415fc040b647a58eb71292 Related: OS#4399 --- M remsim/RemsimClient_Tests.ttcn 1 file changed, 62 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/remsim/RemsimClient_Tests.ttcn b/remsim/RemsimClient_Tests.ttcn index 7bee899..d950152 100644 --- a/remsim/RemsimClient_Tests.ttcn +++ b/remsim/RemsimClient_Tests.ttcn @@ -109,6 +109,66 @@ f_sleep(1.0); } +/* Test if client disconnects from bankd after slotmap delete on server */ +testcase TC_bank_disconnect() runs on client_test_CT { + var BankSlot bslot := { 1, 0 }; + f_init(); + /* expect inbound connectClientReq */ + as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ + as_connectClientReq(i := 1); + + f_sleep(1.0); + + /* configure client to disconnect from [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4("0.0.0.0"), 0)); + + /* expect disconnect of client on simulated bankd side */ + RSPRO_SRV[1].receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_DOWN)); + setverdict(pass); +} + +/* Test if client connects to bankd after disconnects from bankd after slotmap delete on server */ +testcase TC_bank_disconnect_reconnect() runs on client_test_CT { + var BankSlot bslot := { 1, 0 }; + f_init(); + /* expect inbound connectClientReq */ + as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ + as_connectClientReq(i := 1); + + f_sleep(1.0); + + /* configure client to disconnect from [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4("0.0.0.0"), 0)); + + /* expect disconnect of client on simulated bankd side */ + RSPRO_SRV[1].receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_DOWN)); + + /* re-start the IPA emulation (which terminated itself on the TCP disconnect */ + f_rspro_srv_init(1, mp_bankd_ip, mp_bankd_port, g_bankd_comp_id, exp_connect := false); + + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + + /* expect inbound connect on simulated bankd */ + as_connectClientReq(i := 1); + + setverdict(pass); +} + + /* TODO: * send a configClientBankIpReq and change the bank of an active client * send a configClientBankSlotReq and chagne the bank slot of an active client @@ -125,6 +185,8 @@ execute( TC_srv_connectClient_configClientBank() ); execute( TC_srv_reconnect() ); execute( TC_bank_reconnect() ); + execute( TC_bank_disconnect() ); + execute( TC_bank_disconnect_reconnect() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17190 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: I8df29a91718b6b2829415fc040b647a58eb71292 Gerrit-Change-Number: 17190 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:53:30 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:53:30 +0000 Subject: Change in osmo-gsm-tester[master]: contrib: srslte: Allow changing repo name In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17206 ) Change subject: contrib: srslte: Allow changing repo name ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I06e6566ac3df9369b391bc88f288f72588088ef1 Gerrit-Change-Number: 17206 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 17 Feb 2020 21:53:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:53:45 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:53:45 +0000 Subject: Change in osmo-gsm-tester[master]: contrib: Fix default variable value syntax In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17205 ) Change subject: contrib: Fix default variable value syntax ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I23abf33881f64dd89c0bf5ef970972908d337366 Gerrit-Change-Number: 17205 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 17 Feb 2020 21:53:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:54:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:54:07 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Create remote rundir directories In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17204 ) Change subject: ansible: gsm-tester: Create remote rundir directories ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I802bdcc79e7787052364f6518e868d741cb040ac Gerrit-Change-Number: 17204 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 17 Feb 2020 21:54:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:54:29 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:54:29 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Install correct version of Soapdysdr lms module ... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17193 ) Change subject: ansible: gsm-tester: Install correct version of Soapdysdr lms module for srsLTE ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1a66a1c4ba819c6c4887facc99045d099f2ccc53 Gerrit-Change-Number: 17193 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 21:54:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:54:54 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:54:54 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: add some tags to tasks In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17198 ) Change subject: ansible: gsm-tester: add some tags to tasks ...................................................................... Patch Set 1: Code-Review+1 what is the advantage of those tags? -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1fe26d519d4d63d4bef33c1db2abf98a40913f98 Gerrit-Change-Number: 17198 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 17 Feb 2020 21:54:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:55:10 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:55:10 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Allow install srs related packages in Ubuntu In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17199 ) Change subject: ansible: gsm-tester: Allow install srs related packages in Ubuntu ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3fdf2f4f390d27c53f073b38c1716da07f933b6d Gerrit-Change-Number: 17199 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 17 Feb 2020 21:55:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:55:24 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:55:24 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Install patchelf's build dep autoconf In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17200 ) Change subject: ansible: gsm-tester: Install patchelf's build dep autoconf ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibe0e9b10d87c3630e2f12c9c32196e26213530ca Gerrit-Change-Number: 17200 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 17 Feb 2020 21:55:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:55:40 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:55:40 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Use file module instead of manual mkdir In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17201 ) Change subject: ansible: gsm-tester: Use file module instead of manual mkdir ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c541878033360a9d427d13b62c1cc075d5f92b7 Gerrit-Change-Number: 17201 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 17 Feb 2020 21:55:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:56:37 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:56:37 +0000 Subject: Change in osmo-pcu[master]: csn1: fix existNextElement(): use bitvec_get_bit_pos() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17191 ) Change subject: csn1: fix existNextElement(): use bitvec_get_bit_pos() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17191 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I763a295cd955cd33f542292c85d97ff82f6b49bc Gerrit-Change-Number: 17191 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 21:56:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:57:09 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:57:09 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: additionally match debug output of the CSN.1 codec In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17192 ) Change subject: tests/rlcmac: additionally match debug output of the CSN.1 codec ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1a77441eb957353c919bc73f8e3a2e38f4a383a9 Gerrit-Change-Number: 17192 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 21:57:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:57:37 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:57:37 +0000 Subject: Change in osmo-pcu[master]: csn1: get rid of C++ specific code, compile with GCC In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17010 ) Change subject: csn1: get rid of C++ specific code, compile with GCC ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I56d8b7fbd2f9f4e0bdd6b09d0366fe7eb7aa327a Gerrit-Change-Number: 17010 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 21:57:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:57:55 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:57:55 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): do not subtract no_of_bits twice In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17194 ) Change subject: csn1: fix csnStreamDecoder(): do not subtract no_of_bits twice ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id2a4f03035cd8354d3fba0ad37571453d3986d21 Gerrit-Change-Number: 17194 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 21:57:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:58:09 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:58:09 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): always keep remaining_bits_len updated In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17195 ) Change subject: csn1: fix csnStreamDecoder(): always keep remaining_bits_len updated ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17195 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I9f7fa9c3f2f4ff5213dded930cee7ec509b9d799 Gerrit-Change-Number: 17195 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 21:58:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:58:21 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:58:21 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): update bit_offset in CSN_EXIST{_LH} In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17196 ) Change subject: csn1: fix csnStreamDecoder(): update bit_offset in CSN_EXIST{_LH} ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17196 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ibd0b7400d78f7873c2a8d45267332f511b5c6fbb Gerrit-Change-Number: 17196 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 21:58:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:58:30 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:58:30 +0000 Subject: Change in osmo-pcu[master]: csn1: bitvec_get_uint() may return a negative, use %d In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17202 ) Change subject: csn1: bitvec_get_uint() may return a negative, use %d ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I3cfd66643ec140150a4089b0e1c493d911d3d7d4 Gerrit-Change-Number: 17202 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 21:58:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:58:35 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:58:35 +0000 Subject: Change in osmo-pcu[master]: csn1: use proper format specifier for unsigned integers In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17203 ) Change subject: csn1: use proper format specifier for unsigned integers ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I33f86b79e72394bdb7d99762f8ec21d80e06dc30 Gerrit-Change-Number: 17203 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 17 Feb 2020 21:58:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:58:39 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:58:39 +0000 Subject: Change in osmo-pcu[master]: csn1: fix existNextElement(): use bitvec_get_bit_pos() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17191 ) Change subject: csn1: fix existNextElement(): use bitvec_get_bit_pos() ...................................................................... csn1: fix existNextElement(): use bitvec_get_bit_pos() As was discovered recently (see OS#4388), bitvec_read_field() would never return a negative value because its return type is unsigned (uint64_t). We don't really need to get more than one bit, so let's just use the bitvec_get_bit_pos() instead. Change-Id: I763a295cd955cd33f542292c85d97ff82f6b49bc Related: OS#4388 --- M src/csn1.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/csn1.cpp b/src/csn1.cpp index 5928d69..7be28a1 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -137,7 +137,7 @@ static gboolean existNextElement(bitvec *vector, unsigned& readIndex, guint8 Tag) { - guint8 res = bitvec_read_field(vector, &readIndex, 1); + int res = bitvec_get_bit_pos(vector, readIndex++); if (Tag == STANDARD_TAG) { return (res > 0); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17191 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I763a295cd955cd33f542292c85d97ff82f6b49bc Gerrit-Change-Number: 17191 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:58:40 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:58:40 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: additionally match debug output of the CSN.1 codec In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17192 ) Change subject: tests/rlcmac: additionally match debug output of the CSN.1 codec ...................................................................... tests/rlcmac: additionally match debug output of the CSN.1 codec This would allow us to catch more bugs. Note that I had to remove printing of pointer address to make the output deterministic. Change-Id: I1a77441eb957353c919bc73f8e3a2e38f4a383a9 --- M src/csn1.cpp M tests/Makefile.am M tests/rlcmac/RLCMACTest.cpp A tests/rlcmac/RLCMACTest.err M tests/testsuite.at 5 files changed, 43 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/csn1.cpp b/src/csn1.cpp index 7be28a1..b2ae1f2 100644 --- a/src/csn1.cpp +++ b/src/csn1.cpp @@ -564,7 +564,7 @@ csnStreamInit(&arT, bit_offset, length > 0 ? length : remaining_bits_len); arT.direction = 1; - LOGPC(DCSN1, LOGL_NOTICE, "ptr = %p | offset = %d | ", (void *)data, (int)pDescr->offset); + LOGPC(DCSN1, LOGL_NOTICE, "offset = %d | ", (int)pDescr->offset); Status = serialize(&arT, vector, readIndex, pvDATA(data, pDescr->offset)); if (Status >= 0) diff --git a/tests/Makefile.am b/tests/Makefile.am index c9a376f..c599636 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -136,7 +136,7 @@ EXTRA_DIST = \ testsuite.at $(srcdir)/package.m4 $(TESTSUITE) \ - rlcmac/RLCMACTest.ok \ + rlcmac/RLCMACTest.ok rlcmac/RLCMACTest.err \ alloc/AllocTest.ok alloc/AllocTest.err \ tbf/TbfTest.err \ bitcomp/BitcompTest.ok bitcomp/BitcompTest.err \ diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp index 1f74e41..0cc3347 100644 --- a/tests/rlcmac/RLCMACTest.cpp +++ b/tests/rlcmac/RLCMACTest.cpp @@ -256,7 +256,13 @@ { void *ctx = talloc_named_const(NULL, 1, "RLCMACTest"); osmo_init_logging2(ctx, &gprs_log_info); - log_parse_category_mask(osmo_stderr_target, "DPCU,3:DLGLOBAL,1:"); + log_parse_category_mask(osmo_stderr_target, "DPCU,3:DLGLOBAL,1:DCSN1,2:"); + + log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE); + log_set_print_category_hex(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 1); + log_set_print_level(osmo_stderr_target, 1); + log_set_use_color(osmo_stderr_target, 0); //printSizeofRLCMAC(); testRlcMacDownlink(ctx); diff --git a/tests/rlcmac/RLCMACTest.err b/tests/rlcmac/RLCMACTest.err new file mode 100644 index 0000000..33643f3 --- /dev/null +++ b/tests/rlcmac/RLCMACTest.err @@ -0,0 +1,32 @@ +DCSN1 INFO csnStreamDecoder (type=2): MESSAGE_TYPE = 2 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketDownlinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 5 | : End u.Global_TFI | : End ID | 0x00 = 0 | MAC_MODE = 0 | RLC_MODE = 0 | CONTROL_ACK = 0 | TIMESLOT_ALLOCATION = 28 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 15 | TIMING_ADVANCE_TIMESLOT_NUMBER = 4 | : End Packet_Timing_Advance | Exist_P0_and_BTS_PWR_CTRL_MODE = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 5 | u.Indirect_encoding = 1 | : u.Indirect_encoding | MAIO = 0 | MA_NUMBER = 14 | Exist_CHANGE_MARK = 1 | : CHANGE_MARK | CHANGE_MARK_1 = 0 | Exist_CHANGE_MARK_2 = 0 | : End CHANGE_MARK | : End u.Indirect_encoding | : End Frequency_Parameters | Exist_DOWNLINK_TFI_ASSIGNMENT = 0 | Exist_Power_Control_Parameters = 1 | : Power_Control_Parameters | ALPHA = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 1 | Slot[3].GAMMA_TN = 0 | Slot[4].Exist = 1 | Slot[4].GAMMA_TN = 0 | Slot[5].Exist = 1 | Slot[5].GAMMA_TN = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Power_Control_Parameters | Exist_TBF_Starting_Time = 0 | Exist_Measurement_Mapping = 0 | Exist_AdditionsR99 = 0 | Padding = 11|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=2): MESSAGE_TYPE = 2 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 5 | : End u.Global_TFI | : End ID | 0x00 = 0 | MAC_MODE = 0 | RLC_MODE = 0 | CONTROL_ACK = 0 | TIMESLOT_ALLOCATION = 28 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 15 | TIMING_ADVANCE_TIMESLOT_NUMBER = 4 | : End Packet_Timing_Advance | Exist_P0_and_BTS_PWR_CTRL_MODE = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 5 | u.Indirect_encoding = 1 | : u.Indirect_encoding | MAIO = 0 | MA_NUMBER = 14 | Exist_CHANGE_MARK = 1 | : CHANGE_MARK | CHANGE_MARK_1 = 0 | Exist_CHANGE_MARK_2 = 0 | : End CHANGE_MARK | : End u.Indirect_encoding | : End Frequency_Parameters | Exist_DOWNLINK_TFI_ASSIGNMENT = 0 | Exist_Power_Control_Parameters = 1 | : Power_Control_Parameters | ALPHA = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 1 | Slot[3].GAMMA_TN = 0 | Slot[4].Exist = 1 | Slot[4].GAMMA_TN = 0 | Slot[5].Exist = 1 | Slot[5].GAMMA_TN = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Power_Control_Parameters | Exist_TBF_Starting_Time = 0 | Exist_Measurement_Mapping = 0 | Exist_AdditionsR99 = 0 | Padding = 11|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketUplinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 4 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | TLLI_BLOCK_CHANNEL_CODING = 0 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 14 | TIMING_ADVANCE_TIMESLOT_NUMBER = 4 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 5 | u.Indirect_encoding = 1 | : u.Indirect_encoding | MAIO = 0 | MA_NUMBER = 14 | Exist_CHANGE_MARK = 1 | : CHANGE_MARK | CHANGE_MARK_1 = 0 | Exist_CHANGE_MARK_2 = 0 | : End CHANGE_MARK | : End u.Indirect_encoding | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 7 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 1 | Slot[4].USF_TN = 0 | Slot[4].GAMMA_TN = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 3|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 4 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | TLLI_BLOCK_CHANNEL_CODING = 0 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 14 | TIMING_ADVANCE_TIMESLOT_NUMBER = 4 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 5 | u.Indirect_encoding = 1 | : u.Indirect_encoding | MAIO = 0 | MA_NUMBER = 14 | Exist_CHANGE_MARK = 1 | : CHANGE_MARK | CHANGE_MARK_1 = 0 | Exist_CHANGE_MARK_2 = 0 | : End CHANGE_MARK | : End u.Indirect_encoding | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 7 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 1 | Slot[4].USF_TN = 0 | Slot[4].GAMMA_TN = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 3|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 6 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 0xcf59564a | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 0 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 6 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = -816228790 | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 0 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketUplinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 28 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 1 | TLLI_BLOCK_CHANNEL_CODING = 1 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 9 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 2 | u.ARFCN = 0 | u.ARFCN = 631 | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 19 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 8 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].USF_TN = 0 | Slot[6].GAMMA_TN = 9 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 28 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 1 | TLLI_BLOCK_CHANNEL_CODING = 1 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 9 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 2 | u.ARFCN = 0 | u.ARFCN = 631 | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 19 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 8 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].USF_TN = 0 | Slot[6].GAMMA_TN = 9 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=2): MESSAGE_TYPE = 2 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketDownlinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 0 | : End u.Global_TFI | : End ID | 0x00 = 0 | MAC_MODE = 0 | RLC_MODE = 0 | CONTROL_ACK = 0 | TIMESLOT_ALLOCATION = 3 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 1 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_P0_and_BTS_PWR_CTRL_MODE = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 0 | u.ARFCN = 0 | u.ARFCN = 623 | : End Frequency_Parameters | Exist_DOWNLINK_TFI_ASSIGNMENT = 1 | DOWNLINK_TFI_ASSIGNMENT = 0 | Exist_Power_Control_Parameters = 1 | : Power_Control_Parameters | ALPHA = 10 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].GAMMA_TN = 27 | Slot[7].Exist = 1 | Slot[7].GAMMA_TN = 27 | : End Power_Control_Parameters | Exist_TBF_Starting_Time = 0 | Exist_Measurement_Mapping = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_Params = 1 | EGPRS_WindowSize = 6 | LINK_QUALITY_MEASUREMENT_MODE = 0 | Exist_BEP_PERIOD2 = 0 | Exist_Packet_Extended_Timing_Advance = 0 | Exist_COMPACT_ReducedMA = 0 | : End AdditionsR99 | Padding = 11|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=2): MESSAGE_TYPE = 2 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 0 | : End u.Global_TFI | : End ID | 0x00 = 0 | MAC_MODE = 0 | RLC_MODE = 0 | CONTROL_ACK = 0 | TIMESLOT_ALLOCATION = 3 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 1 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_P0_and_BTS_PWR_CTRL_MODE = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 0 | u.ARFCN = 0 | u.ARFCN = 623 | : End Frequency_Parameters | Exist_DOWNLINK_TFI_ASSIGNMENT = 1 | DOWNLINK_TFI_ASSIGNMENT = 0 | Exist_Power_Control_Parameters = 1 | : Power_Control_Parameters | ALPHA = 10 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].GAMMA_TN = 27 | Slot[7].Exist = 1 | Slot[7].GAMMA_TN = 27 | : End Power_Control_Parameters | Exist_TBF_Starting_Time = 0 | Exist_Measurement_Mapping = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_Params = 1 | EGPRS_WindowSize = 6 | LINK_QUALITY_MEASUREMENT_MODE = 0 | Exist_BEP_PERIOD2 = 0 | Exist_Packet_Extended_Timing_Advance = 0 | Exist_COMPACT_ReducedMA = 0 | : End AdditionsR99 | Padding = 11|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketUplinkID = 2 | u.TLLI = 0x78000000 | : End ID | u.PUA_EGPRS_Struct = 1 | : u.PUA_EGPRS_Struct | u.PUA_EGPRS_00 = 0 | : u.PUA_EGPRS_00 | Exist_CONTENTION_RESOLUTION_TLLI = 0 | Exist_COMPACT_ReducedMA = 0 | EGPRS_CHANNEL_CODING_COMMAND = 0 | RESEGMENT = 1 | EGPRS_WindowSize = 6 | AccessTechnologyType = 0 | ARAC_RETRANSMISSION_REQUEST = 0 | TLLI_BLOCK_CHANNEL_CODING = 0 | Exist_BEP_PERIOD2 = 0 | : PacketTimingAdvance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 0 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End PacketTimingAdvance | Exist_Packet_Extended_Timing_Advance = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 0 | u.ARFCN = 0 | u.ARFCN = 623 | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 0 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 10 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].USF_TN = 1 | Slot[6].GAMMA_TN = 27 | Slot[7].Exist = 1 | Slot[7].USF_TN = 1 | Slot[7].GAMMA_TN = 27 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | : End u.PUA_EGPRS_00 | : End u.PUA_EGPRS_Struct | Padding = 11|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.TLLI = 2 | u.TLLI = 2013265920 | : End ID | u.PUA_EGPRS_Struct = 1 | : u.PUA_EGPRS_Struct | u.PUA_EGPRS_00 = 0 | : u.PUA_EGPRS_00 | Exist_CONTENTION_RESOLUTION_TLLI = 0 | Exist_COMPACT_ReducedMA = 0 | EGPRS_CHANNEL_CODING_COMMAND = 0 | RESEGMENT = 1 | EGPRS_WindowSize = 6 | AccessTechnologyType = 0 | ARAC_RETRANSMISSION_REQUEST = 0 | TLLI_BLOCK_CHANNEL_CODING = 0 | Exist_BEP_PERIOD2 = 0 | : PacketTimingAdvance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 0 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End PacketTimingAdvance | Exist_Packet_Extended_Timing_Advance = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 0 | u.ARFCN = 0 | u.ARFCN = 623 | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 0 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 10 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].USF_TN = 1 | Slot[6].GAMMA_TN = 27 | Slot[7].Exist = 1 | Slot[7].USF_TN = 1 | Slot[7].GAMMA_TN = 27 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | : End u.PUA_EGPRS_00 | : End u.PUA_EGPRS_Struct | Padding = 11|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 1 | u.PU_AckNack_EGPRS_Struct = 1 | : u.PU_AckNack_EGPRS_Struct | u.PU_AckNack_EGPRS_00 = 0 | : u.PU_AckNack_EGPRS_00 | EGPRS_ChannelCodingCommand = 3 | RESEGMENT = 1 | PRE_EMPTIVE_TRANSMISSION = 1 | PRR_RETRANSMISSION_REQUEST = 0 | ARAC_RETRANSMISSION_REQUEST = 0 | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 0x78000000 | TBF_EST = 0 | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Exist_Packet_Extended_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | Desc length = 15 | offset = 0 | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | : End Desc | : End EGPRS_AckNack | : End u.PU_AckNack_EGPRS_00 | : End u.PU_AckNack_EGPRS_Struct | Padding = 43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 1 | u.PU_AckNack_EGPRS_Struct = 1 | : u.PU_AckNack_EGPRS_Struct | u.PU_AckNack_EGPRS_00 = 0 | : u.PU_AckNack_EGPRS_00 | EGPRS_ChannelCodingCommand = 3 | RESEGMENT = 1 | PRE_EMPTIVE_TRANSMISSION = 1 | PRR_RETRANSMISSION_REQUEST = 0 | ARAC_RETRANSMISSION_REQUEST = 0 | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 2013265920 | TBF_EST = 0 | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Exist_Packet_Extended_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | Desc length = 15 | : End Desc | : End EGPRS_AckNack | : End u.PU_AckNack_EGPRS_00 | : End u.PU_AckNack_EGPRS_Struct | Padding = 43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=4): MESSAGE_TYPE = 4 | PAGE_MODE = 3 | : ID | DCSN1 ERROR csnStreamDecoder: error STREAM_NOT_SUPPORTED (-8) at PacketPollingID (idx 16): End ID | +DCSN1 INFO csnStreamEncoder (type=4): MESSAGE_TYPE = 4 | PAGE_MODE = 3 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.UPLINK_TFI = 0 | u.UPLINK_TFI = 0 | : End u.Global_TFI | : End ID | TYPE_OF_ACK = 0 | Padding = 43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 24 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 255 | RECEIVED_BLOCK_BITMAP[1] = 255 | RECEIVED_BLOCK_BITMAP[2] = 255 | RECEIVED_BLOCK_BITMAP[3] = 255 | RECEIVED_BLOCK_BITMAP[4] = 255 | RECEIVED_BLOCK_BITMAP[5] = 255 | RECEIVED_BLOCK_BITMAP[6] = 255 | RECEIVED_BLOCK_BITMAP[7] = 255 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 0x7e8ce3dd | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 1 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 24 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 255 | RECEIVED_BLOCK_BITMAP[1] = 255 | RECEIVED_BLOCK_BITMAP[2] = 255 | RECEIVED_BLOCK_BITMAP[3] = 255 | RECEIVED_BLOCK_BITMAP[4] = 255 | RECEIVED_BLOCK_BITMAP[5] = 255 | RECEIVED_BLOCK_BITMAP[6] = 255 | RECEIVED_BLOCK_BITMAP[7] = 255 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 2123162589 | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 1 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=37): MESSAGE_TYPE = 37 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | Padding = 43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=37): MESSAGE_TYPE = 37 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | Padding = 43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=3): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 3 | TLLI = 0x87987447 | Padding = 1|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=3): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 3 | TLLI = -2020051897 | Padding = 1|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 28 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 0 | : Channel_Quality_Report | C_VALUE = 18 | RXQUAL = 0 | SIGN_VAR = 7 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 0 | Padding = 3|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 28 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 0 | : Channel_Quality_Report | C_VALUE = 18 | RXQUAL = 0 | SIGN_VAR = 7 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 0 | Padding = 3|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | Choice PacketResourceRequestID = 1 | u.TLLI = 0xc4f70250 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 3 | u.Content length = 67 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| +DCSN1 INFO csnStreamEncoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | u.TLLI = 1 | u.TLLI = -990444976 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | u.Content = 3 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | u.Content length = 67 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| +DCSN1 INFO csnStreamDecoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 1 | MEAN_BEP_GMSK = 31 | CV_BEP_GMSK = 7 | Exist_MEAN_CV_BEP_8PSK = 0 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 0 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 0 | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | Desc length = 15 | offset = 0 | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | : End Desc | : End EGPRS_AckNack | Padding = 11|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 1 | MEAN_BEP_GMSK = 31 | CV_BEP_GMSK = 7 | Exist_MEAN_CV_BEP_8PSK = 0 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 0 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 0 | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | Desc length = 15 | : End Desc | : End EGPRS_AckNack | Padding = 11|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| +DCSN1 INFO csnStreamDecoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 0 | Exist_MEAN_CV_BEP_8PSK = 1 | MEAN_BEP_8PSK = 31 | CV_BEP_8PSK = 7 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 58 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 1 | : ChannelRequestDescription | PEAK_THROUGHPUT_CLASS = 6 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 62 | : End ChannelRequestDescription | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 0 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 1187 | Exist_CRBB = 0 | URBB = 127 | URBB = 255 | URBB = 255 | URBB = 238 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | : End Desc | : End EGPRS_AckNack | Padding = +DCSN1 INFO csnStreamEncoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 21 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | DCSN1 ERROR csnStreamDecoder: error NEED_MORE BITS TO UNPACK (-5) at EGPRS_multislot_class (idx 31): End Multislot_capability | diff --git a/tests/testsuite.at b/tests/testsuite.at index fe87ff9..8a319bd 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -5,7 +5,8 @@ AT_SETUP([rlcmac]) AT_KEYWORDS([rlcmac]) cat $abs_srcdir/rlcmac/RLCMACTest.ok > expout -AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/rlcmac/RLCMACTest], [0], [expout], [ignore]) +cat $abs_srcdir/rlcmac/RLCMACTest.err > experr +AT_CHECK([$OSMO_QEMU $abs_top_builddir/tests/rlcmac/RLCMACTest], [0], [expout], [experr]) AT_CLEANUP AT_SETUP([multi_slot]) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1a77441eb957353c919bc73f8e3a2e38f4a383a9 Gerrit-Change-Number: 17192 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:58:40 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:58:40 +0000 Subject: Change in osmo-pcu[master]: csn1: get rid of C++ specific code, compile with GCC In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17010 ) Change subject: csn1: get rid of C++ specific code, compile with GCC ...................................................................... csn1: get rid of C++ specific code, compile with GCC The implementation of CSN.1 codec was taken from Wireshark, where it's implemented in pure C. For some reason it was mixed with C++ specific features, mostly using references in parameter declaration. Not sure what are the benefits. Change-Id: I56d8b7fbd2f9f4e0bdd6b09d0366fe7eb7aa327a --- M src/Makefile.am R src/csn1.c M src/csn1.h M src/gsm_rlcmac.cpp M src/gsm_rlcmac.h M tests/rlcmac/RLCMACTest.cpp 6 files changed, 209 insertions(+), 213 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/Makefile.am b/src/Makefile.am index a84a511..eb1e389 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -40,7 +40,7 @@ libgprs_la_SOURCES = \ gprs_debug.cpp \ - csn1.cpp \ + csn1.c \ gsm_rlcmac.cpp \ gprs_bssgp_pcu.cpp \ gprs_rlcmac.cpp \ diff --git a/src/csn1.cpp b/src/csn1.c similarity index 91% rename from src/csn1.cpp rename to src/csn1.c index b2ae1f2..eedad75 100644 --- a/src/csn1.cpp +++ b/src/csn1.c @@ -28,8 +28,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include -#include #include #include #define __STDC_FORMAT_MACROS @@ -37,10 +35,8 @@ #include "csn1.h" #include -extern "C" { #include #include -} #define pvDATA(_pv, _offset) ((void*) ((unsigned char*)_pv + _offset)) #define pui8DATA(_pv, _offset) ((guint8*) pvDATA(_pv, _offset)) @@ -51,33 +47,32 @@ #define STANDARD_TAG 1 #define REVERSED_TAG 0 -using namespace std; static const unsigned char ixBitsTab[] = {0, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5}; /* Returns no_of_bits (up to 8) masked with 0x2B */ static guint8 -get_masked_bits8( bitvec *vector, unsigned& readIndex, gint bit_offset, const gint no_of_bits) +get_masked_bits8(struct bitvec *vector, unsigned *readIndex, gint bit_offset, const gint no_of_bits) { static const guint8 maskBits[] = {0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF}; //gint byte_offset = bit_offset >> 3; /* divide by 8 */ gint relative_bit_offset = bit_offset & 0x07; /* modulo 8 */ guint8 result; gint bit_shift = 8 - relative_bit_offset - (gint) no_of_bits; - readIndex -= relative_bit_offset; + *readIndex -= relative_bit_offset; if (bit_shift >= 0) { - result = (0x2B ^ ((guint8)bitvec_read_field(vector, &readIndex, 8))) >> bit_shift; - readIndex-= bit_shift; + result = (0x2B ^ ((guint8)bitvec_read_field(vector, readIndex, 8))) >> bit_shift; + *readIndex-= bit_shift; result &= maskBits[no_of_bits]; } else { - guint8 hight_part = (0x2B ^ ((guint8)bitvec_read_field(vector, &readIndex, 8))) & maskBits[8 - relative_bit_offset]; + guint8 hight_part = (0x2B ^ ((guint8)bitvec_read_field(vector, readIndex, 8))) & maskBits[8 - relative_bit_offset]; hight_part = (guint8) (hight_part << (-bit_shift)); - result = (0x2B ^ ((guint8)bitvec_read_field(vector, &readIndex, 8))) >> (8 + bit_shift); - readIndex = readIndex - (8 - (-bit_shift)); + result = (0x2B ^ ((guint8)bitvec_read_field(vector, readIndex, 8))) >> (8 + bit_shift); + *readIndex = *readIndex - (8 - (-bit_shift)); result |= hight_part; } return result; @@ -111,14 +106,14 @@ }; -static gint16 ProcessError_impl(const char *file, int line, unsigned readIndex, +static gint16 ProcessError_impl(const char *file, int line, unsigned *readIndex, const char* sz, gint16 err, const CSN_DESCR* pDescr) { /* Don't add trailing newline, top caller is responsible for appending it */ if (err != CSN_OK) LOGPSRC(DCSN1, LOGL_ERROR, file, line, "%s: error %s (%d) at %s (idx %d)", sz, get_value_string(csn1_error_names, err), err, - pDescr ? pDescr->sz : "-", readIndex); + pDescr ? pDescr->sz : "-", *readIndex); return err; } @@ -135,9 +130,9 @@ */ static gboolean -existNextElement(bitvec *vector, unsigned& readIndex, guint8 Tag) +existNextElement(struct bitvec *vector, unsigned *readIndex, guint8 Tag) { - int res = bitvec_get_bit_pos(vector, readIndex++); + int res = bitvec_get_bit_pos(vector, (*readIndex)++); if (Tag == STANDARD_TAG) { return (res > 0); @@ -147,7 +142,7 @@ gint16 -csnStreamDecoder(csnStream_t* ar, const CSN_DESCR* pDescr, bitvec *vector, unsigned& readIndex, void* data) +csnStreamDecoder(csnStream_t* ar, const CSN_DESCR* pDescr, struct bitvec *vector, unsigned *readIndex, void* data) { gint remaining_bits_len = ar->remaining_bits_len; gint bit_offset = ar->bit_offset; @@ -156,6 +151,7 @@ guint32* pui32; guint64* pui64; guint8 Tag = STANDARD_TAG; + unsigned ib; if (remaining_bits_len <= 0) { @@ -171,7 +167,7 @@ if (remaining_bits_len > 0) { pui8 = pui8DATA(data, pDescr->offset); - *pui8 = bitvec_read_field(vector, &readIndex, 1); + *pui8 = bitvec_read_field(vector, readIndex, 1); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); /* end add the bit value to protocol tree */ } @@ -207,21 +203,21 @@ { if (no_of_bits <= 8) { - guint8 ui8 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint8 ui8 = bitvec_read_field(vector, readIndex, no_of_bits); pui8 = pui8DATA(data, pDescr->offset); *pui8 = ui8; LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); } else if (no_of_bits <= 16) { - guint16 ui16 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint16 ui16 = bitvec_read_field(vector, readIndex, no_of_bits); pui16 = pui16DATA(data, pDescr->offset); *pui16 = ui16; LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { - guint32 ui32 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint32 ui32 = bitvec_read_field(vector, readIndex, no_of_bits); pui32 = pui32DATA(data, pDescr->offset); *pui32 = ui32; LOGPC(DCSN1, LOGL_NOTICE, "%s = 0x%08x | ", pDescr->sz , *pui32); @@ -269,21 +265,21 @@ { if (no_of_bits <= 8) { - guint8 ui8 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint8 ui8 = bitvec_read_field(vector, readIndex, no_of_bits); pui8 = pui8DATA(data, pDescr->offset); *pui8 = ui8 + (guint8)pDescr->descr.value; LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); } else if (no_of_bits <= 16) { - guint16 ui16 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint16 ui16 = bitvec_read_field(vector, readIndex, no_of_bits); pui16 = pui16DATA(data, pDescr->offset); *pui16 = ui16 + (guint16)pDescr->descr.value; LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { - guint32 ui32 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint32 ui32 = bitvec_read_field(vector, readIndex, no_of_bits); pui32 = pui32DATA(data, pDescr->offset); *pui32 = ui32 + (guint16)pDescr->descr.value; LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); @@ -352,7 +348,7 @@ pui8 = pui8DATA(data, pDescr->offset); do { - *pui8 = bitvec_read_field(vector, &readIndex, no_of_bits); + *pui8 = bitvec_read_field(vector, readIndex, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; bit_offset += no_of_bits; @@ -433,9 +429,9 @@ if (no_of_bits <= 32) { - for(unsigned ib = 0; ib < 4; ib++) + for(ib = 0; ib < 4; ib++) { - guint8 ui8 = bitvec_read_field(vector, &readIndex, 8); + guint8 ui8 = bitvec_read_field(vector, readIndex, 8); pui8 = pui8DATA(data, pDescr->offset+ib); *pui8 = ui8; LOGPC(DCSN1, LOGL_NOTICE, "%s[%u] = %u | ", pDescr->sz , ib, (unsigned)*pui8); @@ -443,9 +439,9 @@ } else if (no_of_bits <= 64) { - for(unsigned ib = 0; ib < 8; ib++) + for(ib = 0; ib < 8; ib++) { - guint8 ui8 = bitvec_read_field(vector, &readIndex, 8); + guint8 ui8 = bitvec_read_field(vector, readIndex, 8); pui8 = pui8DATA(data, pDescr->offset+ib); *pui8 = ui8; LOGPC(DCSN1, LOGL_NOTICE, "%s[%u] = %u | ", pDescr->sz , ib, (unsigned)*pui8); @@ -502,7 +498,7 @@ while (count > 0) { guint8 no_of_bits = pChoice->bits; - guint8 value = bitvec_read_field(vector, &readIndex, no_of_bits); + guint8 value = bitvec_read_field(vector, readIndex, no_of_bits); if (value == pChoice->value) { CSN_DESCR descr[2]; @@ -535,7 +531,7 @@ break; } - readIndex -= no_of_bits; + *readIndex -= no_of_bits; count--; pChoice++; i++; @@ -556,7 +552,7 @@ guint8 length_len = pDescr->i; gint16 Status = -1; - guint8 length = bitvec_read_field(vector, &readIndex, length_len); + guint8 length = bitvec_read_field(vector, readIndex, length_len); LOGPC(DCSN1, LOGL_NOTICE, "%s length = %d | ", pDescr->sz , (int)length); bit_offset += length_len; @@ -611,11 +607,11 @@ if (CSN_UNION_LH == pDescr->type) { - index |= get_masked_bits8(vector,readIndex, bit_offset, 1); + index |= get_masked_bits8(vector, readIndex, bit_offset, 1); } else { - index |= bitvec_read_field(vector, &readIndex, 1); + index |= bitvec_read_field(vector, readIndex, 1); } remaining_bits_len--; bit_offset++; @@ -638,7 +634,7 @@ { pui8 = pui8DATA(data, pDescr->offset); *pui8 = 0x00; - if (bitvec_read_field(vector, &readIndex, 1) > 0) + if (bitvec_read_field(vector, readIndex, 1) > 0) { *pui8 = 0x01; } @@ -665,21 +661,21 @@ if (no_of_bits <= 8) { - guint8 ui8 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint8 ui8 = bitvec_read_field(vector, readIndex, no_of_bits); pui8 = pui8DATA(data, pDescr->offset); *pui8 = ui8; LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); } else if (no_of_bits <= 16) { - guint16 ui16 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint16 ui16 = bitvec_read_field(vector, readIndex, no_of_bits); pui16 = pui16DATA(data, pDescr->offset); *pui16 = ui16; LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { - guint32 ui32 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint32 ui32 = bitvec_read_field(vector, readIndex, no_of_bits); pui32 = pui32DATA(data, pDescr->offset); *pui32 = ui32; LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); @@ -707,21 +703,21 @@ { if (no_of_bits <= 8) { - guint8 ui8 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint8 ui8 = bitvec_read_field(vector, readIndex, no_of_bits); pui8 = pui8DATA(data, pDescr->offset); *pui8 = ui8 + (guint8)pDescr->descr.value; LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); } else if (no_of_bits <= 16) { - guint16 ui16 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint16 ui16 = bitvec_read_field(vector, readIndex, no_of_bits); pui16 = pui16DATA(data, pDescr->offset); *pui16 = ui16 + (guint16)pDescr->descr.value; LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { - guint32 ui32 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint32 ui32 = bitvec_read_field(vector, readIndex, no_of_bits); pui32 = pui32DATA(data, pDescr->offset); *pui32 = ui32 + (guint16)pDescr->descr.value; LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); @@ -788,7 +784,7 @@ while (nCount > 0) { - *pui8 = bitvec_read_field(vector, &readIndex, no_of_bits); + *pui8 = bitvec_read_field(vector, readIndex, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; bit_offset += no_of_bits; @@ -801,7 +797,7 @@ while (nCount > 0) { - *pui16 = bitvec_read_field(vector, &readIndex, no_of_bits); + *pui16 = bitvec_read_field(vector, readIndex, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui16); pui16++; bit_offset += no_of_bits; @@ -877,13 +873,13 @@ if (no_of_bits <= 32) { - guint32 ui32 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint32 ui32 = bitvec_read_field(vector, readIndex, no_of_bits); pui32 = pui32DATA(data, pDescr->offset); *pui32 = ui32; } else if (no_of_bits <= 64) { - guint64 ui64 = bitvec_read_field(vector, &readIndex, no_of_bits); + guint64 ui64 = bitvec_read_field(vector, readIndex, no_of_bits); pui64 = pui64DATA(data, pDescr->offset); *pui64 = ui64; LOGPC(DCSN1, LOGL_NOTICE, "%s = %lu | ", pDescr->sz , *pui64); @@ -948,7 +944,7 @@ } else { - fExist = bitvec_read_field(vector, &readIndex, 1); + fExist = bitvec_read_field(vector, readIndex, 1); } *pui8 = fExist; @@ -987,7 +983,7 @@ /* the "regular" M_NEXT_EXIST description element */ fExist = 0x00; - if (bitvec_read_field(vector, &readIndex, 1)) + if (bitvec_read_field(vector, readIndex, 1)) { fExist = 0x01; } @@ -1030,7 +1026,7 @@ } /* the "regular" M_NEXT_EXIST_LH description element */ - fExist = get_masked_bits8(vector,readIndex,bit_offset, 1); + fExist = get_masked_bits8(vector, readIndex, bit_offset, 1); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)fExist); *pui8++ = fExist; remaining_bits_len -= 1; @@ -1080,7 +1076,7 @@ if (nB1 > 0) { /* take care of the first byte - it will be right aligned */ - *pui8 = bitvec_read_field(vector, &readIndex, nB1); + *pui8 = bitvec_read_field(vector, readIndex, nB1); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; no_of_bits -= nB1; @@ -1090,7 +1086,7 @@ /* remaining no_of_bits is a multiple of 8 or 0 */ while (no_of_bits > 0) { - *pui8 = bitvec_read_field(vector, &readIndex, 8); + *pui8 = bitvec_read_field(vector, readIndex, 8); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; no_of_bits -= 8; @@ -1134,14 +1130,14 @@ while (no_of_bits >= 8) { - *pui8 = bitvec_read_field(vector, &readIndex, 8); + *pui8 = bitvec_read_field(vector, readIndex, 8); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; no_of_bits -= 8; } if (no_of_bits > 0) - { - *pui8 = bitvec_read_field(vector, &readIndex, no_of_bits); + { + *pui8 = bitvec_read_field(vector, readIndex, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; bit_offset += no_of_bits; @@ -1212,7 +1208,7 @@ while (count > 0) { readIndex -= 8; - *pui8 = bitvec_read_field(vector, &readIndex, 8); + *pui8 = bitvec_read_field(vector, readIndex, 8); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; bit_offset += 8; @@ -1245,7 +1241,7 @@ remaining_bits_len--; /* extract and store no_of_bits long element from bitstream */ - *pui8 = bitvec_read_field(vector, &readIndex, no_of_bits); + *pui8 = bitvec_read_field(vector, readIndex, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; remaining_bits_len -= no_of_bits; @@ -1394,7 +1390,7 @@ if (no_of_bits <= 32) { - ui32 = bitvec_read_field(vector, &readIndex, no_of_bits); + ui32 = bitvec_read_field(vector, readIndex, no_of_bits); } else { @@ -1446,7 +1442,7 @@ -gint16 csnStreamEncoder(csnStream_t* ar, const CSN_DESCR* pDescr, bitvec *vector, unsigned& writeIndex, void* data) +gint16 csnStreamEncoder(csnStream_t* ar, const CSN_DESCR* pDescr, struct bitvec *vector, unsigned *writeIndex, void* data) { gint remaining_bits_len = ar->remaining_bits_len; gint bit_offset = ar->bit_offset; @@ -1454,6 +1450,7 @@ guint16* pui16; guint32* pui32; guint64* pui64; + unsigned ib; guint8 Tag = STANDARD_TAG; @@ -1471,7 +1468,7 @@ if (remaining_bits_len > 0) { pui8 = pui8DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui8, 1); + bitvec_write_field(vector, writeIndex, *pui8, 1); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); /* end add the bit value to protocol tree */ } @@ -1505,19 +1502,19 @@ if (no_of_bits <= 8) { pui8 = pui8DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui8, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui8, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); } else if (no_of_bits <= 16) { pui16 = pui16DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui16, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui16, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { pui32 = pui32DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui32, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui32, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); } else @@ -1550,19 +1547,19 @@ if (no_of_bits <= 8) { pui8 = pui8DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui8 - (guint8)pDescr->descr.value, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui8 - (guint8)pDescr->descr.value, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)(*pui8 - (guint8)pDescr->descr.value)); } else if (no_of_bits <= 16) { pui16 = pui16DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui16 - (guint16)pDescr->descr.value, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui16 - (guint16)pDescr->descr.value, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned short)(*pui16 - (guint16)pDescr->descr.value)); } else if (no_of_bits <= 32) { pui32 = pui32DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui32 - (guint16)pDescr->descr.value, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui32 - (guint16)pDescr->descr.value, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned int)(*pui32 - (guint16)pDescr->descr.value)); } else @@ -1590,12 +1587,12 @@ if (no_of_bits <= 8) { pui8 = pui8DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui8, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui8, no_of_bits); // TODO : Change get_masked_bits8() - writeIndex -= no_of_bits; + *writeIndex -= no_of_bits; guint8 ui8 = get_masked_bits8(vector, writeIndex, bit_offset, no_of_bits); - writeIndex -= no_of_bits; - bitvec_write_field(vector, &writeIndex, ui8, no_of_bits); + *writeIndex -= no_of_bits; + bitvec_write_field(vector, writeIndex, ui8, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); } @@ -1632,7 +1629,7 @@ pui8 = pui8DATA(data, pDescr->offset); do { - bitvec_write_field(vector, &writeIndex, *pui8, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui8, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; remaining_bits_len -= no_of_bits; @@ -1715,19 +1712,19 @@ if (no_of_bits <= 32) { - for(unsigned ib = 0; ib < 4; ib++) + for(ib = 0; ib < 4; ib++) { pui8 = pui8DATA(data, pDescr->offset+ib); - bitvec_write_field(vector, &writeIndex, *pui8, 8); + bitvec_write_field(vector, writeIndex, *pui8, 8); LOGPC(DCSN1, LOGL_NOTICE, "%s[%u] = %u | ", pDescr->sz , ib, (unsigned)*pui8); } } else if (no_of_bits <= 64) { - for(unsigned ib = 0; ib < 8; ib++) + for(ib = 0; ib < 8; ib++) { pui8 = pui8DATA(data, pDescr->offset+ib); - bitvec_write_field(vector, &writeIndex, *pui8, 8); + bitvec_write_field(vector, writeIndex, *pui8, 8); LOGPC(DCSN1, LOGL_NOTICE, "%s[%u] = %u | ", pDescr->sz , ib, (unsigned)*pui8); } } @@ -1782,7 +1779,7 @@ guint8 no_of_bits = pChoice->bits; guint8 value = pChoice->value; LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pChoice->descr.sz , (unsigned)value); - bitvec_write_field(vector, &writeIndex, value, no_of_bits); + bitvec_write_field(vector, writeIndex, value, no_of_bits); CSN_DESCR descr[2]; gint16 Status; @@ -1820,16 +1817,16 @@ unsigned lengthIndex; // store writeIndex for length value (7 bit) - lengthIndex = writeIndex; - writeIndex += length_len; + lengthIndex = *writeIndex; + *writeIndex += length_len; bit_offset += length_len; remaining_bits_len -= length_len; arT.direction = 0; csnStreamInit(&arT, bit_offset, remaining_bits_len); Status = serialize(&arT, vector, writeIndex, pvDATA(data, pDescr->offset)); - bitvec_write_field(vector, &lengthIndex, writeIndex-lengthIndex-length_len, length_len); - LOGPC(DCSN1, LOGL_NOTICE, "%s length = %u | ", pDescr->sz , (unsigned)(writeIndex-lengthIndex)); + bitvec_write_field(vector, &lengthIndex, *writeIndex - lengthIndex - length_len, length_len); + LOGPC(DCSN1, LOGL_NOTICE, "%s length = %u | ", pDescr->sz , (unsigned)(*writeIndex - lengthIndex)); if (Status >= 0) { @@ -1867,10 +1864,10 @@ /* Assign UnionType */ pui8 = pui8DATA(data, pDescr->offset); //read index from data and write to vector - bitvec_write_field(vector, &writeIndex, *pui8, Bits); + bitvec_write_field(vector, writeIndex, *pui8, Bits); //decode index - writeIndex -= Bits; + *writeIndex -= Bits; while (Bits > 0) { @@ -1878,11 +1875,11 @@ if (CSN_UNION_LH == pDescr->type) { - index |= get_masked_bits8(vector,writeIndex, bit_offset, 1); + index |= get_masked_bits8(vector, writeIndex, bit_offset, 1); } else { - index |= bitvec_read_field(vector, &writeIndex, 1); + index |= bitvec_read_field(vector, writeIndex, 1); } remaining_bits_len--; @@ -1890,8 +1887,8 @@ Bits--; } - writeIndex -= Bits; - bitvec_write_field(vector, &writeIndex, index, Bits); + *writeIndex -= Bits; + bitvec_write_field(vector, writeIndex, index, Bits); /* script index to continue on, limited in case we do not have a power of 2 */ @@ -1904,7 +1901,7 @@ case CSN_BIT: { pui8 = pui8DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui8, 1); + bitvec_write_field(vector, writeIndex, *pui8, 1); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); remaining_bits_len--; bit_offset++; @@ -1926,19 +1923,19 @@ if (no_of_bits <= 8) { pui8 = pui8DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui8, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui8, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); } else if (no_of_bits <= 16) { pui16 = pui16DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui16, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui16, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { pui32 = pui32DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui32, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui32, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); } else @@ -1966,19 +1963,19 @@ if (no_of_bits <= 8) { pui8 = pui8DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui8 - (guint8)pDescr->descr.value, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui8 - (guint8)pDescr->descr.value, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)(*pui8 - (guint8)pDescr->descr.value)); } else if (no_of_bits <= 16) { pui16 = pui16DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui16 - (guint16)pDescr->descr.value, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui16 - (guint16)pDescr->descr.value, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned short)(*pui16 - (guint16)pDescr->descr.value)); } else if (no_of_bits <= 32) { pui32 = pui32DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui32 - (guint16)pDescr->descr.value, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui32 - (guint16)pDescr->descr.value, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned int)(*pui32 - (guint16)pDescr->descr.value)); } else @@ -2007,12 +2004,12 @@ if (no_of_bits <= 8) { pui8 = pui8DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui8, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui8, no_of_bits); // TODO : Change get_masked_bits8() - writeIndex -= no_of_bits; + *writeIndex -= no_of_bits; guint8 ui8 = get_masked_bits8(vector, writeIndex, bit_offset, no_of_bits); - writeIndex -= no_of_bits; - bitvec_write_field(vector, &writeIndex, ui8, no_of_bits); + *writeIndex -= no_of_bits; + bitvec_write_field(vector, writeIndex, ui8, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); } @@ -2049,7 +2046,7 @@ pui8 = pui8DATA(data, pDescr->offset); do { - bitvec_write_field(vector, &writeIndex, *pui8, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui8, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; remaining_bits_len -= no_of_bits; @@ -2132,13 +2129,13 @@ if (no_of_bits <= 32) { pui32 = pui32DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui32, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui32, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); } else if (no_of_bits <= 64) { pui64 = pui64DATA(data, pDescr->offset); - bitvec_write_field(vector, &writeIndex, *pui64, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui64, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %lu | ", pDescr->sz , *pui64); } else @@ -2196,7 +2193,7 @@ unsigned exist = 0; pui8 = pui8DATA(data, pDescr->offset); exist = *pui8; - bitvec_write_field(vector, &writeIndex, *pui8, 1); + bitvec_write_field(vector, writeIndex, *pui8, 1); writeIndex--; if (CSN_EXIST_LH == pDescr->type) { @@ -2204,10 +2201,10 @@ } else { - fExist = bitvec_read_field(vector, &writeIndex, 1); + fExist = bitvec_read_field(vector, writeIndex, 1); } writeIndex--; - bitvec_write_field(vector, &writeIndex, fExist, 1); + bitvec_write_field(vector, writeIndex, fExist, 1); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz, (unsigned)fExist); remaining_bits_len--; bit_offset++; @@ -2238,7 +2235,7 @@ break; } - bitvec_write_field(vector, &writeIndex, *pui8, 1); + bitvec_write_field(vector, writeIndex, *pui8, 1); fExist = *pui8; LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); @@ -2272,11 +2269,11 @@ } /* the "regular" M_NEXT_EXIST_LH description element */ - bitvec_write_field(vector, &writeIndex, *pui8, 1); + bitvec_write_field(vector, writeIndex, *pui8, 1); writeIndex--; - fExist = get_masked_bits8(vector,writeIndex, bit_offset, 1); + fExist = get_masked_bits8(vector, writeIndex, bit_offset, 1); writeIndex--; - bitvec_write_field(vector, &writeIndex, fExist, 1); + bitvec_write_field(vector, writeIndex, fExist, 1); pui8++; remaining_bits_len--; @@ -2324,7 +2321,7 @@ if (nB1 > 0) { /* take care of the first byte - it will be right aligned */ - bitvec_write_field(vector, &writeIndex, *pui8, nB1); + bitvec_write_field(vector, writeIndex, *pui8, nB1); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; no_of_bits -= nB1; @@ -2335,7 +2332,7 @@ /* remaining no_of_bits is a multiple of 8 or 0 */ while (no_of_bits > 0) { - bitvec_write_field(vector, &writeIndex, *pui8, 8); + bitvec_write_field(vector, writeIndex, *pui8, 8); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; no_of_bits -= 8; @@ -2382,14 +2379,14 @@ while (no_of_bits > 0) { - bitvec_write_field(vector, &writeIndex, *pui8, 8); + bitvec_write_field(vector, writeIndex, *pui8, 8); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; no_of_bits -= 8; } if (nB1 > 0) { - bitvec_write_field(vector, &writeIndex, *pui8, nB1); + bitvec_write_field(vector, writeIndex, *pui8, nB1); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; no_of_bits -= nB1; @@ -2421,14 +2418,14 @@ * < padding bits > ::= { null | 0 < spare padding > ! < Ignore : 1 bit** = < no string > > } ; */ guint8 fl = filler&(0xff>>(8-bits_to_handle + 1)); - bitvec_write_field(vector, &writeIndex, fl, bits_to_handle); + bitvec_write_field(vector, writeIndex, fl, bits_to_handle); LOGPC(DCSN1, LOGL_NOTICE, "%u|", fl); remaining_bits_len -= bits_to_handle; bit_offset += bits_to_handle; } else if (bits_to_handle == 0) { - bitvec_write_field(vector, &writeIndex, filler, 8); + bitvec_write_field(vector, writeIndex, filler, 8); LOGPC(DCSN1, LOGL_NOTICE, "%u|", filler); remaining_bits_len -= 8; bit_offset += 8; @@ -2467,7 +2464,7 @@ while (count > 0) { - bitvec_write_field(vector, &writeIndex, *pui8, 8); + bitvec_write_field(vector, writeIndex, *pui8, 8); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; bit_offset += 8; @@ -2495,13 +2492,13 @@ ElementCount = *pui8DATA(data, (gint16)pDescr->descr.value); while (ElementCount > 0) { /* tag control shows existence of next list elements */ - bitvec_write_field(vector, &writeIndex, Tag, 1); + bitvec_write_field(vector, writeIndex, Tag, 1); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)Tag); bit_offset++; remaining_bits_len--; /* extract and store no_of_bits long element from bitstream */ - bitvec_write_field(vector, &writeIndex, *pui8, no_of_bits); + bitvec_write_field(vector, writeIndex, *pui8, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pui8++; ElementCount--; @@ -2515,7 +2512,7 @@ remaining_bits_len -= no_of_bits; } - bitvec_write_field(vector, &writeIndex, !Tag, 1); + bitvec_write_field(vector, writeIndex, !Tag, 1); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)(!Tag)); bit_offset++; remaining_bits_len--; @@ -2537,7 +2534,7 @@ while (ElementCount > 0) { /* tag control shows existence of next list elements */ - bitvec_write_field(vector, &writeIndex, Tag, 1); + bitvec_write_field(vector, writeIndex, Tag, 1); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)Tag); bit_offset++; @@ -2568,7 +2565,7 @@ } } - bitvec_write_field(vector, &writeIndex, !Tag, 1); + bitvec_write_field(vector, writeIndex, !Tag, 1); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)(!Tag)); bit_offset++; @@ -2606,7 +2603,7 @@ { /* get data element */ if (ElementCount != ElementNum) { - bitvec_write_field(vector, &writeIndex, Tag, 1); + bitvec_write_field(vector, writeIndex, Tag, 1); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)Tag); bit_offset++; remaining_bits_len--; @@ -2633,7 +2630,7 @@ } } - bitvec_write_field(vector, &writeIndex, !Tag, 1); + bitvec_write_field(vector, writeIndex, !Tag, 1); bit_offset++; remaining_bits_len--; Tag = STANDARD_TAG; /* in case it was set to "reversed" */ @@ -2644,7 +2641,7 @@ case CSN_FIXED: { /* Verify the fixed bits */ guint8 no_of_bits = (guint8) pDescr->i; - bitvec_write_field(vector, &writeIndex, pDescr->offset, no_of_bits); + bitvec_write_field(vector, writeIndex, pDescr->offset, no_of_bits); LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)pDescr->offset); remaining_bits_len -= no_of_bits; bit_offset += no_of_bits; diff --git a/src/csn1.h b/src/csn1.h index f445dd2..b3fdc0a 100644 --- a/src/csn1.h +++ b/src/csn1.h @@ -28,12 +28,7 @@ #ifndef _PACKET_CSN1_H_ #define _PACKET_CSN1_H_ -extern "C" { #include -} - -#include -#include #define MIN(a,b) (((a)<(b))?(a):(b)) //#define max(a,b) (((a)>(b))?(a):(b)) @@ -88,7 +83,7 @@ gint direction; /* 0 - decode; 1 - encode */ } csnStream_t; -typedef gint16 (*StreamSerializeFcn_t)(csnStream_t* ar, bitvec *vector, unsigned& readIndex, void* data); +typedef gint16 (*StreamSerializeFcn_t)(csnStream_t* ar, struct bitvec *vector, unsigned *readIndex, void* data); typedef enum { CSN_END = 0, @@ -233,9 +228,9 @@ * RETURNS: int Number of bits left to be unpacked. Negative Error code if failed to unpack all bits ******************************************************************************/ -gint16 csnStreamDecoder(csnStream_t* ar, const CSN_DESCR* pDescr, bitvec *vector, unsigned& readIndex, void* data); +gint16 csnStreamDecoder(csnStream_t* ar, const CSN_DESCR* pDescr, struct bitvec *vector, unsigned *readIndex, void* data); -gint16 csnStreamEncoder(csnStream_t* ar, const CSN_DESCR* pDescr, bitvec *vector, unsigned& readIndex, void* data); +gint16 csnStreamEncoder(csnStream_t* ar, const CSN_DESCR* pDescr, struct bitvec *vector, unsigned *writeIndex, void* data); /* CSN struct macro's */ #define CSN_DESCR_BEGIN(_STRUCT)\ diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index 403b65e..52154b8 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -184,7 +184,7 @@ CSN_DESCR_END (EGPRS_AckNack_Desc_t) /*< EGPRS Ack/Nack Description IE >*/ -gint16 Egprs_Ack_Nack_Desc_w_len_Dissector(csnStream_t* ar, bitvec *vector, unsigned& readIndex, void* data) +gint16 Egprs_Ack_Nack_Desc_w_len_Dissector(csnStream_t* ar, bitvec *vector, unsigned *readIndex, void* data) { if (ar->direction == 0) { @@ -745,7 +745,7 @@ M_UINT (Receive_N_PDU_Number_t, value, 8), CSN_DESCR_END (Receive_N_PDU_Number_t) -gint16 Receive_N_PDU_Number_list_Dissector(csnStream_t* ar, bitvec *vector, unsigned& readIndex, void* data) +gint16 Receive_N_PDU_Number_list_Dissector(csnStream_t* ar, bitvec *vector, unsigned *readIndex, void* data) { if (ar->direction == 0) { @@ -856,7 +856,7 @@ M_UINT_OR_NULL (Content_t, PS_HandoverCapability, 1), CSN_DESCR_END (Content_t) -gint16 Content_Dissector(csnStream_t* ar, bitvec *vector, unsigned& readIndex, void* data) +gint16 Content_Dissector(csnStream_t* ar, bitvec *vector, unsigned *readIndex, void* data) { if (ar->direction == 0) { @@ -880,7 +880,7 @@ M_REC_TARRAY (Additional_access_technologies_t, Additional_access_technologies[0], Additional_access_technologies_struct_t, Count_additional_access_technologies), CSN_DESCR_END (Additional_access_technologies_t) -gint16 Additional_access_technologies_Dissector(csnStream_t* ar, bitvec* vector, unsigned& readIndex, void* data) +gint16 Additional_access_technologies_Dissector(csnStream_t* ar, bitvec* vector, unsigned *readIndex, void* data) { if (ar->direction == 0) { @@ -4999,73 +4999,73 @@ * CSNDESCR is an array that holds the different element types * ar is the csn context holding the bitcount, offset and output */ - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Failure_t), vector, readIndex, &data->u.Packet_Cell_Change_Failure); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Failure_t), vector, &readIndex, &data->u.Packet_Cell_Change_Failure); break; } case MT_PACKET_CONTROL_ACK: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Control_Acknowledgement_t), vector, readIndex, &data->u.Packet_Control_Acknowledgement); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Control_Acknowledgement_t), vector, &readIndex, &data->u.Packet_Control_Acknowledgement); break; } case MT_PACKET_DOWNLINK_ACK_NACK: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Ack_Nack_t), vector, readIndex, &data->u.Packet_Downlink_Ack_Nack); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Ack_Nack_t), vector, &readIndex, &data->u.Packet_Downlink_Ack_Nack); break; } case MT_PACKET_UPLINK_DUMMY_CONTROL_BLOCK: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Dummy_Control_Block_t), vector, readIndex, &data->u.Packet_Uplink_Dummy_Control_Block); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Dummy_Control_Block_t), vector, &readIndex, &data->u.Packet_Uplink_Dummy_Control_Block); break; } case MT_PACKET_MEASUREMENT_REPORT: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Measurement_Report_t), vector, readIndex, &data->u.Packet_Measurement_Report); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Measurement_Report_t), vector, &readIndex, &data->u.Packet_Measurement_Report); break; } case MT_PACKET_RESOURCE_REQUEST: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Resource_Request_t), vector, readIndex, &data->u.Packet_Resource_Request); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Resource_Request_t), vector, &readIndex, &data->u.Packet_Resource_Request); break; } case MT_PACKET_MOBILE_TBF_STATUS: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Mobile_TBF_Status_t), vector, readIndex, &data->u.Packet_Mobile_TBF_Status); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Mobile_TBF_Status_t), vector, &readIndex, &data->u.Packet_Mobile_TBF_Status); break; } case MT_PACKET_PSI_STATUS: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PSI_Status_t), vector, readIndex, &data->u.Packet_PSI_Status); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PSI_Status_t), vector, &readIndex, &data->u.Packet_PSI_Status); break; } case MT_EGPRS_PACKET_DOWNLINK_ACK_NACK: { - ret = csnStreamDecoder(&ar, CSNDESCR(EGPRS_PD_AckNack_t), vector, readIndex, &data->u.Egprs_Packet_Downlink_Ack_Nack); + ret = csnStreamDecoder(&ar, CSNDESCR(EGPRS_PD_AckNack_t), vector, &readIndex, &data->u.Egprs_Packet_Downlink_Ack_Nack); break; } case MT_PACKET_PAUSE: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Pause_t), vector, readIndex, &data->u.Packet_Pause); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Pause_t), vector, &readIndex, &data->u.Packet_Pause); break; } case MT_PACKET_ENHANCED_MEASUREMENT_REPORT: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Enh_Measurement_Report_t), vector, readIndex, &data->u.Packet_Enh_Measurement_Report); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Enh_Measurement_Report_t), vector, &readIndex, &data->u.Packet_Enh_Measurement_Report); break; } case MT_ADDITIONAL_MS_RAC: { - ret = csnStreamDecoder(&ar, CSNDESCR(Additional_MS_Rad_Access_Cap_t), vector, readIndex, &data->u.Additional_MS_Rad_Access_Cap); + ret = csnStreamDecoder(&ar, CSNDESCR(Additional_MS_Rad_Access_Cap_t), vector, &readIndex, &data->u.Additional_MS_Rad_Access_Cap); break; } case MT_PACKET_CELL_CHANGE_NOTIFICATION: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Notification_t), vector, readIndex, &data->u.Packet_Cell_Change_Notification); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Notification_t), vector, &readIndex, &data->u.Packet_Cell_Change_Notification); break; } case MT_PACKET_SI_STATUS: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_SI_Status_t), vector, readIndex, &data->u.Packet_SI_Status); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_SI_Status_t), vector, &readIndex, &data->u.Packet_SI_Status); break; } default: @@ -5154,127 +5154,127 @@ { case MT_PACKET_ACCESS_REJECT: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Access_Reject_t), vector, readIndex, &data->u.Packet_Access_Reject); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Access_Reject_t), vector, &readIndex, &data->u.Packet_Access_Reject); break; } case MT_PACKET_CELL_CHANGE_ORDER: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Order_t), vector, readIndex, &data->u.Packet_Cell_Change_Order); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Order_t), vector, &readIndex, &data->u.Packet_Cell_Change_Order); break; } case MT_PACKET_CELL_CHANGE_CONTINUE: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Continue_t), vector, readIndex, &data->u.Packet_Cell_Change_Continue); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Cell_Change_Continue_t), vector, &readIndex, &data->u.Packet_Cell_Change_Continue); break; } case MT_PACKET_DOWNLINK_ASSIGNMENT: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Assignment_t), vector, readIndex, &data->u.Packet_Downlink_Assignment); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Assignment_t), vector, &readIndex, &data->u.Packet_Downlink_Assignment); break; } case MT_PACKET_MEASUREMENT_ORDER: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Measurement_Order_t), vector, readIndex, &data->u.Packet_Measurement_Order); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Measurement_Order_t), vector, &readIndex, &data->u.Packet_Measurement_Order); break; } case MT_PACKET_NEIGHBOUR_CELL_DATA: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Neighbour_Cell_Data_t), vector, readIndex, &data->u.Packet_Neighbour_Cell_Data); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Neighbour_Cell_Data_t), vector, &readIndex, &data->u.Packet_Neighbour_Cell_Data); break; } case MT_PACKET_SERVING_CELL_DATA: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Serving_Cell_Data_t), vector, readIndex, &data->u.Packet_Serving_Cell_Data); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Serving_Cell_Data_t), vector, &readIndex, &data->u.Packet_Serving_Cell_Data); break; } case MT_PACKET_PAGING_REQUEST: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Paging_Request_t), vector, readIndex, &data->u.Packet_Paging_Request); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Paging_Request_t), vector, &readIndex, &data->u.Packet_Paging_Request); break; } case MT_PACKET_PDCH_RELEASE: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PDCH_Release_t), vector, readIndex, &data->u.Packet_PDCH_Release); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PDCH_Release_t), vector, &readIndex, &data->u.Packet_PDCH_Release); break; } case MT_PACKET_POLLING_REQ: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Polling_Request_t), vector, readIndex, &data->u.Packet_Polling_Request); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Polling_Request_t), vector, &readIndex, &data->u.Packet_Polling_Request); break; } case MT_PACKET_POWER_CONTROL_TIMING_ADVANCE: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Power_Control_Timing_Advance_t), vector, readIndex, &data->u.Packet_Power_Control_Timing_Advance); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Power_Control_Timing_Advance_t), vector, &readIndex, &data->u.Packet_Power_Control_Timing_Advance); break; } case MT_PACKET_PRACH_PARAMETERS: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PRACH_Parameters_t), vector, readIndex, &data->u.Packet_PRACH_Parameters); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PRACH_Parameters_t), vector, &readIndex, &data->u.Packet_PRACH_Parameters); break; } case MT_PACKET_QUEUEING_NOTIFICATION: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Queueing_Notification_t), vector, readIndex, &data->u.Packet_Queueing_Notification); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Queueing_Notification_t), vector, &readIndex, &data->u.Packet_Queueing_Notification); break; } case MT_PACKET_TIMESLOT_RECONFIGURE: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Timeslot_Reconfigure_t), vector, readIndex, &data->u.Packet_Timeslot_Reconfigure); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Timeslot_Reconfigure_t), vector, &readIndex, &data->u.Packet_Timeslot_Reconfigure); break; } case MT_PACKET_TBF_RELEASE: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_TBF_Release_t), vector, readIndex, &data->u.Packet_TBF_Release); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_TBF_Release_t), vector, &readIndex, &data->u.Packet_TBF_Release); break; } case MT_PACKET_UPLINK_ACK_NACK: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Ack_Nack_t), vector, readIndex, &data->u.Packet_Uplink_Ack_Nack); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Ack_Nack_t), vector, &readIndex, &data->u.Packet_Uplink_Ack_Nack); break; } case MT_PACKET_UPLINK_ASSIGNMENT: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Assignment_t), vector, readIndex, &data->u.Packet_Uplink_Assignment); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Uplink_Assignment_t), vector, &readIndex, &data->u.Packet_Uplink_Assignment); break; } case MT_PACKET_HANDOVER_COMMAND: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Handover_Command_t), vector, readIndex, &data->u.Packet_Handover_Command); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Handover_Command_t), vector, &readIndex, &data->u.Packet_Handover_Command); break; } case MT_PACKET_PHYSICAL_INFORMATION: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PhysicalInformation_t), vector, readIndex, &data->u.Packet_Handover_Command); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_PhysicalInformation_t), vector, &readIndex, &data->u.Packet_Handover_Command); break; } case MT_PACKET_DOWNLINK_DUMMY_CONTROL_BLOCK: { - ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Dummy_Control_Block_t), vector, readIndex, &data->u.Packet_Downlink_Dummy_Control_Block); + ret = csnStreamDecoder(&ar, CSNDESCR(Packet_Downlink_Dummy_Control_Block_t), vector, &readIndex, &data->u.Packet_Downlink_Dummy_Control_Block); break; } case MT_PACKET_SYSTEM_INFO_1: { - ret = csnStreamDecoder(&ar, CSNDESCR(PSI1_t), vector, readIndex, &data->u.PSI1); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI1_t), vector, &readIndex, &data->u.PSI1); break; } case MT_PACKET_SYSTEM_INFO_2: { - ret = csnStreamDecoder(&ar, CSNDESCR(PSI2_t), vector, readIndex, &data->u.PSI2); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI2_t), vector, &readIndex, &data->u.PSI2); break; } case MT_PACKET_SYSTEM_INFO_3: { - ret = csnStreamDecoder(&ar, CSNDESCR(PSI3_t), vector, readIndex, &data->u.PSI3); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI3_t), vector, &readIndex, &data->u.PSI3); break; } case MT_PACKET_SYSTEM_INFO_5: { - ret = csnStreamDecoder(&ar, CSNDESCR(PSI5_t), vector, readIndex, &data->u.PSI5); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI5_t), vector, &readIndex, &data->u.PSI5); break; } case MT_PACKET_SYSTEM_INFO_13: { - ret = csnStreamDecoder(&ar, CSNDESCR(PSI13_t), vector, readIndex, &data->u.PSI13); + ret = csnStreamDecoder(&ar, CSNDESCR(PSI13_t), vector, &readIndex, &data->u.PSI13); break; } default: @@ -5316,73 +5316,73 @@ * CSNDESCR is an array that holds the different element types * ar is the csn context holding the bitcount, offset and output */ - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Failure_t), vector, writeIndex, &data->u.Packet_Cell_Change_Failure); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Failure_t), vector, &writeIndex, &data->u.Packet_Cell_Change_Failure); break; } case MT_PACKET_CONTROL_ACK: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Control_Acknowledgement_t), vector, writeIndex, &data->u.Packet_Control_Acknowledgement); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Control_Acknowledgement_t), vector, &writeIndex, &data->u.Packet_Control_Acknowledgement); break; } case MT_PACKET_DOWNLINK_ACK_NACK: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Ack_Nack_t), vector, writeIndex, &data->u.Packet_Downlink_Ack_Nack); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Ack_Nack_t), vector, &writeIndex, &data->u.Packet_Downlink_Ack_Nack); break; } case MT_PACKET_UPLINK_DUMMY_CONTROL_BLOCK: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Dummy_Control_Block_t), vector, writeIndex, &data->u.Packet_Uplink_Dummy_Control_Block); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Dummy_Control_Block_t), vector, &writeIndex, &data->u.Packet_Uplink_Dummy_Control_Block); break; } case MT_PACKET_MEASUREMENT_REPORT: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Measurement_Report_t), vector, writeIndex, &data->u.Packet_Measurement_Report); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Measurement_Report_t), vector, &writeIndex, &data->u.Packet_Measurement_Report); break; } case MT_PACKET_RESOURCE_REQUEST: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Resource_Request_t), vector, writeIndex, &data->u.Packet_Resource_Request); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Resource_Request_t), vector, &writeIndex, &data->u.Packet_Resource_Request); break; } case MT_PACKET_MOBILE_TBF_STATUS: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Mobile_TBF_Status_t), vector, writeIndex, &data->u.Packet_Mobile_TBF_Status); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Mobile_TBF_Status_t), vector, &writeIndex, &data->u.Packet_Mobile_TBF_Status); break; } case MT_PACKET_PSI_STATUS: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PSI_Status_t), vector, writeIndex, &data->u.Packet_PSI_Status); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PSI_Status_t), vector, &writeIndex, &data->u.Packet_PSI_Status); break; } case MT_EGPRS_PACKET_DOWNLINK_ACK_NACK: { - ret = csnStreamEncoder(&ar, CSNDESCR(EGPRS_PD_AckNack_t), vector, writeIndex, &data->u.Egprs_Packet_Downlink_Ack_Nack); + ret = csnStreamEncoder(&ar, CSNDESCR(EGPRS_PD_AckNack_t), vector, &writeIndex, &data->u.Egprs_Packet_Downlink_Ack_Nack); break; } case MT_PACKET_PAUSE: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Pause_t), vector, writeIndex, &data->u.Packet_Pause); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Pause_t), vector, &writeIndex, &data->u.Packet_Pause); break; } case MT_PACKET_ENHANCED_MEASUREMENT_REPORT: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Enh_Measurement_Report_t), vector, writeIndex, &data->u.Packet_Enh_Measurement_Report); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Enh_Measurement_Report_t), vector, &writeIndex, &data->u.Packet_Enh_Measurement_Report); break; } case MT_ADDITIONAL_MS_RAC: { - ret = csnStreamEncoder(&ar, CSNDESCR(Additional_MS_Rad_Access_Cap_t), vector, writeIndex, &data->u.Additional_MS_Rad_Access_Cap); + ret = csnStreamEncoder(&ar, CSNDESCR(Additional_MS_Rad_Access_Cap_t), vector, &writeIndex, &data->u.Additional_MS_Rad_Access_Cap); break; } case MT_PACKET_CELL_CHANGE_NOTIFICATION: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Notification_t), vector, writeIndex, &data->u.Packet_Cell_Change_Notification); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Notification_t), vector, &writeIndex, &data->u.Packet_Cell_Change_Notification); break; } case MT_PACKET_SI_STATUS: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_SI_Status_t), vector, writeIndex, &data->u.Packet_SI_Status); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_SI_Status_t), vector, &writeIndex, &data->u.Packet_SI_Status); break; } default: @@ -5468,127 +5468,127 @@ { case MT_PACKET_ACCESS_REJECT: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Access_Reject_t), vector, writeIndex, &data->u.Packet_Access_Reject); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Access_Reject_t), vector, &writeIndex, &data->u.Packet_Access_Reject); break; } case MT_PACKET_CELL_CHANGE_ORDER: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Order_t), vector, writeIndex, &data->u.Packet_Cell_Change_Order); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Order_t), vector, &writeIndex, &data->u.Packet_Cell_Change_Order); break; } case MT_PACKET_CELL_CHANGE_CONTINUE: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Continue_t), vector, writeIndex, &data->u.Packet_Cell_Change_Continue); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Cell_Change_Continue_t), vector, &writeIndex, &data->u.Packet_Cell_Change_Continue); break; } case MT_PACKET_DOWNLINK_ASSIGNMENT: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Assignment_t), vector, writeIndex, &data->u.Packet_Downlink_Assignment); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Assignment_t), vector, &writeIndex, &data->u.Packet_Downlink_Assignment); break; } case MT_PACKET_MEASUREMENT_ORDER: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Measurement_Order_t), vector, writeIndex, &data->u.Packet_Measurement_Order); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Measurement_Order_t), vector, &writeIndex, &data->u.Packet_Measurement_Order); break; } case MT_PACKET_NEIGHBOUR_CELL_DATA: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Neighbour_Cell_Data_t), vector, writeIndex, &data->u.Packet_Neighbour_Cell_Data); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Neighbour_Cell_Data_t), vector, &writeIndex, &data->u.Packet_Neighbour_Cell_Data); break; } case MT_PACKET_SERVING_CELL_DATA: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Serving_Cell_Data_t), vector, writeIndex, &data->u.Packet_Serving_Cell_Data); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Serving_Cell_Data_t), vector, &writeIndex, &data->u.Packet_Serving_Cell_Data); break; } case MT_PACKET_PAGING_REQUEST: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Paging_Request_t), vector, writeIndex, &data->u.Packet_Paging_Request); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Paging_Request_t), vector, &writeIndex, &data->u.Packet_Paging_Request); break; } case MT_PACKET_PDCH_RELEASE: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PDCH_Release_t), vector, writeIndex, &data->u.Packet_PDCH_Release); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PDCH_Release_t), vector, &writeIndex, &data->u.Packet_PDCH_Release); break; } case MT_PACKET_POLLING_REQ: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Polling_Request_t), vector, writeIndex, &data->u.Packet_Polling_Request); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Polling_Request_t), vector, &writeIndex, &data->u.Packet_Polling_Request); break; } case MT_PACKET_POWER_CONTROL_TIMING_ADVANCE: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Power_Control_Timing_Advance_t), vector, writeIndex, &data->u.Packet_Power_Control_Timing_Advance); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Power_Control_Timing_Advance_t), vector, &writeIndex, &data->u.Packet_Power_Control_Timing_Advance); break; } case MT_PACKET_PRACH_PARAMETERS: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PRACH_Parameters_t), vector, writeIndex, &data->u.Packet_PRACH_Parameters); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PRACH_Parameters_t), vector, &writeIndex, &data->u.Packet_PRACH_Parameters); break; } case MT_PACKET_QUEUEING_NOTIFICATION: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Queueing_Notification_t), vector, writeIndex, &data->u.Packet_Queueing_Notification); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Queueing_Notification_t), vector, &writeIndex, &data->u.Packet_Queueing_Notification); break; } case MT_PACKET_TIMESLOT_RECONFIGURE: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Timeslot_Reconfigure_t), vector, writeIndex, &data->u.Packet_Timeslot_Reconfigure); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Timeslot_Reconfigure_t), vector, &writeIndex, &data->u.Packet_Timeslot_Reconfigure); break; } case MT_PACKET_TBF_RELEASE: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_TBF_Release_t), vector, writeIndex, &data->u.Packet_TBF_Release); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_TBF_Release_t), vector, &writeIndex, &data->u.Packet_TBF_Release); break; } case MT_PACKET_UPLINK_ACK_NACK: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Ack_Nack_t), vector, writeIndex, &data->u.Packet_Uplink_Ack_Nack); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Ack_Nack_t), vector, &writeIndex, &data->u.Packet_Uplink_Ack_Nack); break; } case MT_PACKET_UPLINK_ASSIGNMENT: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Assignment_t), vector, writeIndex, &data->u.Packet_Uplink_Assignment); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Uplink_Assignment_t), vector, &writeIndex, &data->u.Packet_Uplink_Assignment); break; } case MT_PACKET_HANDOVER_COMMAND: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Handover_Command_t), vector, writeIndex, &data->u.Packet_Handover_Command); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Handover_Command_t), vector, &writeIndex, &data->u.Packet_Handover_Command); break; } case MT_PACKET_PHYSICAL_INFORMATION: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PhysicalInformation_t), vector, writeIndex, &data->u.Packet_Handover_Command); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_PhysicalInformation_t), vector, &writeIndex, &data->u.Packet_Handover_Command); break; } case MT_PACKET_DOWNLINK_DUMMY_CONTROL_BLOCK: { - ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Dummy_Control_Block_t), vector, writeIndex, &data->u.Packet_Downlink_Dummy_Control_Block); + ret = csnStreamEncoder(&ar, CSNDESCR(Packet_Downlink_Dummy_Control_Block_t), vector, &writeIndex, &data->u.Packet_Downlink_Dummy_Control_Block); break; } case MT_PACKET_SYSTEM_INFO_1: { - ret = csnStreamEncoder(&ar, CSNDESCR(PSI1_t), vector, writeIndex, &data->u.PSI1); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI1_t), vector, &writeIndex, &data->u.PSI1); break; } case MT_PACKET_SYSTEM_INFO_2: { - ret = csnStreamEncoder(&ar, CSNDESCR(PSI2_t), vector, writeIndex, &data->u.PSI2); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI2_t), vector, &writeIndex, &data->u.PSI2); break; } case MT_PACKET_SYSTEM_INFO_3: { - ret = csnStreamEncoder(&ar, CSNDESCR(PSI3_t), vector, writeIndex, &data->u.PSI3); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI3_t), vector, &writeIndex, &data->u.PSI3); break; } case MT_PACKET_SYSTEM_INFO_5: { - ret = csnStreamEncoder(&ar, CSNDESCR(PSI5_t), vector, writeIndex, &data->u.PSI5); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI5_t), vector, &writeIndex, &data->u.PSI5); break; } case MT_PACKET_SYSTEM_INFO_13: { - ret = csnStreamEncoder(&ar, CSNDESCR(PSI13_t), vector, writeIndex, &data->u.PSI13); + ret = csnStreamEncoder(&ar, CSNDESCR(PSI13_t), vector, &writeIndex, &data->u.PSI13); break; } default: @@ -5754,7 +5754,7 @@ /* recursive csnStreamEncoder call uses LOGPC everywhere, so we need to start the log somewhere... */ LOGP(DCSN1, LOGL_INFO, "csnStreamEncoder (RAcap): "); - ret = csnStreamDecoder(&ar, CSNDESCR(MS_Radio_Access_capability_t), vector, readIndex, data); + ret = csnStreamDecoder(&ar, CSNDESCR(MS_Radio_Access_capability_t), vector, &readIndex, data); /* recursive csnStreamDecoder call uses LOGPC everywhere without trailing newline, so as a caller we are responisble for submitting it */ diff --git a/src/gsm_rlcmac.h b/src/gsm_rlcmac.h index f6979e7..4ba03fe 100644 --- a/src/gsm_rlcmac.h +++ b/src/gsm_rlcmac.h @@ -32,7 +32,10 @@ #ifndef __PACKET_GSM_RLCMAC_H__ #define __PACKET_GSM_RLCMAC_H__ +extern "C" { #include "csn1.h" +} + #include #include diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp index 0cc3347..a8d6217 100644 --- a/tests/rlcmac/RLCMACTest.cpp +++ b/tests/rlcmac/RLCMACTest.cpp @@ -24,7 +24,6 @@ #include #include #include -#include "csn1.h" #include "gsm_rlcmac.h" #include "gprs_rlcmac.h" #include "decoding.h" @@ -37,6 +36,8 @@ #include #include #include + +#include "csn1.h" } using namespace std; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I56d8b7fbd2f9f4e0bdd6b09d0366fe7eb7aa327a Gerrit-Change-Number: 17010 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:58:41 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:58:41 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): do not subtract no_of_bits twice In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17194 ) Change subject: csn1: fix csnStreamDecoder(): do not subtract no_of_bits twice ...................................................................... csn1: fix csnStreamDecoder(): do not subtract no_of_bits twice Found while doing differential analysis (comparison against the original implementation from Wireshark). Change-Id: Id2a4f03035cd8354d3fba0ad37571453d3986d21 --- M src/csn1.c 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/csn1.c b/src/csn1.c index eedad75..a766bd3 100644 --- a/src/csn1.c +++ b/src/csn1.c @@ -306,7 +306,6 @@ if (remaining_bits_len >= no_of_bits) { - remaining_bits_len -= no_of_bits; if (no_of_bits <= 8) { guint8 ui8 = get_masked_bits8(vector, readIndex, bit_offset, no_of_bits); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17194 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Id2a4f03035cd8354d3fba0ad37571453d3986d21 Gerrit-Change-Number: 17194 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:58:42 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:58:42 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): always keep remaining_bits_len updated In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17195 ) Change subject: csn1: fix csnStreamDecoder(): always keep remaining_bits_len updated ...................................................................... csn1: fix csnStreamDecoder(): always keep remaining_bits_len updated Found while doing differential analysis (comparison against the original implementation from Wireshark). Change-Id: I9f7fa9c3f2f4ff5213dded930cee7ec509b9d799 --- M src/csn1.c 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/csn1.c b/src/csn1.c index a766bd3..31b8e00 100644 --- a/src/csn1.c +++ b/src/csn1.c @@ -656,8 +656,6 @@ guint8 no_of_bits = (guint8) pDescr->i; if (remaining_bits_len >= no_of_bits) { - remaining_bits_len -= no_of_bits; - if (no_of_bits <= 8) { guint8 ui8 = bitvec_read_field(vector, readIndex, no_of_bits); @@ -689,6 +687,7 @@ return ProcessError(readIndex,"csnStreamDecoder", CSN_ERROR_GENERAL, pDescr); } + remaining_bits_len -= no_of_bits; bit_offset += no_of_bits; pDescr++; break; @@ -731,6 +730,7 @@ return ProcessError(readIndex,"csnStreamDecoder", CSN_ERROR_NEED_MORE_BITS_TO_UNPACK, pDescr); } + remaining_bits_len -= no_of_bits; bit_offset += no_of_bits; pDescr++; break; @@ -759,6 +759,7 @@ return ProcessError(readIndex,"csnStreamDecoder", CSN_ERROR_NEED_MORE_BITS_TO_UNPACK, pDescr); } + remaining_bits_len -= no_of_bits; bit_offset += no_of_bits; pDescr++; break; @@ -1310,6 +1311,7 @@ LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , bitvec_get_uint(vector, 1)); /* existNextElement() returned FALSE, 1 bit consumed */ + remaining_bits_len--; bit_offset++; /* Store the counted number of elements of the array */ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17195 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I9f7fa9c3f2f4ff5213dded930cee7ec509b9d799 Gerrit-Change-Number: 17195 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:58:43 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:58:43 +0000 Subject: Change in osmo-pcu[master]: csn1: fix csnStreamDecoder(): update bit_offset in CSN_EXIST{_LH} In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17196 ) Change subject: csn1: fix csnStreamDecoder(): update bit_offset in CSN_EXIST{_LH} ...................................................................... csn1: fix csnStreamDecoder(): update bit_offset in CSN_EXIST{_LH} Found while doing differential analysis (comparison against the original implementation from Wireshark). Change-Id: Ibd0b7400d78f7873c2a8d45267332f511b5c6fbb --- M src/csn1.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/csn1.c b/src/csn1.c index 31b8e00..2f05327 100644 --- a/src/csn1.c +++ b/src/csn1.c @@ -950,6 +950,7 @@ *pui8 = fExist; LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned)*pui8); pDescr++; + bit_offset++; remaining_bits_len -= 1; if (!fExist) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17196 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ibd0b7400d78f7873c2a8d45267332f511b5c6fbb Gerrit-Change-Number: 17196 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:58:44 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:58:44 +0000 Subject: Change in osmo-pcu[master]: csn1: bitvec_get_uint() may return a negative, use %d In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17202 ) Change subject: csn1: bitvec_get_uint() may return a negative, use %d ...................................................................... csn1: bitvec_get_uint() may return a negative, use %d Change-Id: I3cfd66643ec140150a4089b0e1c493d911d3d7d4 --- M src/csn1.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/csn1.c b/src/csn1.c index 2f05327..7464ac3 100644 --- a/src/csn1.c +++ b/src/csn1.c @@ -1309,7 +1309,7 @@ } } - LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , bitvec_get_uint(vector, 1)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , bitvec_get_uint(vector, 1)); /* existNextElement() returned FALSE, 1 bit consumed */ remaining_bits_len--; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I3cfd66643ec140150a4089b0e1c493d911d3d7d4 Gerrit-Change-Number: 17202 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 21:58:44 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 21:58:44 +0000 Subject: Change in osmo-pcu[master]: csn1: use proper format specifier for unsigned integers In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17203 ) Change subject: csn1: use proper format specifier for unsigned integers ...................................................................... csn1: use proper format specifier for unsigned integers Change-Id: I33f86b79e72394bdb7d99762f8ec21d80e06dc30 --- M src/csn1.c M tests/rlcmac/RLCMACTest.err 2 files changed, 23 insertions(+), 23 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/csn1.c b/src/csn1.c index 7464ac3..594e8ec 100644 --- a/src/csn1.c +++ b/src/csn1.c @@ -111,7 +111,7 @@ { /* Don't add trailing newline, top caller is responsible for appending it */ if (err != CSN_OK) - LOGPSRC(DCSN1, LOGL_ERROR, file, line, "%s: error %s (%d) at %s (idx %d)", + LOGPSRC(DCSN1, LOGL_ERROR, file, line, "%s: error %s (%d) at %s (idx %u)", sz, get_value_string(csn1_error_names, err), err, pDescr ? pDescr->sz : "-", *readIndex); return err; @@ -213,7 +213,7 @@ guint16 ui16 = bitvec_read_field(vector, readIndex, no_of_bits); pui16 = pui16DATA(data, pDescr->offset); *pui16 = ui16; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { @@ -275,14 +275,14 @@ guint16 ui16 = bitvec_read_field(vector, readIndex, no_of_bits); pui16 = pui16DATA(data, pDescr->offset); *pui16 = ui16 + (guint16)pDescr->descr.value; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { guint32 ui32 = bitvec_read_field(vector, readIndex, no_of_bits); pui32 = pui32DATA(data, pDescr->offset); *pui32 = ui32 + (guint16)pDescr->descr.value; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui32); } else { @@ -553,13 +553,13 @@ guint8 length = bitvec_read_field(vector, readIndex, length_len); - LOGPC(DCSN1, LOGL_NOTICE, "%s length = %d | ", pDescr->sz , (int)length); + LOGPC(DCSN1, LOGL_NOTICE, "%s length = %u | ", pDescr->sz , length); bit_offset += length_len; remaining_bits_len -= length_len; csnStreamInit(&arT, bit_offset, length > 0 ? length : remaining_bits_len); arT.direction = 1; - LOGPC(DCSN1, LOGL_NOTICE, "offset = %d | ", (int)pDescr->offset); + LOGPC(DCSN1, LOGL_NOTICE, "offset = %u | ", pDescr->offset); Status = serialize(&arT, vector, readIndex, pvDATA(data, pDescr->offset)); if (Status >= 0) @@ -668,14 +668,14 @@ guint16 ui16 = bitvec_read_field(vector, readIndex, no_of_bits); pui16 = pui16DATA(data, pDescr->offset); *pui16 = ui16; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { guint32 ui32 = bitvec_read_field(vector, readIndex, no_of_bits); pui32 = pui32DATA(data, pDescr->offset); *pui32 = ui32; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui32); } else { @@ -711,14 +711,14 @@ guint16 ui16 = bitvec_read_field(vector, readIndex, no_of_bits); pui16 = pui16DATA(data, pDescr->offset); *pui16 = ui16 + (guint16)pDescr->descr.value; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { guint32 ui32 = bitvec_read_field(vector, readIndex, no_of_bits); pui32 = pui32DATA(data, pDescr->offset); *pui32 = ui32 + (guint16)pDescr->descr.value; - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui32); } else { @@ -1403,7 +1403,7 @@ return ProcessError(readIndex,"csnStreamDecoder FIXED value does not match", -1, pDescr); } - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned int)ui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned int)ui32); remaining_bits_len -= no_of_bits; bit_offset += no_of_bits; pDescr++; @@ -1511,13 +1511,13 @@ { pui16 = pui16DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui16, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { pui32 = pui32DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui32, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui32); } else { @@ -1556,13 +1556,13 @@ { pui16 = pui16DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui16 - (guint16)pDescr->descr.value, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned short)(*pui16 - (guint16)pDescr->descr.value)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned short)(*pui16 - (guint16)pDescr->descr.value)); } else if (no_of_bits <= 32) { pui32 = pui32DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui32 - (guint16)pDescr->descr.value, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned int)(*pui32 - (guint16)pDescr->descr.value)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned int)(*pui32 - (guint16)pDescr->descr.value)); } else { @@ -1932,13 +1932,13 @@ { pui16 = pui16DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui16, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui16); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui16); } else if (no_of_bits <= 32) { pui32 = pui32DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui32, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui32); } else { @@ -1972,13 +1972,13 @@ { pui16 = pui16DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui16 - (guint16)pDescr->descr.value, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned short)(*pui16 - (guint16)pDescr->descr.value)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned short)(*pui16 - (guint16)pDescr->descr.value)); } else if (no_of_bits <= 32) { pui32 = pui32DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui32 - (guint16)pDescr->descr.value, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , (unsigned int)(*pui32 - (guint16)pDescr->descr.value)); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , (unsigned int)(*pui32 - (guint16)pDescr->descr.value)); } else { @@ -2132,7 +2132,7 @@ { pui32 = pui32DATA(data, pDescr->offset); bitvec_write_field(vector, writeIndex, *pui32, no_of_bits); - LOGPC(DCSN1, LOGL_NOTICE, "%s = %d | ", pDescr->sz , *pui32); + LOGPC(DCSN1, LOGL_NOTICE, "%s = %u | ", pDescr->sz , *pui32); } else if (no_of_bits <= 64) { diff --git a/tests/rlcmac/RLCMACTest.err b/tests/rlcmac/RLCMACTest.err index 33643f3..a1e5e3f 100644 --- a/tests/rlcmac/RLCMACTest.err +++ b/tests/rlcmac/RLCMACTest.err @@ -3,7 +3,7 @@ DCSN1 INFO csnStreamDecoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketUplinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 4 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | TLLI_BLOCK_CHANNEL_CODING = 0 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 14 | TIMING_ADVANCE_TIMESLOT_NUMBER = 4 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 5 | u.Indirect_encoding = 1 | : u.Indirect_encoding | MAIO = 0 | MA_NUMBER = 14 | Exist_CHANGE_MARK = 1 | : CHANGE_MARK | CHANGE_MARK_1 = 0 | Exist_CHANGE_MARK_2 = 0 | : End CHANGE_MARK | : End u.Indirect_encoding | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 7 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 1 | Slot[4].USF_TN = 0 | Slot[4].GAMMA_TN = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 3|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 4 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | TLLI_BLOCK_CHANNEL_CODING = 0 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 14 | TIMING_ADVANCE_TIMESLOT_NUMBER = 4 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 5 | u.Indirect_encoding = 1 | : u.Indirect_encoding | MAIO = 0 | MA_NUMBER = 14 | Exist_CHANGE_MARK = 1 | : CHANGE_MARK | CHANGE_MARK_1 = 0 | Exist_CHANGE_MARK_2 = 0 | : End CHANGE_MARK | : End u.Indirect_encoding | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 7 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 1 | Slot[4].USF_TN = 0 | Slot[4].GAMMA_TN = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 3|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 6 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 0xcf59564a | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 0 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| -DCSN1 INFO csnStreamEncoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 6 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = -816228790 | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 0 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=9): MESSAGE_TYPE = 9 | PAGE_MODE = 0 | 0x00 = 0 | UPLINK_TFI = 6 | u.PU_AckNack_GPRS_Struct = 0 | : u.PU_AckNack_GPRS_Struct | CHANNEL_CODING_COMMAND = 0 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Common_Uplink_Ack_Nack_Data.Exist_CONTENTION_RESOLUTION_TLLI = 1 | Common_Uplink_Ack_Nack_Data.CONTENTION_RESOLUTION_TLLI = 3478738506 | Common_Uplink_Ack_Nack_Data.Exist_Packet_Timing_Advance = 0 | Common_Uplink_Ack_Nack_Data.Exist_Power_Control_Parameters = 0 | Common_Uplink_Ack_Nack_Data.Exist_Extension_Bits = 0 | u.FixedAllocationDummy = 0 | u.FixedAllocationDummy = 0 | Exist_AdditionsR99 = 0 | : End u.PU_AckNack_GPRS_Struct | Padding = 43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketUplinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 28 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 1 | TLLI_BLOCK_CHANNEL_CODING = 1 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 9 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 2 | u.ARFCN = 0 | u.ARFCN = 631 | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 19 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 8 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].USF_TN = 0 | Slot[6].GAMMA_TN = 9 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=10): MESSAGE_TYPE = 10 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | u.Global_TFI = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 28 | : End u.Global_TFI | : End ID | u.PUA_GPRS_Struct = 0 | : u.PUA_GPRS_Struct | CHANNEL_CODING_COMMAND = 1 | TLLI_BLOCK_CHANNEL_CODING = 1 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 9 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 2 | u.ARFCN = 0 | u.ARFCN = 631 | : End Frequency_Parameters | u.Dynamic_Allocation = 1 | : u.Dynamic_Allocation | Extended_Dynamic_Allocation = 0 | Exist_P0 = 0 | USF_GRANULARITY = 0 | Exist_UPLINK_TFI_ASSIGNMENT = 1 | UPLINK_TFI_ASSIGNMENT = 19 | Exist_RLC_DATA_BLOCKS_GRANTED = 0 | Exist_TBF_Starting_Time = 0 | u.Timeslot_Allocation_Power_Ctrl_Param = 1 | : u.Timeslot_Allocation_Power_Ctrl_Param | ALPHA = 8 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].USF_TN = 0 | Slot[6].GAMMA_TN = 9 | Slot[7].Exist = 0 | : End u.Timeslot_Allocation_Power_Ctrl_Param | : End u.Dynamic_Allocation | Exist_AdditionsR99 = 0 | : End u.PUA_GPRS_Struct | Padding = 43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=2): MESSAGE_TYPE = 2 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | : ID | Choice PacketDownlinkID = 0 | : u.Global_TFI | u.DOWNLINK_TFI = 1 | u.DOWNLINK_TFI = 0 | : End u.Global_TFI | : End ID | 0x00 = 0 | MAC_MODE = 0 | RLC_MODE = 0 | CONTROL_ACK = 0 | TIMESLOT_ALLOCATION = 3 | : Packet_Timing_Advance | Exist_TIMING_ADVANCE_VALUE = 0 | Exist_IndexAndtimeSlot = 1 | TIMING_ADVANCE_INDEX = 1 | TIMING_ADVANCE_TIMESLOT_NUMBER = 6 | : End Packet_Timing_Advance | Exist_P0_and_BTS_PWR_CTRL_MODE = 0 | Exist_Frequency_Parameters = 1 | : Frequency_Parameters | TSC = 0 | u.ARFCN = 0 | u.ARFCN = 623 | : End Frequency_Parameters | Exist_DOWNLINK_TFI_ASSIGNMENT = 1 | DOWNLINK_TFI_ASSIGNMENT = 0 | Exist_Power_Control_Parameters = 1 | : Power_Control_Parameters | ALPHA = 10 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 1 | Slot[6].GAMMA_TN = 27 | Slot[7].Exist = 1 | Slot[7].GAMMA_TN = 27 | : End Power_Control_Parameters | Exist_TBF_Starting_Time = 0 | Exist_Measurement_Mapping = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_Params = 1 | EGPRS_WindowSize = 6 | LINK_QUALITY_MEASUREMENT_MODE = 0 | Exist_BEP_PERIOD2 = 0 | Exist_Packet_Extended_Timing_Advance = 0 | Exist_COMPACT_ReducedMA = 0 | : End AdditionsR99 | Padding = 11|43|43|43|43|43|43|43|43|43| @@ -19,11 +19,11 @@ DCSN1 INFO csnStreamDecoder (type=37): MESSAGE_TYPE = 37 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | Padding = 43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=37): MESSAGE_TYPE = 37 | PAGE_MODE = 0 | Exist_PERSISTENCE_LEVEL = 0 | Padding = 43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=3): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 3 | TLLI = 0x87987447 | Padding = 1|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| -DCSN1 INFO csnStreamEncoder (type=3): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 3 | TLLI = -2020051897 | Padding = 1|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| +DCSN1 INFO csnStreamEncoder (type=3): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 3 | TLLI = 2274915399 | Padding = 1|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 28 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 0 | : Channel_Quality_Report | C_VALUE = 18 | RXQUAL = 0 | SIGN_VAR = 7 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 0 | Padding = 3|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 28 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 0 | : Channel_Quality_Report | C_VALUE = 18 | RXQUAL = 0 | SIGN_VAR = 7 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 0 | Padding = 3|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | Choice PacketResourceRequestID = 1 | u.TLLI = 0xc4f70250 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 3 | u.Content length = 67 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| -DCSN1 INFO csnStreamEncoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | u.TLLI = 1 | u.TLLI = -990444976 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | u.Content = 3 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | u.Content length = 67 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| +DCSN1 INFO csnStreamEncoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | u.TLLI = 1 | u.TLLI = 3304522320 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | u.Content = 3 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | u.Content length = 67 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| DCSN1 INFO csnStreamDecoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 1 | MEAN_BEP_GMSK = 31 | CV_BEP_GMSK = 7 | Exist_MEAN_CV_BEP_8PSK = 0 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 0 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 0 | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | Desc length = 15 | offset = 0 | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | : End Desc | : End EGPRS_AckNack | Padding = 11|43|43|43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 1 | MEAN_BEP_GMSK = 31 | CV_BEP_GMSK = 7 | Exist_MEAN_CV_BEP_8PSK = 0 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 0 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 0 | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | Desc length = 15 | : End Desc | : End EGPRS_AckNack | Padding = 11|43|43|43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17203 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I33f86b79e72394bdb7d99762f8ec21d80e06dc30 Gerrit-Change-Number: 17203 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 22:04:42 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 22:04:42 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Integrate VPCD test port into RemsimBankd_Tests.ttcn In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17207 ) Change subject: remsim: Integrate VPCD test port into RemsimBankd_Tests.ttcn ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17207 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: I967f2d526f4ef1278bd2ac1d590a8dce732379d5 Gerrit-Change-Number: 17207 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 17 Feb 2020 22:04:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 22:04:45 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 17 Feb 2020 22:04:45 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Integrate VPCD test port into RemsimBankd_Tests.ttcn In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17207 ) Change subject: remsim: Integrate VPCD test port into RemsimBankd_Tests.ttcn ...................................................................... remsim: Integrate VPCD test port into RemsimBankd_Tests.ttcn VPCD (specifically ifd-vpcd) is an ifd-handler (reader driver) for a virtual smart card reader integrated with pcsc-lite. It is part of the virtualsmartcard project. Using this ifd-vpcd, we can implementa virtual smart card reader beneath osmo-remsim-bankd, which allows us to implement both the smart card [reader] below osmo-remsim-bankd as well as the osmo-remsim-server + client above osmo-remsim-bankd - in other words a fully virtualized test fixture for bankd. Change-Id: I967f2d526f4ef1278bd2ac1d590a8dce732379d5 --- M remsim/RemsimBankd_Tests.ttcn M remsim/gen_links.sh M remsim/regen_makefile.sh 3 files changed, 41 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/remsim/RemsimBankd_Tests.ttcn b/remsim/RemsimBankd_Tests.ttcn index e9e3b31..fd3f907 100644 --- a/remsim/RemsimBankd_Tests.ttcn +++ b/remsim/RemsimBankd_Tests.ttcn @@ -17,6 +17,10 @@ import from IPA_Emulation all; import from Misc_Helpers all; +import from VPCD_Types all; +import from VPCD_CodecPort all; +import from VPCD_Adapter all; + import from RSPRO all; import from RSRES all; import from RSPRO_Types all; @@ -30,7 +34,7 @@ /* We implement a RSPRO server to simulate the remsim-server and a RSPRO client to simulate a remsim-client connecting to bankd */ -type component bankd_test_CT extends rspro_server_CT, rspro_client_CT { +type component bankd_test_CT extends rspro_server_CT, rspro_client_CT, VPCD_Adapter_CT { } private function f_init(boolean start_client := false) runs on bankd_test_CT { @@ -332,11 +336,43 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); } +private altstep as_vpcd() runs on VPCD_Adapter_CT { + [] VPCD.receive(tr_VPCD_Recv(g_vpcd_conn_id, tr_VPCD_CTRL_ATR)) { + f_vpcd_send(ts_VPCD_DATA('3B9F96801FC78031A073BE21136743200718000001A5'O)); + repeat; + } + [] VPCD.receive(tr_VPCD_Recv(g_vpcd_conn_id, tr_VPCD_CTRL_OFF)) { + repeat; + } + [] VPCD.receive(tr_VPCD_Recv(g_vpcd_conn_id, tr_VPCD_CTRL_ON)) { + repeat; + } +} + +/* transceive a TPDU from modem to card (and back) */ +function f_rspro_xceive_mdm2card_vpcd(integer idx, BankSlot bs, template (value) octetstring data, + template (value) TpduFlags flags, template (value) octetstring res) runs on bankd_test_CT return octetstring { + var RsproPDU rx; + RSPRO[idx].send(ts_RSPRO_TpduModemToCard(rspro[idx].rspro_client_slot, bs, flags, data)); + f_vpcd_exp(tr_VPCD_DATA(data)); + f_vpcd_send(ts_VPCD_DATA(res)); + rx := f_rspro_exp(tr_RSPRO_TpduCardToModem(bs, rspro[idx].rspro_client_slot, ?, ?)); + if (rx.msg.tpduCardToModem.data != valueof(res)) { + setverdict(fail, "Expected ", res, " from card, but got ", rx.msg.tpduCardToModem.data); + } + return rx.msg.tpduCardToModem.data; +} + + /* first add mapping, then connect matching client and exchange some TPDUs */ testcase TC_createMapping_exchangeTPDU() runs on bankd_test_CT { /* FIXME: this would only be done in f_init_client(), but we need it before */ rspro[0].rspro_client_slot := { clientId := 23+0, slotNr := 0 }; + VPCD_Adapter.f_connect(); + activate(as_vpcd()); + f_sleep(2.0); + f_init(); as_connectBankReq(bid := mp_bank_id, nslots := mp_num_slots); f_rspro_srv_reset_state(ok); @@ -354,7 +390,7 @@ var TpduFlags f := {tpduHeaderPresent:=true, finalPart:=true, procByteContinueTx:=false, procByteContinueRx:=false}; for (var integer i := 0; i < 10; i:=i+1) { - f_rspro_xceive_mdm2card(0, bs, 'A0A40000023F00'O, f); + f_rspro_xceive_mdm2card_vpcd(0, bs, 'A0A40000023F00'O, f, '9000'O); } Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); } diff --git a/remsim/gen_links.sh b/remsim/gen_links.sh index 7c234ec..366a8e6 100755 --- a/remsim/gen_links.sh +++ b/remsim/gen_links.sh @@ -38,6 +38,8 @@ FILES+="IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp IPA_CodecPort.ttcn " #RSL_Types.ttcn RSL_Emulation.ttcn " FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn " FILES+="Native_Functions.ttcn Native_FunctionDefs.cc " +FILES+="VPCD_Types.ttcn VPCD_CodecPort.ttcn VPCD_CodecPort_CtrlFunct.ttcn VPCD_CodecPort_CtrlFunctDef.cc +VPCD_Adapter.ttcn " gen_links $DIR $FILES ignore_pp_results diff --git a/remsim/regen_makefile.sh b/remsim/regen_makefile.sh index e398360..6f7d209 100755 --- a/remsim/regen_makefile.sh +++ b/remsim/regen_makefile.sh @@ -1,6 +1,6 @@ #!/bin/sh -FILES="*.ttcn *.ttcnpp *.asn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc TELNETasp_PT.cc Native_FunctionDefs.cc RSPRO_EncDec.cc Abstract_Socket.cc HTTPmsg_PT.cc HTTPmsg_MessageLen_Function.cc JSON_EncDec.cc" +FILES="*.ttcn *.ttcnpp *.asn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc TELNETasp_PT.cc Native_FunctionDefs.cc RSPRO_EncDec.cc Abstract_Socket.cc HTTPmsg_PT.cc HTTPmsg_MessageLen_Function.cc JSON_EncDec.cc VPCD_CodecPort_CtrlFunctDef.cc " export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSPRO -DIPA_EMULATION_CTRL" -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17207 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: I967f2d526f4ef1278bd2ac1d590a8dce732379d5 Gerrit-Change-Number: 17207 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 23:17:49 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 17 Feb 2020 23:17:49 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: fix misleading LOGP statement in decode_gsm_ra_cap() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17208 ) Change subject: gsm_rlcmac: fix misleading LOGP statement in decode_gsm_ra_cap() ...................................................................... gsm_rlcmac: fix misleading LOGP statement in decode_gsm_ra_cap() Change-Id: I48fd701566e1364ce7fccaa3e3a1a0296b932988 --- M src/gsm_rlcmac.cpp M tests/rlcmac/RLCMACTest.err 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/08/17208/1 diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index 52154b8..09a46e8 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -5753,7 +5753,7 @@ csnStreamInit(&ar, 0, 8 * vector->data_len); /* recursive csnStreamEncoder call uses LOGPC everywhere, so we need to start the log somewhere... */ - LOGP(DCSN1, LOGL_INFO, "csnStreamEncoder (RAcap): "); + LOGP(DCSN1, LOGL_INFO, "csnStreamDecoder (RAcap): "); ret = csnStreamDecoder(&ar, CSNDESCR(MS_Radio_Access_capability_t), vector, &readIndex, data); /* recursive csnStreamDecoder call uses LOGPC everywhere without trailing diff --git a/tests/rlcmac/RLCMACTest.err b/tests/rlcmac/RLCMACTest.err index a1e5e3f..2d7de59 100644 --- a/tests/rlcmac/RLCMACTest.err +++ b/tests/rlcmac/RLCMACTest.err @@ -29,4 +29,4 @@ DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 0 | Exist_MEAN_CV_BEP_8PSK = 1 | MEAN_BEP_8PSK = 31 | CV_BEP_8PSK = 7 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 58 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 1 | : ChannelRequestDescription | PEAK_THROUGHPUT_CLASS = 6 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 62 | : End ChannelRequestDescription | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 0 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 1187 | Exist_CRBB = 0 | URBB = 127 | URBB = 255 | URBB = 255 | URBB = 238 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | : End Desc | : End EGPRS_AckNack | Padding = -DCSN1 INFO csnStreamEncoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 21 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | DCSN1 ERROR csnStreamDecoder: error NEED_MORE BITS TO UNPACK (-5) at EGPRS_multislot_class (idx 31): End Multislot_capability | +DCSN1 INFO csnStreamDecoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 21 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | DCSN1 ERROR csnStreamDecoder: error NEED_MORE BITS TO UNPACK (-5) at EGPRS_multislot_class (idx 31): End Multislot_capability | -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I48fd701566e1364ce7fccaa3e3a1a0296b932988 Gerrit-Change-Number: 17208 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 23:17:49 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 17 Feb 2020 23:17:49 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: fix malformed MS RA capability in testRAcap() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17209 ) Change subject: tests/rlcmac: fix malformed MS RA capability in testRAcap() ...................................................................... tests/rlcmac: fix malformed MS RA capability in testRAcap() Long story short: as it turns out the test vector '12a5146200'O has been generated by TITAN, and it's malformed. The length indicator it contains must be at least 29 bits, not 21. This field is calculated by TITAN automatically, so I guess there is a bug somewhere in its RAW encoder implementation. It's funny that Wireshark decodes the old malformed vector without any problems if it's encapsulated into the BSSGP DL-UNITDATA. The reason for that is because BSSGP dissector does not actually use the CSN.1 codec and relies on its own hand-written parser [1], which does not respect the length constraints. Furthermore, table 10.5.146/3GPP TS 24.008, describing the format of MS Radio Access Capability IE, has the following comment: < Multislot capability struct > ::= { 0 | 1 < HSCSD multislot class : bit (5) > } ... -- error: struct too short, assume features do not exist so ideally our CSN.1 decoder should be more tolerant to the old malformed vector, but unfortunately error handling is not implemented. [1] See de_gmm_ms_radio_acc_cap() in epan/dissectors/packet-gsm_a_gm.c. Change-Id: I5f810397b8d09c18e069168023429f6a4d899c86 --- M tests/rlcmac/RLCMACTest.cpp M tests/rlcmac/RLCMACTest.err M tests/rlcmac/RLCMACTest.ok 3 files changed, 10 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/09/17209/1 diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp index a8d6217..66dce6f 100644 --- a/tests/rlcmac/RLCMACTest.cpp +++ b/tests/rlcmac/RLCMACTest.cpp @@ -224,7 +224,7 @@ /* MS RA capability 1 0001 .... = Access Technology Type: GSM E --note that GSM E covers GSM P (1) - .... 0010 101. .... = Length in bits: 0x15 (21) + .... 0011 101. .... = Length in bits: 0x1d (29) ...0 01.. RF Power Capability, GMSK Power Class: Not specified (1) A5 Bits: Same values apply for parameters as in the immediately preceding Access capabilities field within this IE (0) .... ...1 = Controlled early Classmark Sending: Implemented @@ -235,22 +235,17 @@ .... ..00 011. .... = GPRS multislot class: Max Rx-Slot/TDMA:2 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:3 Tta:3 Ttb:2 Tra:3 Trb:1 Type:1 (3) ...0 .... = GPRS Extended Dynamic Allocation Capability: Not Implemented */ - bitvec_unhex(vector, "12a5146200"); + bitvec_unhex(vector, "13a5146200"); rc = decode_gsm_ra_cap(vector, &data); - printf("decode_gsm_ra_cap fails? %s\n", rc !=0 ? "yes" : "no"); -#if 0 - /* FIXME: OS#1525, OS#3499: csn1 fails to parse this MS RA Cap IE value */ - assert (rc == 0); + OSMO_ASSERT(rc == 0); /* Make sure there's 1 value (currently fails due to failed decoding) */ - osmo_assert(cap->Count_MS_RA_capability_value == 1); + OSMO_ASSERT(data.Count_MS_RA_capability_value == 1); - /* Make sure MS multislot class is parsed correctly (currently fails due - to failed decoding and count being 0) */ - uint8_t ms_class = Decoding::get_ms_class_by_capability(&data); - assert(ms_class == 3); -#endif + /* Make sure GPRS / EGPRS multislot class is parsed correctly */ + printf("GPRS multislot class = %u\n", Decoding::get_ms_class_by_capability(&data)); + printf("EGPRS multislot class = %u\n", Decoding::get_egprs_ms_class_by_capability(&data)); } int main(int argc, char *argv[]) diff --git a/tests/rlcmac/RLCMACTest.err b/tests/rlcmac/RLCMACTest.err index 2d7de59..8a963fe 100644 --- a/tests/rlcmac/RLCMACTest.err +++ b/tests/rlcmac/RLCMACTest.err @@ -29,4 +29,4 @@ DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 0 | Exist_MEAN_CV_BEP_8PSK = 1 | MEAN_BEP_8PSK = 31 | CV_BEP_8PSK = 7 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 58 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 1 | : ChannelRequestDescription | PEAK_THROUGHPUT_CLASS = 6 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 62 | : End ChannelRequestDescription | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 0 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 1187 | Exist_CRBB = 0 | URBB = 127 | URBB = 255 | URBB = 255 | URBB = 238 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | : End Desc | : End EGPRS_AckNack | Padding = -DCSN1 INFO csnStreamDecoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 21 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | DCSN1 ERROR csnStreamDecoder: error NEED_MORE BITS TO UNPACK (-5) at EGPRS_multislot_class (idx 31): End Multislot_capability | +DCSN1 INFO csnStreamDecoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 29 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 0 | EGPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_DTM_GPRS_multislot_class = 0 | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 0 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = NULL | UMTS_FDD_Radio_Access_Technology_Capability = NULL | UMTS_384_TDD_Radio_Access_Technology_Capability = NULL | CDMA2000_Radio_Access_Technology_Capability = NULL | UMTS_128_TDD_Radio_Access_Technology_Capability = NULL | GERAN_Feature_Package_1 = NULL | Modulation_based_multislot_class_support = NULL | GMSK_MultislotPowerProfile = NULL | EightPSK_MultislotProfile = NULL | MultipleTBF_Capability = NULL | DownlinkAdvancedReceiverPerformance = NULL | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = NULL | DTM_EnhancementsCapability = NULL | PS_HandoverCapability = NULL | MS_RA_capability_value } | diff --git a/tests/rlcmac/RLCMACTest.ok b/tests/rlcmac/RLCMACTest.ok index 2d27ca4..c4e028c 100644 --- a/tests/rlcmac/RLCMACTest.ok +++ b/tests/rlcmac/RLCMACTest.ok @@ -124,4 +124,5 @@ vector1 == vector2 : TRUE *** testCsnLeftAlignedVarBmpBounds *** *** testRAcap *** -decode_gsm_ra_cap fails? yes +GPRS multislot class = 3 +EGPRS multislot class = 0 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I5f810397b8d09c18e069168023429f6a4d899c86 Gerrit-Change-Number: 17209 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 17 23:21:04 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 17 Feb 2020 23:21:04 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: fix misleading LOGP statement in decode_gsm_ra_cap() In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17208 ) Change subject: gsm_rlcmac: fix misleading LOGP statement in decode_gsm_ra_cap() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I48fd701566e1364ce7fccaa3e3a1a0296b932988 Gerrit-Change-Number: 17208 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Mon, 17 Feb 2020 23:21:04 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 08:20:19 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 08:20:19 +0000 Subject: Change in docker-playground[master]: osmo-remsim-master: Add vpcd + pcscd to Docker image References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/17210 ) Change subject: osmo-remsim-master: Add vpcd + pcscd to Docker image ...................................................................... osmo-remsim-master: Add vpcd + pcscd to Docker image This way we can run the container with osmo-remsim-bankd + ifd-vpcd, i.e. with a simulated smart card reader behind the bank. Change-Id: I463eca0f66197b409e00028e75e9501de620cc8b --- M osmo-remsim-master/Dockerfile 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/10/17210/1 diff --git a/osmo-remsim-master/Dockerfile b/osmo-remsim-master/Dockerfile index 3c5c5cc..0a15d93 100644 --- a/osmo-remsim-master/Dockerfile +++ b/osmo-remsim-master/Dockerfile @@ -3,6 +3,21 @@ MAINTAINER Harald Welte +# PC/SC required for testing of bankd (with vpcd) +# autoconf, automake, libtool, pkg-config, m4, help2man required for virtualsmartcard +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + libpcsclite-dev \ + pcscd \ + pcsc-tools \ + autoconf automake libtool pkg-config m4 help2man ca-certificates && \ + apt-get clean + +# build virtualsmartcard +RUN git clone https://github.com/frankmorgner/vsmartcard.git +RUN cd vsmartcard/virtualsmartcard && autoreconf -fi && ./configure && make -j8 install + + ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I463eca0f66197b409e00028e75e9501de620cc8b Gerrit-Change-Number: 17210 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 08:20:20 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 08:20:20 +0000 Subject: Change in docker-playground[master]: remsim: Integrate pcscd+ifd-vpcd for bankd tests References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/17211 ) Change subject: remsim: Integrate pcscd+ifd-vpcd for bankd tests ...................................................................... remsim: Integrate pcscd+ifd-vpcd for bankd tests This way we can actually tests TPDU transmission from a simulated remsim client through the real bankd into a simulated SIM card. Change-Id: I584e4c5e3d120bfbd26ade545fe41e541308f26a --- M ttcn3-remsim-test/bankd/REMSIM_Tests.cfg M ttcn3-remsim-test/bankd/bankd_pcsc_slots.csv M ttcn3-remsim-test/jenkins.sh 3 files changed, 4 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/11/17211/1 diff --git a/ttcn3-remsim-test/bankd/REMSIM_Tests.cfg b/ttcn3-remsim-test/bankd/REMSIM_Tests.cfg index ca83346..76588a6 100644 --- a/ttcn3-remsim-test/bankd/REMSIM_Tests.cfg +++ b/ttcn3-remsim-test/bankd/REMSIM_Tests.cfg @@ -12,6 +12,7 @@ REMSIM_Tests.mp_server_ip := "172.18.17.10" # IP address of the IUT (bankd) to which simulated client connects REMSIM_Tests.mp_bankd_ip := "172.18.17.30" +VPCD_Adapter.mp_vpcd_host := "172.18.17.30" [MAIN_CONTROLLER] diff --git a/ttcn3-remsim-test/bankd/bankd_pcsc_slots.csv b/ttcn3-remsim-test/bankd/bankd_pcsc_slots.csv index 38a22c9..0e8d529 100644 --- a/ttcn3-remsim-test/bankd/bankd_pcsc_slots.csv +++ b/ttcn3-remsim-test/bankd/bankd_pcsc_slots.csv @@ -1,6 +1,2 @@ -"1","0","ACS ACR33 ICC Reader 00 00" -"1","1","ACS ACR33 ICC Reader 00 01" -"1","2","ACS ACR33 ICC Reader 00 02" -"1","3","ACS ACR33 ICC Reader 00 03" -"1","4","ACS ACR33 ICC Reader 00 04" -"1","23","Alcor Micro AU9560 00 00" +"1","0","Virtual PCD 00 00" +"1","1","Virtual PCD 00 01" diff --git a/ttcn3-remsim-test/jenkins.sh b/ttcn3-remsim-test/jenkins.sh index e09bc88..ab3f550 100755 --- a/ttcn3-remsim-test/jenkins.sh +++ b/ttcn3-remsim-test/jenkins.sh @@ -24,7 +24,7 @@ -v $VOL_BASE_DIR/bankd:/data \ --name ${BUILD_TAG}-bankd -d \ $REPO_USER/osmo-remsim-$IMAGE_SUFFIX \ - /bin/sh -c "osmo-remsim-bankd -i 172.18.17.10 >/data/osmo-remsim-bankd.log 2>&1" + /bin/sh -c "pcscd; osmo-remsim-bankd -i 172.18.17.10 >/data/osmo-remsim-bankd.log 2>&1" } start_client() { -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I584e4c5e3d120bfbd26ade545fe41e541308f26a Gerrit-Change-Number: 17211 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 08:21:00 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 08:21:00 +0000 Subject: Change in docker-playground[master]: osmo-remsim-master: Add vpcd + pcscd to Docker image In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/17210 ) Change subject: osmo-remsim-master: Add vpcd + pcscd to Docker image ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I463eca0f66197b409e00028e75e9501de620cc8b Gerrit-Change-Number: 17210 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 18 Feb 2020 08:21:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 08:21:17 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 08:21:17 +0000 Subject: Change in docker-playground[master]: remsim: Integrate pcscd+ifd-vpcd for bankd tests In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/17211 ) Change subject: remsim: Integrate pcscd+ifd-vpcd for bankd tests ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I584e4c5e3d120bfbd26ade545fe41e541308f26a Gerrit-Change-Number: 17211 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 18 Feb 2020 08:21:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 08:21:21 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 08:21:21 +0000 Subject: Change in docker-playground[master]: osmo-remsim-master: Add vpcd + pcscd to Docker image In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/17210 ) Change subject: osmo-remsim-master: Add vpcd + pcscd to Docker image ...................................................................... osmo-remsim-master: Add vpcd + pcscd to Docker image This way we can run the container with osmo-remsim-bankd + ifd-vpcd, i.e. with a simulated smart card reader behind the bank. Change-Id: I463eca0f66197b409e00028e75e9501de620cc8b --- M osmo-remsim-master/Dockerfile 1 file changed, 15 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/osmo-remsim-master/Dockerfile b/osmo-remsim-master/Dockerfile index 3c5c5cc..0a15d93 100644 --- a/osmo-remsim-master/Dockerfile +++ b/osmo-remsim-master/Dockerfile @@ -3,6 +3,21 @@ MAINTAINER Harald Welte +# PC/SC required for testing of bankd (with vpcd) +# autoconf, automake, libtool, pkg-config, m4, help2man required for virtualsmartcard +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + libpcsclite-dev \ + pcscd \ + pcsc-tools \ + autoconf automake libtool pkg-config m4 help2man ca-certificates && \ + apt-get clean + +# build virtualsmartcard +RUN git clone https://github.com/frankmorgner/vsmartcard.git +RUN cd vsmartcard/virtualsmartcard && autoreconf -fi && ./configure && make -j8 install + + ARG OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_9.0/" COPY Release.key /tmp/Release.key -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17210 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I463eca0f66197b409e00028e75e9501de620cc8b Gerrit-Change-Number: 17210 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 08:21:22 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 08:21:22 +0000 Subject: Change in docker-playground[master]: remsim: Integrate pcscd+ifd-vpcd for bankd tests In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/17211 ) Change subject: remsim: Integrate pcscd+ifd-vpcd for bankd tests ...................................................................... remsim: Integrate pcscd+ifd-vpcd for bankd tests This way we can actually tests TPDU transmission from a simulated remsim client through the real bankd into a simulated SIM card. Change-Id: I584e4c5e3d120bfbd26ade545fe41e541308f26a --- M ttcn3-remsim-test/bankd/REMSIM_Tests.cfg M ttcn3-remsim-test/bankd/bankd_pcsc_slots.csv M ttcn3-remsim-test/jenkins.sh 3 files changed, 4 insertions(+), 7 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ttcn3-remsim-test/bankd/REMSIM_Tests.cfg b/ttcn3-remsim-test/bankd/REMSIM_Tests.cfg index ca83346..76588a6 100644 --- a/ttcn3-remsim-test/bankd/REMSIM_Tests.cfg +++ b/ttcn3-remsim-test/bankd/REMSIM_Tests.cfg @@ -12,6 +12,7 @@ REMSIM_Tests.mp_server_ip := "172.18.17.10" # IP address of the IUT (bankd) to which simulated client connects REMSIM_Tests.mp_bankd_ip := "172.18.17.30" +VPCD_Adapter.mp_vpcd_host := "172.18.17.30" [MAIN_CONTROLLER] diff --git a/ttcn3-remsim-test/bankd/bankd_pcsc_slots.csv b/ttcn3-remsim-test/bankd/bankd_pcsc_slots.csv index 38a22c9..0e8d529 100644 --- a/ttcn3-remsim-test/bankd/bankd_pcsc_slots.csv +++ b/ttcn3-remsim-test/bankd/bankd_pcsc_slots.csv @@ -1,6 +1,2 @@ -"1","0","ACS ACR33 ICC Reader 00 00" -"1","1","ACS ACR33 ICC Reader 00 01" -"1","2","ACS ACR33 ICC Reader 00 02" -"1","3","ACS ACR33 ICC Reader 00 03" -"1","4","ACS ACR33 ICC Reader 00 04" -"1","23","Alcor Micro AU9560 00 00" +"1","0","Virtual PCD 00 00" +"1","1","Virtual PCD 00 01" diff --git a/ttcn3-remsim-test/jenkins.sh b/ttcn3-remsim-test/jenkins.sh index e09bc88..ab3f550 100755 --- a/ttcn3-remsim-test/jenkins.sh +++ b/ttcn3-remsim-test/jenkins.sh @@ -24,7 +24,7 @@ -v $VOL_BASE_DIR/bankd:/data \ --name ${BUILD_TAG}-bankd -d \ $REPO_USER/osmo-remsim-$IMAGE_SUFFIX \ - /bin/sh -c "osmo-remsim-bankd -i 172.18.17.10 >/data/osmo-remsim-bankd.log 2>&1" + /bin/sh -c "pcscd; osmo-remsim-bankd -i 172.18.17.10 >/data/osmo-remsim-bankd.log 2>&1" } start_client() { -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17211 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I584e4c5e3d120bfbd26ade545fe41e541308f26a Gerrit-Change-Number: 17211 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 10:12:08 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 10:12:08 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: add some tags to tasks In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17198 ) Change subject: ansible: gsm-tester: add some tags to tasks ...................................................................... Patch Set 1: > Patch Set 1: Code-Review+1 > > what is the advantage of those tags? It allows installing some parts of it only depending on the machine. For instance, the host running osmo-gsm-tester.py (main unit, master) requires different stuff from the host where processes orchestrated by osmo-gsm-tester run. Furthermore, some setups may not usse ofono modems and hence a bunch of stuff is not needed. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1fe26d519d4d63d4bef33c1db2abf98a40913f98 Gerrit-Change-Number: 17198 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 10:12:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 10:19:50 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 10:19:50 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: fix malformed MS RA capability in testRAcap() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17209 ) Change subject: tests/rlcmac: fix malformed MS RA capability in testRAcap() ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17209/1/tests/rlcmac/RLCMACTest.cpp File tests/rlcmac/RLCMACTest.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17209/1/tests/rlcmac/RLCMACTest.cpp at 238 PS1, Line 238: bitvec_unhex(vector, "13a5146200"); It makes sense to keep the older packet and document it is malformed and check current behavior when decoding it (failure), as an example of "NEED_MORE BITS TO UNPACK" scenario. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I5f810397b8d09c18e069168023429f6a4d899c86 Gerrit-Change-Number: 17209 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 10:19:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 10:20:25 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 10:20:25 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: fix misleading LOGP statement in decode_gsm_ra_cap() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17208 ) Change subject: gsm_rlcmac: fix misleading LOGP statement in decode_gsm_ra_cap() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I48fd701566e1364ce7fccaa3e3a1a0296b932988 Gerrit-Change-Number: 17208 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 10:20:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 10:20:29 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 10:20:29 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: fix misleading LOGP statement in decode_gsm_ra_cap() In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17208 ) Change subject: gsm_rlcmac: fix misleading LOGP statement in decode_gsm_ra_cap() ...................................................................... gsm_rlcmac: fix misleading LOGP statement in decode_gsm_ra_cap() Change-Id: I48fd701566e1364ce7fccaa3e3a1a0296b932988 --- M src/gsm_rlcmac.cpp M tests/rlcmac/RLCMACTest.err 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved pespin: Looks good to me, approved diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index 52154b8..09a46e8 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -5753,7 +5753,7 @@ csnStreamInit(&ar, 0, 8 * vector->data_len); /* recursive csnStreamEncoder call uses LOGPC everywhere, so we need to start the log somewhere... */ - LOGP(DCSN1, LOGL_INFO, "csnStreamEncoder (RAcap): "); + LOGP(DCSN1, LOGL_INFO, "csnStreamDecoder (RAcap): "); ret = csnStreamDecoder(&ar, CSNDESCR(MS_Radio_Access_capability_t), vector, &readIndex, data); /* recursive csnStreamDecoder call uses LOGPC everywhere without trailing diff --git a/tests/rlcmac/RLCMACTest.err b/tests/rlcmac/RLCMACTest.err index a1e5e3f..2d7de59 100644 --- a/tests/rlcmac/RLCMACTest.err +++ b/tests/rlcmac/RLCMACTest.err @@ -29,4 +29,4 @@ DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 0 | Exist_MEAN_CV_BEP_8PSK = 1 | MEAN_BEP_8PSK = 31 | CV_BEP_8PSK = 7 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 58 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 1 | : ChannelRequestDescription | PEAK_THROUGHPUT_CLASS = 6 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 62 | : End ChannelRequestDescription | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 0 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 1187 | Exist_CRBB = 0 | URBB = 127 | URBB = 255 | URBB = 255 | URBB = 238 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | : End Desc | : End EGPRS_AckNack | Padding = -DCSN1 INFO csnStreamEncoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 21 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | DCSN1 ERROR csnStreamDecoder: error NEED_MORE BITS TO UNPACK (-5) at EGPRS_multislot_class (idx 31): End Multislot_capability | +DCSN1 INFO csnStreamDecoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 21 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | DCSN1 ERROR csnStreamDecoder: error NEED_MORE BITS TO UNPACK (-5) at EGPRS_multislot_class (idx 31): End Multislot_capability | -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17208 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I48fd701566e1364ce7fccaa3e3a1a0296b932988 Gerrit-Change-Number: 17208 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 10:24:11 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 10:24:11 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Install correct version of Soapdysdr lms module ... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17193 ) Change subject: ansible: gsm-tester: Install correct version of Soapdysdr lms module for srsLTE ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1a66a1c4ba819c6c4887facc99045d099f2ccc53 Gerrit-Change-Number: 17193 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 10:24:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 10:24:15 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 10:24:15 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: add some tags to tasks In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17198 ) Change subject: ansible: gsm-tester: add some tags to tasks ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1fe26d519d4d63d4bef33c1db2abf98a40913f98 Gerrit-Change-Number: 17198 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 10:24:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 10:24:19 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 10:24:19 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Allow install srs related packages in Ubuntu In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17199 ) Change subject: ansible: gsm-tester: Allow install srs related packages in Ubuntu ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3fdf2f4f390d27c53f073b38c1716da07f933b6d Gerrit-Change-Number: 17199 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 10:24:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 10:24:23 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 10:24:23 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Install patchelf's build dep autoconf In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17200 ) Change subject: ansible: gsm-tester: Install patchelf's build dep autoconf ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibe0e9b10d87c3630e2f12c9c32196e26213530ca Gerrit-Change-Number: 17200 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 10:24:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 10:24:28 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 10:24:28 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Use file module instead of manual mkdir In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17201 ) Change subject: ansible: gsm-tester: Use file module instead of manual mkdir ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c541878033360a9d427d13b62c1cc075d5f92b7 Gerrit-Change-Number: 17201 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 10:24:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 10:24:32 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 10:24:32 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Create remote rundir directories In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17204 ) Change subject: ansible: gsm-tester: Create remote rundir directories ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I802bdcc79e7787052364f6518e868d741cb040ac Gerrit-Change-Number: 17204 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 10:24:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 11:13:22 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 11:13:22 +0000 Subject: Change in osmo-gsm-tester[master]: config: Fix reading empty yaml default-suites.conf References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17212 ) Change subject: config: Fix reading empty yaml default-suites.conf ...................................................................... config: Fix reading empty yaml default-suites.conf during config.read(), on empty file yaml.safe_load() returns None, which was then later converted to string "None" by _standardize(), and osmo-gsm-tester.py was not catching "not combination_strs" condition. Change-Id: I07d7daab8f8f4238db140f0a0311f3d1d41e6cb0 --- M src/osmo_gsm_tester/config.py 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/12/17212/1 diff --git a/src/osmo_gsm_tester/config.py b/src/osmo_gsm_tester/config.py index 7f1e52f..87b3da4 100644 --- a/src/osmo_gsm_tester/config.py +++ b/src/osmo_gsm_tester/config.py @@ -176,6 +176,8 @@ return yaml.dump(config, default_flow_style=False) def _standardize_item(item): + if item is None: + return None if isinstance(item, (tuple, list)): return [_standardize_item(i) for i in item] if isinstance(item, dict): -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I07d7daab8f8f4238db140f0a0311f3d1d41e6cb0 Gerrit-Change-Number: 17212 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 11:23:31 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 11:23:31 +0000 Subject: Change in osmo-gsm-tester[master]: config: Fix reading empty yaml default-suites.conf In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17212 ) Change subject: config: Fix reading empty yaml default-suites.conf ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I07d7daab8f8f4238db140f0a0311f3d1d41e6cb0 Gerrit-Change-Number: 17212 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 11:23:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 11:23:34 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 11:23:34 +0000 Subject: Change in osmo-gsm-tester[master]: config: Fix reading empty yaml default-suites.conf In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17212 ) Change subject: config: Fix reading empty yaml default-suites.conf ...................................................................... config: Fix reading empty yaml default-suites.conf during config.read(), on empty file yaml.safe_load() returns None, which was then later converted to string "None" by _standardize(), and osmo-gsm-tester.py was not catching "not combination_strs" condition. Change-Id: I07d7daab8f8f4238db140f0a0311f3d1d41e6cb0 --- M src/osmo_gsm_tester/config.py 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/config.py b/src/osmo_gsm_tester/config.py index 7f1e52f..87b3da4 100644 --- a/src/osmo_gsm_tester/config.py +++ b/src/osmo_gsm_tester/config.py @@ -176,6 +176,8 @@ return yaml.dump(config, default_flow_style=False) def _standardize_item(item): + if item is None: + return None if isinstance(item, (tuple, list)): return [_standardize_item(i) for i in item] if isinstance(item, dict): -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17212 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I07d7daab8f8f4238db140f0a0311f3d1d41e6cb0 Gerrit-Change-Number: 17212 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 12:19:28 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 12:19:28 +0000 Subject: Change in osmo-gsm-tester[master]: suites/debug: Allow jumping into python debugger References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17213 ) Change subject: suites/debug: Allow jumping into python debugger ...................................................................... suites/debug: Allow jumping into python debugger Change-Id: Ia6262299981f1d7ac2d81c22b7b9b007e096259a --- M suites/debug/interactive.py 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/13/17213/1 diff --git a/suites/debug/interactive.py b/suites/debug/interactive.py index 98bf174..89f967f 100755 --- a/suites/debug/interactive.py +++ b/suites/debug/interactive.py @@ -37,7 +37,7 @@ m.connect(msc.mcc_mnc()) while True: - cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd , data-attach, data-wait, data-detach, data-activate') + cmd = prompt('Enter command: (q)uit (d)ebug (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd , data-attach, data-wait, data-detach, data-activate') cmd = cmd.strip().lower() if not cmd: @@ -48,6 +48,9 @@ if 'quit'.startswith(cmd): break + elif 'debug'.startswith(cmd): + import pdb; pdb.set_trace() + elif 'wait-registered'.startswith(cmd): try: for m in modems: -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ia6262299981f1d7ac2d81c22b7b9b007e096259a Gerrit-Change-Number: 17213 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 15:31:22 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 15:31:22 +0000 Subject: Change in osmo-gsm-tester[master]: contrib: Fix default variable value syntax In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17205 ) Change subject: contrib: Fix default variable value syntax ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I23abf33881f64dd89c0bf5ef970972908d337366 Gerrit-Change-Number: 17205 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 15:31:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 15:31:25 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 15:31:25 +0000 Subject: Change in osmo-gsm-tester[master]: contrib: Fix default variable value syntax In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17205 ) Change subject: contrib: Fix default variable value syntax ...................................................................... contrib: Fix default variable value syntax Change-Id: I23abf33881f64dd89c0bf5ef970972908d337366 --- M contrib/jenkins-build-common.sh M contrib/jenkins-build-srslte.sh 2 files changed, 5 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins-build-common.sh b/contrib/jenkins-build-common.sh index d64f92d..ca8bf02 100644 --- a/contrib/jenkins-build-common.sh +++ b/contrib/jenkins-build-common.sh @@ -42,16 +42,16 @@ exit 1 fi -git_url="${git_url-"git://git.osmocom.org"}" -prefix="${prefix-"$base/inst-$name"}" +git_url="${git_url:-git://git.osmocom.org}" +prefix="${prefix:-$base/inst-$name}" # prefix_real is usually identical with prefix, except when installing to a # different $DESTDIR than /, which is the case for example when building # osmo-bts within the sysmoBTS SDK -prefix_real="${prefix_real-"$prefix"}" +prefix_real="${prefix_real:-$prefix}" # Flag to be used to enable ASAN in builds. Defaults to enable ASAN builds and # it can be disabled by passing SANITIZE_FLAGS="" to the build. -SANITIZE_FLAGS="${SANITIZE_FLAGS---enable-sanitize}" +SANITIZE_FLAGS="${SANITIZE_FLAGS:---enable-sanitize}" export PKG_CONFIG_PATH="$prefix_real/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$prefix_real/lib:$LD_LIBRARY_PATH" diff --git a/contrib/jenkins-build-srslte.sh b/contrib/jenkins-build-srslte.sh index 77d5bc4..29a6ffc 100755 --- a/contrib/jenkins-build-srslte.sh +++ b/contrib/jenkins-build-srslte.sh @@ -3,7 +3,7 @@ base="$PWD" name="srslte" -git_url="${git_url-"https://github.com/pespin/"}" +git_url="${git_url:-https://github.com/srsLTE}" . "$(dirname "$0")/jenkins-build-common.sh" #TODO: make sure libconfig, zeroMQ is installed -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I23abf33881f64dd89c0bf5ef970972908d337366 Gerrit-Change-Number: 17205 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 15:31:27 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 15:31:27 +0000 Subject: Change in osmo-gsm-tester[master]: contrib: srslte: Allow changing repo name In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17206 ) Change subject: contrib: srslte: Allow changing repo name ...................................................................... contrib: srslte: Allow changing repo name Change-Id: I06e6566ac3df9369b391bc88f288f72588088ef1 --- M contrib/jenkins-build-srslte.sh 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins-build-srslte.sh b/contrib/jenkins-build-srslte.sh index 29a6ffc..dd75e86 100755 --- a/contrib/jenkins-build-srslte.sh +++ b/contrib/jenkins-build-srslte.sh @@ -4,9 +4,10 @@ base="$PWD" name="srslte" git_url="${git_url:-https://github.com/srsLTE}" +project_name="${project_name:-srsLTE}" . "$(dirname "$0")/jenkins-build-common.sh" #TODO: make sure libconfig, zeroMQ is installed -build_repo srsLTE +build_repo $project_name create_bin_tgz "srsue srsenb srsepc" -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17206 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I06e6566ac3df9369b391bc88f288f72588088ef1 Gerrit-Change-Number: 17206 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 15:34:55 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 15:34:55 +0000 Subject: Change in osmo-gsm-tester[master]: suites/debug: Allow jumping into python debugger In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17213 ) Change subject: suites/debug: Allow jumping into python debugger ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ia6262299981f1d7ac2d81c22b7b9b007e096259a Gerrit-Change-Number: 17213 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 15:34:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 15:34:58 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 18 Feb 2020 15:34:58 +0000 Subject: Change in osmo-gsm-tester[master]: suites/debug: Allow jumping into python debugger In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17213 ) Change subject: suites/debug: Allow jumping into python debugger ...................................................................... suites/debug: Allow jumping into python debugger Change-Id: Ia6262299981f1d7ac2d81c22b7b9b007e096259a --- M suites/debug/interactive.py 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/suites/debug/interactive.py b/suites/debug/interactive.py index 98bf174..89f967f 100755 --- a/suites/debug/interactive.py +++ b/suites/debug/interactive.py @@ -37,7 +37,7 @@ m.connect(msc.mcc_mnc()) while True: - cmd = prompt('Enter command: (q)uit (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd , data-attach, data-wait, data-detach, data-activate') + cmd = prompt('Enter command: (q)uit (d)ebug (s)ms (g)et-registered (w)ait-registered, call-list [], call-dial , call-wait-incoming , call-answer , call-hangup , ussd , data-attach, data-wait, data-detach, data-activate') cmd = cmd.strip().lower() if not cmd: @@ -48,6 +48,9 @@ if 'quit'.startswith(cmd): break + elif 'debug'.startswith(cmd): + import pdb; pdb.set_trace() + elif 'wait-registered'.startswith(cmd): try: for m in modems: -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ia6262299981f1d7ac2d81c22b7b9b007e096259a Gerrit-Change-Number: 17213 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 16:26:34 2020 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 18 Feb 2020 16:26:34 +0000 Subject: Change in libosmocore[master]: osmo-sim-test: Recurse through subdirectories In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17153 ) Change subject: osmo-sim-test: Recurse through subdirectories ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17153 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I737b01d9a845e37d8be9d4709ef0de04e749daec Gerrit-Change-Number: 17153 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 16:26:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 16:46:40 2020 From: gerrit-no-reply at lists.osmocom.org (Hoernchen) Date: Tue, 18 Feb 2020 16:46:40 +0000 Subject: Change in libosmocore[master]: osmo-sim-test: Fall-back to classic SIM In-Reply-To: References: Message-ID: Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17154 ) Change subject: osmo-sim-test: Fall-back to classic SIM ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17154 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5a986fc65de76c24c5af52ce7e8c699cf302fda9 Gerrit-Change-Number: 17154 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 18 Feb 2020 16:46:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 17:08:27 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 18 Feb 2020 17:08:27 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: fix malformed MS RA capability in testRAcap() In-Reply-To: References: Message-ID: Hello pespin, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17209 to look at the new patch set (#2). Change subject: tests/rlcmac: fix malformed MS RA capability in testRAcap() ...................................................................... tests/rlcmac: fix malformed MS RA capability in testRAcap() Long story short: as it turns out the test vector '12a5146200'O has been generated by TITAN, and it's malformed. The length indicator it contains must be at least 29 bits, not 21. This field is calculated by TITAN automatically, so I guess there is a bug somewhere in its RAW encoder implementation. It's funny that Wireshark decodes the old malformed vector without any problems if it's encapsulated into the BSSGP DL-UNITDATA. The reason for that is because BSSGP dissector does not actually use the CSN.1 codec and relies on its own hand-written parser [1], which does not respect the length constraints. Furthermore, table 10.5.146/3GPP TS 24.008, describing the format of MS Radio Access Capability IE, has the following comment: < Multislot capability struct > ::= { 0 | 1 < HSCSD multislot class : bit (5) > } ... -- error: struct too short, assume features do not exist so ideally our CSN.1 decoder should be more tolerant to the old malformed vector, but unfortunately error handling is not implemented. [1] See de_gmm_ms_radio_acc_cap() in epan/dissectors/packet-gsm_a_gm.c. Change-Id: I5f810397b8d09c18e069168023429f6a4d899c86 --- M tests/rlcmac/RLCMACTest.cpp M tests/rlcmac/RLCMACTest.err M tests/rlcmac/RLCMACTest.ok 3 files changed, 22 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/09/17209/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I5f810397b8d09c18e069168023429f6a4d899c86 Gerrit-Change-Number: 17209 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 20:24:45 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 20:24:45 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: fix malformed MS RA capability in testRAcap() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17209 ) Change subject: tests/rlcmac: fix malformed MS RA capability in testRAcap() ...................................................................... Patch Set 2: Code-Review+1 if there is a bug in the TITAN encoder, it should for sure be reported upstream so they can fix it. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I5f810397b8d09c18e069168023429f6a4d899c86 Gerrit-Change-Number: 17209 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 20:24:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 20:24:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 20:24:59 +0000 Subject: Change in libosmocore[master]: osmo-sim-test: Fall-back to classic SIM In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17154 ) Change subject: osmo-sim-test: Fall-back to classic SIM ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17154 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5a986fc65de76c24c5af52ce7e8c699cf302fda9 Gerrit-Change-Number: 17154 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 18 Feb 2020 20:24:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 20:25:02 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 20:25:02 +0000 Subject: Change in libosmocore[master]: osmo-sim-test: Recurse through subdirectories In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17153 ) Change subject: osmo-sim-test: Recurse through subdirectories ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17153 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I737b01d9a845e37d8be9d4709ef0de04e749daec Gerrit-Change-Number: 17153 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 20:25:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 20:25:10 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 20:25:10 +0000 Subject: Change in libosmocore[master]: osmo-sim-test: Recurse through subdirectories In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17153 ) Change subject: osmo-sim-test: Recurse through subdirectories ...................................................................... osmo-sim-test: Recurse through subdirectories Don't just iterate over all files in the current working directory (cwd), but also recurse through all sub-directories. Change-Id: I737b01d9a845e37d8be9d4709ef0de04e749daec --- M utils/osmo-sim-test.c 1 file changed, 39 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve Hoernchen: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/utils/osmo-sim-test.c b/utils/osmo-sim-test.c index cd98397..ea3ce2a 100644 --- a/utils/osmo-sim-test.c +++ b/utils/osmo-sim-test.c @@ -374,6 +374,44 @@ } } + +static void iterate_fs(struct osim_chan_hdl *chan) +{ + const struct osim_file_desc *prev_cwd; + struct osim_file_desc *ofd; + + /* iterate over all files in current working directory */ + llist_for_each_entry(ofd, &chan->cwd->child_list, list) { + struct msgb *m; + printf("\n\n================ %s (%s) ==================\n", + ofd->short_name, ofd->long_name); + + m = select_file(chan, ofd->fid); + if (msgb_apdu_sw(m) != 0x9000) { + msgb_free(m); + continue; + } + dump_fcp_template_msg(m); + msgb_free(m); + + /* If this is a DF, recurse into it */ + switch (ofd->type) { + case TYPE_DF: + /* the select above has just changed into this directory */ + prev_cwd = chan->cwd; + chan->cwd = ofd; + iterate_fs(chan); + /* "pop" the directory from the stack */ + chan->cwd = prev_cwd; + break; + default: + dump_file(chan, ofd->fid); + break; + } + } +} + + int main(int argc, char **argv) { struct osim_reader_hdl *reader; @@ -410,19 +448,7 @@ dump_fcp_template_msg(msg); msgb_free(msg); - { - struct osim_file_desc *ofd; - llist_for_each_entry(ofd, &chan->cwd->child_list, list) { - struct msgb *m; - printf("\n\n================ %s (%s) ==================\n", - ofd->short_name, ofd->long_name); - - m = select_file(chan, ofd->fid); - dump_fcp_template_msg(m); - msgb_free(m); - dump_file(chan, ofd->fid); - } - } + iterate_fs(chan); exit(0); } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17153 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I737b01d9a845e37d8be9d4709ef0de04e749daec Gerrit-Change-Number: 17153 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 20:25:10 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 20:25:10 +0000 Subject: Change in libosmocore[master]: osmo-sim-test: Fall-back to classic SIM In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17154 ) Change subject: osmo-sim-test: Fall-back to classic SIM ...................................................................... osmo-sim-test: Fall-back to classic SIM If selection of ADF_USIM fails, let's fall-back to reading/dumping a classic TS 11.11 (51.011) SIM card. Change-Id: I5a986fc65de76c24c5af52ce7e8c699cf302fda9 --- M include/osmocom/sim/sim.h M utils/osmo-sim-test.c 2 files changed, 106 insertions(+), 22 deletions(-) Approvals: Jenkins Builder: Verified Hoernchen: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/sim/sim.h b/include/osmocom/sim/sim.h index 2bc4715..8eb3f11 100644 --- a/include/osmocom/sim/sim.h +++ b/include/osmocom/sim/sim.h @@ -135,6 +135,7 @@ TYPE_ADF, /*!< Application Dedicated File */ TYPE_EF, /*!< Entry File */ TYPE_EF_INT, /*!< Internal Entry File */ + TYPE_MF, /*!< Master File */ }; enum osim_ef_type { diff --git a/utils/osmo-sim-test.c b/utils/osmo-sim-test.c index ea3ce2a..d33f1ba 100644 --- a/utils/osmo-sim-test.c +++ b/utils/osmo-sim-test.c @@ -33,6 +33,8 @@ /* FIXME: this needs to be moved to card_fs_uicc.c */ +static uint8_t g_class = 0x00; /* UICC/USIM */ + /* 11.1.1 */ static struct msgb *_select_file(struct osim_chan_hdl *st, uint8_t p1, uint8_t p2, const uint8_t *data, uint8_t data_len) @@ -40,7 +42,7 @@ struct msgb *msg; uint8_t *dst; - msg = osim_new_apdumsg(0x00, 0xA4, p1, p2, data_len, 256); + msg = osim_new_apdumsg(g_class, 0xA4, p1, p2, data_len, 256); dst = msgb_put(msg, data_len); memcpy(dst, data, data_len); @@ -59,8 +61,13 @@ static struct msgb *select_file(struct osim_chan_hdl *st, uint16_t fid) { uint16_t cfid = htons(fid); + uint8_t p2 = 0x04; - return _select_file(st, 0x00, 0x04, (uint8_t *)&cfid, 2); + /* Classic SIM cards don't support 0x04 (Return FCP) */ + if (g_class == 0xA0) + p2 = 0x00; + + return _select_file(st, 0x00, p2, (uint8_t *)&cfid, 2); } /* 11.1.9 */ @@ -72,7 +79,7 @@ if (strlen(pin) > 8) return -EINVAL; - msg = osim_new_apdumsg(0x00, 0x20, 0x00, pin_nr, 8, 0); + msg = osim_new_apdumsg(g_class, 0x20, 0x00, pin_nr, 8, 0); pindst = (char *) msgb_put(msg, 8); memset(pindst, 0xFF, 8); /* Do not copy the terminating \0 */ @@ -86,7 +93,7 @@ { struct msgb *msg; - msg = osim_new_apdumsg(0x00, 0xB2, rec_nr, 0x04, 0, rec_size); + msg = osim_new_apdumsg(g_class, 0xB2, rec_nr, 0x04, 0, rec_size); osim_transceive_apdu(st, msg); @@ -101,7 +108,7 @@ if (offset > 0x7fff || len > 256) return NULL; - msg = osim_new_apdumsg(0x00, 0xB0, offset >> 8, offset & 0xff, 0, len & 0xff); + msg = osim_new_apdumsg(g_class, 0xB0, offset >> 8, offset & 0xff, 0, len & 0xff); osim_transceive_apdu(st, msg); @@ -175,7 +182,61 @@ return 0; } +/* TS 51.011 Section 9.3 Type of File */ +static const enum osim_file_type sim2ftype[8] = { + [1] = TYPE_MF, + [2] = TYPE_DF, + [4] = TYPE_EF, +}; + +/* TS 51.011 Section 9.3 Structure of File */ +static const enum osim_ef_type sim2eftype[8] = { + [0] = EF_TYPE_TRANSP, + [1] = EF_TYPE_RECORD_FIXED, + [3] = EF_TYPE_RECORD_CYCLIC, +}; + +/* TS 51.011 Section 9.2.1 */ +static int osim_fcp_fd_decode_sim(struct osim_fcp_fd_decoded *ofd, const uint8_t *fcp, int fcp_len) +{ + memset(ofd, 0, sizeof(*ofd)); + + if (fcp_len < 14) + return -EINVAL; + + ofd->type = sim2ftype[fcp[6] & 7]; + switch (ofd->type) { + case TYPE_EF: + ofd->ef_type = sim2eftype[fcp[13] & 7]; + if (fcp_len < 13 + fcp[12]) + return -EINVAL; + switch (ofd->ef_type) { + case EF_TYPE_RECORD_FIXED: + case EF_TYPE_RECORD_CYCLIC: + if (fcp_len < 15) + return -EINVAL; + ofd->rec_len = fcp[14]; + ofd->num_rec = ntohs(*(uint16_t *)(fcp+2)) / ofd->rec_len; + break; + default: + break; + } + break; + case TYPE_MF: + case TYPE_DF: + if (fcp_len < 22) + return -EINVAL; + break; + default: + break; + } + + return 0; +} + +extern struct osim_card_profile *osim_cprof_sim(void *ctx); extern struct osim_card_profile *osim_cprof_usim(void *ctx); +extern struct osim_card_profile *osim_cprof_isim(void *ctx); static struct msgb *try_select_adf_usim(struct osim_chan_hdl *st) { @@ -186,9 +247,17 @@ int rc, i; msg = select_file(st, 0x2f00); - rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-2, 0, 0); - if (rc < 0) + if (!msg) return NULL; + /* return status word in case of error */ + if (msgb_apdu_sw(msg) != 0x9000) + return msg; + + rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-2, 0, 0); + if (rc < 0) { + msgb_free(msg); + return NULL; + } dump_fcp_template(&tp); @@ -266,20 +335,25 @@ goto out; } - rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-2, 0, 0); - if (rc < 0) { - printf("Unable to parse FCP\n"); - goto out; + if (g_class != 0xA0) { + rc = tlv_parse(&tp, &ts102221_fcp_tlv_def, msgb_apdu_de(msg)+2, msgb_apdu_le(msg)-2, 0, 0); + if (rc < 0) { + printf("Unable to parse FCP: %s\n", msgb_hexdump(msg)); + goto out; + } + + if (!TLVP_PRESENT(&tp, UICC_FCP_T_FILE_DESC) || + TLVP_LEN(&tp, UICC_FCP_T_FILE_DESC) < 2) { + printf("No file descriptor present ?!?\n"); + goto out; + } + + rc = osim_fcp_fd_decode(&ffdd, TLVP_VAL(&tp, UICC_FCP_T_FILE_DESC), + TLVP_LEN(&tp, UICC_FCP_T_FILE_DESC)); + } else { + rc = osim_fcp_fd_decode_sim(&ffdd, msgb_apdu_de(msg), msgb_apdu_le(msg)); } - if (!TLVP_PRESENT(&tp, UICC_FCP_T_FILE_DESC) || - TLVP_LEN(&tp, UICC_FCP_T_FILE_DESC) < 2) { - printf("No file descriptor present ?!?\n"); - goto out; - } - - rc = osim_fcp_fd_decode(&ffdd, TLVP_VAL(&tp, UICC_FCP_T_FILE_DESC), - TLVP_LEN(&tp, UICC_FCP_T_FILE_DESC)); if (rc < 0) { printf("Unable to decode File Descriptor\n"); goto out; @@ -432,10 +506,19 @@ exit(3); msg = try_select_adf_usim(chan); - if (!msg || msgb_apdu_sw(msg) != 0x9000) + if (!msg) { exit(4); - dump_fcp_template_msg(msg); - msgb_free(msg); + } else if (msgb_apdu_sw(msg) == 0x6e00) { + /* CLA not supported: must be classic SIM, not USIM */ + g_class = 0xA0; + chan->card->prof = osim_cprof_sim(chan->card); + chan->cwd = chan->card->prof->mf; + msgb_free(msg); + } else if (msgb_apdu_sw(msg) == 0x9000) { + /* normal file */ + dump_fcp_template_msg(msg); + msgb_free(msg); + } msg = select_file(chan, 0x6fc5); dump_fcp_template_msg(msg); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17154 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5a986fc65de76c24c5af52ce7e8c699cf302fda9 Gerrit-Change-Number: 17154 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 20:30:40 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 20:30:40 +0000 Subject: Change in osmo-bts[master]: Do not depend on pcu_direct flag when populating ph_data_ind In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17197 ) Change subject: Do not depend on pcu_direct flag when populating ph_data_ind ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17197 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iaa37bb62af4f5eb4b6e684cb754e68d11e6fd676 Gerrit-Change-Number: 17197 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 18 Feb 2020 20:30:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 20:33:13 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 20:33:13 +0000 Subject: Change in osmo-bts[master]: osmo-bts-sysmo: merge measurement data and payload In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17146 ) Change subject: osmo-bts-sysmo: merge measurement data and payload ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Gerrit-Change-Number: 17146 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 18 Feb 2020 20:33:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 21:45:30 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 18 Feb 2020 21:45:30 +0000 Subject: Change in libosmocore[master]: bitvec: fix bitvec_unhex(): do not return 1 on success References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17214 ) Change subject: bitvec: fix bitvec_unhex(): do not return 1 on success ...................................................................... bitvec: fix bitvec_unhex(): do not return 1 on success This function is supposed to return 0 on success or 1 in case of error. However, it used to return 1 even in case of success. The reason is that length of the input string was not taken into account and sscanf() was failing on '\0'. Let's use osmo_hexparse() and rely on its return value. P.S. Funny that the unit test expectations were wrong too. Change-Id: I441a22c7964bb31688071d8bcf6a282d8c0187ff --- M src/bitvec.c M tests/bitvec/bitvec_test.ok 2 files changed, 11 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/14/17214/1 diff --git a/src/bitvec.c b/src/bitvec.c index 5130705..be1b576 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -457,17 +457,13 @@ */ int bitvec_unhex(struct bitvec *bv, const char *src) { - unsigned i; - unsigned val; - unsigned write_index = 0; - unsigned digits = bv->data_len * 2; + int rc; - for (i = 0; i < digits; i++) { - if (sscanf(src + i, "%1x", &val) < 1) { - return 1; - } - bitvec_write_field(bv, &write_index, val, 4); - } + rc = osmo_hexparse(src, bv->data, bv->data_len); + if (rc < 0) /* turn -1 into 1 in case of error */ + return 1; + + bv->cur_bit = rc * 8; return 0; } diff --git a/tests/bitvec/bitvec_test.ok b/tests/bitvec/bitvec_test.ok index a48912d..fa8143c 100644 --- a/tests/bitvec/bitvec_test.ok +++ b/tests/bitvec/bitvec_test.ok @@ -119,19 +119,19 @@ bitvec: 00 00 00 00 fc 82 84 86 88 8a 8c 8e 90 92 94 96 98 9a 9c 9e a0 a2 a4 a6 a8 aa ac ae b0 b2 b4 fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 out: ff 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a ff === end test_byte_ops === -1 -=> cur_bit=184 +0 -=> cur_bit=184 48282407a6a074227201000b2b2b2b2b2b2b2b2b2b2b2b0000000000000000000000000000000000000000000000000000000000000000000000000000000000 48282407a6a074227201000b2b2b2b2b2b2b2b2b2b2b2b -1 -=> cur_bit=184 +0 -=> cur_bit=184 47240c00400000000000000079eb2ac9402b2b2b2b2b2b0000000000000000000000000000000000000000000000000000000000000000000000000000000000 47240c00400000000000000079eb2ac9402b2b2b2b2b2b -1 -=> cur_bit=184 +0 -=> cur_bit=184 47283c367513ba333004242b2b2b2b2b2b2b2b2b2b2b2b0000000000000000000000000000000000000000000000000000000000000000000000000000000000 47283c367513ba333004242b2b2b2b2b2b2b2b2b2b2b2b -1 -=> cur_bit=184 +0 -=> cur_bit=184 deadface000000000000000000000000000000beeffeed0000000000000000000000000000000000000000000000000000000000000000000000000000000000 DEADFACE000000000000000000000000000000BEEFFEED -0 -=> cur_bit=512 +1 -=> cur_bit=0 fffffaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa FFFFFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB arrr... -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I441a22c7964bb31688071d8bcf6a282d8c0187ff Gerrit-Change-Number: 17214 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 21:46:50 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 18 Feb 2020 21:46:50 +0000 Subject: Change in libosmocore[master]: bitvec: fix bitvec_unhex(): do not return 1 on success In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/17214 to look at the new patch set (#2). Change subject: bitvec: fix bitvec_unhex(): do not return 1 on success ...................................................................... bitvec: fix bitvec_unhex(): do not return 1 on success This function is supposed to return 0 on success or 1 in case of error. However, it used to return 1 even in case of success. The reason is that length of the input string was not taken into account and sscanf() was failing on '\0'. Let's use osmo_hexparse() and rely on its return value. P.S. Funny that the unit test expectations were wrong too. Change-Id: I441a22c7964bb31688071d8bcf6a282d8c0187ff --- M src/bitvec.c M tests/bitvec/bitvec_test.ok 2 files changed, 12 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/14/17214/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I441a22c7964bb31688071d8bcf6a282d8c0187ff Gerrit-Change-Number: 17214 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 21:58:45 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 18 Feb 2020 21:58:45 +0000 Subject: Change in libosmocore[master]: bitvec: fix misleading description of bitvec_spare_padding() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17215 ) Change subject: bitvec: fix misleading description of bitvec_spare_padding() ...................................................................... bitvec: fix misleading description of bitvec_spare_padding() Change-Id: Ie60bf7d993fe80d3c0fcd04e4c3dd81da4a2ea0b --- M src/bitvec.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/15/17215/1 diff --git a/src/bitvec.c b/src/bitvec.c index 10aa776..6202227 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -292,7 +292,7 @@ return 0; } -/*! pad all remaining bits up to num_bits +/*! pad all remaining bits up to a given bit number * \return 0 on success; negative otherwise */ int bitvec_spare_padding(struct bitvec *bv, unsigned int up_to_bit) { -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie60bf7d993fe80d3c0fcd04e4c3dd81da4a2ea0b Gerrit-Change-Number: 17215 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 22:04:08 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 22:04:08 +0000 Subject: Change in osmo-remsim[master]: rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-remsim/+/17184 to look at the new patch set (#4). Change subject: rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server ...................................................................... rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server This is in preparation of other patches which will actually issue the SRVC_E_DISCONNET event towards this FSM. Related: OS#4399 Change-Id: I080f9e85987bbbe7aef84c32ce84b69d949ff561 --- M src/rspro_client_fsm.c M src/rspro_client_fsm.h 2 files changed, 22 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/84/17184/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I080f9e85987bbbe7aef84c32ce84b69d949ff561 Gerrit-Change-Number: 17184 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 22:04:09 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 22:04:09 +0000 Subject: Change in osmo-remsim[master]: client: user_shell.c: fflush() after writes to stdout References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17216 ) Change subject: client: user_shell.c: fflush() after writes to stdout ...................................................................... client: user_shell.c: fflush() after writes to stdout This is useful if we have external programs interfacing with stdin/stdout of osmo-remsim-client-shell. We don't want that output to hang in some buffer indefinitely, but rather have the lines flushed immediately. Change-Id: I6879f9f186ce87e0644b3d7868fc5ea031b82c62 --- M src/client/user_shell.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/16/17216/1 diff --git a/src/client/user_shell.c b/src/client/user_shell.c index d5cad7b..11601d6 100644 --- a/src/client/user_shell.c +++ b/src/client/user_shell.c @@ -23,6 +23,7 @@ const struct TpduCardToModem *card2modem = &pdu->msg.choice.tpduCardToModem; printf("R-APDU: %s\n", osmo_hexdump(card2modem->data.buf, card2modem->data.size)); + fflush(stdout); return 0; } @@ -36,6 +37,7 @@ printf("SET_ATR: %s\n", osmo_hexdump(pdu->msg.choice.setAtrReq.atr.buf, pdu->msg.choice.setAtrReq.atr.size)); + fflush(stdout); resp = rspro_gen_SetAtrRes(ResultCode_ok); if (!resp) -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I6879f9f186ce87e0644b3d7868fc5ea031b82c62 Gerrit-Change-Number: 17216 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 22:04:09 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 22:04:09 +0000 Subject: Change in osmo-remsim[master]: client: user_shell.c: Don't echo stdin on stdout References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17217 ) Change subject: client: user_shell.c: Don't echo stdin on stdout ...................................................................... client: user_shell.c: Don't echo stdin on stdout This is a debug statement that shouldn't be in the code anymore Change-Id: I6601e06c843ee7c8d151011af072186bfc5d3efa --- M src/client/user_shell.c 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/17/17217/1 diff --git a/src/client/user_shell.c b/src/client/user_shell.c index 11601d6..abe1542 100644 --- a/src/client/user_shell.c +++ b/src/client/user_shell.c @@ -87,8 +87,6 @@ OSMO_ASSERT(ss->rx_msg); - printf("stdin: `%s'\n", cmd); - if (!strcasecmp(cmd, "RESET")) { /* reset the [remote] card */ pdu = rspro_gen_ClientSlotStatusInd(bc->srv_conn.clslot, &bslot, -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I6601e06c843ee7c8d151011af072186bfc5d3efa Gerrit-Change-Number: 17217 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 22:05:34 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 22:05:34 +0000 Subject: Change in osmo-remsim[master]: rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17184 ) Change subject: rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I080f9e85987bbbe7aef84c32ce84b69d949ff561 Gerrit-Change-Number: 17184 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 18 Feb 2020 22:05:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 22:05:54 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 22:05:54 +0000 Subject: Change in osmo-remsim[master]: client: Make ConfigClientBankReq with bankd_port == 0 trigger SRVC_E_... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17185 ) Change subject: client: Make ConfigClientBankReq with bankd_port == 0 trigger SRVC_E_DISCONNECT ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17185 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Idbfbfa0e84fa14dcb913b4dcbd943bc80ec175ac Gerrit-Change-Number: 17185 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 18 Feb 2020 22:05:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 22:06:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 22:06:07 +0000 Subject: Change in osmo-remsim[master]: client: user_shell.c: fflush() after writes to stdout In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17216 ) Change subject: client: user_shell.c: fflush() after writes to stdout ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I6879f9f186ce87e0644b3d7868fc5ea031b82c62 Gerrit-Change-Number: 17216 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 18 Feb 2020 22:06:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 22:06:17 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 18 Feb 2020 22:06:17 +0000 Subject: Change in osmo-remsim[master]: client: user_shell.c: Don't echo stdin on stdout In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17217 ) Change subject: client: user_shell.c: Don't echo stdin on stdout ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I6601e06c843ee7c8d151011af072186bfc5d3efa Gerrit-Change-Number: 17217 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 18 Feb 2020 22:06:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 22:11:08 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 18 Feb 2020 22:11:08 +0000 Subject: Change in libosmocore[master]: bitvec: avoid redundant zero-initialization in bitvec_alloc() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17218 ) Change subject: bitvec: avoid redundant zero-initialization in bitvec_alloc() ...................................................................... bitvec: avoid redundant zero-initialization in bitvec_alloc() All the fields of the structure are set explicitly anyway. Change-Id: I40c0322d5f2febd98bae6fbe0ec2132eda6fb35b --- M src/bitvec.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/17218/1 diff --git a/src/bitvec.c b/src/bitvec.c index 6202227..5dd0275 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -400,7 +400,7 @@ * \return pointer to allocated vector; NULL in case of error */ struct bitvec *bitvec_alloc(unsigned int size, TALLOC_CTX *ctx) { - struct bitvec *bv = talloc_zero(ctx, struct bitvec); + struct bitvec *bv = talloc(ctx, struct bitvec); if (!bv) return NULL; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I40c0322d5f2febd98bae6fbe0ec2132eda6fb35b Gerrit-Change-Number: 17218 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 22:11:08 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 18 Feb 2020 22:11:08 +0000 Subject: Change in libosmocore[master]: bitvec: cosmetic: init i only once in bitvec_[un]pack() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17219 ) Change subject: bitvec: cosmetic: init i only once in bitvec_[un]pack() ...................................................................... bitvec: cosmetic: init i only once in bitvec_[un]pack() Change-Id: I5606ca34a72d42a9b6aafed662b995f9fa77be09 --- M src/bitvec.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/19/17219/1 diff --git a/src/bitvec.c b/src/bitvec.c index 5dd0275..d7f32fb 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -431,7 +431,7 @@ * \return number of bytes (= bits) copied */ unsigned int bitvec_pack(const struct bitvec *bv, uint8_t *buffer) { - unsigned int i = 0; + unsigned int i; for (i = 0; i < bv->data_len; i++) buffer[i] = bv->data[i]; @@ -444,7 +444,7 @@ * \return number of bytes (= bits) copied */ unsigned int bitvec_unpack(struct bitvec *bv, const uint8_t *buffer) { - unsigned int i = 0; + unsigned int i; for (i = 0; i < bv->data_len; i++) bv->data[i] = buffer[i]; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5606ca34a72d42a9b6aafed662b995f9fa77be09 Gerrit-Change-Number: 17219 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 18 22:59:13 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 18 Feb 2020 22:59:13 +0000 Subject: Change in libosmocore[master]: tests/bitvec: add a unit test for bitvec_read_field() References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17220 ) Change subject: tests/bitvec: add a unit test for bitvec_read_field() ...................................................................... tests/bitvec: add a unit test for bitvec_read_field() The aim of this unit test is to demonstrate the problem described in OS#4388: bitvec_read_field() can never return negative value on error (e.g. out of bounds access). Change-Id: I340ab5799fa53d5345edb02f3e2a3655527705c0 Related: OS#4388 --- M tests/bitvec/bitvec_test.c M tests/bitvec/bitvec_test.ok 2 files changed, 60 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/20/17220/1 diff --git a/tests/bitvec/bitvec_test.c b/tests/bitvec/bitvec_test.c index fbf5c5d..b4764e6 100644 --- a/tests/bitvec/bitvec_test.c +++ b/tests/bitvec/bitvec_test.c @@ -222,6 +222,45 @@ } } +static void test_bitvec_read_field(void) +{ + uint8_t data[8] = { 0xde, 0xad, 0xbe, 0xef, 0xfe, 0xeb, 0xda, 0xed }; + struct bitvec bv = { + .data_len = sizeof(data), + .data = data, + .cur_bit = 0, + }; + + unsigned int readIndex; + uint64_t field; + +#define _bitvec_read_field(idx, len) \ + readIndex = idx; \ + field = bitvec_read_field(&bv, &readIndex, len); \ + printf("bitvec_read_field(idx=%u, len=%u) => %" PRIx64 "\n", idx, len, field); + + _bitvec_read_field(0, 64); + _bitvec_read_field(0, 32); + _bitvec_read_field(0, 16); + _bitvec_read_field(0, 8); + _bitvec_read_field(0, 0); + + _bitvec_read_field(8, 8); + _bitvec_read_field(8, 4); + _bitvec_read_field(8, 0); + + _bitvec_read_field(10, 9); + _bitvec_read_field(10, 7); + _bitvec_read_field(10, 5); + _bitvec_read_field(10, 3); + _bitvec_read_field(10, 1); + + /* Out of bounds (see OS#4388) */ + _bitvec_read_field(8 * 8 * 8, 16); /* index too far */ + _bitvec_read_field(0, 8 * 8 + 1); /* too many bits */ + _bitvec_read_field(8 * 8, 16); /* 16 bits past */ +} + int main(int argc, char **argv) { struct bitvec bv; @@ -331,6 +370,9 @@ test_used_bytes(); test_tailroom(); + printf("\ntest bitvec_read_field():\n"); + test_bitvec_read_field(); + printf("\nbitvec ok.\n"); return 0; } diff --git a/tests/bitvec/bitvec_test.ok b/tests/bitvec/bitvec_test.ok index fa8143c..b118502 100644 --- a/tests/bitvec/bitvec_test.ok +++ b/tests/bitvec/bitvec_test.ok @@ -170,4 +170,22 @@ bitvec bytes used. +test bitvec_read_field(): +bitvec_read_field(idx=0, len=64) => deadbeeffeebdaed +bitvec_read_field(idx=0, len=32) => deadbeef +bitvec_read_field(idx=0, len=16) => dead +bitvec_read_field(idx=0, len=8) => de +bitvec_read_field(idx=0, len=0) => 0 +bitvec_read_field(idx=8, len=8) => ad +bitvec_read_field(idx=8, len=4) => a +bitvec_read_field(idx=8, len=0) => 0 +bitvec_read_field(idx=10, len=9) => 16d +bitvec_read_field(idx=10, len=7) => 5b +bitvec_read_field(idx=10, len=5) => 16 +bitvec_read_field(idx=10, len=3) => 5 +bitvec_read_field(idx=10, len=1) => 1 +bitvec_read_field(idx=512, len=16) => ffffffffffffffea +bitvec_read_field(idx=0, len=65) => ffffffffffffffea +bitvec_read_field(idx=64, len=16) => ffffffffffffffea + bitvec ok. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I340ab5799fa53d5345edb02f3e2a3655527705c0 Gerrit-Change-Number: 17220 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Tue Feb 18 23:59:48 2020 From: admin at opensuse.org (OBS Notification) Date: Tue, 18 Feb 2020 23:59:48 +0000 Subject: Build failure of network:osmocom:latest/eclipse-titan in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5e4c7a955be80_74062afaa90a25fc7111b2@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/eclipse-titan/Raspbian_10/armv7l Package network:osmocom:latest/eclipse-titan failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:latest eclipse-titan Last lines of build log: [ 955s] -h: generate TTCN-3 code allowing type substitution [ 955s] -m: generate only the UsefulTtcn3Types and XSD predefined modules [ 955s] -o: generate all definitions into one module (called XSD_Definitions) [ 955s] -p: do not generate the UsefulTtcn3Types and XSD predefined modules [ 955s] -q: quiet mode - disable the issue of status messages [ 955s] -s: parse and validate only - no TTCN-3 module generation [ 955s] -t: disable the generation of timing information in TTCN-3 modules [ 955s] -v: show version information [ 955s] -w: suppress warnings [ 955s] -x: disable schema validation but generate TTCN-3 modules [ 955s] -z: zap URI scheme from module name [ 955s] make[4]: *** [Makefile:284: TitanLoggerApi.ttcn] Error 1 [ 955s] make[4]: Leaving directory '/usr/src/packages/BUILD/core' [ 955s] make[3]: *** [../../Makefile.genrules:60: ../../core/RInt.o] Error 2 [ 955s] make[3]: Leaving directory '/usr/src/packages/BUILD/mctr2/mctr' [ 955s] make[2]: *** [Makefile:32: all] Error 2 [ 955s] make[2]: Leaving directory '/usr/src/packages/BUILD/mctr2' [ 955s] make[1]: *** [Makefile:65: all] Error 2 [ 955s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 955s] dh_auto_build: make -j1 returned exit code 2 [ 955s] make: *** [debian/rules:6: build] Error 2 [ 955s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 955s] ### VM INTERACTION START ### [ 959s] [ 906.296988] sysrq: SysRq : Power Off [ 959s] [ 906.299717] reboot: Power down [ 959s] ### VM INTERACTION END ### [ 960s] [ 960s] armbuild15 failed "build eclipse-titan_6.5.0-1.dsc" at Tue Feb 18 23:59:46 UTC 2020. [ 960s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Wed Feb 19 08:32:10 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 08:32:10 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: fix malformed MS RA capability in testRAcap() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17209 ) Change subject: tests/rlcmac: fix malformed MS RA capability in testRAcap() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I5f810397b8d09c18e069168023429f6a4d899c86 Gerrit-Change-Number: 17209 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 19 Feb 2020 08:32:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 08:52:11 2020 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 19 Feb 2020 08:52:11 +0000 Subject: Change in osmo-bts[master]: dtx: add detection of AMR DTX frames References: Message-ID: dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17221 ) Change subject: dtx: add detection of AMR DTX frames ...................................................................... dtx: add detection of AMR DTX frames Currently we do not detect any of the DTX frames (SID_FIRST, SID_UPDATE etc.) Detecting and tagging those frames as is_sub is important for measurement processing. Also the RTP marker bit must be set on each ONSET frame. - Add detection of DTX frames - Tag DTX frames as is_sub - Set RTP marker bit when ONSET frames are received Change-Id: I5afe730fff2fa3199a5913b0de4f5c7b23a39f31 Related: OS#2978 --- M include/osmo-bts/scheduler_backend.h M src/common/scheduler.c M src/osmo-bts-trx/scheduler_trx.c 3 files changed, 37 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/21/17221/1 diff --git a/include/osmo-bts/scheduler_backend.h b/include/osmo-bts/scheduler_backend.h index aa2d6e9..bdb5224 100644 --- a/include/osmo-bts/scheduler_backend.h +++ b/include/osmo-bts/scheduler_backend.h @@ -55,7 +55,8 @@ int _sched_compose_tch_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t *tch, uint8_t tch_len, - int16_t ta_offs_256bits, uint16_t ber10k, float rssi); + int16_t ta_offs_256bits, uint16_t ber10k, float rssi, + uint8_t is_sub); ubit_t *tx_idle_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t bid, uint16_t *nbits); diff --git a/src/common/scheduler.c b/src/common/scheduler.c index e8df537..20c665a 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -754,7 +754,8 @@ int _sched_compose_tch_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn, enum trx_chan_type chan, uint8_t *tch, uint8_t tch_len, - int16_t ta_offs_256bits, uint16_t ber10k, float rssi) + int16_t ta_offs_256bits, uint16_t ber10k, float rssi, + uint8_t is_sub) { struct msgb *msg; struct osmo_phsap_prim *l1sap; @@ -773,6 +774,7 @@ l1sap->u.tch.rssi = (int8_t) (rssi); l1sap->u.tch.ber10k = ber10k; l1sap->u.tch.ta_offs_256bits = ta_offs_256bits; + l1sap->u.tch.is_sub = is_sub & 1; msg->l2h = msgb_put(msg, tch_len); if (tch_len) diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 5abb73b..5bf8cff 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -37,6 +37,8 @@ #include #include #include +#include + #include #include @@ -400,7 +402,7 @@ /* Note: RSSI is set to 0 to indicate to the higher * layers that this is a faked tch_ind */ - _sched_compose_tch_ind(l1t, tn, fn, chan, tch_data, len, toa256, 10000, 0); + _sched_compose_tch_ind(l1t, tn, fn, chan, tch_data, len, toa256, 10000, 0, 0); } } @@ -1138,6 +1140,8 @@ get_lchan_by_chan_nr(l1t->trx, trx_chan_desc[chan].chan_nr | bi->tn); unsigned int fn_begin; uint16_t ber10k; + uint8_t amr_dtx; + uint8_t is_sub = 0; /* handle rach, if handover rach detection is turned on */ if (chan_state->ho_rach_detect == 1) @@ -1197,10 +1201,19 @@ * the first FN 4,13,21 defines that CMR is included in frame. * NOTE: A frame ends 7 FN after start. */ - rc = gsm0503_tch_afs_decode(tch_data + 2, *bursts_p, + + memset(tch_data, 0, sizeof(tch_data)); + + rc = gsm0503_tch_afs_decode_dtx(tch_data + 2, *bursts_p, (((bi->fn + 26 - 7) % 26) >> 2) & 1, chan_state->codec, chan_state->codecs, &chan_state->ul_ft, - &chan_state->ul_cmr, &n_errors, &n_bits_total); + &chan_state->ul_cmr, &n_errors, &n_bits_total, &amr_dtx); + + if (amr_dtx != AMR_OTHER) + is_sub = 1; + if (amr_dtx == AFS_ONSET) + lchan->rtp_tx_marker = true; + if (rc) trx_loop_amr_input(l1t, trx_chan_desc[chan].chan_nr | bi->tn, chan_state, @@ -1305,7 +1318,7 @@ compose_l1sap: fn_begin = gsm0502_fn_remap(bi->fn, FN_REMAP_TCH_F); return _sched_compose_tch_ind(l1t, bi->tn, fn_begin, chan, - tch_data, rc, bi->toa256, ber10k, bi->rssi); + tch_data, rc, bi->toa256, ber10k, bi->rssi, is_sub); } /*! \brief a single TCH/H burst was received by the PHY, process it */ @@ -1333,6 +1346,8 @@ int fn_is_odd = (((bi->fn + 26 - 10) % 26) >> 2) & 1; unsigned int fn_begin; uint16_t ber10k; + uint8_t amr_dtx; + uint8_t is_sub = 0; /* handle RACH, if handover RACH detection is turned on */ if (chan_state->ho_rach_detect == 1) @@ -1404,10 +1419,20 @@ * in frame, the first FN 4,13,21 or 5,14,22 defines that CMR * is included in frame. */ - rc = gsm0503_tch_ahs_decode(tch_data + 2, *bursts_p, + rc = gsm0503_tch_ahs_decode_dtx(tch_data + 2, *bursts_p, fn_is_odd, fn_is_odd, chan_state->codec, chan_state->codecs, &chan_state->ul_ft, - &chan_state->ul_cmr, &n_errors, &n_bits_total); + &chan_state->ul_cmr, &n_errors, &n_bits_total, &amr_dtx); + + if (amr_dtx != AMR_OTHER) + is_sub = 1; + if (amr_dtx == AHS_ONSET) + lchan->rtp_tx_marker = true; + else if (amr_dtx == AHS_SID_FIRST_INH) + lchan->rtp_tx_marker = true; + else if (amr_dtx == AHS_SID_UPDATE_INH) + lchan->rtp_tx_marker = true; + if (rc) trx_loop_amr_input(l1t, trx_chan_desc[chan].chan_nr | bi->tn, chan_state, @@ -1522,7 +1547,7 @@ else fn_begin = gsm0502_fn_remap(bi->fn, FN_REMAP_TCH_H1); return _sched_compose_tch_ind(l1t, bi->tn, fn_begin, chan, - tch_data, rc, bi->toa256, ber10k, bi->rssi); + tch_data, rc, bi->toa256, ber10k, bi->rssi, is_sub); } /* schedule all frames of all TRX for given FN */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I5afe730fff2fa3199a5913b0de4f5c7b23a39f31 Gerrit-Change-Number: 17221 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 08:55:43 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 08:55:43 +0000 Subject: Change in osmo-bts[master]: Do not depend on pcu_direct flag when populating ph_data_ind In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17197 ) Change subject: Do not depend on pcu_direct flag when populating ph_data_ind ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17197 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iaa37bb62af4f5eb4b6e684cb754e68d11e6fd676 Gerrit-Change-Number: 17197 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 19 Feb 2020 08:55:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 08:56:20 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 08:56:20 +0000 Subject: Change in osmo-bts[master]: osmo-bts-sysmo: merge measurement data and payload In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17146 ) Change subject: osmo-bts-sysmo: merge measurement data and payload ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Gerrit-Change-Number: 17146 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 19 Feb 2020 08:56:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 08:58:34 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 08:58:34 +0000 Subject: Change in libosmocore[master]: bitvec: fix bitvec_unhex(): do not return 1 on success In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17214 ) Change subject: bitvec: fix bitvec_unhex(): do not return 1 on success ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I441a22c7964bb31688071d8bcf6a282d8c0187ff Gerrit-Change-Number: 17214 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 19 Feb 2020 08:58:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 09:01:10 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 09:01:10 +0000 Subject: Change in libosmocore[master]: bitvec: fix misleading description of bitvec_spare_padding() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17215 ) Change subject: bitvec: fix misleading description of bitvec_spare_padding() ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/17215/1/src/bitvec.c File src/bitvec.c: https://gerrit.osmocom.org/c/libosmocore/+/17215/1/src/bitvec.c at 295 PS1, Line 295: /*! pad all remaining bits up to a given bit number "the given bit number", not any random one, but the one passed :) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie60bf7d993fe80d3c0fcd04e4c3dd81da4a2ea0b Gerrit-Change-Number: 17215 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 19 Feb 2020 09:01:10 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 09:02:32 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 09:02:32 +0000 Subject: Change in libosmocore[master]: bitvec: avoid redundant zero-initialization in bitvec_alloc() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17218 ) Change subject: bitvec: avoid redundant zero-initialization in bitvec_alloc() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I40c0322d5f2febd98bae6fbe0ec2132eda6fb35b Gerrit-Change-Number: 17218 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 19 Feb 2020 09:02:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 09:02:52 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 09:02:52 +0000 Subject: Change in libosmocore[master]: bitvec: cosmetic: init i only once in bitvec_[un]pack() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17219 ) Change subject: bitvec: cosmetic: init i only once in bitvec_[un]pack() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5606ca34a72d42a9b6aafed662b995f9fa77be09 Gerrit-Change-Number: 17219 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 19 Feb 2020 09:02:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 09:05:21 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 09:05:21 +0000 Subject: Change in libosmocore[master]: tests/bitvec: add a unit test for bitvec_read_field() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17220 ) Change subject: tests/bitvec: add a unit test for bitvec_read_field() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I340ab5799fa53d5345edb02f3e2a3655527705c0 Gerrit-Change-Number: 17220 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 19 Feb 2020 09:05:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 09:19:22 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 09:19:22 +0000 Subject: Change in libosmocore[master]: bitvec: fix bitvec_unhex(): do not return 1 on success In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17214 ) Change subject: bitvec: fix bitvec_unhex(): do not return 1 on success ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I441a22c7964bb31688071d8bcf6a282d8c0187ff Gerrit-Change-Number: 17214 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 19 Feb 2020 09:19:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 09:19:47 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 09:19:47 +0000 Subject: Change in libosmocore[master]: bitvec: fix misleading description of bitvec_spare_padding() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17215 ) Change subject: bitvec: fix misleading description of bitvec_spare_padding() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie60bf7d993fe80d3c0fcd04e4c3dd81da4a2ea0b Gerrit-Change-Number: 17215 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 19 Feb 2020 09:19:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 09:21:06 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 09:21:06 +0000 Subject: Change in libosmocore[master]: bitvec: avoid redundant zero-initialization in bitvec_alloc() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17218 ) Change subject: bitvec: avoid redundant zero-initialization in bitvec_alloc() ...................................................................... Patch Set 1: I'm not a big fan of such over-optimization patches. What if somebody inrtoduces new fields into the struct at some later point? And if those are not explicitly initialized? I would want to discuss such patches once somebody really runs into performance problems and has profiling data that shows these are the bottlenecks. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I40c0322d5f2febd98bae6fbe0ec2132eda6fb35b Gerrit-Change-Number: 17218 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 09:21:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 09:21:41 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 09:21:41 +0000 Subject: Change in libosmocore[master]: bitvec: cosmetic: init i only once in bitvec_[un]pack() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17219 ) Change subject: bitvec: cosmetic: init i only once in bitvec_[un]pack() ...................................................................... Patch Set 1: Code-Review+2 indeed, cosmetic. I'd expect any reasonable compiler should not generate different output... -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5606ca34a72d42a9b6aafed662b995f9fa77be09 Gerrit-Change-Number: 17219 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 19 Feb 2020 09:21:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 09:22:11 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 09:22:11 +0000 Subject: Change in libosmocore[master]: tests/bitvec: add a unit test for bitvec_read_field() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17220 ) Change subject: tests/bitvec: add a unit test for bitvec_read_field() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I340ab5799fa53d5345edb02f3e2a3655527705c0 Gerrit-Change-Number: 17220 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 19 Feb 2020 09:22:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 09:30:29 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 09:30:29 +0000 Subject: Change in libosmocore[master]: bitvec: avoid redundant zero-initialization in bitvec_alloc() In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17218 ) Change subject: bitvec: avoid redundant zero-initialization in bitvec_alloc() ...................................................................... Patch Set 1: I'd personally prefer keeping the talloc_zero() and removing the explicit = 0, imho that's the best tradeoff between maintainability and performance, but I'm fine with this change too. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I40c0322d5f2febd98bae6fbe0ec2132eda6fb35b Gerrit-Change-Number: 17218 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 09:30:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 10:23:03 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 10:23:03 +0000 Subject: Change in osmo-ci[master]: ansible: slave: Skip ttcn3 install on ARM targets References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17222 ) Change subject: ansible: slave: Skip ttcn3 install on ARM targets ...................................................................... ansible: slave: Skip ttcn3 install on ARM targets eclipse-titan is not currently built for ARM targets (or it fails) on osmocom OBS repos. Let's disable it since anyway we don't need to run ttcn3 stuff on ARM slaves. Change-Id: I83f95766fc601bfced6404db56af3bf8b871982f --- M ansible/roles/osmocom-jenkins-slave/tasks/main.yml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/22/17222/1 diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml index 6d15ea1..e8e6093 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml @@ -31,7 +31,7 @@ - name: install ttcn3 dependencies include_tasks: ttcn3-slave.yml - when: ttcn3_slave and ansible_distribution == 'Debian' and ansible_distribution_version >= '9' + when: ttcn3_slave and ansible_distribution == 'Debian' and ansible_distribution_version >= '9' and not (ansible_architecture == "armv7l" or ansible_architecture == "armv7l") - name: copy .gitconfig copy: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I83f95766fc601bfced6404db56af3bf8b871982f Gerrit-Change-Number: 17222 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 10:26:24 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 10:26:24 +0000 Subject: Change in osmo-ci[master]: ansible: slave: Skip ttcn3 install on ARM targets In-Reply-To: References: Message-ID: pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-ci/+/17222 ) Change subject: ansible: slave: Skip ttcn3 install on ARM targets ...................................................................... ansible: slave: Skip ttcn3 install on ARM targets eclipse-titan is not currently built for ARM targets (or it fails) on osmocom OBS repos. Let's disable it since anyway we don't need to run ttcn3 stuff on ARM slaves. Change-Id: I83f95766fc601bfced6404db56af3bf8b871982f --- M ansible/roles/osmocom-jenkins-slave/tasks/main.yml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/22/17222/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I83f95766fc601bfced6404db56af3bf8b871982f Gerrit-Change-Number: 17222 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 10:31:10 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 19 Feb 2020 10:31:10 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: fix malformed MS RA capability in testRAcap() In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17209 ) Change subject: tests/rlcmac: fix malformed MS RA capability in testRAcap() ...................................................................... tests/rlcmac: fix malformed MS RA capability in testRAcap() Long story short: as it turns out the test vector '12a5146200'O has been generated by TITAN, and it's malformed. The length indicator it contains must be at least 29 bits, not 21. This field is calculated by TITAN automatically, so I guess there is a bug somewhere in its RAW encoder implementation. It's funny that Wireshark decodes the old malformed vector without any problems if it's encapsulated into the BSSGP DL-UNITDATA. The reason for that is because BSSGP dissector does not actually use the CSN.1 codec and relies on its own hand-written parser [1], which does not respect the length constraints. Furthermore, table 10.5.146/3GPP TS 24.008, describing the format of MS Radio Access Capability IE, has the following comment: < Multislot capability struct > ::= { 0 | 1 < HSCSD multislot class : bit (5) > } ... -- error: struct too short, assume features do not exist so ideally our CSN.1 decoder should be more tolerant to the old malformed vector, but unfortunately error handling is not implemented. [1] See de_gmm_ms_radio_acc_cap() in epan/dissectors/packet-gsm_a_gm.c. Change-Id: I5f810397b8d09c18e069168023429f6a4d899c86 --- M tests/rlcmac/RLCMACTest.cpp M tests/rlcmac/RLCMACTest.err M tests/rlcmac/RLCMACTest.ok 3 files changed, 22 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp index a8d6217..de63fe6 100644 --- a/tests/rlcmac/RLCMACTest.cpp +++ b/tests/rlcmac/RLCMACTest.cpp @@ -224,7 +224,7 @@ /* MS RA capability 1 0001 .... = Access Technology Type: GSM E --note that GSM E covers GSM P (1) - .... 0010 101. .... = Length in bits: 0x15 (21) + .... 0011 101. .... = Length in bits: 0x1d (29) ...0 01.. RF Power Capability, GMSK Power Class: Not specified (1) A5 Bits: Same values apply for parameters as in the immediately preceding Access capabilities field within this IE (0) .... ...1 = Controlled early Classmark Sending: Implemented @@ -235,22 +235,27 @@ .... ..00 011. .... = GPRS multislot class: Max Rx-Slot/TDMA:2 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:3 Tta:3 Ttb:2 Tra:3 Trb:1 Type:1 (3) ...0 .... = GPRS Extended Dynamic Allocation Capability: Not Implemented */ - bitvec_unhex(vector, "12a5146200"); + bitvec_unhex(vector, "13a5146200"); rc = decode_gsm_ra_cap(vector, &data); - printf("decode_gsm_ra_cap fails? %s\n", rc !=0 ? "yes" : "no"); -#if 0 - /* FIXME: OS#1525, OS#3499: csn1 fails to parse this MS RA Cap IE value */ - assert (rc == 0); + OSMO_ASSERT(rc == 0); /* Make sure there's 1 value (currently fails due to failed decoding) */ - osmo_assert(cap->Count_MS_RA_capability_value == 1); + OSMO_ASSERT(data.Count_MS_RA_capability_value == 1); - /* Make sure MS multislot class is parsed correctly (currently fails due - to failed decoding and count being 0) */ - uint8_t ms_class = Decoding::get_ms_class_by_capability(&data); - assert(ms_class == 3); -#endif + /* Make sure GPRS / EGPRS multislot class is parsed correctly */ + printf("GPRS multislot class = %u\n", Decoding::get_ms_class_by_capability(&data)); + printf("EGPRS multislot class = %u\n", Decoding::get_egprs_ms_class_by_capability(&data)); + + /* Mangle the length indicator (set it to 21) */ + unsigned int writeIndex = 4; + rc = bitvec_write_field(vector, &writeIndex, 21, 7); + OSMO_ASSERT(rc == 0); + + /* Make sure decoding attempt fails */ + printf("Test decoding of a malformed vector (short length indicator)\n"); + rc = decode_gsm_ra_cap(vector, &data); + printf("decode_gsm_ra_cap() returns %d\n", rc); } int main(int argc, char *argv[]) diff --git a/tests/rlcmac/RLCMACTest.err b/tests/rlcmac/RLCMACTest.err index 2d7de59..52a3cc3 100644 --- a/tests/rlcmac/RLCMACTest.err +++ b/tests/rlcmac/RLCMACTest.err @@ -29,4 +29,5 @@ DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 0 | Exist_MEAN_CV_BEP_8PSK = 1 | MEAN_BEP_8PSK = 31 | CV_BEP_8PSK = 7 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 58 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 1 | : ChannelRequestDescription | PEAK_THROUGHPUT_CLASS = 6 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 62 | : End ChannelRequestDescription | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 0 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 1187 | Exist_CRBB = 0 | URBB = 127 | URBB = 255 | URBB = 255 | URBB = 238 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | : End Desc | : End EGPRS_AckNack | Padding = +DCSN1 INFO csnStreamDecoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 29 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 0 | EGPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_DTM_GPRS_multislot_class = 0 | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 0 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = NULL | UMTS_FDD_Radio_Access_Technology_Capability = NULL | UMTS_384_TDD_Radio_Access_Technology_Capability = NULL | CDMA2000_Radio_Access_Technology_Capability = NULL | UMTS_128_TDD_Radio_Access_Technology_Capability = NULL | GERAN_Feature_Package_1 = NULL | Modulation_based_multislot_class_support = NULL | GMSK_MultislotPowerProfile = NULL | EightPSK_MultislotProfile = NULL | MultipleTBF_Capability = NULL | DownlinkAdvancedReceiverPerformance = NULL | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = NULL | DTM_EnhancementsCapability = NULL | PS_HandoverCapability = NULL | MS_RA_capability_value } | DCSN1 INFO csnStreamDecoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 21 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | DCSN1 ERROR csnStreamDecoder: error NEED_MORE BITS TO UNPACK (-5) at EGPRS_multislot_class (idx 31): End Multislot_capability | diff --git a/tests/rlcmac/RLCMACTest.ok b/tests/rlcmac/RLCMACTest.ok index 2d27ca4..96c1bfb 100644 --- a/tests/rlcmac/RLCMACTest.ok +++ b/tests/rlcmac/RLCMACTest.ok @@ -124,4 +124,7 @@ vector1 == vector2 : TRUE *** testCsnLeftAlignedVarBmpBounds *** *** testRAcap *** -decode_gsm_ra_cap fails? yes +GPRS multislot class = 3 +EGPRS multislot class = 0 +Test decoding of a malformed vector (short length indicator) +decode_gsm_ra_cap() returns -5 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I5f810397b8d09c18e069168023429f6a4d899c86 Gerrit-Change-Number: 17209 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 11:19:52 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 19 Feb 2020 11:19:52 +0000 Subject: Change in libosmocore[master]: bitvec: avoid redundant zero-initialization in bitvec_alloc() In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17218 ) Change subject: bitvec: avoid redundant zero-initialization in bitvec_alloc() ...................................................................... Patch Set 1: > I'm not a big fan of such over-optimization patches. This patch is more about code maintainability rather than optimization. Using talloc_zero() or memset(ptr, 0x00, sizeof(*ptr)) makes it harder to find bugs, because neither ASan/UBSan nor Valgrind would be able to tell you that something was not properly initialized somewhere. For example, it took me a while to find the reason of printing warnings about deprecated VTY commands to stdin instead of stderr (see https://gerrit.osmocom.org/c/libosmocore/+/16138). The reason was that vty->fd was not initialized explicitly (bug), and 'thanks' to talloc_zero() it was set to stdin (fd=0) by default. If we were using explicit initialization, ASan would uncover that bug even before somebody noticed it. The only thing I like about talloc_zero() and zero-initialization in general is that it guards us from unexpected behaviour. > What if somebody inrtoduces new fields into the struct at some later point? And if those are not explicitly initialized? The new fields can be initialized explicitly unless the struct is too big... >From the Python's Zen: "Explicit is better than implicit". I believe it applies here too. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I40c0322d5f2febd98bae6fbe0ec2132eda6fb35b Gerrit-Change-Number: 17218 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 11:19:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 11:33:31 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 19 Feb 2020 11:33:31 +0000 Subject: Change in libosmocore[master]: bitvec: fix misleading description of bitvec_spare_padding() In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17215 ) Change subject: bitvec: fix misleading description of bitvec_spare_padding() ...................................................................... Patch Set 1: (4 comments) https://gerrit.osmocom.org/c/libosmocore/+/17215/1/src/bitvec.c File src/bitvec.c: https://gerrit.osmocom.org/c/libosmocore/+/17215/1/src/bitvec.c at 76 PS1, Line 76: for a given position inside a bitvec Example. https://gerrit.osmocom.org/c/libosmocore/+/17215/1/src/bitvec.c at 98 PS1, Line 98: for a given position inside a bitvec Example. https://gerrit.osmocom.org/c/libosmocore/+/17215/1/src/bitvec.c at 141 PS1, Line 141: a bit vector Example. https://gerrit.osmocom.org/c/libosmocore/+/17215/1/src/bitvec.c at 295 PS1, Line 295: /*! pad all remaining bits up to a given bit number > "the given bit number", not any random one, but the one passed :) I'm not a native speaker, but it feels like "a given bit number" is correct. And the article you suggested also looks correct :) We're basically talking about _some_ bit number and we don't know the exact value, so in this context this is just _a number_ that is passed to the function. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie60bf7d993fe80d3c0fcd04e4c3dd81da4a2ea0b Gerrit-Change-Number: 17215 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 19 Feb 2020 11:33:31 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 11:37:30 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 11:37:30 +0000 Subject: Change in osmo-ci[master]: ansible: slave: Skip ttcn3 install on ARM targets In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17222 ) Change subject: ansible: slave: Skip ttcn3 install on ARM targets ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I83f95766fc601bfced6404db56af3bf8b871982f Gerrit-Change-Number: 17222 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 11:37:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 11:37:58 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 11:37:58 +0000 Subject: Change in osmo-bts[master]: osmo-bts-sysmo: merge measurement data and payload In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17146 ) Change subject: osmo-bts-sysmo: merge measurement data and payload ...................................................................... osmo-bts-sysmo: merge measurement data and payload For osmo-bts-sysmo the MPH INFO MEAS IND indication is still sent separately. Lets merge the measurement information into the PH DATA Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Related: OS#2977 --- M include/osmo-bts/l1sap.h M src/common/l1sap.c M src/osmo-bts-litecell15/tch.c M src/osmo-bts-oc2g/tch.c M src/osmo-bts-octphy/l1_tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/main.c M src/osmo-bts-sysmo/tch.c 8 files changed, 28 insertions(+), 31 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h index 1883869..1fcf78c 100644 --- a/include/osmo-bts/l1sap.h +++ b/include/osmo-bts/l1sap.h @@ -134,7 +134,8 @@ int add_l1sap_header(struct gsm_bts_trx *trx, struct msgb *rmsg, struct gsm_lchan *lchan, uint8_t chan_nr, uint32_t fn, - uint16_t ber10k, int16_t lqual_cb); + uint16_t ber10k, int16_t lqual_cb, int8_t rssi, + int16_t ta_offs, uint8_t is_sub); #define msgb_l1sap_prim(msg) ((struct osmo_phsap_prim *)(msg)->l1h) diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 0b51045..05dbb6f 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -176,9 +176,15 @@ return msg; } +/* Enclose rmsg into an osmo_phsap primitive and hand it over to the higher + * layers. The phsap primitive also contains measurement information. The + * parameters rssi, ta_offs and is_sub are only needed when the measurement + * information is passed along with the TCH data. When separate measurement + * indications are used, those last three parameters may be set to zero. */ int add_l1sap_header(struct gsm_bts_trx *trx, struct msgb *rmsg, struct gsm_lchan *lchan, uint8_t chan_nr, uint32_t fn, - uint16_t ber10k, int16_t lqual_cb) + uint16_t ber10k, int16_t lqual_cb, int8_t rssi, + int16_t ta_offs, uint8_t is_sub) { struct osmo_phsap_prim *l1sap; @@ -194,6 +200,10 @@ l1sap->u.tch.ber10k = ber10k; l1sap->u.tch.lqual_cb = lqual_cb; + l1sap->u.tch.rssi = rssi; + l1sap->u.tch.ta_offs_256bits = ta_offs; + l1sap->u.tch.is_sub = is_sub; + return l1sap_up(trx, l1sap); } diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index 5eae753..526b2dd 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -373,7 +373,7 @@ rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP"); return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, data_ind->measParam.fBer * 10000, - data_ind->measParam.fLinkQuality * 10); + data_ind->measParam.fLinkQuality * 10, 0, 0, 0); } payload_type = data_ind->msgUnitParam.u8Buffer[0]; @@ -463,7 +463,7 @@ if (rmsg) return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, data_ind->measParam.fBer * 10000, - data_ind->measParam.fLinkQuality * 10); + data_ind->measParam.fLinkQuality * 10, 0, 0, 0); return 0; diff --git a/src/osmo-bts-oc2g/tch.c b/src/osmo-bts-oc2g/tch.c index 1bd93e4..09ee1e7 100644 --- a/src/osmo-bts-oc2g/tch.c +++ b/src/osmo-bts-oc2g/tch.c @@ -373,7 +373,7 @@ rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP"); return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, data_ind->measParam.fBer * 10000, - data_ind->measParam.fLinkQuality * 10); + data_ind->measParam.fLinkQuality * 10, 0, 0, 0); } payload_type = data_ind->msgUnitParam.u8Buffer[0]; @@ -475,7 +475,7 @@ if (rmsg) return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, data_ind->measParam.fBer * 10000, - data_ind->measParam.fLinkQuality * 10); + data_ind->measParam.fLinkQuality * 10, 0, 0, 0); return 0; diff --git a/src/osmo-bts-octphy/l1_tch.c b/src/osmo-bts-octphy/l1_tch.c index df0469d..bffa1e9 100644 --- a/src/osmo-bts-octphy/l1_tch.c +++ b/src/osmo-bts-octphy/l1_tch.c @@ -151,7 +151,7 @@ rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP"); return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->Data.ulFrameNumber, - ber10k, lqual_cb); + ber10k, lqual_cb, 0, 0, 0); } payload_len = data_ind->Data.ulDataLength; @@ -210,7 +210,7 @@ if (rmsg) return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->Data.ulFrameNumber, - ber10k, lqual_cb); + ber10k, lqual_cb, 0, 0, 0); return 0; diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index a891f48..2e5e5b6 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -940,25 +940,6 @@ #define LOG_FMT_MEAS "Meas: RSSI %-3.2f dBm, Qual %-3.2f dB, BER %-3.2f, Timing %d" #define LOG_PARAM_MEAS(meas_param) (meas_param)->fRssi, (meas_param)->fLinkQuality, (meas_param)->fBer, (meas_param)->i16BurstTiming -static int process_meas_res(struct gsm_bts_trx *trx, uint8_t chan_nr, - uint32_t fn, GsmL1_MeasParam_t *m) -{ - struct osmo_phsap_prim l1sap; - memset(&l1sap, 0, sizeof(l1sap)); - osmo_prim_init(&l1sap.oph, SAP_GSM_PH, PRIM_MPH_INFO, - PRIM_OP_INDICATION, NULL); - l1sap.u.info.type = PRIM_INFO_MEAS; - l1sap.u.info.u.meas_ind.chan_nr = chan_nr; - l1sap.u.info.u.meas_ind.ta_offs_256bits = m->i16BurstTiming * 64; - l1sap.u.info.u.meas_ind.ber10k = (unsigned int) (m->fBer * 10000); - l1sap.u.info.u.meas_ind.inv_rssi = (uint8_t) (m->fRssi * -1); - l1sap.u.info.u.meas_ind.fn = fn; - - /* l1sap wants to take msgb ownership. However, as there is no - * msg, it will msgb_free(l1sap.oph.msg == NULL) */ - return l1sap_up(trx, &l1sap); -} - static int handle_ph_data_ind(struct femtol1_hdl *fl1, GsmL1_PhDataInd_t *data_ind, struct msgb *l1p_msg) { @@ -983,8 +964,6 @@ fn = data_ind->u32Fn; link_id = (data_ind->sapi == GsmL1_Sapi_Sacch) ? LID_SACCH : LID_DEDIC; - process_meas_res(trx, chan_nr, fn, &data_ind->measParam); - gsm_fn2gsmtime(&g_time, fn); DEBUGPGT(DL1P, &g_time, "Rx PH-DATA.ind %s (hL2 %08x): %s, " LOG_FMT_MEAS "\n", diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index bb2c436..44c6d5d 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -87,6 +87,7 @@ gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_F_AMR); gsm_bts_set_feature(bts, BTS_FEAT_SPEECH_H_AMR); gsm_bts_set_feature(bts, BTS_FEAT_MS_PWR_CTRL_DSP); + gsm_bts_set_feature(bts, BTS_FEAT_MEAS_PAYLOAD_COMB); bts_model_vty_init(bts); diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index 54e7313..eb719f1 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -518,7 +518,10 @@ rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP"); return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, data_ind->measParam.fBer * 10000, - data_ind->measParam.fLinkQuality * 10); + data_ind->measParam.fLinkQuality * 10, + data_ind->measParam.fRssi, + data_ind->measParam.i16BurstTiming * 64, + 0); } payload_type = data_ind->msgUnitParam.u8Buffer[0]; @@ -613,7 +616,10 @@ if (rmsg) return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, data_ind->measParam.fBer * 10000, - data_ind->measParam.fLinkQuality * 10); + data_ind->measParam.fLinkQuality * 10, + data_ind->measParam.fRssi, + data_ind->measParam.i16BurstTiming * 64, + 0); return 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17146 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Gerrit-Change-Number: 17146 Gerrit-PatchSet: 3 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 11:37:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 11:37:50 +0000 Subject: Change in osmo-bts[master]: Do not depend on pcu_direct flag when populating ph_data_ind In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17197 ) Change subject: Do not depend on pcu_direct flag when populating ph_data_ind ...................................................................... Do not depend on pcu_direct flag when populating ph_data_ind The struct members ber10k, ta_offs_256bits and lqual_cb in ph_data_ind are only populated when the pcu_direct flag is not set. The pcu_direct flag is set when the pcu is directly attached to the phy and all pcu related traffic (pdtch) is handled without sending it through osmo-bts-sysmo. For those cases osmo_bts_sysmo will not make use of those struct members, even if they were populated. When the PCU is not directly attached the data is needed because it is sent through the pcu_sock to the PCU. Lets remove the check because it is not required. Also in future patches where measurement indications and data / tch indicatins are merged the struct members are also needed to carry the measurement information for SACCH as well. Change-Id: Iaa37bb62af4f5eb4b6e684cb754e68d11e6fd676 --- M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-oc2g/l1_if.c M src/osmo-bts-sysmo/l1_if.c 3 files changed, 12 insertions(+), 15 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index 989cc10..abf48bc 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -1024,11 +1024,10 @@ l1sap->u.data.chan_nr = chan_nr; l1sap->u.data.fn = fn; l1sap->u.data.rssi = rssi; - if (!pcu_direct) { - l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; - l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming*64; - l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; - } + l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; + l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming*64; + l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; + return l1sap_up(trx, l1sap); } diff --git a/src/osmo-bts-oc2g/l1_if.c b/src/osmo-bts-oc2g/l1_if.c index 9816979..b46c528 100644 --- a/src/osmo-bts-oc2g/l1_if.c +++ b/src/osmo-bts-oc2g/l1_if.c @@ -1081,11 +1081,10 @@ l1sap->u.data.chan_nr = chan_nr; l1sap->u.data.fn = fn; l1sap->u.data.rssi = rssi; - if (!pcu_direct) { - l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; - l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming*64; - l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; - } + l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; + l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming*64; + l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; + return l1sap_up(trx, l1sap); } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index db0dfb5..a891f48 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1010,11 +1010,10 @@ l1sap->u.data.chan_nr = chan_nr; l1sap->u.data.fn = fn; l1sap->u.data.rssi = (int8_t) (data_ind->measParam.fRssi); - if (!pcu_direct) { /* FIXME: if pcu_direct=1, then this is not set, what to do in pcu_tx_data_ind() in this case ?*/ - l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; - l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming * 64; - l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; - } + l1sap->u.data.ber10k = data_ind->measParam.fBer * 10000; + l1sap->u.data.ta_offs_256bits = data_ind->measParam.i16BurstTiming * 64; + l1sap->u.data.lqual_cb = data_ind->measParam.fLinkQuality * 10; + /* copy data from L1 primitive to L1SAP primitive */ sap_msg->l2h = msgb_put(sap_msg, data_ind->msgUnitParam.u8Size); memcpy(sap_msg->l2h, data_ind->msgUnitParam.u8Buffer, -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17197 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iaa37bb62af4f5eb4b6e684cb754e68d11e6fd676 Gerrit-Change-Number: 17197 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 11:43:18 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 19 Feb 2020 11:43:18 +0000 Subject: Change in libosmocore[master]: tests/bitvec: add a unit test for bitvec_read_field() In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17220 ) Change subject: tests/bitvec: add a unit test for bitvec_read_field() ...................................................................... tests/bitvec: add a unit test for bitvec_read_field() The aim of this unit test is to demonstrate the problem described in OS#4388: bitvec_read_field() can never return negative value on error (e.g. out of bounds access). Change-Id: I340ab5799fa53d5345edb02f3e2a3655527705c0 Related: OS#4388 --- M tests/bitvec/bitvec_test.c M tests/bitvec/bitvec_test.ok 2 files changed, 60 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/tests/bitvec/bitvec_test.c b/tests/bitvec/bitvec_test.c index fbf5c5d..b4764e6 100644 --- a/tests/bitvec/bitvec_test.c +++ b/tests/bitvec/bitvec_test.c @@ -222,6 +222,45 @@ } } +static void test_bitvec_read_field(void) +{ + uint8_t data[8] = { 0xde, 0xad, 0xbe, 0xef, 0xfe, 0xeb, 0xda, 0xed }; + struct bitvec bv = { + .data_len = sizeof(data), + .data = data, + .cur_bit = 0, + }; + + unsigned int readIndex; + uint64_t field; + +#define _bitvec_read_field(idx, len) \ + readIndex = idx; \ + field = bitvec_read_field(&bv, &readIndex, len); \ + printf("bitvec_read_field(idx=%u, len=%u) => %" PRIx64 "\n", idx, len, field); + + _bitvec_read_field(0, 64); + _bitvec_read_field(0, 32); + _bitvec_read_field(0, 16); + _bitvec_read_field(0, 8); + _bitvec_read_field(0, 0); + + _bitvec_read_field(8, 8); + _bitvec_read_field(8, 4); + _bitvec_read_field(8, 0); + + _bitvec_read_field(10, 9); + _bitvec_read_field(10, 7); + _bitvec_read_field(10, 5); + _bitvec_read_field(10, 3); + _bitvec_read_field(10, 1); + + /* Out of bounds (see OS#4388) */ + _bitvec_read_field(8 * 8 * 8, 16); /* index too far */ + _bitvec_read_field(0, 8 * 8 + 1); /* too many bits */ + _bitvec_read_field(8 * 8, 16); /* 16 bits past */ +} + int main(int argc, char **argv) { struct bitvec bv; @@ -331,6 +370,9 @@ test_used_bytes(); test_tailroom(); + printf("\ntest bitvec_read_field():\n"); + test_bitvec_read_field(); + printf("\nbitvec ok.\n"); return 0; } diff --git a/tests/bitvec/bitvec_test.ok b/tests/bitvec/bitvec_test.ok index a48912d..2974554 100644 --- a/tests/bitvec/bitvec_test.ok +++ b/tests/bitvec/bitvec_test.ok @@ -170,4 +170,22 @@ bitvec bytes used. +test bitvec_read_field(): +bitvec_read_field(idx=0, len=64) => deadbeeffeebdaed +bitvec_read_field(idx=0, len=32) => deadbeef +bitvec_read_field(idx=0, len=16) => dead +bitvec_read_field(idx=0, len=8) => de +bitvec_read_field(idx=0, len=0) => 0 +bitvec_read_field(idx=8, len=8) => ad +bitvec_read_field(idx=8, len=4) => a +bitvec_read_field(idx=8, len=0) => 0 +bitvec_read_field(idx=10, len=9) => 16d +bitvec_read_field(idx=10, len=7) => 5b +bitvec_read_field(idx=10, len=5) => 16 +bitvec_read_field(idx=10, len=3) => 5 +bitvec_read_field(idx=10, len=1) => 1 +bitvec_read_field(idx=512, len=16) => ffffffffffffffea +bitvec_read_field(idx=0, len=65) => ffffffffffffffea +bitvec_read_field(idx=64, len=16) => ffffffffffffffea + bitvec ok. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I340ab5799fa53d5345edb02f3e2a3655527705c0 Gerrit-Change-Number: 17220 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 11:43:19 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 19 Feb 2020 11:43:19 +0000 Subject: Change in libosmocore[master]: bitvec: fix bitvec_unhex(): do not return 1 on success In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17214 ) Change subject: bitvec: fix bitvec_unhex(): do not return 1 on success ...................................................................... bitvec: fix bitvec_unhex(): do not return 1 on success This function is supposed to return 0 on success or 1 in case of error. However, it used to return 1 even in case of success. The reason is that length of the input string was not taken into account and sscanf() was failing on '\0'. Let's use osmo_hexparse() and rely on its return value. P.S. Funny that the unit test expectations were wrong too. Change-Id: I441a22c7964bb31688071d8bcf6a282d8c0187ff --- M src/bitvec.c M tests/bitvec/bitvec_test.ok 2 files changed, 12 insertions(+), 15 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/bitvec.c b/src/bitvec.c index 5130705..10aa776 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -45,6 +45,7 @@ #include #include #include +#include #define BITNUM_FROM_COMP(byte, bit) ((byte*8)+bit) @@ -457,17 +458,13 @@ */ int bitvec_unhex(struct bitvec *bv, const char *src) { - unsigned i; - unsigned val; - unsigned write_index = 0; - unsigned digits = bv->data_len * 2; + int rc; - for (i = 0; i < digits; i++) { - if (sscanf(src + i, "%1x", &val) < 1) { - return 1; - } - bitvec_write_field(bv, &write_index, val, 4); - } + rc = osmo_hexparse(src, bv->data, bv->data_len); + if (rc < 0) /* turn -1 into 1 in case of error */ + return 1; + + bv->cur_bit = rc * 8; return 0; } diff --git a/tests/bitvec/bitvec_test.ok b/tests/bitvec/bitvec_test.ok index 2974554..b118502 100644 --- a/tests/bitvec/bitvec_test.ok +++ b/tests/bitvec/bitvec_test.ok @@ -119,19 +119,19 @@ bitvec: 00 00 00 00 fc 82 84 86 88 8a 8c 8e 90 92 94 96 98 9a 9c 9e a0 a2 a4 a6 a8 aa ac ae b0 b2 b4 fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 out: ff 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a ff === end test_byte_ops === -1 -=> cur_bit=184 +0 -=> cur_bit=184 48282407a6a074227201000b2b2b2b2b2b2b2b2b2b2b2b0000000000000000000000000000000000000000000000000000000000000000000000000000000000 48282407a6a074227201000b2b2b2b2b2b2b2b2b2b2b2b -1 -=> cur_bit=184 +0 -=> cur_bit=184 47240c00400000000000000079eb2ac9402b2b2b2b2b2b0000000000000000000000000000000000000000000000000000000000000000000000000000000000 47240c00400000000000000079eb2ac9402b2b2b2b2b2b -1 -=> cur_bit=184 +0 -=> cur_bit=184 47283c367513ba333004242b2b2b2b2b2b2b2b2b2b2b2b0000000000000000000000000000000000000000000000000000000000000000000000000000000000 47283c367513ba333004242b2b2b2b2b2b2b2b2b2b2b2b -1 -=> cur_bit=184 +0 -=> cur_bit=184 deadface000000000000000000000000000000beeffeed0000000000000000000000000000000000000000000000000000000000000000000000000000000000 DEADFACE000000000000000000000000000000BEEFFEED -0 -=> cur_bit=512 +1 -=> cur_bit=0 fffffaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa FFFFFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB arrr... -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I441a22c7964bb31688071d8bcf6a282d8c0187ff Gerrit-Change-Number: 17214 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 11:46:51 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 11:46:51 +0000 Subject: Change in osmo-trx[master]: contrib/jenkins.sh: Reorder sanity checks References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/17223 ) Change subject: contrib/jenkins.sh: Reorder sanity checks ...................................................................... contrib/jenkins.sh: Reorder sanity checks Change-Id: Idfe12148aa7a8030bdaf56d11c1547ebc3f56d14 --- M contrib/jenkins.sh 1 file changed, 14 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/23/17223/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 84e4ea7..df444ca 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -23,15 +23,8 @@ mychroot_nocwd -w / "$@" } -base="$PWD" -deps="$base/deps" -inst="$deps/install" -export deps inst - if [ -z "${INSIDE_CHROOT}" ]; then - osmo-clean-workspace.sh - # Only use ARM chroot if host is not ARM and the target is ARM: if ! $(substr "arm" "$(uname -m)") && [ "x${INSTR}" = "x--with-neon" -o "x${INSTR}" = "x--with-neon-vfpv4" ]; then @@ -69,6 +62,20 @@ fi fi +set -ex + +if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then + echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" + exit 2 +fi + +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst + +osmo-clean-workspace.sh + mkdir "$deps" || true osmo-build-dep.sh libosmocore "" "--enable-sanitize --disable-doxygen --disable-pcsc" -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Idfe12148aa7a8030bdaf56d11c1547ebc3f56d14 Gerrit-Change-Number: 17223 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 14:49:53 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 14:49:53 +0000 Subject: Change in libusrp[master]: m4/ax_boost_base.m4: Update to newest version from autoconf-archive References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libusrp/+/17224 ) Change subject: m4/ax_boost_base.m4: Update to newest version from autoconf-archive ...................................................................... m4/ax_boost_base.m4: Update to newest version from autoconf-archive Fetched from: https://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_boost_base.m4 Change-Id: Id2753b8d13817d3bfa6cb198b272c60f466b6da6 --- M m4/ax_boost_base.m4 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libusrp refs/changes/24/17224/1 diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4 index 2bce519..16fa69b 100644 --- a/m4/ax_boost_base.m4 +++ b/m4/ax_boost_base.m4 @@ -33,7 +33,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 43 +#serial 47 # example boost program (need to pass version) m4_define([_AX_BOOST_BASE_PROGRAM], @@ -113,7 +113,8 @@ dnl are found, e.g. when only header-only libraries are installed! AS_CASE([${host_cpu}], [x86_64],[libsubdirs="lib64 libx32 lib lib64"], - [ppc64|s390x|sparc64|aarch64|ppc64le],[libsubdirs="lib64 lib lib64"], + [mips*64*],[libsubdirs="lib64 lib32 lib lib64"], + [ppc64|powerpc64|s390x|sparc64|aarch64|ppc64le|powerpc64le|riscv64],[libsubdirs="lib64 lib lib64"], [libsubdirs="lib"] ) -- To view, visit https://gerrit.osmocom.org/c/libusrp/+/17224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libusrp Gerrit-Branch: master Gerrit-Change-Id: Id2753b8d13817d3bfa6cb198b272c60f466b6da6 Gerrit-Change-Number: 17224 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 14:49:54 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 14:49:54 +0000 Subject: Change in libusrp[master]: m4/ax_boost_base.m4: Fix debian multiarch_libsubdir path for arch armv7l References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libusrp/+/17225 ) Change subject: m4/ax_boost_base.m4: Fix debian multiarch_libsubdir path for arch armv7l ...................................................................... m4/ax_boost_base.m4: Fix debian multiarch_libsubdir path for arch armv7l Without this patch, building on an RPI4 ends up with BOOST_LDFLAGS=-L/usr/lib while libs are actually under /usr/lib/arm-linux-gnueabihf, and configure will later file during AX_BOOST_THREAD macro. Change-Id: I7a6b2dca5ced6a6a5232fe78b071dfafdda0b0f3 --- M m4/ax_boost_base.m4 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libusrp refs/changes/25/17225/1 diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4 index 16fa69b..7b8190a 100644 --- a/m4/ax_boost_base.m4 +++ b/m4/ax_boost_base.m4 @@ -123,6 +123,7 @@ dnl are almost assuredly the ones desired. AS_CASE([${host_cpu}], [i?86],[multiarch_libsubdir="lib/i386-${host_os}"], + [armv7l],[multiarch_libsubdir="lib/arm-${host_os}"], [multiarch_libsubdir="lib/${host_cpu}-${host_os}"] ) -- To view, visit https://gerrit.osmocom.org/c/libusrp/+/17225 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libusrp Gerrit-Branch: master Gerrit-Change-Id: I7a6b2dca5ced6a6a5232fe78b071dfafdda0b0f3 Gerrit-Change-Number: 17225 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 14:54:37 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 14:54:37 +0000 Subject: Change in libusrp[master]: m4/ax_boost_base.m4: Update to newest version from autoconf-archive In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libusrp/+/17224 ) Change subject: m4/ax_boost_base.m4: Update to newest version from autoconf-archive ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libusrp/+/17224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libusrp Gerrit-Branch: master Gerrit-Change-Id: Id2753b8d13817d3bfa6cb198b272c60f466b6da6 Gerrit-Change-Number: 17224 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 14:54:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 14:54:55 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 14:54:55 +0000 Subject: Change in libusrp[master]: m4/ax_boost_base.m4: Fix debian multiarch_libsubdir path for arch armv7l In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libusrp/+/17225 ) Change subject: m4/ax_boost_base.m4: Fix debian multiarch_libsubdir path for arch armv7l ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libusrp/+/17225 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libusrp Gerrit-Branch: master Gerrit-Change-Id: I7a6b2dca5ced6a6a5232fe78b071dfafdda0b0f3 Gerrit-Change-Number: 17225 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 14:54:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 14:54:58 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 14:54:58 +0000 Subject: Change in libusrp[master]: m4/ax_boost_base.m4: Update to newest version from autoconf-archive In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libusrp/+/17224 ) Change subject: m4/ax_boost_base.m4: Update to newest version from autoconf-archive ...................................................................... m4/ax_boost_base.m4: Update to newest version from autoconf-archive Fetched from: https://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_boost_base.m4 Change-Id: Id2753b8d13817d3bfa6cb198b272c60f466b6da6 --- M m4/ax_boost_base.m4 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4 index 2bce519..16fa69b 100644 --- a/m4/ax_boost_base.m4 +++ b/m4/ax_boost_base.m4 @@ -33,7 +33,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 43 +#serial 47 # example boost program (need to pass version) m4_define([_AX_BOOST_BASE_PROGRAM], @@ -113,7 +113,8 @@ dnl are found, e.g. when only header-only libraries are installed! AS_CASE([${host_cpu}], [x86_64],[libsubdirs="lib64 libx32 lib lib64"], - [ppc64|s390x|sparc64|aarch64|ppc64le],[libsubdirs="lib64 lib lib64"], + [mips*64*],[libsubdirs="lib64 lib32 lib lib64"], + [ppc64|powerpc64|s390x|sparc64|aarch64|ppc64le|powerpc64le|riscv64],[libsubdirs="lib64 lib lib64"], [libsubdirs="lib"] ) -- To view, visit https://gerrit.osmocom.org/c/libusrp/+/17224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libusrp Gerrit-Branch: master Gerrit-Change-Id: Id2753b8d13817d3bfa6cb198b272c60f466b6da6 Gerrit-Change-Number: 17224 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 14:54:58 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 14:54:58 +0000 Subject: Change in libusrp[master]: m4/ax_boost_base.m4: Fix debian multiarch_libsubdir path for arch armv7l In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libusrp/+/17225 ) Change subject: m4/ax_boost_base.m4: Fix debian multiarch_libsubdir path for arch armv7l ...................................................................... m4/ax_boost_base.m4: Fix debian multiarch_libsubdir path for arch armv7l Without this patch, building on an RPI4 ends up with BOOST_LDFLAGS=-L/usr/lib while libs are actually under /usr/lib/arm-linux-gnueabihf, and configure will later file during AX_BOOST_THREAD macro. Change-Id: I7a6b2dca5ced6a6a5232fe78b071dfafdda0b0f3 --- M m4/ax_boost_base.m4 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/m4/ax_boost_base.m4 b/m4/ax_boost_base.m4 index 16fa69b..7b8190a 100644 --- a/m4/ax_boost_base.m4 +++ b/m4/ax_boost_base.m4 @@ -123,6 +123,7 @@ dnl are almost assuredly the ones desired. AS_CASE([${host_cpu}], [i?86],[multiarch_libsubdir="lib/i386-${host_os}"], + [armv7l],[multiarch_libsubdir="lib/arm-${host_os}"], [multiarch_libsubdir="lib/${host_cpu}-${host_os}"] ) -- To view, visit https://gerrit.osmocom.org/c/libusrp/+/17225 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libusrp Gerrit-Branch: master Gerrit-Change-Id: I7a6b2dca5ced6a6a5232fe78b071dfafdda0b0f3 Gerrit-Change-Number: 17225 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 14:55:26 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 14:55:26 +0000 Subject: Change in osmo-trx[master]: contrib/jenkins.sh: Reorder sanity checks In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17223 ) Change subject: contrib/jenkins.sh: Reorder sanity checks ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Idfe12148aa7a8030bdaf56d11c1547ebc3f56d14 Gerrit-Change-Number: 17223 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 14:55:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 17:09:01 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 17:09:01 +0000 Subject: Change in osmo-trx[master]: debug.h: Avoid printing pthread_t type References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/17226 ) Change subject: debug.h: Avoid printing pthread_t type ...................................................................... debug.h: Avoid printing pthread_t type Using %lu for pthread_t was wrong on armv7l arch. Even worse, according to pthread_self() man page, pthread_t cannot be assumed to be of a simple type and hence printable: """ POSIX.1 allows an implementation wide freedom in choosing the type used to represent a thread ID; for example, representation using either an arithmetic type or a structure is permitted. """ Let's use gettid() instead. According to glibc documentation: """ The pid_t data type is a signed integer type which is capable of representing a process ID. In the GNU C Library, this is an int. """ It may not be the same on other libc's though, so let's better cast to a long int just in case. Accordign to gettid() man, the libc function was only added recently during glibc 2.30, however the system call has been around for quite some time (linux 2.4.11). Let's accomodate use udner non-glibc or older versions of it by having a direct syscall fallback. Change-Id: I40265fd4c62e550014ba3ff3335ca053c5bc01f2 --- M CommonLibs/debug.c M CommonLibs/debug.h M configure.ac 3 files changed, 37 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/26/17226/1 diff --git a/CommonLibs/debug.c b/CommonLibs/debug.c index c227435..5e09079 100644 --- a/CommonLibs/debug.c +++ b/CommonLibs/debug.c @@ -21,7 +21,17 @@ * See the COPYING file in the main directory for details. */ -#include +#include "config.h" + +/* If HAVE_GETTID, then "_GNU_SOURCE" may need to be defined to use gettid() */ +#if HAVE_GETTID +#define _GNU_SOURCE +#endif + +#include +#include +#include +#include "config.h" #include #include @@ -77,3 +87,15 @@ .cat = default_categories, .num_cat = ARRAY_SIZE(default_categories), }; + +pid_t my_gettid(void) +{ +#if HAVE_GETTID + return gettid(); +#elif defined(LINUX) && defined(__NR_gettid) + return (pid_t) syscall(__NR_gettid); +#else + #pragma message ("use pid as tid") + return getpid(); +#endif +} diff --git a/CommonLibs/debug.h b/CommonLibs/debug.h index 0dca2ee..9f118b5 100644 --- a/CommonLibs/debug.h +++ b/CommonLibs/debug.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include @@ -18,10 +18,12 @@ DDEVDRV, }; +pid_t my_gettid(void); + #define CLOGC(category, level, fmt, args...) do { \ - LOGP(category, level, "[tid=%lu] " fmt, pthread_self(), ##args); \ + LOGP(category, level, "[tid=%ld] " fmt, (long int) my_gettid(), ##args); \ } while(0) #define CLOGCHAN(chan, category, level, fmt, args...) do { \ - LOGP(category, level, "[tid=%lu][chan=%lu] " fmt, pthread_self(), chan, ##args); \ + LOGP(category, level, "[tid=%ld][chan=%lu] " fmt, (long int) my_gettid(), chan, ##args); \ } while(0) diff --git a/configure.ac b/configure.ac index b0be728..76c3515 100644 --- a/configure.ac +++ b/configure.ac @@ -75,6 +75,15 @@ AC_HEADER_TIME AC_C_BIGENDIAN +# Check if gettid is available (despite not being documented in glibc doc, it requires __USE_GNU on some systems) +# C compiler is used since __USE_GNU seems to be always defined for g++. +save_CPPFLAGS=$CPPFLAGS +AC_LANG_PUSH(C) +CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" +AC_CHECK_FUNCS([gettid]) +AC_LANG_POP(C) +CPPFLAGS=$save_CPPFLAGS + PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.3.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.3.0) PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.3.0) -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I40265fd4c62e550014ba3ff3335ca053c5bc01f2 Gerrit-Change-Number: 17226 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 17:09:02 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 17:09:02 +0000 Subject: Change in osmo-trx[master]: debug.h: Fix print format of chan in CLOGCHAN References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/17227 ) Change subject: debug.h: Fix print format of chan in CLOGCHAN ...................................................................... debug.h: Fix print format of chan in CLOGCHAN Under armv7l arch, size_t is actually an unsigned int and not a long unsigned int, and compiler errors: CommonLibs/debug.h:28:24: error: format ?%lu? expects argument of type ?long unsigned int?, but argument 8 has type ?size_t {aka unsigned int}? [-Werror=format=] Change-Id: I7f6ded5a984570b5267916d6c84eb7d019db73a8 --- M CommonLibs/debug.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/27/17227/1 diff --git a/CommonLibs/debug.h b/CommonLibs/debug.h index 9f118b5..8d70155 100644 --- a/CommonLibs/debug.h +++ b/CommonLibs/debug.h @@ -25,5 +25,5 @@ } while(0) #define CLOGCHAN(chan, category, level, fmt, args...) do { \ - LOGP(category, level, "[tid=%ld][chan=%lu] " fmt, (long int) my_gettid(), chan, ##args); \ + LOGP(category, level, "[tid=%ld][chan=%zu] " fmt, (long int) my_gettid(), chan, ##args); \ } while(0) -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17227 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I7f6ded5a984570b5267916d6c84eb7d019db73a8 Gerrit-Change-Number: 17227 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 17:54:08 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 19 Feb 2020 17:54:08 +0000 Subject: Change in osmo-trx[master]: debug.h: Avoid printing pthread_t type In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17226 ) Change subject: debug.h: Avoid printing pthread_t type ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I40265fd4c62e550014ba3ff3335ca053c5bc01f2 Gerrit-Change-Number: 17226 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Wed, 19 Feb 2020 17:54:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 17:54:32 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 19 Feb 2020 17:54:32 +0000 Subject: Change in osmo-trx[master]: debug.h: Fix print format of chan in CLOGCHAN In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17227 ) Change subject: debug.h: Fix print format of chan in CLOGCHAN ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17227 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I7f6ded5a984570b5267916d6c84eb7d019db73a8 Gerrit-Change-Number: 17227 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Wed, 19 Feb 2020 17:54:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 18:52:10 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 18:52:10 +0000 Subject: Change in osmo-ci[master]: job: Update master and gerrit osmo-trx jobs to also build on ARM plat... References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17228 ) Change subject: job: Update master and gerrit osmo-trx jobs to also build on ARM platform ...................................................................... job: Update master and gerrit osmo-trx jobs to also build on ARM platform Related: OS#4301 Change-Id: I0049ab35b5106d5af8474903e203f66b044ff5ca --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 10 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/28/17228/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 80a3b08..e946674 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -206,14 +206,15 @@ - osmo-sip-connector - osmo-trx: + slave_axis: !!python/tuple [osmocom-master-debian9,rpi4-deb9build-ansible] a1_name: INSTR - # ARM variants temporarily disabled due to issue OS#3061 (mind the combination_filter below!) - # a1: !!python/tuple [--with-sse, --with-neon, --with-neon-vfpv4] - a1: !!python/tuple [--with-sse] + a1: !!python/tuple [--with-sse, --with-neon, --with-neon-vfpv4] a2_name: WITH_MANUALS a2: !!python/tuple ["1", "0"] combination_filter: > - (INSTR == "--with-sse" && WITH_MANUALS == "1") + (INSTR == "--with-sse" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || + (INSTR == "--with-neon" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") || + (INSTR == "--with-neon-vfpv4" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") cmd: 'ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh' - osmocom-bb diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 78aeb7c..688ee15 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -299,14 +299,15 @@ email: gerrit-log at lists.osmocom.org laforge at gnumonks.org 246tnt at gmail.com - osmo-trx: + slave_axis: !!python/tuple [osmocom-master-debian9,rpi4-deb9build-ansible] a1_name: INSTR - # ARM variants temporarily disabled due to issue OS#3061 (mind the combination_filter below!) - # a1: !!python/tuple [--with-sse, --with-neon, --with-neon-vfpv4] - a1: !!python/tuple [--with-sse] + a1: !!python/tuple [--with-sse, --with-neon, --with-neon-vfpv4] a2_name: WITH_MANUALS a2: !!python/tuple ["1", "0"] combination_filter: > - (INSTR == "--with-sse" && WITH_MANUALS == "1") + (INSTR == "--with-sse" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || + (INSTR == "--with-neon" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") || + (INSTR == "--with-neon-vfpv4" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") cmd: 'PUBLISH=1 ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh' - osmocom-bb -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0049ab35b5106d5af8474903e203f66b044ff5ca Gerrit-Change-Number: 17228 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 18:52:11 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 19 Feb 2020 18:52:11 +0000 Subject: Change in osmo-ci[master]: hosts: Add rpi4-deb9build-ansible References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17229 ) Change subject: hosts: Add rpi4-deb9build-ansible ...................................................................... hosts: Add rpi4-deb9build-ansible Change-Id: I3bea29c3a9fa9b4b6dc4df3cdde4bb9dbf7de47d --- M ansible/hosts 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/29/17229/1 diff --git a/ansible/hosts b/ansible/hosts index 85b25d6..5098b3e 100644 --- a/ansible/hosts +++ b/ansible/hosts @@ -14,6 +14,7 @@ build2-deb9build-ansible ansible_host=2a01:4f8:10b:2ad9::1:6 osmocom_jenkins_slave_fstrim=True host2-deb8build-ansible ansible_host=2a01:4f8:120:8470::1:2 host2-deb9build-ansible ansible_host=2a01:4f8:120:8470::1:3 osmocom_jenkins_slave_fstrim=True +rpi4-deb9build-ansible ansible_host=10.9.25.51 [simtester] simtest ansible_host=10.9.25.80 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3bea29c3a9fa9b4b6dc4df3cdde4bb9dbf7de47d Gerrit-Change-Number: 17229 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 18:57:47 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 18:57:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Native_Functions: Add f_str_to{lower, upper}() References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17232 ) Change subject: Native_Functions: Add f_str_to{lower,upper}() ...................................................................... Native_Functions: Add f_str_to{lower,upper}() TTCN-3 interestingly doens't seem to have any case-insensitive string matching or functions to convert to uppwer/lowercase. Change-Id: I2e6e0fd2da001a3cc6d9c31c9e766ae54bf17b2f --- M library/Native_FunctionDefs.cc M library/Native_Functions.ttcn 2 files changed, 36 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/32/17232/1 diff --git a/library/Native_FunctionDefs.cc b/library/Native_FunctionDefs.cc index f6d5d1d..78ca4d1 100644 --- a/library/Native_FunctionDefs.cc +++ b/library/Native_FunctionDefs.cc @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -75,5 +76,34 @@ return CHARSTRING(str); } +CHARSTRING f__str__tolower(const CHARSTRING& in) +{ + TTCN_Buffer ttcn_buffer(in); + TTCN_Buffer buf_out; + CHARSTRING out; + unsigned int i; + + const char *in_str = (const char *)ttcn_buffer.get_data(); + for (i = 0; i < strlen(in_str); i++) + buf_out.put_c((unsigned char) tolower(in_str[i])); + buf_out.get_string(out); + return out; +} + +CHARSTRING f__str__toupper(const CHARSTRING& in) +{ + TTCN_Buffer ttcn_buffer(in); + TTCN_Buffer buf_out; + CHARSTRING out; + unsigned int i; + + const char *in_str = (const char *)ttcn_buffer.get_data(); + for (i = 0; i < strlen(in_str); i++) + buf_out.put_c((unsigned char) toupper(in_str[i])); + buf_out.get_string(out); + return out; +} + + } // namespace diff --git a/library/Native_Functions.ttcn b/library/Native_Functions.ttcn index d59670a..c43004a 100644 --- a/library/Native_Functions.ttcn +++ b/library/Native_Functions.ttcn @@ -11,4 +11,10 @@ external function f_inet_ntoa(in octetstring oct) return charstring; /* like inet_ntoa() but input is host byte order */ external function f_inet_hntoa(in octetstring oct) return charstring; + + /* convert content of charstring to lower-case using tolower(3) */ + external function f_str_tolower(in charstring input) return charstring; + + /* convert content of charstring to upper-case using toupper(3) */ + external function f_str_toupper(in charstring input) return charstring; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17232 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: I2e6e0fd2da001a3cc6d9c31c9e766ae54bf17b2f Gerrit-Change-Number: 17232 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 18:57:47 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 18:57:47 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add tests using stdin/stdout of osmo-remsim-client-shell References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17233 ) Change subject: remsim: Add tests using stdin/stdout of osmo-remsim-client-shell ...................................................................... remsim: Add tests using stdin/stdout of osmo-remsim-client-shell osmo-remsim-client-shell allows to send C-APDU via STDIN of the program and receive R-APDU via STDOUT. We can attach to that using the PIPEasp TTCN3 port, and hence test a [local] osmo-remsim-client-shell transceiving APDUs from/to a simulated bankd in the test case. The only sad part about this is that we now will need to have the implementation under test (osmo-remsim-client-shell binary) in the same container as the TTCN-3 test, as it will fork/exec it. This is why we disable it by default and a modulepar must be used to enable those particular tests. Change-Id: I3a69c692cf3e6bbe04ce58594050b20da0c37d16 --- M deps/Makefile M remsim/REMSIM_Tests.cfg M remsim/RemsimClient_Tests.ttcn M remsim/gen_links.sh M remsim/regen_makefile.sh 5 files changed, 220 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/33/17233/1 diff --git a/deps/Makefile b/deps/Makefile index ccb0b1b..c5af426 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -37,6 +37,7 @@ titan.TestPorts.IPL4asp \ titan.TestPorts.LANL2asp \ titan.TestPorts.PCAPasp \ + titan.TestPorts.PIPEasp \ titan.TestPorts.SIPmsg \ titan.TestPorts.TCPasp \ titan.TestPorts.TELNETasp \ @@ -116,6 +117,7 @@ titan.TestPorts.LANL2asp_commit= R.8.C-3-gb07c265 titan.TestPorts.MTP3asp_commit= 1cecdad6f3641a5f19b3833703bff6e5005eff11 titan.TestPorts.PCAPasp_commit= R.8.A-3-g9ad320f +titan.TestPorts.PIPEasp_commit= R.7.D-3-g8b01154 titan.TestPorts.SCTPasp_commit= R.11.A-2-g2faa9cf titan.TestPorts.SIPmsg_commit= R.15.A-1-ge4f9dd0 titan.TestPorts.TCPasp_commit= R.9.A-5-g2c91bc6 diff --git a/remsim/REMSIM_Tests.cfg b/remsim/REMSIM_Tests.cfg index 36b0952..e3bb900 100644 --- a/remsim/REMSIM_Tests.cfg +++ b/remsim/REMSIM_Tests.cfg @@ -4,6 +4,9 @@ # testsuite specific configuration, not expected to change "./REMSIM_Tests.default" +[MODULE_PARAMETERS] +RemsimClient_Tests.mp_have_local_client := true + [EXECUTE] RemsimServer_Tests.control #RemsimBankd_Tests.control diff --git a/remsim/RemsimClient_Tests.ttcn b/remsim/RemsimClient_Tests.ttcn index d950152..e372faf 100644 --- a/remsim/RemsimClient_Tests.ttcn +++ b/remsim/RemsimClient_Tests.ttcn @@ -1,7 +1,7 @@ module RemsimClient_Tests { /* Integration Tests for osmo-remsim-client - * (C) 2019 by Harald Welte + * (C) 2019-2020 by Harald Welte * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or @@ -12,15 +12,26 @@ * This test suite tests osmo-remsim-client by attaching to the external interfaces. */ +import from Native_Functions all; import from Osmocom_Types all; import from IPA_Emulation all; +/* the PIPEasp port allows us to interact with osmo-remsim-client-shell via stdin/stdout */ +import from PIPEasp_PortType all; +import from PIPEasp_Types all; + import from RSPRO all; import from RSPRO_Types all; import from RSPRO_Server all; import from REMSIM_Tests all; +modulepar { + boolean mp_have_local_client := false; /* backwards compatible default */ + charstring mp_client_shell_cmd := "osmo-remsim-client-shell"; +}; + type component client_test_CT extends rspro_server_CT { + port PIPEasp_PT PIPE; var ComponentIdentity g_srv_comp_id, g_bankd_comp_id; }; @@ -168,6 +179,195 @@ setverdict(pass); } +/*********************************************************************** + * Tests interacting with local remsim-bankd-client via PIPE port + ***********************************************************************/ + +template (value) ASP_PExecuteBackground ts_ExecBg(charstring cmd) := { + command := cmd +} + +template (present) ASP_PStdout tr_Stdout(template (present) charstring line) := { + stdout := line +} + +template (present) ASP_PStderr tr_Stderr(template (present) charstring line) := { + stderr := line +} + +template (value) ASP_PStdin ts_Stdin(template (value) charstring line) := { + stdin :=line +} + +/* osmo-remsim-client logs to stderr, so we need to ignore that log output */ +private altstep as_ignore_stderr() runs on client_test_CT { +[] PIPE.receive(tr_Stderr(?)) { repeat; } +} + +/* start a local osmo-remsim-client as sub-process and attach it to PIPE port */ +private function f_init_client_pipe(ClientSlot cs) runs on client_test_CT { + var charstring cmdline := mp_client_shell_cmd & " -i 127.0.0.1"; + map(self:PIPE, system:PIPE); + PIPE.send(ts_ExecBg(cmdline & " -c " & int2str(cs.clientId) + & " -n " & int2str(cs.slotNr))); + activate(as_ignore_stderr()); +} + +/* pretty-print an octet string as series of ASCII encoded hex bytes with spaces */ +function f_osmo_hexdump(octetstring input) return charstring { + var charstring ret := ""; + for (var integer i := 0; i < lengthof(input); i := i+1) { + ret := ret & f_str_tolower(oct2str(input[i])) & " "; + } + return ret; +} + +/* simulated bankd instructs client to "set ATR"; expect it to show up on stdout */ +function f_set_atr(template (value) ClientSlot cs, octetstring atr, + template ResultCode exp_res := ok, integer i := 0) +runs on client_test_CT { + RSPRO_SRV[i].send(ts_RSPRO_SetAtrReq(cs, atr)); + interleave { + [] RSPRO_SRV[i].receive(tr_RSPRO_SetAtrRes(exp_res)); + [] PIPE.receive(tr_Stdout("SET_ATR: " & f_osmo_hexdump(atr))); + } +} + +/* send a C-APDU from simulated application to client stdin; expect it on simulated bankd */ +function f_client2bank(template (present) ClientSlot cs, template (present) BankSlot bs, + octetstring c_apdu, integer i:=0) runs on client_test_CT +{ + /* send C-APDU via STDIN of osmo-remsim-client-shell */ + PIPE.send(ts_Stdin(oct2str(c_apdu))); + /* expect the same C-APDU to arrive via RSPRO tpduModemToCard */ + f_rspro_srv_exp(tr_RSPRO_TpduModemToCard(cs, bs, ?, c_apdu), i); +} + +/* send a R-APDU from simulated bankd to client; expect it on simualated app (client stdout) */ +function f_bank2client(template (present) BankSlot bs, template (present) ClientSlot cs, + octetstring r_apdu, boolean exp_fail := false, integer i:=0) +runs on client_test_CT { + var TpduFlags flags := { + tpduHeaderPresent:=true, + finalPart:=true, + procByteContinueTx:=false, + procByteContinueRx:=false + } + timer T := 10.0; + + RSPRO_SRV[i].send(ts_RSPRO_TpduCardToModem(bs, cs, flags, r_apdu)); + T.start; + alt { + [] PIPE.receive(tr_Stdout("R-APDU: " & f_osmo_hexdump(r_apdu))) { + if (exp_fail) { + setverdict(fail, "Expected R-APDU to fail but still received it"); + self.stop; + } else { + setverdict(pass); + } + } + [] PIPE.receive(tr_Stdout(?)) { + setverdict(fail, "Unexpected R-APDU on stdout of remsim-client-shell"); + self.stop; + } + [] T.timeout { + if (exp_fail) { + setverdict(pass); + } else { + setverdict(fail, "Timeout waiting for R-APDU on remsim-client-shell"); + self.stop; + } + } + } +} + +/* Transceive a C+R APDU from client (via pipe) to simulated bankd and back */ +function f_xceive_apdus(ClientSlot cslot, BankSlot bslot, + integer count := 100, integer i := 0) runs on client_test_CT +{ + for (var integer j := 0; j < count; j := j+1) { + var octetstring c_apdu := f_rnd_octstring(f_rnd_int(270)); + var octetstring r_apdu := f_rnd_octstring(f_rnd_int(270)); + f_client2bank(cslot, bslot, c_apdu, i:=i); + f_bank2client(bslot, cslot, r_apdu, i:=i); + } +} + +/* transceive APDUs using forked osmo-remsim-client-shell + stdio */ +testcase TC_pipe_xceive_apdus() runs on client_test_CT { + var BankSlot bslot := { 1, 0 }; + var ClientSlot cslot := { 321, 123 }; + f_init_client_pipe(cslot); + f_init(); + + /* expect inbound connectClientReq */ + as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ + as_connectClientReq(i := 1); + + f_set_atr(cslot, '3B9F96801FC78031A073BE21136743200718000001A5'O, i:=1); + + f_xceive_apdus(cslot, bslot, count := 100, i:=1); +} + +/* Send R-APDU from correct bankId/slotNr but to wrong ClientId */ +testcase TC_pipe_apdu_wrong_cslot() runs on client_test_CT { + var BankSlot bslot := { 1, 0 }; + var ClientSlot cslot := { 321, 123 }; + f_init_client_pipe(cslot); + f_init(); + + /* expect inbound connectClientReq */ + as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ + as_connectClientReq(i := 1); + + f_set_atr(cslot, '3B9F96801FC78031A073BE21136743200718000001A5'O, i:=1); + + var octetstring c_apdu := f_rnd_octstring(f_rnd_int(270)); + var octetstring r_apdu := f_rnd_octstring(f_rnd_int(270)); + /* Send C-APDU from correct ClientId/Slot to simulated bankd */ + f_client2bank(cslot, bslot, c_apdu, i:=1); + /* respond with R-APDU from correct bankId/Slot but stating wrong ClientId */ + cslot.clientId := 1023; + f_bank2client(bslot, cslot, r_apdu, exp_fail:=true, i:=1); +} + +/* Send R-APDU from wrong bankId/slotNr but to correct ClientId/Slot */ +testcase TC_pipe_apdu_wrong_bslot() runs on client_test_CT { + var BankSlot bslot := { 1, 0 }; + var ClientSlot cslot := { 321, 123 }; + f_init_client_pipe(cslot); + f_init(); + + /* expect inbound connectClientReq */ + as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ + as_connectClientReq(i := 1); + + f_set_atr(cslot, '3B9F96801FC78031A073BE21136743200718000001A5'O, i:=1); + + var octetstring c_apdu := f_rnd_octstring(f_rnd_int(270)); + var octetstring r_apdu := f_rnd_octstring(f_rnd_int(270)); + /* Send C-APDU from correct ClientId/Slot to simulated bankd */ + f_client2bank(cslot, bslot, c_apdu, i:=1); + /* respond with R-APDU from wrong bankId but stating correct ClientId */ + bslot.bankId := 1023; + f_bank2client(bslot, cslot, r_apdu, exp_fail:=true, i:=1); +} + /* TODO: * send a configClientBankIpReq and change the bank of an active client @@ -187,6 +387,12 @@ execute( TC_bank_reconnect() ); execute( TC_bank_disconnect() ); execute( TC_bank_disconnect_reconnect() ); + + if (mp_have_local_client) { + execute( TC_pipe_xceive_apdus() ); + execute( TC_pipe_apdu_wrong_cslot() ); + execute( TC_pipe_apdu_wrong_bslot() ); + } } diff --git a/remsim/gen_links.sh b/remsim/gen_links.sh index 366a8e6..995abfb 100755 --- a/remsim/gen_links.sh +++ b/remsim/gen_links.sh @@ -32,6 +32,10 @@ FILES="JSON_EncDec.cc JSON_Types.ttcn " gen_links $DIR $FILES +DIR=$BASEDIR/titan.TestPorts.PIPEasp/src +FILES="PIPEasp_PT.cc PIPEasp_PT.hh PIPEasp_Types.ttcn PIPEasp_PortType.ttcn " +gen_links $DIR $FILES + DIR=../library FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn Osmocom_Types.ttcn " diff --git a/remsim/regen_makefile.sh b/remsim/regen_makefile.sh index 6f7d209..3f19228 100755 --- a/remsim/regen_makefile.sh +++ b/remsim/regen_makefile.sh @@ -1,7 +1,10 @@ #!/bin/sh -FILES="*.ttcn *.ttcnpp *.asn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc TELNETasp_PT.cc Native_FunctionDefs.cc RSPRO_EncDec.cc Abstract_Socket.cc HTTPmsg_PT.cc HTTPmsg_MessageLen_Function.cc JSON_EncDec.cc VPCD_CodecPort_CtrlFunctDef.cc " +FILES="*.ttcn *.ttcnpp *.asn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc TELNETasp_PT.cc Native_FunctionDefs.cc RSPRO_EncDec.cc Abstract_Socket.cc HTTPmsg_PT.cc HTTPmsg_MessageLen_Function.cc JSON_EncDec.cc VPCD_CodecPort_CtrlFunctDef.cc PIPEasp_PT.cc " export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSPRO -DIPA_EMULATION_CTRL" ../regen-makefile.sh REMSIM_Tests.ttcn $FILES + +# required for forkpty(3) used by PIPEasp +sed -i -e '/^LINUX_LIBS/ s/$/ -lutil/' Makefile -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17233 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: I3a69c692cf3e6bbe04ce58594050b20da0c37d16 Gerrit-Change-Number: 17233 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 18:57:45 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 18:57:45 +0000 Subject: Change in osmo-ttcn3-hacks[master]: DIAMETER: Add tr_DIA_AIR() to send AuthInfoRequest References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17230 ) Change subject: DIAMETER: Add tr_DIA_AIR() to send AuthInfoRequest ...................................................................... DIAMETER: Add tr_DIA_AIR() to send AuthInfoRequest Change-Id: Ib30fafaa2c660d32e864a57f4d3b0f50a158de6c --- M library/DIAMETER_Templates.ttcn 1 file changed, 50 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/30/17230/1 diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn index 2779536..533ede2 100644 --- a/library/DIAMETER_Templates.ttcn +++ b/library/DIAMETER_Templates.ttcn @@ -572,6 +572,41 @@ } } + + +template (value) GenericAVP ts_AVP_NumOfReqVectors(template (value) UINT32 num_req := '00000004'O) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Number_Of_Requested_Vectors), + avp_data := { + avp_AAA_3GPP_Number_Of_Requested_Vectors := num_req + } + } +} + +template (value) GenericAVP ts_AVP_ImmReqPref(template (value) UINT32 par := '00000000'O) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Immediate_Response_Preferred), + avp_data := { + avp_AAA_3GPP_Immediate_Response_Preferred := par + } + } +} + + +/* 7.3.11 Requested-EUTRAN-Authentication-Info */ +template (value) GenericAVP ts_AVP_RequestedEutranAuthInfo(template (value) UINT32 num_vec := '00000004'O) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Requested_EUTRAN_Authentication_Info), + avp_data := { + avp_AAA_3GPP_Requested_EUTRAN_Authentication_Info := { + ts_AVP_NumOfReqVectors(num_vec), + ts_AVP_ImmReqPref('00000000'O) + } + } + } +} + + /* TS 29.262 7.3.27 Context-Identifier */ template (value) GenericAVP ts_AVP_3GPP_ContextId(uint32_t ctx) := { avp := { @@ -757,6 +792,21 @@ ts_AVP_VendorSpecAppId(vendor_id_3GPP, c_DIAMETER_3GPP_S6_AID) }); + +template (value) PDU_DIAMETER +ts_DIA_AIR(template (value) UINT32 hbh_id, template (value) UINT32 ete_id, + template (value) octetstring sess_id, + template (value) charstring dest_realm, hexstring imsi) +:= ts_DIAMETER(flags:='00000000'B, cmd_code:=Authentication_Information, hbh_id:=hbh_id, ete_id:=ete_id, + avps := { + ts_AVP_SessionId(sess_id), + ts_AVP_DestinationRealm(dest_realm), + ts_AVP_UserNameImsi(imsi), + /* Requested EUTRAN Auth Info */ + ts_AVP_RequestedEutranAuthInfo, + ts_AVP_3GPP_VisitedPlmnId('11111F'O) + }); + template (present) PDU_DIAMETER tr_DIA_AIR(hexstring imsi) := tr_DIAMETER(flags := '11000000'B, cmd_code:=Authentication_Information, app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17230 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: Ib30fafaa2c660d32e864a57f4d3b0f50a158de6c Gerrit-Change-Number: 17230 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 18:57:46 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 18:57:46 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps/Makefile: Call Github repositories ECLIPSEGITHUB References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17231 ) Change subject: deps/Makefile: Call Github repositories ECLIPSEGITHUB ...................................................................... deps/Makefile: Call Github repositories ECLIPSEGITHUB ECLIPSEGIT and ECLIPSEGIT2 are really difficult to distinguish, let's call the former ECLIPSEGITHUB, i.e. the eclipse organization at github. Change-Id: I3a12164f76b85168c3afe85af2dd4be42f3e560b --- M deps/Makefile 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/31/17231/1 diff --git a/deps/Makefile b/deps/Makefile index 1a13211..ccb0b1b 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -ECLIPSEGIT:=https://github.com/eclipse +ECLIPSEGITHUB:=https://github.com/eclipse ECLIPSEGIT2:=https://git.eclipse.org/r/titan OSMOGITHUB:=https://github.com/osmocom OSMOGIT:=git://git.osmocom.org -ECLIPSEGIT_REPOS= titan.Libraries.TCCUsefulFunctions \ +ECLIPSEGITHUB_REPOS= titan.Libraries.TCCUsefulFunctions \ titan.ProtocolModules.DNS \ titan.ProtocolModules.ICMP \ titan.ProtocolModules.ICMPv6 \ @@ -70,7 +70,7 @@ titan.ProtocolModules.BSSMAP \ titan.TestPorts.USB -ALL_REPOS=$(ECLIPSEGIT_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS) +ALL_REPOS=$(ECLIPSEGITHUB_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS) # Tag names from 'git-describe --tags'; if not available, a commit hash may be used instead. # In order to keep local changes in the repository of a dependency, set its commit to the @@ -166,8 +166,8 @@ endif endef -$(foreach dir,$(ECLIPSEGIT_REPOS), \ - $(eval $(call GIT_template,$(dir),$(ECLIPSEGIT)))) +$(foreach dir,$(ECLIPSEGITHUB_REPOS), \ + $(eval $(call GIT_template,$(dir),$(ECLIPSEGITHUB)))) $(foreach dir,$(ECLIPSEGIT2_REPOS), \ $(eval $(call GIT_template,$(dir),$(ECLIPSEGIT2)))) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17231 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: I3a12164f76b85168c3afe85af2dd4be42f3e560b Gerrit-Change-Number: 17231 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 19:10:29 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 19:10:29 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add global guard timer to client+bankd tests References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17234 ) Change subject: remsim: Add global guard timer to client+bankd tests ...................................................................... remsim: Add global guard timer to client+bankd tests Change-Id: I85d436a91d1c805f2fb66138ef7e2fb73107f2d1 --- M remsim/RSPRO_Server.ttcn 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/34/17234/1 diff --git a/remsim/RSPRO_Server.ttcn b/remsim/RSPRO_Server.ttcn index 5c9051c..25ec4d1 100644 --- a/remsim/RSPRO_Server.ttcn +++ b/remsim/RSPRO_Server.ttcn @@ -34,8 +34,15 @@ type component rspro_server_CT { var RSPRO_Server g_rspro_srv[NUM_SERVER]; port IPA_RSPRO_PT RSPRO_SRV[NUM_SERVER]; + timer g_rspro_srv_Tguard := 30.0; }; +private altstep as_rspro_srv_Tguard() runs on rspro_server_CT { +[] g_rspro_srv_Tguard.timeout { + setverdict(fail, "RSPRO Server global guard timer timeout"); + mtc.stop; + } +} altstep as_ignore_id_ack(integer i) runs on rspro_server_CT { [] RSPRO_SRV[i].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) { repeat; } @@ -66,6 +73,9 @@ g_rspro_srv[i].ccm_pars.name := "Osmocom TTCN-3 RSPRO server simulator"; g_rspro_srv[i].rspro_id := rspro_id; + activate(as_rspro_srv_Tguard()); + g_rspro_srv_Tguard.start; + map(g_rspro_srv[i].vc_IPA:IPA_PORT, system:IPA_CODEC_PT); connect(g_rspro_srv[i].vc_IPA:IPA_RSPRO_PORT, self:RSPRO_SRV[i]); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17234 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: I85d436a91d1c805f2fb66138ef7e2fb73107f2d1 Gerrit-Change-Number: 17234 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 19:17:13 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 19:17:13 +0000 Subject: Change in osmo-ttcn3-hacks[master]: DIAMETER: Add tr_DIA_AIR() to send AuthInfoRequest In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17230 ) Change subject: DIAMETER: Add tr_DIA_AIR() to send AuthInfoRequest ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17230 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: Ib30fafaa2c660d32e864a57f4d3b0f50a158de6c Gerrit-Change-Number: 17230 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 19:17:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 19:17:22 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 19:17:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps/Makefile: Call Github repositories ECLIPSEGITHUB In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17231 ) Change subject: deps/Makefile: Call Github repositories ECLIPSEGITHUB ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17231 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: I3a12164f76b85168c3afe85af2dd4be42f3e560b Gerrit-Change-Number: 17231 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 19:17:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 19:17:35 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 19:17:35 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Native_Functions: Add f_str_to{lower, upper}() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17232 ) Change subject: Native_Functions: Add f_str_to{lower,upper}() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17232 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: I2e6e0fd2da001a3cc6d9c31c9e766ae54bf17b2f Gerrit-Change-Number: 17232 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 19:17:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 19:17:42 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 19:17:42 +0000 Subject: Change in osmo-ttcn3-hacks[master]: DIAMETER: Add tr_DIA_AIR() to send AuthInfoRequest In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17230 ) Change subject: DIAMETER: Add tr_DIA_AIR() to send AuthInfoRequest ...................................................................... DIAMETER: Add tr_DIA_AIR() to send AuthInfoRequest Change-Id: Ib30fafaa2c660d32e864a57f4d3b0f50a158de6c --- M library/DIAMETER_Templates.ttcn 1 file changed, 50 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn index 2779536..533ede2 100644 --- a/library/DIAMETER_Templates.ttcn +++ b/library/DIAMETER_Templates.ttcn @@ -572,6 +572,41 @@ } } + + +template (value) GenericAVP ts_AVP_NumOfReqVectors(template (value) UINT32 num_req := '00000004'O) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Number_Of_Requested_Vectors), + avp_data := { + avp_AAA_3GPP_Number_Of_Requested_Vectors := num_req + } + } +} + +template (value) GenericAVP ts_AVP_ImmReqPref(template (value) UINT32 par := '00000000'O) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Immediate_Response_Preferred), + avp_data := { + avp_AAA_3GPP_Immediate_Response_Preferred := par + } + } +} + + +/* 7.3.11 Requested-EUTRAN-Authentication-Info */ +template (value) GenericAVP ts_AVP_RequestedEutranAuthInfo(template (value) UINT32 num_vec := '00000004'O) := { + avp := { + avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Requested_EUTRAN_Authentication_Info), + avp_data := { + avp_AAA_3GPP_Requested_EUTRAN_Authentication_Info := { + ts_AVP_NumOfReqVectors(num_vec), + ts_AVP_ImmReqPref('00000000'O) + } + } + } +} + + /* TS 29.262 7.3.27 Context-Identifier */ template (value) GenericAVP ts_AVP_3GPP_ContextId(uint32_t ctx) := { avp := { @@ -757,6 +792,21 @@ ts_AVP_VendorSpecAppId(vendor_id_3GPP, c_DIAMETER_3GPP_S6_AID) }); + +template (value) PDU_DIAMETER +ts_DIA_AIR(template (value) UINT32 hbh_id, template (value) UINT32 ete_id, + template (value) octetstring sess_id, + template (value) charstring dest_realm, hexstring imsi) +:= ts_DIAMETER(flags:='00000000'B, cmd_code:=Authentication_Information, hbh_id:=hbh_id, ete_id:=ete_id, + avps := { + ts_AVP_SessionId(sess_id), + ts_AVP_DestinationRealm(dest_realm), + ts_AVP_UserNameImsi(imsi), + /* Requested EUTRAN Auth Info */ + ts_AVP_RequestedEutranAuthInfo, + ts_AVP_3GPP_VisitedPlmnId('11111F'O) + }); + template (present) PDU_DIAMETER tr_DIA_AIR(hexstring imsi) := tr_DIAMETER(flags := '11000000'B, cmd_code:=Authentication_Information, app_id := int2oct(c_DIAMETER_3GPP_S6_AID, 4), -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17230 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: Ib30fafaa2c660d32e864a57f4d3b0f50a158de6c Gerrit-Change-Number: 17230 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 19:17:43 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 19:17:43 +0000 Subject: Change in osmo-ttcn3-hacks[master]: deps/Makefile: Call Github repositories ECLIPSEGITHUB In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17231 ) Change subject: deps/Makefile: Call Github repositories ECLIPSEGITHUB ...................................................................... deps/Makefile: Call Github repositories ECLIPSEGITHUB ECLIPSEGIT and ECLIPSEGIT2 are really difficult to distinguish, let's call the former ECLIPSEGITHUB, i.e. the eclipse organization at github. Change-Id: I3a12164f76b85168c3afe85af2dd4be42f3e560b --- M deps/Makefile 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/deps/Makefile b/deps/Makefile index 1a13211..ccb0b1b 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -ECLIPSEGIT:=https://github.com/eclipse +ECLIPSEGITHUB:=https://github.com/eclipse ECLIPSEGIT2:=https://git.eclipse.org/r/titan OSMOGITHUB:=https://github.com/osmocom OSMOGIT:=git://git.osmocom.org -ECLIPSEGIT_REPOS= titan.Libraries.TCCUsefulFunctions \ +ECLIPSEGITHUB_REPOS= titan.Libraries.TCCUsefulFunctions \ titan.ProtocolModules.DNS \ titan.ProtocolModules.ICMP \ titan.ProtocolModules.ICMPv6 \ @@ -70,7 +70,7 @@ titan.ProtocolModules.BSSMAP \ titan.TestPorts.USB -ALL_REPOS=$(ECLIPSEGIT_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS) +ALL_REPOS=$(ECLIPSEGITHUB_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS) # Tag names from 'git-describe --tags'; if not available, a commit hash may be used instead. # In order to keep local changes in the repository of a dependency, set its commit to the @@ -166,8 +166,8 @@ endif endef -$(foreach dir,$(ECLIPSEGIT_REPOS), \ - $(eval $(call GIT_template,$(dir),$(ECLIPSEGIT)))) +$(foreach dir,$(ECLIPSEGITHUB_REPOS), \ + $(eval $(call GIT_template,$(dir),$(ECLIPSEGITHUB)))) $(foreach dir,$(ECLIPSEGIT2_REPOS), \ $(eval $(call GIT_template,$(dir),$(ECLIPSEGIT2)))) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17231 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: I3a12164f76b85168c3afe85af2dd4be42f3e560b Gerrit-Change-Number: 17231 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 19:17:43 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 19:17:43 +0000 Subject: Change in osmo-ttcn3-hacks[master]: Native_Functions: Add f_str_to{lower, upper}() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17232 ) Change subject: Native_Functions: Add f_str_to{lower,upper}() ...................................................................... Native_Functions: Add f_str_to{lower,upper}() TTCN-3 interestingly doens't seem to have any case-insensitive string matching or functions to convert to uppwer/lowercase. Change-Id: I2e6e0fd2da001a3cc6d9c31c9e766ae54bf17b2f --- M library/Native_FunctionDefs.cc M library/Native_Functions.ttcn 2 files changed, 36 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/library/Native_FunctionDefs.cc b/library/Native_FunctionDefs.cc index f6d5d1d..78ca4d1 100644 --- a/library/Native_FunctionDefs.cc +++ b/library/Native_FunctionDefs.cc @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -75,5 +76,34 @@ return CHARSTRING(str); } +CHARSTRING f__str__tolower(const CHARSTRING& in) +{ + TTCN_Buffer ttcn_buffer(in); + TTCN_Buffer buf_out; + CHARSTRING out; + unsigned int i; + + const char *in_str = (const char *)ttcn_buffer.get_data(); + for (i = 0; i < strlen(in_str); i++) + buf_out.put_c((unsigned char) tolower(in_str[i])); + buf_out.get_string(out); + return out; +} + +CHARSTRING f__str__toupper(const CHARSTRING& in) +{ + TTCN_Buffer ttcn_buffer(in); + TTCN_Buffer buf_out; + CHARSTRING out; + unsigned int i; + + const char *in_str = (const char *)ttcn_buffer.get_data(); + for (i = 0; i < strlen(in_str); i++) + buf_out.put_c((unsigned char) toupper(in_str[i])); + buf_out.get_string(out); + return out; +} + + } // namespace diff --git a/library/Native_Functions.ttcn b/library/Native_Functions.ttcn index d59670a..c43004a 100644 --- a/library/Native_Functions.ttcn +++ b/library/Native_Functions.ttcn @@ -11,4 +11,10 @@ external function f_inet_ntoa(in octetstring oct) return charstring; /* like inet_ntoa() but input is host byte order */ external function f_inet_hntoa(in octetstring oct) return charstring; + + /* convert content of charstring to lower-case using tolower(3) */ + external function f_str_tolower(in charstring input) return charstring; + + /* convert content of charstring to upper-case using toupper(3) */ + external function f_str_toupper(in charstring input) return charstring; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17232 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: I2e6e0fd2da001a3cc6d9c31c9e766ae54bf17b2f Gerrit-Change-Number: 17232 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 19:18:10 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 19:18:10 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add global guard timer to client+bankd tests In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17234 ) Change subject: remsim: Add global guard timer to client+bankd tests ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17234 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: I85d436a91d1c805f2fb66138ef7e2fb73107f2d1 Gerrit-Change-Number: 17234 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 19:18:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 19:18:17 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 19:18:17 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add tests using stdin/stdout of osmo-remsim-client-shell In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17233 ) Change subject: remsim: Add tests using stdin/stdout of osmo-remsim-client-shell ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17233 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: I3a69c692cf3e6bbe04ce58594050b20da0c37d16 Gerrit-Change-Number: 17233 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 19:18:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 19:18:20 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 19:18:20 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add tests using stdin/stdout of osmo-remsim-client-shell In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17233 ) Change subject: remsim: Add tests using stdin/stdout of osmo-remsim-client-shell ...................................................................... remsim: Add tests using stdin/stdout of osmo-remsim-client-shell osmo-remsim-client-shell allows to send C-APDU via STDIN of the program and receive R-APDU via STDOUT. We can attach to that using the PIPEasp TTCN3 port, and hence test a [local] osmo-remsim-client-shell transceiving APDUs from/to a simulated bankd in the test case. The only sad part about this is that we now will need to have the implementation under test (osmo-remsim-client-shell binary) in the same container as the TTCN-3 test, as it will fork/exec it. This is why we disable it by default and a modulepar must be used to enable those particular tests. Change-Id: I3a69c692cf3e6bbe04ce58594050b20da0c37d16 --- M deps/Makefile M remsim/REMSIM_Tests.cfg M remsim/RemsimClient_Tests.ttcn M remsim/gen_links.sh M remsim/regen_makefile.sh 5 files changed, 220 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/deps/Makefile b/deps/Makefile index ccb0b1b..c5af426 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -37,6 +37,7 @@ titan.TestPorts.IPL4asp \ titan.TestPorts.LANL2asp \ titan.TestPorts.PCAPasp \ + titan.TestPorts.PIPEasp \ titan.TestPorts.SIPmsg \ titan.TestPorts.TCPasp \ titan.TestPorts.TELNETasp \ @@ -116,6 +117,7 @@ titan.TestPorts.LANL2asp_commit= R.8.C-3-gb07c265 titan.TestPorts.MTP3asp_commit= 1cecdad6f3641a5f19b3833703bff6e5005eff11 titan.TestPorts.PCAPasp_commit= R.8.A-3-g9ad320f +titan.TestPorts.PIPEasp_commit= R.7.D-3-g8b01154 titan.TestPorts.SCTPasp_commit= R.11.A-2-g2faa9cf titan.TestPorts.SIPmsg_commit= R.15.A-1-ge4f9dd0 titan.TestPorts.TCPasp_commit= R.9.A-5-g2c91bc6 diff --git a/remsim/REMSIM_Tests.cfg b/remsim/REMSIM_Tests.cfg index 36b0952..e3bb900 100644 --- a/remsim/REMSIM_Tests.cfg +++ b/remsim/REMSIM_Tests.cfg @@ -4,6 +4,9 @@ # testsuite specific configuration, not expected to change "./REMSIM_Tests.default" +[MODULE_PARAMETERS] +RemsimClient_Tests.mp_have_local_client := true + [EXECUTE] RemsimServer_Tests.control #RemsimBankd_Tests.control diff --git a/remsim/RemsimClient_Tests.ttcn b/remsim/RemsimClient_Tests.ttcn index d950152..e372faf 100644 --- a/remsim/RemsimClient_Tests.ttcn +++ b/remsim/RemsimClient_Tests.ttcn @@ -1,7 +1,7 @@ module RemsimClient_Tests { /* Integration Tests for osmo-remsim-client - * (C) 2019 by Harald Welte + * (C) 2019-2020 by Harald Welte * All rights reserved. * * Released under the terms of GNU General Public License, Version 2 or @@ -12,15 +12,26 @@ * This test suite tests osmo-remsim-client by attaching to the external interfaces. */ +import from Native_Functions all; import from Osmocom_Types all; import from IPA_Emulation all; +/* the PIPEasp port allows us to interact with osmo-remsim-client-shell via stdin/stdout */ +import from PIPEasp_PortType all; +import from PIPEasp_Types all; + import from RSPRO all; import from RSPRO_Types all; import from RSPRO_Server all; import from REMSIM_Tests all; +modulepar { + boolean mp_have_local_client := false; /* backwards compatible default */ + charstring mp_client_shell_cmd := "osmo-remsim-client-shell"; +}; + type component client_test_CT extends rspro_server_CT { + port PIPEasp_PT PIPE; var ComponentIdentity g_srv_comp_id, g_bankd_comp_id; }; @@ -168,6 +179,195 @@ setverdict(pass); } +/*********************************************************************** + * Tests interacting with local remsim-bankd-client via PIPE port + ***********************************************************************/ + +template (value) ASP_PExecuteBackground ts_ExecBg(charstring cmd) := { + command := cmd +} + +template (present) ASP_PStdout tr_Stdout(template (present) charstring line) := { + stdout := line +} + +template (present) ASP_PStderr tr_Stderr(template (present) charstring line) := { + stderr := line +} + +template (value) ASP_PStdin ts_Stdin(template (value) charstring line) := { + stdin :=line +} + +/* osmo-remsim-client logs to stderr, so we need to ignore that log output */ +private altstep as_ignore_stderr() runs on client_test_CT { +[] PIPE.receive(tr_Stderr(?)) { repeat; } +} + +/* start a local osmo-remsim-client as sub-process and attach it to PIPE port */ +private function f_init_client_pipe(ClientSlot cs) runs on client_test_CT { + var charstring cmdline := mp_client_shell_cmd & " -i 127.0.0.1"; + map(self:PIPE, system:PIPE); + PIPE.send(ts_ExecBg(cmdline & " -c " & int2str(cs.clientId) + & " -n " & int2str(cs.slotNr))); + activate(as_ignore_stderr()); +} + +/* pretty-print an octet string as series of ASCII encoded hex bytes with spaces */ +function f_osmo_hexdump(octetstring input) return charstring { + var charstring ret := ""; + for (var integer i := 0; i < lengthof(input); i := i+1) { + ret := ret & f_str_tolower(oct2str(input[i])) & " "; + } + return ret; +} + +/* simulated bankd instructs client to "set ATR"; expect it to show up on stdout */ +function f_set_atr(template (value) ClientSlot cs, octetstring atr, + template ResultCode exp_res := ok, integer i := 0) +runs on client_test_CT { + RSPRO_SRV[i].send(ts_RSPRO_SetAtrReq(cs, atr)); + interleave { + [] RSPRO_SRV[i].receive(tr_RSPRO_SetAtrRes(exp_res)); + [] PIPE.receive(tr_Stdout("SET_ATR: " & f_osmo_hexdump(atr))); + } +} + +/* send a C-APDU from simulated application to client stdin; expect it on simulated bankd */ +function f_client2bank(template (present) ClientSlot cs, template (present) BankSlot bs, + octetstring c_apdu, integer i:=0) runs on client_test_CT +{ + /* send C-APDU via STDIN of osmo-remsim-client-shell */ + PIPE.send(ts_Stdin(oct2str(c_apdu))); + /* expect the same C-APDU to arrive via RSPRO tpduModemToCard */ + f_rspro_srv_exp(tr_RSPRO_TpduModemToCard(cs, bs, ?, c_apdu), i); +} + +/* send a R-APDU from simulated bankd to client; expect it on simualated app (client stdout) */ +function f_bank2client(template (present) BankSlot bs, template (present) ClientSlot cs, + octetstring r_apdu, boolean exp_fail := false, integer i:=0) +runs on client_test_CT { + var TpduFlags flags := { + tpduHeaderPresent:=true, + finalPart:=true, + procByteContinueTx:=false, + procByteContinueRx:=false + } + timer T := 10.0; + + RSPRO_SRV[i].send(ts_RSPRO_TpduCardToModem(bs, cs, flags, r_apdu)); + T.start; + alt { + [] PIPE.receive(tr_Stdout("R-APDU: " & f_osmo_hexdump(r_apdu))) { + if (exp_fail) { + setverdict(fail, "Expected R-APDU to fail but still received it"); + self.stop; + } else { + setverdict(pass); + } + } + [] PIPE.receive(tr_Stdout(?)) { + setverdict(fail, "Unexpected R-APDU on stdout of remsim-client-shell"); + self.stop; + } + [] T.timeout { + if (exp_fail) { + setverdict(pass); + } else { + setverdict(fail, "Timeout waiting for R-APDU on remsim-client-shell"); + self.stop; + } + } + } +} + +/* Transceive a C+R APDU from client (via pipe) to simulated bankd and back */ +function f_xceive_apdus(ClientSlot cslot, BankSlot bslot, + integer count := 100, integer i := 0) runs on client_test_CT +{ + for (var integer j := 0; j < count; j := j+1) { + var octetstring c_apdu := f_rnd_octstring(f_rnd_int(270)); + var octetstring r_apdu := f_rnd_octstring(f_rnd_int(270)); + f_client2bank(cslot, bslot, c_apdu, i:=i); + f_bank2client(bslot, cslot, r_apdu, i:=i); + } +} + +/* transceive APDUs using forked osmo-remsim-client-shell + stdio */ +testcase TC_pipe_xceive_apdus() runs on client_test_CT { + var BankSlot bslot := { 1, 0 }; + var ClientSlot cslot := { 321, 123 }; + f_init_client_pipe(cslot); + f_init(); + + /* expect inbound connectClientReq */ + as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ + as_connectClientReq(i := 1); + + f_set_atr(cslot, '3B9F96801FC78031A073BE21136743200718000001A5'O, i:=1); + + f_xceive_apdus(cslot, bslot, count := 100, i:=1); +} + +/* Send R-APDU from correct bankId/slotNr but to wrong ClientId */ +testcase TC_pipe_apdu_wrong_cslot() runs on client_test_CT { + var BankSlot bslot := { 1, 0 }; + var ClientSlot cslot := { 321, 123 }; + f_init_client_pipe(cslot); + f_init(); + + /* expect inbound connectClientReq */ + as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ + as_connectClientReq(i := 1); + + f_set_atr(cslot, '3B9F96801FC78031A073BE21136743200718000001A5'O, i:=1); + + var octetstring c_apdu := f_rnd_octstring(f_rnd_int(270)); + var octetstring r_apdu := f_rnd_octstring(f_rnd_int(270)); + /* Send C-APDU from correct ClientId/Slot to simulated bankd */ + f_client2bank(cslot, bslot, c_apdu, i:=1); + /* respond with R-APDU from correct bankId/Slot but stating wrong ClientId */ + cslot.clientId := 1023; + f_bank2client(bslot, cslot, r_apdu, exp_fail:=true, i:=1); +} + +/* Send R-APDU from wrong bankId/slotNr but to correct ClientId/Slot */ +testcase TC_pipe_apdu_wrong_bslot() runs on client_test_CT { + var BankSlot bslot := { 1, 0 }; + var ClientSlot cslot := { 321, 123 }; + f_init_client_pipe(cslot); + f_init(); + + /* expect inbound connectClientReq */ + as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ + as_connectClientReq(i := 1); + + f_set_atr(cslot, '3B9F96801FC78031A073BE21136743200718000001A5'O, i:=1); + + var octetstring c_apdu := f_rnd_octstring(f_rnd_int(270)); + var octetstring r_apdu := f_rnd_octstring(f_rnd_int(270)); + /* Send C-APDU from correct ClientId/Slot to simulated bankd */ + f_client2bank(cslot, bslot, c_apdu, i:=1); + /* respond with R-APDU from wrong bankId but stating correct ClientId */ + bslot.bankId := 1023; + f_bank2client(bslot, cslot, r_apdu, exp_fail:=true, i:=1); +} + /* TODO: * send a configClientBankIpReq and change the bank of an active client @@ -187,6 +387,12 @@ execute( TC_bank_reconnect() ); execute( TC_bank_disconnect() ); execute( TC_bank_disconnect_reconnect() ); + + if (mp_have_local_client) { + execute( TC_pipe_xceive_apdus() ); + execute( TC_pipe_apdu_wrong_cslot() ); + execute( TC_pipe_apdu_wrong_bslot() ); + } } diff --git a/remsim/gen_links.sh b/remsim/gen_links.sh index 366a8e6..995abfb 100755 --- a/remsim/gen_links.sh +++ b/remsim/gen_links.sh @@ -32,6 +32,10 @@ FILES="JSON_EncDec.cc JSON_Types.ttcn " gen_links $DIR $FILES +DIR=$BASEDIR/titan.TestPorts.PIPEasp/src +FILES="PIPEasp_PT.cc PIPEasp_PT.hh PIPEasp_Types.ttcn PIPEasp_PortType.ttcn " +gen_links $DIR $FILES + DIR=../library FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn Osmocom_Types.ttcn " diff --git a/remsim/regen_makefile.sh b/remsim/regen_makefile.sh index 6f7d209..3f19228 100755 --- a/remsim/regen_makefile.sh +++ b/remsim/regen_makefile.sh @@ -1,7 +1,10 @@ #!/bin/sh -FILES="*.ttcn *.ttcnpp *.asn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc TELNETasp_PT.cc Native_FunctionDefs.cc RSPRO_EncDec.cc Abstract_Socket.cc HTTPmsg_PT.cc HTTPmsg_MessageLen_Function.cc JSON_EncDec.cc VPCD_CodecPort_CtrlFunctDef.cc " +FILES="*.ttcn *.ttcnpp *.asn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc TELNETasp_PT.cc Native_FunctionDefs.cc RSPRO_EncDec.cc Abstract_Socket.cc HTTPmsg_PT.cc HTTPmsg_MessageLen_Function.cc JSON_EncDec.cc VPCD_CodecPort_CtrlFunctDef.cc PIPEasp_PT.cc " export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSPRO -DIPA_EMULATION_CTRL" ../regen-makefile.sh REMSIM_Tests.ttcn $FILES + +# required for forkpty(3) used by PIPEasp +sed -i -e '/^LINUX_LIBS/ s/$/ -lutil/' Makefile -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17233 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: I3a69c692cf3e6bbe04ce58594050b20da0c37d16 Gerrit-Change-Number: 17233 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 19:18:20 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 19:18:20 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add global guard timer to client+bankd tests In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17234 ) Change subject: remsim: Add global guard timer to client+bankd tests ...................................................................... remsim: Add global guard timer to client+bankd tests Change-Id: I85d436a91d1c805f2fb66138ef7e2fb73107f2d1 --- M remsim/RSPRO_Server.ttcn 1 file changed, 10 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/remsim/RSPRO_Server.ttcn b/remsim/RSPRO_Server.ttcn index 5c9051c..25ec4d1 100644 --- a/remsim/RSPRO_Server.ttcn +++ b/remsim/RSPRO_Server.ttcn @@ -34,8 +34,15 @@ type component rspro_server_CT { var RSPRO_Server g_rspro_srv[NUM_SERVER]; port IPA_RSPRO_PT RSPRO_SRV[NUM_SERVER]; + timer g_rspro_srv_Tguard := 30.0; }; +private altstep as_rspro_srv_Tguard() runs on rspro_server_CT { +[] g_rspro_srv_Tguard.timeout { + setverdict(fail, "RSPRO Server global guard timer timeout"); + mtc.stop; + } +} altstep as_ignore_id_ack(integer i) runs on rspro_server_CT { [] RSPRO_SRV[i].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_ID_ACK}) { repeat; } @@ -66,6 +73,9 @@ g_rspro_srv[i].ccm_pars.name := "Osmocom TTCN-3 RSPRO server simulator"; g_rspro_srv[i].rspro_id := rspro_id; + activate(as_rspro_srv_Tguard()); + g_rspro_srv_Tguard.start; + map(g_rspro_srv[i].vc_IPA:IPA_PORT, system:IPA_CODEC_PT); connect(g_rspro_srv[i].vc_IPA:IPA_RSPRO_PORT, self:RSPRO_SRV[i]); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17234 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: I85d436a91d1c805f2fb66138ef7e2fb73107f2d1 Gerrit-Change-Number: 17234 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 19:18:48 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 19:18:48 +0000 Subject: Change in osmo-ci[master]: job: Update master and gerrit osmo-trx jobs to also build on ARM plat... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17228 ) Change subject: job: Update master and gerrit osmo-trx jobs to also build on ARM platform ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0049ab35b5106d5af8474903e203f66b044ff5ca Gerrit-Change-Number: 17228 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 19:18:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 19 19:22:04 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 19 Feb 2020 19:22:04 +0000 Subject: Change in osmo-ci[master]: hosts: Add rpi4-deb9build-ansible In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17229 ) Change subject: hosts: Add rpi4-deb9build-ansible ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-ci/+/17229/1/ansible/hosts File ansible/hosts: https://gerrit.osmocom.org/c/osmo-ci/+/17229/1/ansible/hosts at 17 PS1, Line 17: rpi4-deb9build-ansible ansible_host=10.9.25.51 the somewhat sad part here is that so far one could reach all jenkins-slaves on the public internet, while this one now requires access to a VPN. We've had other machines in VPN (like osmo-gsm-tester), but there all of the machines in that group are inside VPN. It would probably be better to harmonize that setup in some way. Ideally we'd give that machine also a public v6 IP (or a port forward from there). Unfortunately that's not simple at the moment, and at my current work load I may get to it in 5 years or so :/ maybe worth adding this to the commitlog or as comment here. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3bea29c3a9fa9b4b6dc4df3cdde4bb9dbf7de47d Gerrit-Change-Number: 17229 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 19 Feb 2020 19:22:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 00:36:02 2020 From: gerrit-no-reply at lists.osmocom.org (gnutoo) Date: Thu, 20 Feb 2020 00:36:02 +0000 Subject: Change in pysim[master]: python3 conversion: Use braces around print calls In-Reply-To: References: Message-ID: gnutoo has abandoned this change. ( https://gerrit.osmocom.org/c/pysim/+/15502 ) Change subject: python3 conversion: Use braces around print calls ...................................................................... Abandoned This was re-written (and merged) in this commit: https://gerrit.osmocom.org/plugins/gitiles/pysim/+/6727f0c02c67f9614294eeb7cf2cc5c137f5c266 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/15502 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ia472baa8c14b87fe917ea52a998d5ccda66d20d1 Gerrit-Change-Number: 15502 Gerrit-PatchSet: 3 Gerrit-Owner: gnutoo Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 06:11:30 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Thu, 20 Feb 2020 06:11:30 +0000 Subject: Change in pysim[master]: python3 conversion: Use braces around print calls In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/15502 ) Change subject: python3 conversion: Use braces around print calls ...................................................................... Patch Set 3: > This was re-written (and merged) in this commit: [...] Oh, I am sorry. Somehow this change slipped out of my mind... Let's get https://gerrit.osmocom.org/c/pysim/+/15504 merged. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/15502 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ia472baa8c14b87fe917ea52a998d5ccda66d20d1 Gerrit-Change-Number: 15502 Gerrit-PatchSet: 3 Gerrit-Owner: gnutoo Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 20 Feb 2020 06:11:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 10:54:09 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 20 Feb 2020 10:54:09 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Install correct version of Soapdysdr lms module ... In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17193 ) Change subject: ansible: gsm-tester: Install correct version of Soapdysdr lms module for srsLTE ...................................................................... ansible: gsm-tester: Install correct version of Soapdysdr lms module for srsLTE At runtime, srsLTE expects that newer version of the module instead of old 0.5.2 one. Change-Id: I1a66a1c4ba819c6c4887facc99045d099f2ccc53 --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve; Verified laforge: Looks good to me, approved diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index ef51178..9f3fd25 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -58,6 +58,7 @@ - libuhd-dev - libczmq-dev - libsoapysdr-dev + - soapysdr0.7-module-lms7 - name: install ofono build dependencies apt: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1a66a1c4ba819c6c4887facc99045d099f2ccc53 Gerrit-Change-Number: 17193 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 10:54:21 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 20 Feb 2020 10:54:21 +0000 Subject: Change in osmo-ci[master]: ansible: slave: Skip ttcn3 install on ARM targets In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17222 ) Change subject: ansible: slave: Skip ttcn3 install on ARM targets ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I83f95766fc601bfced6404db56af3bf8b871982f Gerrit-Change-Number: 17222 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 20 Feb 2020 10:54:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 10:54:36 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 20 Feb 2020 10:54:36 +0000 Subject: Change in osmo-ci[master]: job: Update master and gerrit osmo-trx jobs to also build on ARM plat... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17228 ) Change subject: job: Update master and gerrit osmo-trx jobs to also build on ARM platform ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0049ab35b5106d5af8474903e203f66b044ff5ca Gerrit-Change-Number: 17228 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 20 Feb 2020 10:54:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 10:54:40 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 20 Feb 2020 10:54:40 +0000 Subject: Change in osmo-ci[master]: hosts: Add rpi4-deb9build-ansible In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17229 ) Change subject: hosts: Add rpi4-deb9build-ansible ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3bea29c3a9fa9b4b6dc4df3cdde4bb9dbf7de47d Gerrit-Change-Number: 17229 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 20 Feb 2020 10:54:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 10:54:44 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 20 Feb 2020 10:54:44 +0000 Subject: Change in osmo-ci[master]: ansible: slave: Skip ttcn3 install on ARM targets In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17222 ) Change subject: ansible: slave: Skip ttcn3 install on ARM targets ...................................................................... ansible: slave: Skip ttcn3 install on ARM targets eclipse-titan is not currently built for ARM targets (or it fails) on osmocom OBS repos. Let's disable it since anyway we don't need to run ttcn3 stuff on ARM slaves. Change-Id: I83f95766fc601bfced6404db56af3bf8b871982f --- M ansible/roles/osmocom-jenkins-slave/tasks/main.yml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml index 6d15ea1..ca66bc4 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml @@ -31,7 +31,7 @@ - name: install ttcn3 dependencies include_tasks: ttcn3-slave.yml - when: ttcn3_slave and ansible_distribution == 'Debian' and ansible_distribution_version >= '9' + when: ttcn3_slave and ansible_distribution == 'Debian' and ansible_distribution_version >= '9' and not (ansible_architecture == "armv7l" or ansible_architecture == "arm64") - name: copy .gitconfig copy: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17222 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I83f95766fc601bfced6404db56af3bf8b871982f Gerrit-Change-Number: 17222 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 11:49:41 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 20 Feb 2020 11:49:41 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: add jenkins user to osmo-gsm-tester group on slaves References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17235 ) Change subject: ansible: gsm-tester: add jenkins user to osmo-gsm-tester group on slaves ...................................................................... ansible: gsm-tester: add jenkins user to osmo-gsm-tester group on slaves Change-Id: Id5a06c19a4341311a86b87e3e9ac23d3656909b9 --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 14 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/35/17235/1 diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index eff4939..fc3def9 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -257,15 +257,26 @@ - osmo-gsm-tester-main - osmo-gsm-tester-proc -- name: add jenkins to osmo-gsm-tester and systemd-journal +- name: Add jenkins user to osmo-gsm-tester group user: - name: jenkins + name: "{{ jenkins_user }}" + groups: "{{ item }}" + append: yes + shell: /bin/bash + with_items: + - osmo-gsm-tester + tags: + - osmo-gsm-tester-main + - osmo-gsm-tester-proc + +- name: add jenkins user to systemd-journal and dialout groups + user: + name: "{{ jenkins_user }}" groups: "{{ item }}" append: yes shell: /bin/bash with_items: - systemd-journal - - osmo-gsm-tester - dialout tags: - osmo-gsm-tester-main -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Id5a06c19a4341311a86b87e3e9ac23d3656909b9 Gerrit-Change-Number: 17235 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 13:33:22 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 20 Feb 2020 13:33:22 +0000 Subject: Change in osmo-gsm-tester[master]: iperf3: Fix netns param not used References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17236 ) Change subject: iperf3: Fix netns param not used ...................................................................... iperf3: Fix netns param not used Change-Id: I2768ec0c6d2cbfc8411382a983e1ba17cb5f097e --- M src/osmo_gsm_tester/iperf3.py 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/36/17236/1 diff --git a/src/osmo_gsm_tester/iperf3.py b/src/osmo_gsm_tester/iperf3.py index 2038daa..1b13ffe 100644 --- a/src/osmo_gsm_tester/iperf3.py +++ b/src/osmo_gsm_tester/iperf3.py @@ -160,11 +160,11 @@ self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) self.log_file = self.run_dir.new_file(IPerf3Client.LOGFILE) if self.runs_locally(): - return self.prepare_test_proc_locally() + return self.prepare_test_proc_locally(netns) else: - return self.prepare_test_proc_remotely() + return self.prepare_test_proc_remotely(netns) - def prepare_test_proc_remotely(self, netns=None): + def prepare_test_proc_remotely(self, netns): self.rem_host = remote.RemoteHost(self.run_dir, self._run_node.ssh_user(), self._run_node.ssh_addr()) remote_prefix_dir = util.Dir(IPerf3Client.REMOTE_DIR) @@ -182,7 +182,7 @@ self.process = self.rem_host.RemoteProcess(self.name(), popen_args, env={}) return self.process - def prepare_test_proc_locally(self, netns=None): + def prepare_test_proc_locally(self, netns): pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.server.addr(), netns) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17236 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I2768ec0c6d2cbfc8411382a983e1ba17cb5f097e Gerrit-Change-Number: 17236 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 14:29:05 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 20 Feb 2020 14:29:05 +0000 Subject: Change in osmo-gsm-tester[master]: iperf3: Fix netns param not used In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17236 ) Change subject: iperf3: Fix netns param not used ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17236 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I2768ec0c6d2cbfc8411382a983e1ba17cb5f097e Gerrit-Change-Number: 17236 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 20 Feb 2020 14:29:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 14:29:09 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 20 Feb 2020 14:29:09 +0000 Subject: Change in osmo-gsm-tester[master]: iperf3: Fix netns param not used In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17236 ) Change subject: iperf3: Fix netns param not used ...................................................................... iperf3: Fix netns param not used Change-Id: I2768ec0c6d2cbfc8411382a983e1ba17cb5f097e --- M src/osmo_gsm_tester/iperf3.py 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/iperf3.py b/src/osmo_gsm_tester/iperf3.py index 2038daa..1b13ffe 100644 --- a/src/osmo_gsm_tester/iperf3.py +++ b/src/osmo_gsm_tester/iperf3.py @@ -160,11 +160,11 @@ self.run_dir = util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name())) self.log_file = self.run_dir.new_file(IPerf3Client.LOGFILE) if self.runs_locally(): - return self.prepare_test_proc_locally() + return self.prepare_test_proc_locally(netns) else: - return self.prepare_test_proc_remotely() + return self.prepare_test_proc_remotely(netns) - def prepare_test_proc_remotely(self, netns=None): + def prepare_test_proc_remotely(self, netns): self.rem_host = remote.RemoteHost(self.run_dir, self._run_node.ssh_user(), self._run_node.ssh_addr()) remote_prefix_dir = util.Dir(IPerf3Client.REMOTE_DIR) @@ -182,7 +182,7 @@ self.process = self.rem_host.RemoteProcess(self.name(), popen_args, env={}) return self.process - def prepare_test_proc_locally(self, netns=None): + def prepare_test_proc_locally(self, netns): pcap_recorder.PcapRecorder(self.suite_run, self.run_dir.new_dir('pcap'), None, 'host %s and port not 22' % self.server.addr(), netns) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17236 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I2768ec0c6d2cbfc8411382a983e1ba17cb5f097e Gerrit-Change-Number: 17236 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 14:59:14 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 20 Feb 2020 14:59:14 +0000 Subject: Change in osmo-gsm-tester[master]: srsLTE: Support configuring different RF backends References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17237 ) Change subject: srsLTE: Support configuring different RF backends ...................................................................... srsLTE: Support configuring different RF backends Before this patch, only virtual RF through ZeroMQ was supported. This patch allows configuring srsUE and srsENB to use a real SDR with UHD/SoapySDR backend connected through a physical RF network, while still keeping compatibility to run on virtual RF ZeroMQ network, based on the resources used (controlled by scenarios). For instance, one can first run a suite through the phyisical RF (using 2 UHD-controlled SDRs) and afterwards with ZeroMQ using the following default-suites.conf: - 4g:srsenb-rftype-uhd+srsue-rftype-uhd - 4g:srsenb-rftype-zmq+srsue-rftype-zmq Change-Id: I7dbbe328f4c0225fe74e878bb2da13fe39ccf049 --- M example/default-suites.conf M example/resources.conf.prod A example/scenarios/srsenb-rftype-uhd.conf A example/scenarios/srsenb-rftype-zmq.conf A example/scenarios/srsue-rftype-soapy.conf A example/scenarios/srsue-rftype-uhd.conf A example/scenarios/srsue-rftype-zmq.conf M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/srs_enb.py M src/osmo_gsm_tester/srs_ue.py M src/osmo_gsm_tester/templates/srsenb.conf.tmpl M src/osmo_gsm_tester/templates/srsue.conf.tmpl 12 files changed, 73 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/37/17237/1 diff --git a/example/default-suites.conf b/example/default-suites.conf index cfac1ca..4910dbc 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -162,4 +162,4 @@ - smpp - encryption -- 4g +- 4g:srsenb-rftype-zmq+srsue-rftype-zmq diff --git a/example/resources.conf.prod b/example/resources.conf.prod index 943160b..cbcaafd 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -157,6 +157,15 @@ enb: - label: srsENB-zmq type: srsenb + rf_dev_type: zmq + rf_dev_args: auto + remote_user: jenkins + addr: 10.42.42.117 + +- label: srsENB-B200 + type: srsenb + rf_dev_type: UHD + rf_dev_args: "type=b200,serial=306BD11,recv_frame_size=9232,send_frame_size=9232" remote_user: jenkins addr: 10.42.42.117 @@ -241,12 +250,23 @@ - label: srsUE-zmq_1 type: srsue + rf_dev_type: zmq + rf_dev_args: auto remote_user: jenkins addr: 10.42.42.116 imsi: '001010123456789' ki: '00112233445566778899aabbccddeeff' auth_algo: 'xor' +- label: srsUE-soapy-lms_1 + type: srsue + rf_dev_type: soapy + rf_dev_args: driver=lime,serial=00090706024F0A22,rxant=LNAW,txant=BAND1 + remote_user: jenkins + addr: 10.42.42.116 + imsi: '001010123456789' + ki: '00112233445566778899aabbccddeeff' + auth_algo: 'xor' osmocon_phone: - serial_device: '/dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_00897B41-if00-port0' diff --git a/example/scenarios/srsenb-rftype-uhd.conf b/example/scenarios/srsenb-rftype-uhd.conf new file mode 100644 index 0000000..293c109 --- /dev/null +++ b/example/scenarios/srsenb-rftype-uhd.conf @@ -0,0 +1,4 @@ +resources: + enb: + - type: srsenb + rf_dev_type: UHD diff --git a/example/scenarios/srsenb-rftype-zmq.conf b/example/scenarios/srsenb-rftype-zmq.conf new file mode 100644 index 0000000..e0f9c9d --- /dev/null +++ b/example/scenarios/srsenb-rftype-zmq.conf @@ -0,0 +1,4 @@ +resources: + enb: + - type: srsenb + rf_dev_type: zmq diff --git a/example/scenarios/srsue-rftype-soapy.conf b/example/scenarios/srsue-rftype-soapy.conf new file mode 100644 index 0000000..5f034af --- /dev/null +++ b/example/scenarios/srsue-rftype-soapy.conf @@ -0,0 +1,4 @@ +resources: + modem: + - type: srsue + rf_dev_type: soapy diff --git a/example/scenarios/srsue-rftype-uhd.conf b/example/scenarios/srsue-rftype-uhd.conf new file mode 100644 index 0000000..fef8696 --- /dev/null +++ b/example/scenarios/srsue-rftype-uhd.conf @@ -0,0 +1,4 @@ +resources: + modem: + - type: srsue + rf_dev_type: UHD diff --git a/example/scenarios/srsue-rftype-zmq.conf b/example/scenarios/srsue-rftype-zmq.conf new file mode 100644 index 0000000..d30a84b --- /dev/null +++ b/example/scenarios/srsue-rftype-zmq.conf @@ -0,0 +1,4 @@ +resources: + modem: + - type: srsue + rf_dev_type: zmq diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 0804591..e8ca859 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -89,7 +89,8 @@ 'enb[].type': schema.STR, 'enb[].remote_user': schema.STR, 'enb[].addr': schema.IPV4, - 'enb[].band': schema.BAND, + 'enb[].rf_dev_type': schema.STR, + 'enb[].rf_dev_args': schema.STR, 'arfcn[].arfcn': schema.INT, 'arfcn[].band': schema.BAND, 'modem[].type': schema.STR, @@ -102,6 +103,8 @@ 'modem[].addr': schema.IPV4, 'modem[].ciphers[]': schema.CIPHER, 'modem[].features[]': schema.MODEM_FEATURE, + 'modem[].rf_dev_type': schema.STR, + 'modem[].rf_dev_args': schema.STR, 'osmocon_phone[].serial_device': schema.STR, } diff --git a/src/osmo_gsm_tester/srs_enb.py b/src/osmo_gsm_tester/srs_enb.py index 2b65a5b..6fb186f 100644 --- a/src/osmo_gsm_tester/srs_enb.py +++ b/src/osmo_gsm_tester/srs_enb.py @@ -22,6 +22,9 @@ from . import log, util, config, template, process, remote +def rf_type_valid(rf_type_str): + return rf_type_str in ('zmq', 'UHD', 'soapy', 'bladeRF') + class srsENB(log.Origin): REMOTE_DIR = '/osmo-gsm-tester-srsenb' @@ -34,6 +37,7 @@ def __init__(self, suite_run, conf): super().__init__(log.C_RUN, 'srsenb') + self._conf = conf self._addr = conf.get('addr', None) if self._addr is None: raise log.Error('addr not set') @@ -59,6 +63,8 @@ else: self.base_srate=23.04e6 self.remote_user = conf.get('remote_user', None) + if not rf_type_valid(conf.get('rf_dev_type', None)): + raise log.Error('Invalid rf_dev_type=%s' % conf.get('rf_dev_type', None)) def cleanup(self): if self.process is None: @@ -117,8 +123,6 @@ '--enb_files.sib_config=' + self.remote_config_sib_file, '--enb_files.rr_config=' + self.remote_config_rr_file, '--enb_files.drb_config=' + self.remote_config_drb_file, - '--rf.device_name=zmq', - '--rf.device_args="fail_on_disconnect=true,tx_port=tcp://'+ self.addr() +':2000,rx_port=tcp://'+ self.ue.addr() +':2001,id=enb,base_srate='+ str(self.base_srate) + '"', '--expert.nof_phy_threads=1', '--expert.rrc_inactivity_timer=1500', '--enb.n_prb=' + str(self.nof_prb), @@ -145,8 +149,6 @@ '--enb_files.sib_config=' + os.path.abspath(self.config_sib_file), '--enb_files.rr_config=' + os.path.abspath(self.config_rr_file), '--enb_files.drb_config=' + os.path.abspath(self.config_drb_file), - '--rf.device_name=zmq', - '--rf.device_args="fail_on_disconnect=true,tx_port=tcp://'+ self.addr() +':2000,rx_port=tcp://'+ self.ue.addr() +':2001,id=enb,base_srate='+ str(self.base_srate) + '"', '--expert.nof_phy_threads=1', '--expert.rrc_inactivity_timer=1500', '--enb.n_prb=' + str(self.nof_prb), @@ -161,8 +163,12 @@ values = dict(enb=config.get_defaults('srsenb')) config.overlay(values, self.suite_run.config()) - config.overlay(values, dict(enb={ 'run_addr': self.addr(), - 'mme_addr': self.epc.addr()})) + config.overlay(values, dict(enb=self._conf)) + config.overlay(values, dict(enb={ 'mme_addr': self.epc.addr() })) + + # We need to set some specific variables programatically here to match IP addresses: + if self._conf.get('rf_dev_type') == 'zmq': + config.overlay(values, dict(enb=dict(rf_dev_args='fail_on_disconnect=true,tx_port=tcp://'+ self.addr() +':2000,rx_port=tcp://'+ self.ue.addr() +':2001,id=enb,base_srate='+ str(self.base_srate)))) self.dbg('srsENB ' + filename + ':\n' + pprint.pformat(values)) diff --git a/src/osmo_gsm_tester/srs_ue.py b/src/osmo_gsm_tester/srs_ue.py index c68c726..4a99ad9 100644 --- a/src/osmo_gsm_tester/srs_ue.py +++ b/src/osmo_gsm_tester/srs_ue.py @@ -24,6 +24,9 @@ from .run_node import RunNode from .ms import MS +def rf_type_valid(rf_type_str): + return rf_type_str in ('zmq', 'UHD', 'soapy', 'bladeRF') + class srsUE(MS): REMOTE_DIR = '/osmo-gsm-tester-srsue' @@ -54,6 +57,8 @@ else: self.base_srate=23.04e6 self.remote_user = conf.get('remote_user', None) + if not rf_type_valid(conf.get('rf_dev_type', None)): + raise log.Error('Invalid rf_dev_type=%s' % conf.get('rf_dev_type', None)) def cleanup(self): if self.process is None: @@ -122,8 +127,6 @@ #'strace', '-ff', args = (remote_binary, self.remote_config_file, - '--rf.device_name=zmq', - '--rf.device_args="tx_port=tcp://'+ self.addr() +':2001,rx_port=tcp://'+ self.enb.addr() +':2000,id=ue,base_srate='+ str(self.base_srate) + '"', '--phy.nof_phy_threads=1', '--gw.netns=' + self.netns(), '--log.filename=' + 'stdout', #self.remote_log_file, @@ -157,8 +160,6 @@ util.setcap_netsys_admin(binary, self.run_dir.new_dir('setcap_netsys_admin')) args = (binary, os.path.abspath(self.config_file), - '--rf.device_name=zmq', - '--rf.device_args="tx_port=tcp://'+ self.addr() +':2001,rx_port=tcp://'+ self.enb.addr() +':2000,id=ue,base_srate='+ str(self.base_srate) + '"', '--phy.nof_phy_threads=1', '--gw.netns=' + self.netns(), '--log.filename=' + self.log_file, @@ -180,6 +181,10 @@ config.overlay(values, self.suite_run.config()) config.overlay(values, dict(ue=self._conf)) + # We need to set some specific variables programatically here to match IP addresses: + if self._conf.get('rf_dev_type') == 'zmq': + config.overlay(values, dict(ue=dict(rf_dev_args='tx_port=tcp://'+ self.addr() +':2001,rx_port=tcp://'+ self.enb.addr() +':2000,id=ue,base_srate='+ str(self.base_srate)))) + self.dbg('SRSUE CONFIG:\n' + pprint.pformat(values)) with open(self.config_file, 'w') as f: diff --git a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl index 0eba35b..2006832 100644 --- a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl +++ b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl @@ -26,8 +26,8 @@ mcc = ${enb.mcc} mnc = ${enb.mnc} mme_addr = ${enb.mme_addr} -gtp_bind_addr = ${enb.run_addr} -s1c_bind_addr = ${enb.run_addr} +gtp_bind_addr = ${enb.addr} +s1c_bind_addr = ${enb.addr} n_prb = 50 #tm = 4 #nof_ports = 2 @@ -70,7 +70,7 @@ tx_gain = 80 rx_gain = 40 -#device_name = auto +device_name = ${enb.rf_dev_type} # For best performance in 2x2 MIMO and >= 15 MHz use the following device_args settings: # USRP B210: num_recv_frames=64,num_send_frames=64 @@ -78,7 +78,7 @@ # For best performance when BW<5 MHz (25 PRB), use the following device_args settings: # USRP B210: send_frame_size=512,recv_frame_size=512 -#device_args = auto +device_args = ${enb.rf_dev_args} #time_adv_nsamples = auto #burst_preamble_us = auto diff --git a/src/osmo_gsm_tester/templates/srsue.conf.tmpl b/src/osmo_gsm_tester/templates/srsue.conf.tmpl index 5e5676d..eef5a7e 100644 --- a/src/osmo_gsm_tester/templates/srsue.conf.tmpl +++ b/src/osmo_gsm_tester/templates/srsue.conf.tmpl @@ -39,13 +39,15 @@ #nof_radios = 1 #nof_rx_ant = 1 +device_name = ${ue.rf_dev_type} + # For best performance in 2x2 MIMO and >= 15 MHz use the following device_args settings: # USRP B210: num_recv_frames=64,num_send_frames=64 # For best performance when BW<5 MHz (25 PRB), use the following device_args settings: # USRP B210: send_frame_size=512,recv_frame_size=512 -#device_args = auto +device_args = ${ue.rf_dev_args} #time_adv_nsamples = auto #burst_preamble_us = auto #continuous_tx = auto -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17237 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I7dbbe328f4c0225fe74e878bb2da13fe39ccf049 Gerrit-Change-Number: 17237 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 15:13:37 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 20 Feb 2020 15:13:37 +0000 Subject: Change in osmo-gsm-tester[master]: srsLTE: Support configuring different RF backends In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17237 ) Change subject: srsLTE: Support configuring different RF backends ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17237 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I7dbbe328f4c0225fe74e878bb2da13fe39ccf049 Gerrit-Change-Number: 17237 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 20 Feb 2020 15:13:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 15:13:43 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 20 Feb 2020 15:13:43 +0000 Subject: Change in osmo-gsm-tester[master]: srsLTE: Support configuring different RF backends In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17237 ) Change subject: srsLTE: Support configuring different RF backends ...................................................................... srsLTE: Support configuring different RF backends Before this patch, only virtual RF through ZeroMQ was supported. This patch allows configuring srsUE and srsENB to use a real SDR with UHD/SoapySDR backend connected through a physical RF network, while still keeping compatibility to run on virtual RF ZeroMQ network, based on the resources used (controlled by scenarios). For instance, one can first run a suite through the phyisical RF (using 2 UHD-controlled SDRs) and afterwards with ZeroMQ using the following default-suites.conf: - 4g:srsenb-rftype-uhd+srsue-rftype-uhd - 4g:srsenb-rftype-zmq+srsue-rftype-zmq Change-Id: I7dbbe328f4c0225fe74e878bb2da13fe39ccf049 --- M example/default-suites.conf M example/resources.conf.prod A example/scenarios/srsenb-rftype-uhd.conf A example/scenarios/srsenb-rftype-zmq.conf A example/scenarios/srsue-rftype-soapy.conf A example/scenarios/srsue-rftype-uhd.conf A example/scenarios/srsue-rftype-zmq.conf M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/srs_enb.py M src/osmo_gsm_tester/srs_ue.py M src/osmo_gsm_tester/templates/srsenb.conf.tmpl M src/osmo_gsm_tester/templates/srsue.conf.tmpl 12 files changed, 73 insertions(+), 17 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/example/default-suites.conf b/example/default-suites.conf index cfac1ca..4910dbc 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -162,4 +162,4 @@ - smpp - encryption -- 4g +- 4g:srsenb-rftype-zmq+srsue-rftype-zmq diff --git a/example/resources.conf.prod b/example/resources.conf.prod index 943160b..cbcaafd 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -157,6 +157,15 @@ enb: - label: srsENB-zmq type: srsenb + rf_dev_type: zmq + rf_dev_args: auto + remote_user: jenkins + addr: 10.42.42.117 + +- label: srsENB-B200 + type: srsenb + rf_dev_type: UHD + rf_dev_args: "type=b200,serial=306BD11,recv_frame_size=9232,send_frame_size=9232" remote_user: jenkins addr: 10.42.42.117 @@ -241,12 +250,23 @@ - label: srsUE-zmq_1 type: srsue + rf_dev_type: zmq + rf_dev_args: auto remote_user: jenkins addr: 10.42.42.116 imsi: '001010123456789' ki: '00112233445566778899aabbccddeeff' auth_algo: 'xor' +- label: srsUE-soapy-lms_1 + type: srsue + rf_dev_type: soapy + rf_dev_args: driver=lime,serial=00090706024F0A22,rxant=LNAW,txant=BAND1 + remote_user: jenkins + addr: 10.42.42.116 + imsi: '001010123456789' + ki: '00112233445566778899aabbccddeeff' + auth_algo: 'xor' osmocon_phone: - serial_device: '/dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_00897B41-if00-port0' diff --git a/example/scenarios/srsenb-rftype-uhd.conf b/example/scenarios/srsenb-rftype-uhd.conf new file mode 100644 index 0000000..293c109 --- /dev/null +++ b/example/scenarios/srsenb-rftype-uhd.conf @@ -0,0 +1,4 @@ +resources: + enb: + - type: srsenb + rf_dev_type: UHD diff --git a/example/scenarios/srsenb-rftype-zmq.conf b/example/scenarios/srsenb-rftype-zmq.conf new file mode 100644 index 0000000..e0f9c9d --- /dev/null +++ b/example/scenarios/srsenb-rftype-zmq.conf @@ -0,0 +1,4 @@ +resources: + enb: + - type: srsenb + rf_dev_type: zmq diff --git a/example/scenarios/srsue-rftype-soapy.conf b/example/scenarios/srsue-rftype-soapy.conf new file mode 100644 index 0000000..5f034af --- /dev/null +++ b/example/scenarios/srsue-rftype-soapy.conf @@ -0,0 +1,4 @@ +resources: + modem: + - type: srsue + rf_dev_type: soapy diff --git a/example/scenarios/srsue-rftype-uhd.conf b/example/scenarios/srsue-rftype-uhd.conf new file mode 100644 index 0000000..fef8696 --- /dev/null +++ b/example/scenarios/srsue-rftype-uhd.conf @@ -0,0 +1,4 @@ +resources: + modem: + - type: srsue + rf_dev_type: UHD diff --git a/example/scenarios/srsue-rftype-zmq.conf b/example/scenarios/srsue-rftype-zmq.conf new file mode 100644 index 0000000..d30a84b --- /dev/null +++ b/example/scenarios/srsue-rftype-zmq.conf @@ -0,0 +1,4 @@ +resources: + modem: + - type: srsue + rf_dev_type: zmq diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 0804591..e8ca859 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -89,7 +89,8 @@ 'enb[].type': schema.STR, 'enb[].remote_user': schema.STR, 'enb[].addr': schema.IPV4, - 'enb[].band': schema.BAND, + 'enb[].rf_dev_type': schema.STR, + 'enb[].rf_dev_args': schema.STR, 'arfcn[].arfcn': schema.INT, 'arfcn[].band': schema.BAND, 'modem[].type': schema.STR, @@ -102,6 +103,8 @@ 'modem[].addr': schema.IPV4, 'modem[].ciphers[]': schema.CIPHER, 'modem[].features[]': schema.MODEM_FEATURE, + 'modem[].rf_dev_type': schema.STR, + 'modem[].rf_dev_args': schema.STR, 'osmocon_phone[].serial_device': schema.STR, } diff --git a/src/osmo_gsm_tester/srs_enb.py b/src/osmo_gsm_tester/srs_enb.py index 2b65a5b..6fb186f 100644 --- a/src/osmo_gsm_tester/srs_enb.py +++ b/src/osmo_gsm_tester/srs_enb.py @@ -22,6 +22,9 @@ from . import log, util, config, template, process, remote +def rf_type_valid(rf_type_str): + return rf_type_str in ('zmq', 'UHD', 'soapy', 'bladeRF') + class srsENB(log.Origin): REMOTE_DIR = '/osmo-gsm-tester-srsenb' @@ -34,6 +37,7 @@ def __init__(self, suite_run, conf): super().__init__(log.C_RUN, 'srsenb') + self._conf = conf self._addr = conf.get('addr', None) if self._addr is None: raise log.Error('addr not set') @@ -59,6 +63,8 @@ else: self.base_srate=23.04e6 self.remote_user = conf.get('remote_user', None) + if not rf_type_valid(conf.get('rf_dev_type', None)): + raise log.Error('Invalid rf_dev_type=%s' % conf.get('rf_dev_type', None)) def cleanup(self): if self.process is None: @@ -117,8 +123,6 @@ '--enb_files.sib_config=' + self.remote_config_sib_file, '--enb_files.rr_config=' + self.remote_config_rr_file, '--enb_files.drb_config=' + self.remote_config_drb_file, - '--rf.device_name=zmq', - '--rf.device_args="fail_on_disconnect=true,tx_port=tcp://'+ self.addr() +':2000,rx_port=tcp://'+ self.ue.addr() +':2001,id=enb,base_srate='+ str(self.base_srate) + '"', '--expert.nof_phy_threads=1', '--expert.rrc_inactivity_timer=1500', '--enb.n_prb=' + str(self.nof_prb), @@ -145,8 +149,6 @@ '--enb_files.sib_config=' + os.path.abspath(self.config_sib_file), '--enb_files.rr_config=' + os.path.abspath(self.config_rr_file), '--enb_files.drb_config=' + os.path.abspath(self.config_drb_file), - '--rf.device_name=zmq', - '--rf.device_args="fail_on_disconnect=true,tx_port=tcp://'+ self.addr() +':2000,rx_port=tcp://'+ self.ue.addr() +':2001,id=enb,base_srate='+ str(self.base_srate) + '"', '--expert.nof_phy_threads=1', '--expert.rrc_inactivity_timer=1500', '--enb.n_prb=' + str(self.nof_prb), @@ -161,8 +163,12 @@ values = dict(enb=config.get_defaults('srsenb')) config.overlay(values, self.suite_run.config()) - config.overlay(values, dict(enb={ 'run_addr': self.addr(), - 'mme_addr': self.epc.addr()})) + config.overlay(values, dict(enb=self._conf)) + config.overlay(values, dict(enb={ 'mme_addr': self.epc.addr() })) + + # We need to set some specific variables programatically here to match IP addresses: + if self._conf.get('rf_dev_type') == 'zmq': + config.overlay(values, dict(enb=dict(rf_dev_args='fail_on_disconnect=true,tx_port=tcp://'+ self.addr() +':2000,rx_port=tcp://'+ self.ue.addr() +':2001,id=enb,base_srate='+ str(self.base_srate)))) self.dbg('srsENB ' + filename + ':\n' + pprint.pformat(values)) diff --git a/src/osmo_gsm_tester/srs_ue.py b/src/osmo_gsm_tester/srs_ue.py index c68c726..4a99ad9 100644 --- a/src/osmo_gsm_tester/srs_ue.py +++ b/src/osmo_gsm_tester/srs_ue.py @@ -24,6 +24,9 @@ from .run_node import RunNode from .ms import MS +def rf_type_valid(rf_type_str): + return rf_type_str in ('zmq', 'UHD', 'soapy', 'bladeRF') + class srsUE(MS): REMOTE_DIR = '/osmo-gsm-tester-srsue' @@ -54,6 +57,8 @@ else: self.base_srate=23.04e6 self.remote_user = conf.get('remote_user', None) + if not rf_type_valid(conf.get('rf_dev_type', None)): + raise log.Error('Invalid rf_dev_type=%s' % conf.get('rf_dev_type', None)) def cleanup(self): if self.process is None: @@ -122,8 +127,6 @@ #'strace', '-ff', args = (remote_binary, self.remote_config_file, - '--rf.device_name=zmq', - '--rf.device_args="tx_port=tcp://'+ self.addr() +':2001,rx_port=tcp://'+ self.enb.addr() +':2000,id=ue,base_srate='+ str(self.base_srate) + '"', '--phy.nof_phy_threads=1', '--gw.netns=' + self.netns(), '--log.filename=' + 'stdout', #self.remote_log_file, @@ -157,8 +160,6 @@ util.setcap_netsys_admin(binary, self.run_dir.new_dir('setcap_netsys_admin')) args = (binary, os.path.abspath(self.config_file), - '--rf.device_name=zmq', - '--rf.device_args="tx_port=tcp://'+ self.addr() +':2001,rx_port=tcp://'+ self.enb.addr() +':2000,id=ue,base_srate='+ str(self.base_srate) + '"', '--phy.nof_phy_threads=1', '--gw.netns=' + self.netns(), '--log.filename=' + self.log_file, @@ -180,6 +181,10 @@ config.overlay(values, self.suite_run.config()) config.overlay(values, dict(ue=self._conf)) + # We need to set some specific variables programatically here to match IP addresses: + if self._conf.get('rf_dev_type') == 'zmq': + config.overlay(values, dict(ue=dict(rf_dev_args='tx_port=tcp://'+ self.addr() +':2001,rx_port=tcp://'+ self.enb.addr() +':2000,id=ue,base_srate='+ str(self.base_srate)))) + self.dbg('SRSUE CONFIG:\n' + pprint.pformat(values)) with open(self.config_file, 'w') as f: diff --git a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl index 0eba35b..2006832 100644 --- a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl +++ b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl @@ -26,8 +26,8 @@ mcc = ${enb.mcc} mnc = ${enb.mnc} mme_addr = ${enb.mme_addr} -gtp_bind_addr = ${enb.run_addr} -s1c_bind_addr = ${enb.run_addr} +gtp_bind_addr = ${enb.addr} +s1c_bind_addr = ${enb.addr} n_prb = 50 #tm = 4 #nof_ports = 2 @@ -70,7 +70,7 @@ tx_gain = 80 rx_gain = 40 -#device_name = auto +device_name = ${enb.rf_dev_type} # For best performance in 2x2 MIMO and >= 15 MHz use the following device_args settings: # USRP B210: num_recv_frames=64,num_send_frames=64 @@ -78,7 +78,7 @@ # For best performance when BW<5 MHz (25 PRB), use the following device_args settings: # USRP B210: send_frame_size=512,recv_frame_size=512 -#device_args = auto +device_args = ${enb.rf_dev_args} #time_adv_nsamples = auto #burst_preamble_us = auto diff --git a/src/osmo_gsm_tester/templates/srsue.conf.tmpl b/src/osmo_gsm_tester/templates/srsue.conf.tmpl index 5e5676d..eef5a7e 100644 --- a/src/osmo_gsm_tester/templates/srsue.conf.tmpl +++ b/src/osmo_gsm_tester/templates/srsue.conf.tmpl @@ -39,13 +39,15 @@ #nof_radios = 1 #nof_rx_ant = 1 +device_name = ${ue.rf_dev_type} + # For best performance in 2x2 MIMO and >= 15 MHz use the following device_args settings: # USRP B210: num_recv_frames=64,num_send_frames=64 # For best performance when BW<5 MHz (25 PRB), use the following device_args settings: # USRP B210: send_frame_size=512,recv_frame_size=512 -#device_args = auto +device_args = ${ue.rf_dev_args} #time_adv_nsamples = auto #burst_preamble_us = auto #continuous_tx = auto -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17237 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I7dbbe328f4c0225fe74e878bb2da13fe39ccf049 Gerrit-Change-Number: 17237 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 17:51:14 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 20 Feb 2020 17:51:14 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Update TODO list References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17238 ) Change subject: remsim: Update TODO list ...................................................................... remsim: Update TODO list Change-Id: I1c6b1c7c1ced88db56940d2cef78193a13a15af6 --- M remsim/RemsimClient_Tests.ttcn M remsim/RemsimServer_Tests.ttcn 2 files changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/38/17238/1 diff --git a/remsim/RemsimClient_Tests.ttcn b/remsim/RemsimClient_Tests.ttcn index e372faf..457e449 100644 --- a/remsim/RemsimClient_Tests.ttcn +++ b/remsim/RemsimClient_Tests.ttcn @@ -374,7 +374,6 @@ * send a configClientBankSlotReq and chagne the bank slot of an active client * test keepalive mechanism: do we get IPA PING? * test keepalive mechanism: do we see disconnect+reconnect if we don't respond to IPA PING? - * test actual APDU transfers * test messages in invalid state, e.g. APDUs before we're connected to a bank * test messages on server connection which are only permitted on bankd connection */ diff --git a/remsim/RemsimServer_Tests.ttcn b/remsim/RemsimServer_Tests.ttcn index f2dbc25..6179489 100644 --- a/remsim/RemsimServer_Tests.ttcn +++ b/remsim/RemsimServer_Tests.ttcn @@ -509,7 +509,6 @@ /* TODO - * - add slotmap, then connect matching client (see if slotmap is sent; check slotmap state) * - connect client w/slotmap; delete slotmap via REST (see if it is deleted) * - don't acknowledge delete from client, disconnect client (see if slotmap is deleted) * - delete non-existing slotmap via REST -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17238 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: I1c6b1c7c1ced88db56940d2cef78193a13a15af6 Gerrit-Change-Number: 17238 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 17:51:15 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 20 Feb 2020 17:51:15 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add TC_slotmap_del_nonexistant() References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17239 ) Change subject: remsim: Add TC_slotmap_del_nonexistant() ...................................................................... remsim: Add TC_slotmap_del_nonexistant() Let's test that deleting a non-existant slotmap from server renders HTTP status 404. Change-Id: Ib74fea146017ffc68b75ec175472842b689891c3 --- M remsim/RemsimServer_Tests.ttcn 1 file changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/39/17239/1 diff --git a/remsim/RemsimServer_Tests.ttcn b/remsim/RemsimServer_Tests.ttcn index 6179489..e154cc2 100644 --- a/remsim/RemsimServer_Tests.ttcn +++ b/remsim/RemsimServer_Tests.ttcn @@ -357,6 +357,16 @@ log(res); } +/* simple delete of a non-existant slotmap */ +testcase TC_slotmap_del_nonexistant() runs on test_CT { + f_rsres_init(); + + var JsSlotmap sm := valueof(ts_JsSlotmap(ts_BankSlot(11,12), ts_ClientSlot(13,14))); + var HTTPResponse res := f_rsres_delete_slotmap(sm.bank, exp_sts:=404); + log(res); +} + + /* simple delete of a 'UNACKNOWLEDGED' slotmap */ testcase TC_slotmap_del_unack() runs on test_CT { var ComponentIdentity rspro_id := valueof(ts_CompId(remsimBankd, testcasename())); @@ -511,7 +521,6 @@ /* TODO * - connect client w/slotmap; delete slotmap via REST (see if it is deleted) * - don't acknowledge delete from client, disconnect client (see if slotmap is deleted) - * - delete non-existing slotmap via REST * - create slotmap with integers out of range via REST * - connect from unknown client (name not known, no clientId provisioned? @@ -527,6 +536,7 @@ execute( TC_slotmap_add_conn_cl_b() ); execute( TC_conn_cl_b_slotmap_add() ); execute( TC_slotmap_del_new() ); + execute( TC_slotmap_del_nonexistant() ); execute( TC_slotmap_del_unack() ); execute( TC_slotmap_del_active() ); execute( TC_slotmap_del_active_client() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17239 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: Ib74fea146017ffc68b75ec175472842b689891c3 Gerrit-Change-Number: 17239 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 17:51:15 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 20 Feb 2020 17:51:15 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add RemsimServer_Tests.TC_slotmap_add_out_of_range() References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17240 ) Change subject: remsim: Add RemsimServer_Tests.TC_slotmap_add_out_of_range() ...................................................................... remsim: Add RemsimServer_Tests.TC_slotmap_add_out_of_range() Validate if osmo-remsim-server permits out-of-range integers in REST. Change-Id: I449541420a15826ed0d2f1460e3ca4b3468662c3 --- M remsim/RemsimServer_Tests.ttcn 1 file changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/40/17240/1 diff --git a/remsim/RemsimServer_Tests.ttcn b/remsim/RemsimServer_Tests.ttcn index e154cc2..bada70a 100644 --- a/remsim/RemsimServer_Tests.ttcn +++ b/remsim/RemsimServer_Tests.ttcn @@ -260,6 +260,31 @@ f_ensure_slotmap_exists_only(sm.client, sm.bank, NEW); } +/* test adding a single slotmap with out-of-range values */ +testcase TC_slotmap_add_out_of_range() runs on test_CT { + f_rsres_init(); + + var HTTPMessage http_resp; + var charstring body; + + body := "{ \"bank\": { \"bankId\": 10000, \"slotNr\": 2 }, \"client\": { \"clientId\": 3, \"slotNr\": 4 } }"; + http_resp := f_http_transact(url := "/api/backend/v1/slotmaps", method := "POST", + body := body, exp := tr_HTTP_Resp(400)); + + body := "{ \"bank\": { \"bankId\": 100, \"slotNr\": 2000 }, \"client\": { \"clientId\": 3, \"slotNr\": 4 } }"; + http_resp := f_http_transact(url := "/api/backend/v1/slotmaps", method := "POST", + body := body, exp := tr_HTTP_Resp(400)); + + body := "{ \"bank\": { \"bankId\": 100, \"slotNr\": 2 }, \"client\": { \"clientId\": 3000, \"slotNr\": 4 } }"; + http_resp := f_http_transact(url := "/api/backend/v1/slotmaps", method := "POST", + body := body, exp := tr_HTTP_Resp(400)); + + body := "{ \"bank\": { \"bankId\": 100, \"slotNr\": 2 }, \"client\": { \"clientId\": 3, \"slotNr\": 4000 } }"; + http_resp := f_http_transact(url := "/api/backend/v1/slotmaps", method := "POST", + body := body, exp := tr_HTTP_Resp(400)); +} + + /* test adding a slotmap and then connecting a client + bankd */ testcase TC_slotmap_add_conn_cl_b() runs on test_CT { /* Simulate one client */ @@ -521,7 +546,6 @@ /* TODO * - connect client w/slotmap; delete slotmap via REST (see if it is deleted) * - don't acknowledge delete from client, disconnect client (see if slotmap is deleted) - * - create slotmap with integers out of range via REST * - connect from unknown client (name not known, no clientId provisioned? * - add client name/ID mappings from REST API? @@ -534,6 +558,7 @@ execute( TC_connect_bank() ); execute( TC_slotmap_add() ); execute( TC_slotmap_add_conn_cl_b() ); + execute( TC_slotmap_add_out_of_range() ); execute( TC_conn_cl_b_slotmap_add() ); execute( TC_slotmap_del_new() ); execute( TC_slotmap_del_nonexistant() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17240 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: I449541420a15826ed0d2f1460e3ca4b3468662c3 Gerrit-Change-Number: 17240 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 20 17:53:48 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 20 Feb 2020 17:53:48 +0000 Subject: Change in osmo-remsim[master]: server: Don't accept out-of-range bank/client/slot numbers on REST References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17241 ) Change subject: server: Don't accept out-of-range bank/client/slot numbers on REST ...................................................................... server: Don't accept out-of-range bank/client/slot numbers on REST Change-Id: Id0c9dcda58d1f85df431a74bbfba06cfaa0af69d --- M src/server/rest_api.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/41/17241/1 diff --git a/src/server/rest_api.c b/src/server/rest_api.c index abd46b9..ff1b588 100644 --- a/src/server/rest_api.c +++ b/src/server/rest_api.c @@ -86,6 +86,8 @@ return -EINVAL; bslot->bank_id = json_integer_value(jbank_id); bslot->slot_nr = json_integer_value(jslot_nr); + if (bslot->bank_id > 1023 || bslot->slot_nr > 1023) + return -EINVAL; return 0; } @@ -110,6 +112,8 @@ return -EINVAL; cslot->client_id = json_integer_value(jclient_id); cslot->slot_nr = json_integer_value(jslot_nr); + if (cslot->client_id > 1023 || cslot->slot_nr > 1023) + return -EINVAL; return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Id0c9dcda58d1f85df431a74bbfba06cfaa0af69d Gerrit-Change-Number: 17241 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 16:55:29 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 16:55:29 +0000 Subject: Change in libosmocore[master]: Import 'neocon' terminal program from Openmoko References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17242 ) Change subject: Import 'neocon' terminal program from Openmoko ...................................................................... Import 'neocon' terminal program from Openmoko This imports the latest version of neocon from commit 504449a8c707fe9e93b670e024db3a315ce47a26 of https://github.com/laf0rge/neocon.git. neocon is a small and simple terminal program, similar to the venerable 'cu' that is part of (Taylor) UUCP for decades. The specialty of neocon is that it can deal with disappearing and re-appearing devices by simply re-opening them once they re-appear. This is e.g. happening on USB unplug/replug of a USB-serial adapter, or for example during reboot of virtual serial ports of cellular modems. We import this to libosmcoore as the program is too small to warrant separate git repo + packaging. In Osmocom we often deal with [virtual] serial ports of all kinds of devices, hence it is useful to have it around. The name 'neocon' is a reference to the Neo1937, the first open source Linux smartphone developed by Openmoko in 2007. neocon was created during Neo1973 development by Werner Almesberger. Change-Id: I4f4f0dae6774447eb370fc1488a4689b1d5d54f8 --- M debian/control M debian/copyright A debian/neocon.install M utils/Makefile.am A utils/neocon.c 5 files changed, 457 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/42/17242/1 diff --git a/debian/control b/debian/control index cdf26bb..03dfbde 100644 --- a/debian/control +++ b/debian/control @@ -359,3 +359,20 @@ were originally developed as part of the OpenBSC project, but which are of a more generic nature and thus useful to (at least) other programs that are developed in the sphere of Free Software / Open Source mobile communication. + +Package: neocon +Architecture: any +Section: utils +Depends: ${shlibs:Depends}, + ${misc:Depends} +Multi-Arch: same +Description: Simplistic serial terminal program supporting re-connect on hotplug + neocon is a small and simple terminal program, similar to the venerable 'cu' + that is part of (Taylor) UUCP for decades. The specialty of neocon is that it + can deal with disappearing and re-appearing devices by simply re-opening them + once they re-appear. This is e.g. happening on USB unplug/replug of a USB-serial + adapter, or for example during reboot of virtual serial ports of cellular modems. + . + The name 'neocon' is a reference to the Neo1937, the first open source Linux + smartphone developed by Openmoko in 2007. neocon was created during Neo1973 + development by Werner Almesberger. diff --git a/debian/copyright b/debian/copyright index b119569..378886a 100644 --- a/debian/copyright +++ b/debian/copyright @@ -35,6 +35,10 @@ 2014 Nils O. Sel?sdal License: GPL-2+ +Files: utils/neocon.c +Copyright: 2007-2008 by OpenMoko, Inc. +License: GPL-2+ + Files: src/gsm/gsm48_ie.c src/gsm/lapd_core.c src/gsm/lapdm.c diff --git a/debian/neocon.install b/debian/neocon.install new file mode 100644 index 0000000..57bc38e --- /dev/null +++ b/debian/neocon.install @@ -0,0 +1 @@ +usr/bin/neocon diff --git a/utils/Makefile.am b/utils/Makefile.am index 653b719..d3646b9 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -5,7 +5,9 @@ EXTRA_DIST = conv_gen.py conv_codes_gsm.py -bin_PROGRAMS = osmo-arfcn osmo-auc-gen osmo-config-merge +bin_PROGRAMS = neocon osmo-arfcn osmo-auc-gen osmo-config-merge + +neocon_SOURCES = neocon.c osmo_arfcn_SOURCES = osmo-arfcn.c diff --git a/utils/neocon.c b/utils/neocon.c new file mode 100644 index 0000000..3c2859b --- /dev/null +++ b/utils/neocon.c @@ -0,0 +1,432 @@ +/* + * neocon.c - An interface for changing tty devices + * + * Copyright (C) 2007, 2008 by OpenMoko, Inc. + * Written by Werner Almesberger + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define MAX_BUF 2048 + +static char *const *ttys; +static int num_ttys; +static int curr_tty = -1; /* start with first tty */ +static speed_t speed = B115200; +static struct termios console, tty; +static FILE *log = NULL; +static int timestamp = 0; +static char escape = '~'; + + +static struct bps { + speed_t speed; + int bps; +} bps_tab[] = { + { B300, 300 }, + { B1200, 1200 }, + { B2400, 2400 }, + { B9600, 9600 }, + { B19200, 19200 }, + { B38400, 38400 }, + { B57600, 57600 }, + { B115200, 115200 }, +#ifdef B230400 + { B230400, 230400 }, +#endif +#ifdef B460800 + { B460800, 460800 }, +#endif +#ifdef B500000 + { B500000, 500000 }, +#endif +#ifdef B576000 + { B576000, 576000 }, +#endif +#ifdef B921600 + { B921600, 921600 }, +#endif +#ifdef B1000000 + { B1000000, 1000000 }, +#endif +#ifdef B1152000 + { B1152000, 1152000 }, +#endif +#ifdef B1500000 + { B1500000, 1500000 }, +#endif +#ifdef B2000000 + { B2000000, 2000000 }, +#endif +#ifdef B2500000 + { B2500000, 2500000 }, +#endif +#ifdef B3000000 + { B3000000, 3000000 }, +#endif +#ifdef B3500000 + { B3500000, 3500000 }, +#endif +#ifdef B4000000 + { B4000000, 4000000 }, +#endif + { 0, 0 } +}; + + +static speed_t bps_to_speed(int bps) +{ + const struct bps *p; + + for (p = bps_tab; p->bps; p++) + if (p->bps == bps) + return p->speed; + fprintf(stderr, "no such speed: %d bps\n", bps); + exit(1); +} + + +static void make_raw(int fd, struct termios *old) +{ + struct termios t; + long flags; + + if (tcgetattr(fd, &t) < 0) { + perror("tcgetattr"); + exit(1); + } + if (old) + *old = t; + cfmakeraw(&t); + if (fd) { + t.c_iflag &= ~(IXON | IXOFF); + t.c_cflag |= CLOCAL; + t.c_cflag &= ~CRTSCTS; + if (cfsetispeed(&t, speed) < 0) { + perror("cfsetispeed"); + exit(1); + } + if (cfsetospeed(&t, speed) < 0) { + perror("cfsetospeed"); + exit(1); + } + } + if (tcsetattr(fd, TCSANOW, &t) < 0) { + perror("tcsetattr"); + exit(1); + } + flags = fcntl(fd,F_GETFL); + if (flags < 0) { + perror("fcntl F_GETFL"); + exit(1); + } + if (fcntl(fd,F_SETFL,flags & ~O_NONBLOCK) < 0) { + perror("fcntl F_GETFL"); + exit(1); + } +} + + +static int open_next_tty(void) +{ + int i, fd = -1; + + for (i = 0; i != num_ttys; i++) { + curr_tty = (curr_tty+1) % num_ttys; + fd = open(ttys[curr_tty], O_RDWR | O_NDELAY); + if (fd >= 0) + break; + } + if (fd >= 0) + make_raw(fd, &tty); + return fd; +} + + +/* + * Return 1 if the user manually forces a device change. + */ + + +static int scan(const char *s, size_t len) +{ + static int state = 0; + const char *p; + int res = 0; + + for (p = s; p != s+len; p++) + switch (state) { + case 0: + if (*p == escape) + state++; + else + state = 0; + break; + case 1: + if (*p == '.') + exit(0); + if (*p == 'n') + res = 1; + state = 0; + break; + } + return res; +} + + +static int write_log(const char *buf, ssize_t len) +{ + size_t wrote; + + wrote = fwrite(buf, 1, len, log); + if (wrote == len) + return 1; + fprintf(stderr, "write failed. closing log file.\n"); + fclose(log); + log = NULL; + return 0; +} + + +static int add_timestamp(void) +{ + struct timeval tv; + char buf[40]; /* be generous */ + int len; + + if (gettimeofday(&tv, NULL) < 0) { + perror("gettimeofday"); + exit(1); + } + len = sprintf(buf, "%lu.%06lu ", + (unsigned long) tv.tv_sec, (unsigned long) tv.tv_usec); + return write_log(buf, len); +} + + +static void do_log(const char *buf, ssize_t len) +{ + static int nl = 1; /* we're at the beginning of a new line */ + char tmp[MAX_BUF]; + const char *from; + char *to; + + assert(len <= MAX_BUF); + from = buf; + to = tmp; + while (from != buf+len) { + if (*from == '\r') { + from++; + continue; + } + if (nl && timestamp) + if (!add_timestamp()) + return; + nl = 0; + if (*from == '\n') { + *to++ = *from++; + if (!write_log(tmp, to-tmp)) + return; + to = tmp; + nl = 1; + continue; + } + *to++ = *from < ' ' || *from > '~' ? '#' : *from; + from++; + } + write_log(tmp, to-tmp); +} + + +static int copy(int in, int out, int from_user, int single) +{ + char buffer[MAX_BUF]; + ssize_t got, wrote, pos; + + got = read(in, buffer, single ? 1 : sizeof(buffer)); + if (got <= 0) + return 0; + if (from_user) { + if (scan(buffer, got)) + return 0; + } + else { + if (log) + do_log(buffer, got); + } + for (pos = 0; pos != got; pos += wrote) { + wrote = write(out, buffer+pos, got-pos); + if (wrote < 0) + return 0; + } + return 1; +} + + +static void write_string(const char *s) +{ + int len = strlen(s); + + while (len) { + ssize_t wrote; + + wrote = write(1, s, len); + if (wrote < 0) { + perror("write"); + exit(1); + } + s += wrote; + len -= wrote; + } +} + + +static void cleanup(void) +{ + if (tcsetattr(0, TCSANOW, &console) < 0) + perror("tcsetattr"); + write(1, "\n", 1); +} + + +static void usage(const char *name) +{ + fprintf(stderr, +"usage: %s [-b bps] [-e escape] [-l logfile [-a] [-T]] [-t delay_ms] tty ...\n\n" +" -a append to the log file if it already exists\n" +" -b bps set the TTY to the specified bit rate\n" +" -e escape set the escape character (default: ~)\n" +" -l logfile log all output to the specified file\n" +" -t delay_ms wait the specified amount of time between input characters\n" +" -T add timestamps to the log file\n" + , name); + exit(1); +} + + +int main(int argc, char *const *argv) +{ + char *end; + int c, bps; + int fd = -1; + int append = 0; + const char *logfile = NULL; + int throttle_us = 0; + int throttle = 0; + + while ((c = getopt(argc, argv, "ab:e:l:t:T")) != EOF) + switch (c) { + case 'a': + append = 1; + break; + case 'b': + bps = strtoul(optarg, &end, 0); + if (*end) + usage(*argv); + speed = bps_to_speed(bps); + break; + case 'e': + if (strlen(optarg) != 1) + usage(*argv); + escape = *optarg; + break; + case 'l': + logfile = optarg; + break; + case 't': + throttle_us = strtoul(optarg, &end, 0)*1000; + if (*end) + usage(*argv); + break; + case 'T': + timestamp = 1; + break; + default: + usage(*argv); + } + num_ttys = argc-optind; + ttys = argv+optind; + + if (logfile) { + log = fopen(logfile, append ? "a" : "w"); + if (!log) { + perror(logfile); + exit(1); + } + setlinebuf(log); + } + + make_raw(0, &console); + atexit(cleanup); + while (1) { + struct timeval tv; + fd_set set; + int res; + + if (fd < 0) { + fd = open_next_tty(); + if (fd > 0) { + char buf[1024]; /* enough :-) */ + + sprintf(buf, "\r\r[Open %s]\r\n", ttys[curr_tty]); + write_string(buf); + } + } + FD_ZERO(&set); + if (!throttle) + FD_SET(0, &set); + if (fd >= 0) + FD_SET(fd, &set); + tv.tv_sec = 0; + tv.tv_usec = throttle ? throttle_us : 100000; + res = select(fd < 0 ? 1 : fd+1, &set, NULL, NULL, &tv); + if (res < 0) { + perror("select"); + return 1; + } + if (!res) + throttle = 0; + if (FD_ISSET(0, &set)) { + if (throttle_us) + throttle = 1; + if (!copy(0, fd, 1, throttle_us != 0)) + goto failed; + } + if (fd >= 0 && FD_ISSET(fd, &set)) + if (!copy(fd, 1, 0, 0)) + goto failed; + continue; + +failed: + write_string("\r\n[Closed]\r\n"); + (void) close(fd); + fd = -1; + } + return 0; +} -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4f4f0dae6774447eb370fc1488a4689b1d5d54f8 Gerrit-Change-Number: 17242 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:07:55 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:07:55 +0000 Subject: Change in osmo-remsim[master]: server: Don't accept out-of-range bank/client/slot numbers on REST In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17241 ) Change subject: server: Don't accept out-of-range bank/client/slot numbers on REST ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Id0c9dcda58d1f85df431a74bbfba06cfaa0af69d Gerrit-Change-Number: 17241 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 21 Feb 2020 20:07:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:07:58 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:07:58 +0000 Subject: Change in osmo-remsim[master]: rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17184 ) Change subject: rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server ...................................................................... rspro_client_fsm: Add SRVC_E_DISCONNECT to disconnect from RSPRO server This is in preparation of other patches which will actually issue the SRVC_E_DISCONNET event towards this FSM. Related: OS#4399 Change-Id: I080f9e85987bbbe7aef84c32ce84b69d949ff561 --- M src/rspro_client_fsm.c M src/rspro_client_fsm.h 2 files changed, 22 insertions(+), 4 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/rspro_client_fsm.c b/src/rspro_client_fsm.c index d5cf04b..b006809 100644 --- a/src/rspro_client_fsm.c +++ b/src/rspro_client_fsm.c @@ -110,6 +110,7 @@ static const struct value_string server_conn_fsm_event_names[] = { OSMO_VALUE_STRING(SRVC_E_ESTABLISH), + OSMO_VALUE_STRING(SRVC_E_DISCONNECT), OSMO_VALUE_STRING(SRVC_E_TCP_UP), OSMO_VALUE_STRING(SRVC_E_TCP_DOWN), OSMO_VALUE_STRING(SRVC_E_KA_TIMEOUT), @@ -330,10 +331,26 @@ static void srvc_allstate_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct rspro_server_conn *srvc = (struct rspro_server_conn *) fi->priv; + switch (event) { case SRVC_E_ESTABLISH: osmo_fsm_inst_state_chg(fi, SRVC_ST_REESTABLISH, T2_RECONNECT, 2); break; + case SRVC_E_DISCONNECT: + if (srvc->keepalive_fi) { + ipa_keepalive_fsm_stop(srvc->keepalive_fi); + osmo_fsm_inst_term(srvc->keepalive_fi, OSMO_FSM_TERM_REGULAR, NULL); + srvc->keepalive_fi = NULL; + } + if (srvc->conn) { + LOGPFSML(fi, LOGL_INFO, "Destroying existing connection to server\n"); + ipa_client_conn_close(srvc->conn); + ipa_client_conn_destroy(srvc->conn); + srvc->conn = NULL; + } + osmo_fsm_inst_state_chg(fi, SRVC_ST_INIT, 0, 0); + break; default: OSMO_ASSERT(0); } @@ -370,20 +387,20 @@ [SRVC_ST_ESTABLISHED] = { .name = "ESTABLISHED", .in_event_mask = S(SRVC_E_TCP_DOWN) | S(SRVC_E_KA_TIMEOUT) | S(SRVC_E_CLIENT_CONN_RES), - .out_state_mask = S(SRVC_ST_CONNECTED) | S(SRVC_ST_REESTABLISH), + .out_state_mask = S(SRVC_ST_CONNECTED) | S(SRVC_ST_REESTABLISH) | S(SRVC_ST_INIT), .action = srvc_st_established, .onenter = srvc_st_established_onenter, }, [SRVC_ST_CONNECTED] = { .name = "CONNECTED", .in_event_mask = S(SRVC_E_TCP_DOWN) | S(SRVC_E_KA_TIMEOUT) | S(SRVC_E_RSPRO_TX), - .out_state_mask = S(SRVC_ST_REESTABLISH), + .out_state_mask = S(SRVC_ST_REESTABLISH) | S(SRVC_ST_INIT), .action = srvc_st_connected, }, [SRVC_ST_REESTABLISH] = { .name = "REESTABLISH", .in_event_mask = S(SRVC_E_TCP_UP) | S(SRVC_E_TCP_DOWN), - .out_state_mask = S(SRVC_ST_ESTABLISHED) | S(SRVC_ST_REESTABLISH), + .out_state_mask = S(SRVC_ST_ESTABLISHED) | S(SRVC_ST_REESTABLISH) | S(SRVC_ST_INIT), .action = srvc_st_reestablish, .onenter = srvc_st_reestablish_onenter, }, @@ -393,7 +410,7 @@ .name = "RSPRO_CLIENT", .states = server_conn_fsm_states, .num_states = ARRAY_SIZE(server_conn_fsm_states), - .allstate_event_mask = S(SRVC_E_ESTABLISH), + .allstate_event_mask = S(SRVC_E_ESTABLISH) | S(SRVC_E_DISCONNECT), .allstate_action = srvc_allstate_action, .timer_cb = server_conn_fsm_timer_cb, .log_subsys = DMAIN, diff --git a/src/rspro_client_fsm.h b/src/rspro_client_fsm.h index 2f3f7fc..c1ae764 100644 --- a/src/rspro_client_fsm.h +++ b/src/rspro_client_fsm.h @@ -8,6 +8,7 @@ enum server_conn_fsm_event { SRVC_E_ESTABLISH, /* instruct SRVC to (re)etablish TCP connection to bankd */ + SRVC_E_DISCONNECT, /* instruct SRVC to disconnect TCP connection to bankd */ SRVC_E_TCP_UP, SRVC_E_TCP_DOWN, SRVC_E_KA_TIMEOUT, -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17184 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I080f9e85987bbbe7aef84c32ce84b69d949ff561 Gerrit-Change-Number: 17184 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:07:58 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:07:58 +0000 Subject: Change in osmo-remsim[master]: client: Make ConfigClientBankReq with bankd_port == 0 trigger SRVC_E_... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17185 ) Change subject: client: Make ConfigClientBankReq with bankd_port == 0 trigger SRVC_E_DISCONNECT ...................................................................... client: Make ConfigClientBankReq with bankd_port == 0 trigger SRVC_E_DISCONNECT If the server sends us ConfigClientBankReq with bankd_port == 0, then this means that we shall disconnect from the bankd. Translate this to the SRVC_E_DISCONNECT event towards the RSPRO connection FSM. Change-Id: Idbfbfa0e84fa14dcb913b4dcbd943bc80ec175ac Related: OS#4399 --- M src/client/remsim_client.c M src/client/simtrace2-remsim_client.c 2 files changed, 12 insertions(+), 6 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/client/remsim_client.c b/src/client/remsim_client.c index 07ffbde..dd78c8e 100644 --- a/src/client/remsim_client.c +++ b/src/client/remsim_client.c @@ -83,8 +83,11 @@ rspro_IpAddr2str(&pdu->msg.choice.configClientBankReq.bankd.ip)); rspro2bank_slot(&bc->bankd_slot, &pdu->msg.choice.configClientBankReq.bankSlot); bc->bankd_conn.server_port = pdu->msg.choice.configClientBankReq.bankd.port; - /* instruct bankd FSM to connect */ - osmo_fsm_inst_dispatch(bc->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); + /* bankd port 0 is a magic value to indicate "no bankd" */ + if (bc->bankd_conn.server_port == 0) + osmo_fsm_inst_dispatch(bc->bankd_conn.fi, SRVC_E_DISCONNECT, NULL); + else + osmo_fsm_inst_dispatch(bc->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); /* send response to server */ resp = rspro_gen_ConfigClientBankRes(ResultCode_ok); server_conn_send_rspro(srvc, resp); diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c index bee8fc9..2929574 100644 --- a/src/client/simtrace2-remsim_client.c +++ b/src/client/simtrace2-remsim_client.c @@ -1,4 +1,4 @@ -/* (C) 2018-2019 by Harald Welte +/* (C) 2018-2020 by Harald Welte * (C) 2018 by sysmocom - s.f.m.c. GmbH, Author: Kevin Redon * * All Rights Reserved @@ -874,8 +874,11 @@ rspro_IpAddr2str(&pdu->msg.choice.configClientBankReq.bankd.ip)); rspro2bank_slot(&g_client->bankd_slot, &pdu->msg.choice.configClientBankReq.bankSlot); g_client->bankd_conn.server_port = pdu->msg.choice.configClientBankReq.bankd.port; - /* instruct bankd FSM to connect */ - osmo_fsm_inst_dispatch(g_client->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); + /* bankd port 0 is a magic value to indicate "no bankd" */ + if (g_client->bankd_conn.server_port == 0) + osmo_fsm_inst_dispatch(g_client->bankd_conn.fi, SRVC_E_DISCONNECT, NULL); + else + osmo_fsm_inst_dispatch(g_client->bankd_conn.fi, SRVC_E_ESTABLISH, NULL); /* send response to server */ resp = rspro_gen_ConfigClientBankRes(ResultCode_ok); server_conn_send_rspro(srvc, resp); @@ -901,7 +904,7 @@ static void print_welcome(void) { printf("simtrace2-remsim-client - Remote SIM card client for SIMtrace\n" - "(C) 2010-2019, Harald Welte \n" + "(C) 2010-2020, Harald Welte \n" "(C) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon \n\n"); } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17185 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Idbfbfa0e84fa14dcb913b4dcbd943bc80ec175ac Gerrit-Change-Number: 17185 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:07:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:07:59 +0000 Subject: Change in osmo-remsim[master]: client: user_shell.c: fflush() after writes to stdout In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17216 ) Change subject: client: user_shell.c: fflush() after writes to stdout ...................................................................... client: user_shell.c: fflush() after writes to stdout This is useful if we have external programs interfacing with stdin/stdout of osmo-remsim-client-shell. We don't want that output to hang in some buffer indefinitely, but rather have the lines flushed immediately. Change-Id: I6879f9f186ce87e0644b3d7868fc5ea031b82c62 --- M src/client/user_shell.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/client/user_shell.c b/src/client/user_shell.c index d5cad7b..11601d6 100644 --- a/src/client/user_shell.c +++ b/src/client/user_shell.c @@ -23,6 +23,7 @@ const struct TpduCardToModem *card2modem = &pdu->msg.choice.tpduCardToModem; printf("R-APDU: %s\n", osmo_hexdump(card2modem->data.buf, card2modem->data.size)); + fflush(stdout); return 0; } @@ -36,6 +37,7 @@ printf("SET_ATR: %s\n", osmo_hexdump(pdu->msg.choice.setAtrReq.atr.buf, pdu->msg.choice.setAtrReq.atr.size)); + fflush(stdout); resp = rspro_gen_SetAtrRes(ResultCode_ok); if (!resp) -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17216 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I6879f9f186ce87e0644b3d7868fc5ea031b82c62 Gerrit-Change-Number: 17216 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:08:00 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:08:00 +0000 Subject: Change in osmo-remsim[master]: client: user_shell.c: Don't echo stdin on stdout In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17217 ) Change subject: client: user_shell.c: Don't echo stdin on stdout ...................................................................... client: user_shell.c: Don't echo stdin on stdout This is a debug statement that shouldn't be in the code anymore Change-Id: I6601e06c843ee7c8d151011af072186bfc5d3efa --- M src/client/user_shell.c 1 file changed, 0 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/client/user_shell.c b/src/client/user_shell.c index 11601d6..abe1542 100644 --- a/src/client/user_shell.c +++ b/src/client/user_shell.c @@ -87,8 +87,6 @@ OSMO_ASSERT(ss->rx_msg); - printf("stdin: `%s'\n", cmd); - if (!strcasecmp(cmd, "RESET")) { /* reset the [remote] card */ pdu = rspro_gen_ClientSlotStatusInd(bc->srv_conn.clslot, &bslot, -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17217 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I6601e06c843ee7c8d151011af072186bfc5d3efa Gerrit-Change-Number: 17217 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:08:00 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:08:00 +0000 Subject: Change in osmo-remsim[master]: server: Don't accept out-of-range bank/client/slot numbers on REST In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17241 ) Change subject: server: Don't accept out-of-range bank/client/slot numbers on REST ...................................................................... server: Don't accept out-of-range bank/client/slot numbers on REST Change-Id: Id0c9dcda58d1f85df431a74bbfba06cfaa0af69d --- M src/server/rest_api.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/server/rest_api.c b/src/server/rest_api.c index abd46b9..ff1b588 100644 --- a/src/server/rest_api.c +++ b/src/server/rest_api.c @@ -86,6 +86,8 @@ return -EINVAL; bslot->bank_id = json_integer_value(jbank_id); bslot->slot_nr = json_integer_value(jslot_nr); + if (bslot->bank_id > 1023 || bslot->slot_nr > 1023) + return -EINVAL; return 0; } @@ -110,6 +112,8 @@ return -EINVAL; cslot->client_id = json_integer_value(jclient_id); cslot->slot_nr = json_integer_value(jslot_nr); + if (cslot->client_id > 1023 || cslot->slot_nr > 1023) + return -EINVAL; return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Id0c9dcda58d1f85df431a74bbfba06cfaa0af69d Gerrit-Change-Number: 17241 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:08:10 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:08:10 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Update TODO list In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17238 ) Change subject: remsim: Update TODO list ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17238 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: I1c6b1c7c1ced88db56940d2cef78193a13a15af6 Gerrit-Change-Number: 17238 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 21 Feb 2020 20:08:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:08:13 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:08:13 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add TC_slotmap_del_nonexistant() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17239 ) Change subject: remsim: Add TC_slotmap_del_nonexistant() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17239 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: Ib74fea146017ffc68b75ec175472842b689891c3 Gerrit-Change-Number: 17239 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 21 Feb 2020 20:08:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:08:18 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:08:18 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add RemsimServer_Tests.TC_slotmap_add_out_of_range() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17240 ) Change subject: remsim: Add RemsimServer_Tests.TC_slotmap_add_out_of_range() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17240 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: I449541420a15826ed0d2f1460e3ca4b3468662c3 Gerrit-Change-Number: 17240 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 21 Feb 2020 20:08:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:08:22 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:08:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Update TODO list In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17238 ) Change subject: remsim: Update TODO list ...................................................................... remsim: Update TODO list Change-Id: I1c6b1c7c1ced88db56940d2cef78193a13a15af6 --- M remsim/RemsimClient_Tests.ttcn M remsim/RemsimServer_Tests.ttcn 2 files changed, 0 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/remsim/RemsimClient_Tests.ttcn b/remsim/RemsimClient_Tests.ttcn index e372faf..457e449 100644 --- a/remsim/RemsimClient_Tests.ttcn +++ b/remsim/RemsimClient_Tests.ttcn @@ -374,7 +374,6 @@ * send a configClientBankSlotReq and chagne the bank slot of an active client * test keepalive mechanism: do we get IPA PING? * test keepalive mechanism: do we see disconnect+reconnect if we don't respond to IPA PING? - * test actual APDU transfers * test messages in invalid state, e.g. APDUs before we're connected to a bank * test messages on server connection which are only permitted on bankd connection */ diff --git a/remsim/RemsimServer_Tests.ttcn b/remsim/RemsimServer_Tests.ttcn index f2dbc25..6179489 100644 --- a/remsim/RemsimServer_Tests.ttcn +++ b/remsim/RemsimServer_Tests.ttcn @@ -509,7 +509,6 @@ /* TODO - * - add slotmap, then connect matching client (see if slotmap is sent; check slotmap state) * - connect client w/slotmap; delete slotmap via REST (see if it is deleted) * - don't acknowledge delete from client, disconnect client (see if slotmap is deleted) * - delete non-existing slotmap via REST -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17238 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: I1c6b1c7c1ced88db56940d2cef78193a13a15af6 Gerrit-Change-Number: 17238 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:08:22 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:08:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add TC_slotmap_del_nonexistant() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17239 ) Change subject: remsim: Add TC_slotmap_del_nonexistant() ...................................................................... remsim: Add TC_slotmap_del_nonexistant() Let's test that deleting a non-existant slotmap from server renders HTTP status 404. Change-Id: Ib74fea146017ffc68b75ec175472842b689891c3 --- M remsim/RemsimServer_Tests.ttcn 1 file changed, 11 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/remsim/RemsimServer_Tests.ttcn b/remsim/RemsimServer_Tests.ttcn index 6179489..e154cc2 100644 --- a/remsim/RemsimServer_Tests.ttcn +++ b/remsim/RemsimServer_Tests.ttcn @@ -357,6 +357,16 @@ log(res); } +/* simple delete of a non-existant slotmap */ +testcase TC_slotmap_del_nonexistant() runs on test_CT { + f_rsres_init(); + + var JsSlotmap sm := valueof(ts_JsSlotmap(ts_BankSlot(11,12), ts_ClientSlot(13,14))); + var HTTPResponse res := f_rsres_delete_slotmap(sm.bank, exp_sts:=404); + log(res); +} + + /* simple delete of a 'UNACKNOWLEDGED' slotmap */ testcase TC_slotmap_del_unack() runs on test_CT { var ComponentIdentity rspro_id := valueof(ts_CompId(remsimBankd, testcasename())); @@ -511,7 +521,6 @@ /* TODO * - connect client w/slotmap; delete slotmap via REST (see if it is deleted) * - don't acknowledge delete from client, disconnect client (see if slotmap is deleted) - * - delete non-existing slotmap via REST * - create slotmap with integers out of range via REST * - connect from unknown client (name not known, no clientId provisioned? @@ -527,6 +536,7 @@ execute( TC_slotmap_add_conn_cl_b() ); execute( TC_conn_cl_b_slotmap_add() ); execute( TC_slotmap_del_new() ); + execute( TC_slotmap_del_nonexistant() ); execute( TC_slotmap_del_unack() ); execute( TC_slotmap_del_active() ); execute( TC_slotmap_del_active_client() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17239 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: Ib74fea146017ffc68b75ec175472842b689891c3 Gerrit-Change-Number: 17239 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:08:22 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:08:22 +0000 Subject: Change in osmo-ttcn3-hacks[master]: remsim: Add RemsimServer_Tests.TC_slotmap_add_out_of_range() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17240 ) Change subject: remsim: Add RemsimServer_Tests.TC_slotmap_add_out_of_range() ...................................................................... remsim: Add RemsimServer_Tests.TC_slotmap_add_out_of_range() Validate if osmo-remsim-server permits out-of-range integers in REST. Change-Id: I449541420a15826ed0d2f1460e3ca4b3468662c3 --- M remsim/RemsimServer_Tests.ttcn 1 file changed, 26 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/remsim/RemsimServer_Tests.ttcn b/remsim/RemsimServer_Tests.ttcn index e154cc2..bada70a 100644 --- a/remsim/RemsimServer_Tests.ttcn +++ b/remsim/RemsimServer_Tests.ttcn @@ -260,6 +260,31 @@ f_ensure_slotmap_exists_only(sm.client, sm.bank, NEW); } +/* test adding a single slotmap with out-of-range values */ +testcase TC_slotmap_add_out_of_range() runs on test_CT { + f_rsres_init(); + + var HTTPMessage http_resp; + var charstring body; + + body := "{ \"bank\": { \"bankId\": 10000, \"slotNr\": 2 }, \"client\": { \"clientId\": 3, \"slotNr\": 4 } }"; + http_resp := f_http_transact(url := "/api/backend/v1/slotmaps", method := "POST", + body := body, exp := tr_HTTP_Resp(400)); + + body := "{ \"bank\": { \"bankId\": 100, \"slotNr\": 2000 }, \"client\": { \"clientId\": 3, \"slotNr\": 4 } }"; + http_resp := f_http_transact(url := "/api/backend/v1/slotmaps", method := "POST", + body := body, exp := tr_HTTP_Resp(400)); + + body := "{ \"bank\": { \"bankId\": 100, \"slotNr\": 2 }, \"client\": { \"clientId\": 3000, \"slotNr\": 4 } }"; + http_resp := f_http_transact(url := "/api/backend/v1/slotmaps", method := "POST", + body := body, exp := tr_HTTP_Resp(400)); + + body := "{ \"bank\": { \"bankId\": 100, \"slotNr\": 2 }, \"client\": { \"clientId\": 3, \"slotNr\": 4000 } }"; + http_resp := f_http_transact(url := "/api/backend/v1/slotmaps", method := "POST", + body := body, exp := tr_HTTP_Resp(400)); +} + + /* test adding a slotmap and then connecting a client + bankd */ testcase TC_slotmap_add_conn_cl_b() runs on test_CT { /* Simulate one client */ @@ -521,7 +546,6 @@ /* TODO * - connect client w/slotmap; delete slotmap via REST (see if it is deleted) * - don't acknowledge delete from client, disconnect client (see if slotmap is deleted) - * - create slotmap with integers out of range via REST * - connect from unknown client (name not known, no clientId provisioned? * - add client name/ID mappings from REST API? @@ -534,6 +558,7 @@ execute( TC_connect_bank() ); execute( TC_slotmap_add() ); execute( TC_slotmap_add_conn_cl_b() ); + execute( TC_slotmap_add_out_of_range() ); execute( TC_conn_cl_b_slotmap_add() ); execute( TC_slotmap_del_new() ); execute( TC_slotmap_del_nonexistant() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17240 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: I449541420a15826ed0d2f1460e3ca4b3468662c3 Gerrit-Change-Number: 17240 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:08:39 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:08:39 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: add some tags to tasks In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17198 ) Change subject: ansible: gsm-tester: add some tags to tasks ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1fe26d519d4d63d4bef33c1db2abf98a40913f98 Gerrit-Change-Number: 17198 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 21 Feb 2020 20:08:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:08:42 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:08:42 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Allow install srs related packages in Ubuntu In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17199 ) Change subject: ansible: gsm-tester: Allow install srs related packages in Ubuntu ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3fdf2f4f390d27c53f073b38c1716da07f933b6d Gerrit-Change-Number: 17199 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 21 Feb 2020 20:08:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:08:44 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:08:44 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Install patchelf's build dep autoconf In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17200 ) Change subject: ansible: gsm-tester: Install patchelf's build dep autoconf ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibe0e9b10d87c3630e2f12c9c32196e26213530ca Gerrit-Change-Number: 17200 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 21 Feb 2020 20:08:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:08:48 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:08:48 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Create remote rundir directories In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17204 ) Change subject: ansible: gsm-tester: Create remote rundir directories ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I802bdcc79e7787052364f6518e868d741cb040ac Gerrit-Change-Number: 17204 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 21 Feb 2020 20:08:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:09:07 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:09:07 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: add jenkins user to osmo-gsm-tester group on slaves In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17235 ) Change subject: ansible: gsm-tester: add jenkins user to osmo-gsm-tester group on slaves ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Id5a06c19a4341311a86b87e3e9ac23d3656909b9 Gerrit-Change-Number: 17235 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 21 Feb 2020 20:09:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:09:11 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:09:11 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: add some tags to tasks In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17198 ) Change subject: ansible: gsm-tester: add some tags to tasks ...................................................................... ansible: gsm-tester: add some tags to tasks Change-Id: I1fe26d519d4d63d4bef33c1db2abf98a40913f98 --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 88 insertions(+), 9 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 9f3fd25..1492305 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -35,6 +35,8 @@ - libasound2-dev - liblua5.3-dev - lua-socket + tags: + - osmocom # mdbus2 is not available in debian10. TODO: compile it for >9 - name: install mdbus2 @@ -43,6 +45,9 @@ with_items: - mdbus2 when: ansible_distribution == 'Debian' and ansible_distribution_version <= '9' + tags: + - ofono + - modem - name: install srsLTE runtime dependencies apt: @@ -59,21 +64,31 @@ - libczmq-dev - libsoapysdr-dev - soapysdr0.7-module-lms7 + tags: + - srs - name: install ofono build dependencies apt: name: ofono state: build-dep + tags: + - ofono + - modem - name: install libqmi-glib a dependency of sysmocom ofono apt: name: libqmi-glib-dev + tags: + - ofono + - modem - name: install uhub dependencies apt: name: "{{ item }}" with_items: - libusb-1.0-0-dev + tags: + - modem - name: setup uhubctl repository git: @@ -82,6 +97,8 @@ version: master clone: yes update: no + tags: + - modem - name: build uhubctl shell: | @@ -90,6 +107,8 @@ args: chdir: /root/uhubctl creates: /usr/sbin/uhubctl + tags: + - modem # TODO: move this into restart-modems.d directory - name: copy quad_modem_power_cycle.sh @@ -98,7 +117,7 @@ dest: /usr/local/bin/quad_modem_power_cycle.sh mode: 0755 tags: - - ofono + - modem - name: setup ofono repository git: @@ -109,6 +128,7 @@ update: no tags: - ofono + - modem - name: build ofono shell: | @@ -122,6 +142,7 @@ creates: /usr/local/sbin/ofonod tags: - ofono + - modem - name: ensure ofono is started service: @@ -130,6 +151,7 @@ enabled: yes tags: - ofono + - modem # patchelf 0.9 available in debian has bugs with certain binaries. Version 0.10 # fails on other binaries, so we need both 0.9 and 0.10 versions installed. @@ -142,6 +164,7 @@ update: no tags: - patchelf + - osmo-gsm-tester-proc - name: build patchelf v0.10 shell: | @@ -155,13 +178,12 @@ creates: /opt/bin/patchelf-v0.10 tags: - patchelf + - osmo-gsm-tester-proc -- name: install gsm tester dependencies +- name: install gsm tester dependencies (main) apt: name: "{{ item }}" with_items: - - dbus - - tcpdump - sqlite3 - python3 - python3-setuptools @@ -170,11 +192,23 @@ - python3-gi - ofono - patchelf - - sudo - libcap2-bin - python3-pip - udhcpc + tags: + - osmo-gsm-tester-main + +- name: install gsm tester dependencies (proc) + apt: + name: "{{ item }}" + with_items: + - tcpdump + - patchelf + - libcap2-bin - iperf3 + - sudo + tags: + - osmo-gsm-tester-proc - name: install gsm tester pip dependencies pip: @@ -186,11 +220,16 @@ - pydbus - pyusb - pysispm - tags: [pip] + tags: + - pip + - osmo-gsm-tester-main - name: create group osmo-gsm-tester group: name: osmo-gsm-tester + tags: + - osmo-gsm-tester-main + - osmo-gsm-tester-proc - name: add jenkins to osmo-gsm-tester and systemd-journal user: @@ -202,6 +241,8 @@ - systemd-journal - osmo-gsm-tester - dialout + tags: + - osmo-gsm-tester-main - name: setup state directory file: @@ -209,10 +250,14 @@ state: directory group: osmo-gsm-tester mode: g+rwxs + tags: + - osmo-gsm-tester-main - name: install acl apt: name: acl + tags: + - osmo-gsm-tester-main # Ensure the group always has access to all files - name: add acl to state directory @@ -223,6 +268,8 @@ entity: osmo-gsm-tester default: yes permissions: rwx + tags: + - osmo-gsm-tester-main - name: create trials directory file: @@ -230,39 +277,57 @@ state: directory group: osmo-gsm-tester mode: g+rwxs + tags: + - osmo-gsm-tester-main - name: allow osmo-gsm-tester to access ofono copy: src: dbus_osmo-gsm-tester.conf dest: /etc/dbus-1/system.d/osmo-gsm-tester.conf + tags: + - ofono + - modem - name: ensure tcpdump can be called by osmo-gsm-tester file: path: /usr/sbin/tcpdump group: osmo-gsm-tester mode: 0750 + tags: + - osmo-gsm-tester-proc + - tcpdump - name: create a symlink for tcpdump file: src: /usr/sbin/tcpdump dest: /usr/local/bin/tcpdump state: link + tags: + - osmo-gsm-tester-proc + - tcpdump - name: add correct capabilities to tcpdump capabilities: path: /usr/sbin/tcpdump capability: cap_net_raw,cap_net_admin=eip state: present + tags: + - osmo-gsm-tester-proc + - tcpdump - name: allow core files for the group osmo-gsm-tester copy: content: "@osmo-gsm-tester - core unlimited" dest: /etc/security/limits.d/osmo-gsm-tester_allowcore.conf + tags: + - osmo-gsm-tester-proc - name: allow rt priority for the group osmo-gsm-tester copy: content: "@osmo-gsm-tester - rtprio 99" dest: /etc/security/limits.d/osmo-gsm-tester_rtprio.conf + tags: + - osmo-gsm-tester-proc - name: setup osmo-gsm-tester repository git: @@ -272,7 +337,7 @@ clone: yes update: no tags: - - osmo-gsm-tester + - osmo-gsm-tester-proc - name: Install osmo-gsm-tester script helpers to /usr/local/bin (PATH) shell: | @@ -281,7 +346,7 @@ args: chdir: /root/osmo-gsm-tester tags: - - osmo-gsm-tester + - osmo-gsm-tester-proc - name: Install osmo-gsm-tester sudoers.d files to /etc/sudoers.d/ (PATH) shell: | @@ -290,37 +355,51 @@ args: chdir: /root/osmo-gsm-tester tags: - - osmo-gsm-tester + - osmo-gsm-tester-proc - name: logrotate limit filesizes to 10M copy: content: "maxsize 10M" dest: /etc/logrotate.d/maxsize + tags: + - osmo-gsm-tester-main - name: install sispmctl (usb power socket) apt: name: sispmctl + tags: + - sispm - name: allow group osmo-gsm-tester to access sispm devices copy: src: 60-sispmctl.rules dest: /etc/udev/rules.d/ notify: restart udev + tags: + - sispm - name: allow group osmo-gsm-tester to access LMS devices copy: src: 64-limesuite.rules dest: /etc/udev/rules.d/ notify: restart udev + tags: + - lms - name: use persistent naming for modem network interfaces copy: src: 70-net-setup-link-modems.rules dest: /etc/udev/rules.d/ notify: restart udev + tags: + - modem - name: avoid dhcpcd managing modem interfaces and racing with udev rename lineinfile: path: /etc/dhcpcd.conf regexp: '^denyinterfaces' line: 'denyinterfaces ww* r*' + tags: + tags: + - osmo-gsm-tester-main + - dhcpcd -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17198 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I1fe26d519d4d63d4bef33c1db2abf98a40913f98 Gerrit-Change-Number: 17198 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:09:12 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:09:12 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Allow install srs related packages in Ubuntu In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17199 ) Change subject: ansible: gsm-tester: Allow install srs related packages in Ubuntu ...................................................................... ansible: gsm-tester: Allow install srs related packages in Ubuntu Change-Id: I3fdf2f4f390d27c53f073b38c1716da07f933b6d --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 18 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 1492305..97ce7e2 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -49,7 +49,7 @@ - ofono - modem -- name: install srsLTE runtime dependencies +- name: install srsLTE build-only dependencies apt: name: "{{ item }}" with_items: @@ -63,7 +63,24 @@ - libuhd-dev - libczmq-dev - libsoapysdr-dev + tags: + - srs + +- name: install srsLTE runtime extra dependencies (Debian) + apt: + name: "{{ item }}" + with_items: - soapysdr0.7-module-lms7 + when: ansible_distribution == 'Debian' + tags: + - srs + +- name: install srsLTE runtime extra dependencies (Ubuntu) + apt: + name: "{{ item }}" + with_items: + - soapysdr0.6-module-lms7 + when: ansible_distribution == 'Ubuntu' tags: - srs -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3fdf2f4f390d27c53f073b38c1716da07f933b6d Gerrit-Change-Number: 17199 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:09:12 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:09:12 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Install patchelf's build dep autoconf In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17200 ) Change subject: ansible: gsm-tester: Install patchelf's build dep autoconf ...................................................................... ansible: gsm-tester: Install patchelf's build dep autoconf Change-Id: Ibe0e9b10d87c3630e2f12c9c32196e26213530ca --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index 97ce7e2..ecdd254 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -170,6 +170,15 @@ - ofono - modem +- name: install patchelf build dependencies + apt: + name: "{{ item }}" + with_items: + - autoconf + tags: + - patchelf + - osmo-gsm-tester-proc + # patchelf 0.9 available in debian has bugs with certain binaries. Version 0.10 # fails on other binaries, so we need both 0.9 and 0.10 versions installed. - name: setup patchelf v0.10 repository -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17200 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ibe0e9b10d87c3630e2f12c9c32196e26213530ca Gerrit-Change-Number: 17200 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:09:12 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:09:12 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Use file module instead of manual mkdir In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17201 ) Change subject: ansible: gsm-tester: Use file module instead of manual mkdir ...................................................................... ansible: gsm-tester: Use file module instead of manual mkdir >From ansible: [WARNING]: Consider using the file module with state=directory rather than running 'mkdir'. Change-Id: I2c541878033360a9d427d13b62c1cc075d5f92b7 --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index ecdd254..db2a16c 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -365,18 +365,22 @@ tags: - osmo-gsm-tester-proc +- name: Install osmo-gsm-tester script helpers to /usr/local/bin (PATH) (mkdir) + file: path=/usr/local/bin state=directory + - name: Install osmo-gsm-tester script helpers to /usr/local/bin (PATH) shell: | - mkdir -p /usr/local/bin/ && \ cp utils/bin/*.sh /usr/local/bin/ args: chdir: /root/osmo-gsm-tester tags: - osmo-gsm-tester-proc +- name: Install osmo-gsm-tester sudoers.d files to /etc/sudoers.d/ (PATH (mkdir) + file: path=/etc/sudoers.d/ state=directory + - name: Install osmo-gsm-tester sudoers.d files to /etc/sudoers.d/ (PATH) shell: | - mkdir -p /etc/sudoers.d/ && \ cp utils/sudoers.d/* /etc/sudoers.d/ args: chdir: /root/osmo-gsm-tester -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I2c541878033360a9d427d13b62c1cc075d5f92b7 Gerrit-Change-Number: 17201 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 20:09:12 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 20:09:12 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: Create remote rundir directories In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17204 ) Change subject: ansible: gsm-tester: Create remote rundir directories ...................................................................... ansible: gsm-tester: Create remote rundir directories These directories are needed by osmo-gsm-tester to copy in some binaries and helper files required in the remote run node. Change-Id: I802bdcc79e7787052364f6518e868d741cb040ac --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 16 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index db2a16c..eff4939 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -424,6 +424,22 @@ tags: - modem +- name: create remote rundir directories + file: + path: "/osmo-gsm-tester-{{ item }}" + state: directory + group: osmo-gsm-tester + mode: g+rwxs + with_items: + - srsenb + - srsepc + - srsue + - trx + tags: + - osmo-gsm-tester-proc + - osmocom + - srs + - name: avoid dhcpcd managing modem interfaces and racing with udev rename lineinfile: path: /etc/dhcpcd.conf -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17204 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I802bdcc79e7787052364f6518e868d741cb040ac Gerrit-Change-Number: 17204 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 21:11:56 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 21 Feb 2020 21:11:56 +0000 Subject: Change in osmo-remsim[master]: client: Work around "stock on PTS" problem References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17243 ) Change subject: client: Work around "stock on PTS" problem ...................................................................... client: Work around "stock on PTS" problem I can occasionally see osmo-remsim-client-st2 get stuck when the Modem (in this case a Quectel EC20) is performing PTS with the card. In the log of osmo-remsim-client-st2 I can see: SIMtrace => PTS req: ff 10 94 7b 00 00 SIMtrace -> 01 07 00 00 00 00 15 00 04 ff 10 94 7b 00 00 ff 10 94 7b SIMtrace => PTS req: ff 10 94 7b 00 00 SIMtrace IRQ 01 04 00 00 00 00 15 00 13 00 00 00 00 00 09 04 0a 80 25 00 00 after which the communication doesn't proceed. After a long time, the modem seems to retry without PTS and then proceeds with normal SIM card communication. Interestingly, both the firmware and a usbmon trace agree that the first APDU header after the PTS is actually sent in an USB IN transfer: -I- 0: computed Fi(1) Di(1) ratio: 372 -I- 0: computed Fi(9) Di(4) ratio: 64 -I- 0: send_tpdu_header: 00 a4 00 04 02 -I- 0: flush_rx_buffer (5) usbmon shows 010600000000130001000000050000a4000402 It's unclear why the host program doesn't get the data from the IN transfer. However, if multiple asynchronous IN EP URB are submited, the problem can be reproducibly avoided. Let's do that. Change-Id: I2fa5f71869b124b73e0c312befce1ca268e9a9a2 Closes: OS#4409 --- M src/client/simtrace2-remsim_client.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/43/17243/1 diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c index 2929574..e495f10 100644 --- a/src/client/simtrace2-remsim_client.c +++ b/src/client/simtrace2-remsim_client.c @@ -1062,7 +1062,7 @@ { struct st_transport *transp = ci->slot->transp; struct usb_interface_match _ifm, *ifm = &_ifm; - int rc; + int rc, i; ifm->vendor = cfg->usb.vendor_id; ifm->product = cfg->usb.product_id; @@ -1163,7 +1163,9 @@ printf("Entering main loop\n"); allocate_and_submit_irq(ci); - allocate_and_submit_in(ci); + /* submit multiple IN URB in order to work around OS#4409 */ + for (i = 0; i < 4; i++) + allocate_and_submit_in(ci); while (!g_leave_main) { osmo_select_main(false); -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I2fa5f71869b124b73e0c312befce1ca268e9a9a2 Gerrit-Change-Number: 17243 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 21:54:41 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 21 Feb 2020 21:54:41 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: add jenkins user to osmo-gsm-tester group on slaves In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17235 ) Change subject: ansible: gsm-tester: add jenkins user to osmo-gsm-tester group on slaves ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Id5a06c19a4341311a86b87e3e9ac23d3656909b9 Gerrit-Change-Number: 17235 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 21 Feb 2020 21:54:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 21 21:54:48 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 21 Feb 2020 21:54:48 +0000 Subject: Change in osmo-ci[master]: ansible: gsm-tester: add jenkins user to osmo-gsm-tester group on slaves In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17235 ) Change subject: ansible: gsm-tester: add jenkins user to osmo-gsm-tester group on slaves ...................................................................... ansible: gsm-tester: add jenkins user to osmo-gsm-tester group on slaves Change-Id: Id5a06c19a4341311a86b87e3e9ac23d3656909b9 --- M ansible/roles/gsm-tester/tasks/main.yml 1 file changed, 14 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Verified diff --git a/ansible/roles/gsm-tester/tasks/main.yml b/ansible/roles/gsm-tester/tasks/main.yml index eff4939..fc3def9 100644 --- a/ansible/roles/gsm-tester/tasks/main.yml +++ b/ansible/roles/gsm-tester/tasks/main.yml @@ -257,15 +257,26 @@ - osmo-gsm-tester-main - osmo-gsm-tester-proc -- name: add jenkins to osmo-gsm-tester and systemd-journal +- name: Add jenkins user to osmo-gsm-tester group user: - name: jenkins + name: "{{ jenkins_user }}" + groups: "{{ item }}" + append: yes + shell: /bin/bash + with_items: + - osmo-gsm-tester + tags: + - osmo-gsm-tester-main + - osmo-gsm-tester-proc + +- name: add jenkins user to systemd-journal and dialout groups + user: + name: "{{ jenkins_user }}" groups: "{{ item }}" append: yes shell: /bin/bash with_items: - systemd-journal - - osmo-gsm-tester - dialout tags: - osmo-gsm-tester-main -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Id5a06c19a4341311a86b87e3e9ac23d3656909b9 Gerrit-Change-Number: 17235 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 19:37:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 19:37:59 +0000 Subject: Change in osmo-remsim[master]: client: Work around "stock on PTS" problem In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17243 ) Change subject: client: Work around "stock on PTS" problem ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I2fa5f71869b124b73e0c312befce1ca268e9a9a2 Gerrit-Change-Number: 17243 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 22 Feb 2020 19:37:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 19:38:19 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 19:38:19 +0000 Subject: Change in osmo-remsim[master]: client: Work around "stock on PTS" problem In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17243 ) Change subject: client: Work around "stock on PTS" problem ...................................................................... client: Work around "stock on PTS" problem I can occasionally see osmo-remsim-client-st2 get stuck when the Modem (in this case a Quectel EC20) is performing PTS with the card. In the log of osmo-remsim-client-st2 I can see: SIMtrace => PTS req: ff 10 94 7b 00 00 SIMtrace -> 01 07 00 00 00 00 15 00 04 ff 10 94 7b 00 00 ff 10 94 7b SIMtrace => PTS req: ff 10 94 7b 00 00 SIMtrace IRQ 01 04 00 00 00 00 15 00 13 00 00 00 00 00 09 04 0a 80 25 00 00 after which the communication doesn't proceed. After a long time, the modem seems to retry without PTS and then proceeds with normal SIM card communication. Interestingly, both the firmware and a usbmon trace agree that the first APDU header after the PTS is actually sent in an USB IN transfer: -I- 0: computed Fi(1) Di(1) ratio: 372 -I- 0: computed Fi(9) Di(4) ratio: 64 -I- 0: send_tpdu_header: 00 a4 00 04 02 -I- 0: flush_rx_buffer (5) usbmon shows 010600000000130001000000050000a4000402 It's unclear why the host program doesn't get the data from the IN transfer. However, if multiple asynchronous IN EP URB are submited, the problem can be reproducibly avoided. Let's do that. Change-Id: I2fa5f71869b124b73e0c312befce1ca268e9a9a2 Closes: OS#4409 --- M src/client/simtrace2-remsim_client.c 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/client/simtrace2-remsim_client.c b/src/client/simtrace2-remsim_client.c index 2929574..e495f10 100644 --- a/src/client/simtrace2-remsim_client.c +++ b/src/client/simtrace2-remsim_client.c @@ -1062,7 +1062,7 @@ { struct st_transport *transp = ci->slot->transp; struct usb_interface_match _ifm, *ifm = &_ifm; - int rc; + int rc, i; ifm->vendor = cfg->usb.vendor_id; ifm->product = cfg->usb.product_id; @@ -1163,7 +1163,9 @@ printf("Entering main loop\n"); allocate_and_submit_irq(ci); - allocate_and_submit_in(ci); + /* submit multiple IN URB in order to work around OS#4409 */ + for (i = 0; i < 4; i++) + allocate_and_submit_in(ci); while (!g_leave_main) { osmo_select_main(false); -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I2fa5f71869b124b73e0c312befce1ca268e9a9a2 Gerrit-Change-Number: 17243 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 19:38:38 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 19:38:38 +0000 Subject: Change in osmo-trx[master]: contrib/jenkins.sh: Reorder sanity checks In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17223 ) Change subject: contrib/jenkins.sh: Reorder sanity checks ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Idfe12148aa7a8030bdaf56d11c1547ebc3f56d14 Gerrit-Change-Number: 17223 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 22 Feb 2020 19:38:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 19:39:05 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 19:39:05 +0000 Subject: Change in osmo-trx[master]: debug.h: Avoid printing pthread_t type In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17226 ) Change subject: debug.h: Avoid printing pthread_t type ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I40265fd4c62e550014ba3ff3335ca053c5bc01f2 Gerrit-Change-Number: 17226 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 22 Feb 2020 19:39:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 19:39:13 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 19:39:13 +0000 Subject: Change in osmo-trx[master]: debug.h: Fix print format of chan in CLOGCHAN In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17227 ) Change subject: debug.h: Fix print format of chan in CLOGCHAN ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17227 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I7f6ded5a984570b5267916d6c84eb7d019db73a8 Gerrit-Change-Number: 17227 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sat, 22 Feb 2020 19:39:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 19:39:15 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 19:39:15 +0000 Subject: Change in osmo-trx[master]: contrib/jenkins.sh: Reorder sanity checks In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17223 ) Change subject: contrib/jenkins.sh: Reorder sanity checks ...................................................................... contrib/jenkins.sh: Reorder sanity checks Change-Id: Idfe12148aa7a8030bdaf56d11c1547ebc3f56d14 --- M contrib/jenkins.sh 1 file changed, 14 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 84e4ea7..df444ca 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -23,15 +23,8 @@ mychroot_nocwd -w / "$@" } -base="$PWD" -deps="$base/deps" -inst="$deps/install" -export deps inst - if [ -z "${INSIDE_CHROOT}" ]; then - osmo-clean-workspace.sh - # Only use ARM chroot if host is not ARM and the target is ARM: if ! $(substr "arm" "$(uname -m)") && [ "x${INSTR}" = "x--with-neon" -o "x${INSTR}" = "x--with-neon-vfpv4" ]; then @@ -69,6 +62,20 @@ fi fi +set -ex + +if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then + echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" + exit 2 +fi + +base="$PWD" +deps="$base/deps" +inst="$deps/install" +export deps inst + +osmo-clean-workspace.sh + mkdir "$deps" || true osmo-build-dep.sh libosmocore "" "--enable-sanitize --disable-doxygen --disable-pcsc" -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Idfe12148aa7a8030bdaf56d11c1547ebc3f56d14 Gerrit-Change-Number: 17223 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 19:39:16 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 19:39:16 +0000 Subject: Change in osmo-trx[master]: debug.h: Avoid printing pthread_t type In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17226 ) Change subject: debug.h: Avoid printing pthread_t type ...................................................................... debug.h: Avoid printing pthread_t type Using %lu for pthread_t was wrong on armv7l arch. Even worse, according to pthread_self() man page, pthread_t cannot be assumed to be of a simple type and hence printable: """ POSIX.1 allows an implementation wide freedom in choosing the type used to represent a thread ID; for example, representation using either an arithmetic type or a structure is permitted. """ Let's use gettid() instead. According to glibc documentation: """ The pid_t data type is a signed integer type which is capable of representing a process ID. In the GNU C Library, this is an int. """ It may not be the same on other libc's though, so let's better cast to a long int just in case. Accordign to gettid() man, the libc function was only added recently during glibc 2.30, however the system call has been around for quite some time (linux 2.4.11). Let's accomodate use udner non-glibc or older versions of it by having a direct syscall fallback. Change-Id: I40265fd4c62e550014ba3ff3335ca053c5bc01f2 --- M CommonLibs/debug.c M CommonLibs/debug.h M configure.ac 3 files changed, 37 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/CommonLibs/debug.c b/CommonLibs/debug.c index c227435..5e09079 100644 --- a/CommonLibs/debug.c +++ b/CommonLibs/debug.c @@ -21,7 +21,17 @@ * See the COPYING file in the main directory for details. */ -#include +#include "config.h" + +/* If HAVE_GETTID, then "_GNU_SOURCE" may need to be defined to use gettid() */ +#if HAVE_GETTID +#define _GNU_SOURCE +#endif + +#include +#include +#include +#include "config.h" #include #include @@ -77,3 +87,15 @@ .cat = default_categories, .num_cat = ARRAY_SIZE(default_categories), }; + +pid_t my_gettid(void) +{ +#if HAVE_GETTID + return gettid(); +#elif defined(LINUX) && defined(__NR_gettid) + return (pid_t) syscall(__NR_gettid); +#else + #pragma message ("use pid as tid") + return getpid(); +#endif +} diff --git a/CommonLibs/debug.h b/CommonLibs/debug.h index 0dca2ee..9f118b5 100644 --- a/CommonLibs/debug.h +++ b/CommonLibs/debug.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include @@ -18,10 +18,12 @@ DDEVDRV, }; +pid_t my_gettid(void); + #define CLOGC(category, level, fmt, args...) do { \ - LOGP(category, level, "[tid=%lu] " fmt, pthread_self(), ##args); \ + LOGP(category, level, "[tid=%ld] " fmt, (long int) my_gettid(), ##args); \ } while(0) #define CLOGCHAN(chan, category, level, fmt, args...) do { \ - LOGP(category, level, "[tid=%lu][chan=%lu] " fmt, pthread_self(), chan, ##args); \ + LOGP(category, level, "[tid=%ld][chan=%lu] " fmt, (long int) my_gettid(), chan, ##args); \ } while(0) diff --git a/configure.ac b/configure.ac index b0be728..76c3515 100644 --- a/configure.ac +++ b/configure.ac @@ -75,6 +75,15 @@ AC_HEADER_TIME AC_C_BIGENDIAN +# Check if gettid is available (despite not being documented in glibc doc, it requires __USE_GNU on some systems) +# C compiler is used since __USE_GNU seems to be always defined for g++. +save_CPPFLAGS=$CPPFLAGS +AC_LANG_PUSH(C) +CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" +AC_CHECK_FUNCS([gettid]) +AC_LANG_POP(C) +CPPFLAGS=$save_CPPFLAGS + PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.3.0) PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.3.0) PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.3.0) -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17226 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I40265fd4c62e550014ba3ff3335ca053c5bc01f2 Gerrit-Change-Number: 17226 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 19:39:16 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 19:39:16 +0000 Subject: Change in osmo-trx[master]: debug.h: Fix print format of chan in CLOGCHAN In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17227 ) Change subject: debug.h: Fix print format of chan in CLOGCHAN ...................................................................... debug.h: Fix print format of chan in CLOGCHAN Under armv7l arch, size_t is actually an unsigned int and not a long unsigned int, and compiler errors: CommonLibs/debug.h:28:24: error: format ?%lu? expects argument of type ?long unsigned int?, but argument 8 has type ?size_t {aka unsigned int}? [-Werror=format=] Change-Id: I7f6ded5a984570b5267916d6c84eb7d019db73a8 --- M CommonLibs/debug.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/CommonLibs/debug.h b/CommonLibs/debug.h index 9f118b5..8d70155 100644 --- a/CommonLibs/debug.h +++ b/CommonLibs/debug.h @@ -25,5 +25,5 @@ } while(0) #define CLOGCHAN(chan, category, level, fmt, args...) do { \ - LOGP(category, level, "[tid=%ld][chan=%lu] " fmt, (long int) my_gettid(), chan, ##args); \ + LOGP(category, level, "[tid=%ld][chan=%zu] " fmt, (long int) my_gettid(), chan, ##args); \ } while(0) -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17227 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I7f6ded5a984570b5267916d6c84eb7d019db73a8 Gerrit-Change-Number: 17227 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 19:39:39 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 19:39:39 +0000 Subject: Change in libosmocore[master]: bitvec: avoid redundant zero-initialization in bitvec_alloc() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17218 ) Change subject: bitvec: avoid redundant zero-initialization in bitvec_alloc() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I40c0322d5f2febd98bae6fbe0ec2132eda6fb35b Gerrit-Change-Number: 17218 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 22 Feb 2020 19:39:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 19:39:55 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 19:39:55 +0000 Subject: Change in libosmocore[master]: bitvec: fix misleading description of bitvec_spare_padding() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17215 ) Change subject: bitvec: fix misleading description of bitvec_spare_padding() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie60bf7d993fe80d3c0fcd04e4c3dd81da4a2ea0b Gerrit-Change-Number: 17215 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 22 Feb 2020 19:39:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 19:39:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 19:39:59 +0000 Subject: Change in libosmocore[master]: bitvec: fix misleading description of bitvec_spare_padding() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17215 ) Change subject: bitvec: fix misleading description of bitvec_spare_padding() ...................................................................... bitvec: fix misleading description of bitvec_spare_padding() Change-Id: Ie60bf7d993fe80d3c0fcd04e4c3dd81da4a2ea0b --- M src/bitvec.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/bitvec.c b/src/bitvec.c index 10aa776..6202227 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -292,7 +292,7 @@ return 0; } -/*! pad all remaining bits up to num_bits +/*! pad all remaining bits up to a given bit number * \return 0 on success; negative otherwise */ int bitvec_spare_padding(struct bitvec *bv, unsigned int up_to_bit) { -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17215 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie60bf7d993fe80d3c0fcd04e4c3dd81da4a2ea0b Gerrit-Change-Number: 17215 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 19:39:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 19:39:59 +0000 Subject: Change in libosmocore[master]: bitvec: cosmetic: init i only once in bitvec_[un]pack() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17219 ) Change subject: bitvec: cosmetic: init i only once in bitvec_[un]pack() ...................................................................... bitvec: cosmetic: init i only once in bitvec_[un]pack() Change-Id: I5606ca34a72d42a9b6aafed662b995f9fa77be09 --- M src/bitvec.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/bitvec.c b/src/bitvec.c index 6202227..2219b71 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -431,7 +431,7 @@ * \return number of bytes (= bits) copied */ unsigned int bitvec_pack(const struct bitvec *bv, uint8_t *buffer) { - unsigned int i = 0; + unsigned int i; for (i = 0; i < bv->data_len; i++) buffer[i] = bv->data[i]; @@ -444,7 +444,7 @@ * \return number of bytes (= bits) copied */ unsigned int bitvec_unpack(struct bitvec *bv, const uint8_t *buffer) { - unsigned int i = 0; + unsigned int i; for (i = 0; i < bv->data_len; i++) bv->data[i] = buffer[i]; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I5606ca34a72d42a9b6aafed662b995f9fa77be09 Gerrit-Change-Number: 17219 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 19:39:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 19:39:59 +0000 Subject: Change in libosmocore[master]: bitvec: avoid redundant zero-initialization in bitvec_alloc() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17218 ) Change subject: bitvec: avoid redundant zero-initialization in bitvec_alloc() ...................................................................... bitvec: avoid redundant zero-initialization in bitvec_alloc() All the fields of the structure are set explicitly anyway. Change-Id: I40c0322d5f2febd98bae6fbe0ec2132eda6fb35b --- M src/bitvec.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/bitvec.c b/src/bitvec.c index 2219b71..d7f32fb 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -400,7 +400,7 @@ * \return pointer to allocated vector; NULL in case of error */ struct bitvec *bitvec_alloc(unsigned int size, TALLOC_CTX *ctx) { - struct bitvec *bv = talloc_zero(ctx, struct bitvec); + struct bitvec *bv = talloc(ctx, struct bitvec); if (!bv) return NULL; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I40c0322d5f2febd98bae6fbe0ec2132eda6fb35b Gerrit-Change-Number: 17218 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 22 21:16:49 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Sat, 22 Feb 2020 21:16:49 +0000 Subject: Change in simtrace2[master]: simtrace2_api: Add osmo_st2_cardem_request_config() References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/17244 ) Change subject: simtrace2_api: Add osmo_st2_cardem_request_config() ...................................................................... simtrace2_api: Add osmo_st2_cardem_request_config() In Change-Id I7cdd3f9171dbed45de0089defe29d2b59044bd84 we introduced firmware support for SIMTRACE_MSGT_BD_CEMU_CONFIG. The respective host part was so far only implemented in osmo-remsim-client-st2, but not in libosmo-simtrace2. Let's fix that. Change-Id: Ia4822d360a271d2ce9725f761cb95de58663ac3b --- M host/include/osmocom/simtrace2/simtrace2_api.h M host/lib/simtrace2_api.c 2 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/44/17244/1 diff --git a/host/include/osmocom/simtrace2/simtrace2_api.h b/host/include/osmocom/simtrace2/simtrace2_api.h index d31fb85..012b96c 100644 --- a/host/include/osmocom/simtrace2/simtrace2_api.h +++ b/host/include/osmocom/simtrace2/simtrace2_api.h @@ -48,6 +48,7 @@ int osmo_st2_cardem_request_sw_tx(struct osmo_st2_cardem_inst *ci, const uint8_t *sw); int osmo_st2_cardem_request_set_atr(struct osmo_st2_cardem_inst *ci, const uint8_t *atr, unsigned int atr_len); +int osmo_st2_cardem_request_config(struct osmo_st2_cardem_inst *ci, uint32_t features); int osmo_st2_modem_reset_pulse(struct osmo_st2_slot *slot, uint16_t duration_ms); diff --git a/host/lib/simtrace2_api.c b/host/lib/simtrace2_api.c index b2b2829..b3e4e38 100644 --- a/host/lib/simtrace2_api.c +++ b/host/lib/simtrace2_api.c @@ -204,6 +204,21 @@ return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_SET_ATR); } +int osmo_st2_cardem_request_config(struct osmo_st2_cardem_inst *ci, uint32_t features) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_config *cfg; + + cfg = (struct cardemu_usb_msg_config *) msgb_put(msg, sizeof(*cfg)); + + printf("<= %s(%08x)\n", __func__, features); + + memset(cfg, 0, sizeof(*cfg)); + cfg->features = features; + + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_BD_CEMU_CONFIG); +} + /*********************************************************************** * Modem Control protocol ***********************************************************************/ -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/17244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ia4822d360a271d2ce9725f761cb95de58663ac3b Gerrit-Change-Number: 17244 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 23 09:28:55 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 23 Feb 2020 09:28:55 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: improve dissection of Packet Resource Request message In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#3) to the change originally created by pespin. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17050 ) Change subject: gsm_rlcmac: improve dissection of Packet Resource Request message ...................................................................... gsm_rlcmac: improve dissection of Packet Resource Request message Port from wireshark.git de028e81c53f9c45ccc5adb3bffd2f16ae2017bf This commit breaks a unit test. See [1] for more details. [1] Ibb4cbd3f5865415fd547e95fc24ff31df1aed4c0 Ported-by: Pau Espin Pedrol Change-Id: Ibb4cbd3f5865415fd547e95fc24ff31df1aed4c0 --- M src/gsm_rlcmac.cpp M src/gsm_rlcmac.h M tests/rlcmac/RLCMACTest.cpp M tests/rlcmac/RLCMACTest.err M tests/rlcmac/RLCMACTest.ok 5 files changed, 77 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/50/17050/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ibb4cbd3f5865415fd547e95fc24ff31df1aed4c0 Gerrit-Change-Number: 17050 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria Gerrit-CC: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 23 09:28:56 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 23 Feb 2020 09:28:56 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: also verify encoding of MS RA Capability References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17245 ) Change subject: tests/rlcmac: also verify encoding of MS RA Capability ...................................................................... tests/rlcmac: also verify encoding of MS RA Capability The main idea of this change is to demonstrate a weakness of the CSN.1 codec that most likely causes a unit test breakage in [1]. The problem seems to be that the transitional structures, where the CSN.1 decoder stores the results, do not contain any details about presence of the optional fields (such as M_UINT_OR_NULL). In other words, it's impossible to know whether some optional field is omitted in the encoded message (NULL), or is it just set to 0. This means that the encoder will always include all optional fields, even if they're not present in the original message. [1] Ibb4cbd3f5865415fd547e95fc24ff31df1aed4c0 Change-Id: Ic46d6e56768f516203d27d8e7a5adb77afdf32b7 --- M src/gsm_rlcmac.cpp M src/gsm_rlcmac.h M tests/rlcmac/RLCMACTest.cpp M tests/rlcmac/RLCMACTest.err M tests/rlcmac/RLCMACTest.ok 5 files changed, 54 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/45/17245/1 diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index 09a46e8..c681466 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -5766,3 +5766,24 @@ } return ret; } + +int encode_gsm_ra_cap(bitvec *vector, MS_Radio_Access_capability_t *data) +{ + unsigned writeIndex = 0; + csnStream_t ar; + int ret; + + csnStreamInit(&ar, 0, vector->data_len * 8); + + /* recursive csnStreamEncoder call uses LOGPC everywhere, so we need to start the log somewhere... */ + LOGP(DCSN1, LOGL_INFO, "csnStreamEncoder (RAcap): "); + ret = csnStreamEncoder(&ar, CSNDESCR(MS_Radio_Access_capability_t), vector, &writeIndex, data); + LOGPC(DCSN1, LOGL_INFO, "\n"); + + if (ret > 0) { + LOGP(DRLCMACDATA, LOGL_NOTICE, "Got %d remaining bits unhandled by encoder at the end of bitvec\n", ret); + ret = 0; + } + + return ret; +} diff --git a/src/gsm_rlcmac.h b/src/gsm_rlcmac.h index 4ba03fe..6b46f17 100644 --- a/src/gsm_rlcmac.h +++ b/src/gsm_rlcmac.h @@ -5309,4 +5309,5 @@ void decode_gsm_rlcmac_uplink_data(bitvec * vector, RlcMacUplinkDataBlock_t * data); void encode_gsm_rlcmac_downlink_data(bitvec * vector, RlcMacDownlinkDataBlock_t * data); int decode_gsm_ra_cap(bitvec * vector, MS_Radio_Access_capability_t * data); + int encode_gsm_ra_cap(bitvec * vector, MS_Radio_Access_capability_t * data); #endif /* __PACKET_GSM_RLCMAC_H__ */ diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp index de63fe6..e7e86d0 100644 --- a/tests/rlcmac/RLCMACTest.cpp +++ b/tests/rlcmac/RLCMACTest.cpp @@ -219,7 +219,9 @@ printf("*** %s ***\n", __func__); MS_Radio_Access_capability_t data; memset(&data, 0, sizeof(data)); - bitvec *vector = bitvec_alloc(23, test_ctx); + bitvec *bv_dec = bitvec_alloc(23, test_ctx); + bitvec *bv_enc = bitvec_alloc(23, test_ctx); + unsigned int len_dec, len_enc; int rc; /* MS RA capability 1 @@ -235,9 +237,10 @@ .... ..00 011. .... = GPRS multislot class: Max Rx-Slot/TDMA:2 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:3 Tta:3 Ttb:2 Tra:3 Trb:1 Type:1 (3) ...0 .... = GPRS Extended Dynamic Allocation Capability: Not Implemented */ - bitvec_unhex(vector, "13a5146200"); + bitvec_unhex(bv_dec, "13a5146200"); - rc = decode_gsm_ra_cap(vector, &data); + printf("=== Test decoding of MS RA Capability ===\n"); + rc = decode_gsm_ra_cap(bv_dec, &data); OSMO_ASSERT(rc == 0); /* Make sure there's 1 value (currently fails due to failed decoding) */ @@ -247,14 +250,30 @@ printf("GPRS multislot class = %u\n", Decoding::get_ms_class_by_capability(&data)); printf("EGPRS multislot class = %u\n", Decoding::get_egprs_ms_class_by_capability(&data)); + /* Test encoding of decoded MS RA Capability */ + printf("=== Test encoding of MS RA Capability ===\n"); + rc = encode_gsm_ra_cap(bv_enc, &data); + printf("encode_gsm_ra_cap() returns %d\n", rc); + + bv_dec->cur_bit = 4; + len_dec = bitvec_get_uint(bv_dec, 7); + bv_enc->cur_bit = 4; + len_enc = bitvec_get_uint(bv_enc, 7); + + /* NOTE: vector2 is expected to be different because there is actually no + * way to distinguish between NULL and 0 in MS_Radio_Access_capability_t. + * The difference is in length indicator: 29 bits vs 50 bits. */ + printf("vector1 (len_ind=%u) = %s\n", len_dec, osmo_hexdump(bv_dec->data, bv_dec->data_len)); + printf("vector2 (len_ind=%u) = %s\n", len_enc, osmo_hexdump(bv_enc->data, bv_enc->data_len)); + /* Mangle the length indicator (set it to 21) */ unsigned int writeIndex = 4; - rc = bitvec_write_field(vector, &writeIndex, 21, 7); + rc = bitvec_write_field(bv_dec, &writeIndex, 21, 7); OSMO_ASSERT(rc == 0); /* Make sure decoding attempt fails */ - printf("Test decoding of a malformed vector (short length indicator)\n"); - rc = decode_gsm_ra_cap(vector, &data); + printf("=== Test decoding of a malformed vector (short length indicator) ===\n"); + rc = decode_gsm_ra_cap(bv_dec, &data); printf("decode_gsm_ra_cap() returns %d\n", rc); } diff --git a/tests/rlcmac/RLCMACTest.err b/tests/rlcmac/RLCMACTest.err index 52a3cc3..a7e501e 100644 --- a/tests/rlcmac/RLCMACTest.err +++ b/tests/rlcmac/RLCMACTest.err @@ -30,4 +30,5 @@ DCSN1 INFO csnStreamEncoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 0 | Exist_MEAN_CV_BEP_8PSK = 1 | MEAN_BEP_8PSK = 31 | CV_BEP_8PSK = 7 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 58 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 1 | : ChannelRequestDescription | PEAK_THROUGHPUT_CLASS = 6 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 62 | : End ChannelRequestDescription | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 0 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 1187 | Exist_CRBB = 0 | URBB = 127 | URBB = 255 | URBB = 255 | URBB = 238 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | : End Desc | : End EGPRS_AckNack | Padding = DCSN1 INFO csnStreamDecoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 29 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 0 | EGPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_DTM_GPRS_multislot_class = 0 | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 0 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = NULL | UMTS_FDD_Radio_Access_Technology_Capability = NULL | UMTS_384_TDD_Radio_Access_Technology_Capability = NULL | CDMA2000_Radio_Access_Technology_Capability = NULL | UMTS_128_TDD_Radio_Access_Technology_Capability = NULL | GERAN_Feature_Package_1 = NULL | Modulation_based_multislot_class_support = NULL | GMSK_MultislotPowerProfile = NULL | EightPSK_MultislotProfile = NULL | MultipleTBF_Capability = NULL | DownlinkAdvancedReceiverPerformance = NULL | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = NULL | DTM_EnhancementsCapability = NULL | PS_HandoverCapability = NULL | MS_RA_capability_value } | +DCSN1 INFO csnStreamEncoder (RAcap): MS_RA_capability_value { | u.Content = 1 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 0 | EGPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_DTM_GPRS_multislot_class = 0 | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 0 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 0 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 0 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 0 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 0 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 0 | PS_HandoverCapability = 0 | u.Content length = 50 | MS_RA_capability_value } | DCSN1 INFO csnStreamDecoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 21 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | DCSN1 ERROR csnStreamDecoder: error NEED_MORE BITS TO UNPACK (-5) at EGPRS_multislot_class (idx 31): End Multislot_capability | diff --git a/tests/rlcmac/RLCMACTest.ok b/tests/rlcmac/RLCMACTest.ok index 96c1bfb..2aea569 100644 --- a/tests/rlcmac/RLCMACTest.ok +++ b/tests/rlcmac/RLCMACTest.ok @@ -124,7 +124,12 @@ vector1 == vector2 : TRUE *** testCsnLeftAlignedVarBmpBounds *** *** testRAcap *** +=== Test decoding of MS RA Capability === GPRS multislot class = 3 EGPRS multislot class = 0 -Test decoding of a malformed vector (short length indicator) +=== Test encoding of MS RA Capability === +encode_gsm_ra_cap() returns 0 +vector1 (len_ind=29) = 13 a5 14 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +vector2 (len_ind=50) = 16 45 14 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +=== Test decoding of a malformed vector (short length indicator) === decode_gsm_ra_cap() returns -5 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic46d6e56768f516203d27d8e7a5adb77afdf32b7 Gerrit-Change-Number: 17245 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 23 09:28:57 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 23 Feb 2020 09:28:57 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: fix Packet_Resource_Request_t: s/Slot/I_LEVEL_TN/ References: Message-ID: Hello pespin, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17246 to review the following change. Change subject: gsm_rlcmac: fix Packet_Resource_Request_t: s/Slot/I_LEVEL_TN/ ...................................................................... gsm_rlcmac: fix Packet_Resource_Request_t: s/Slot/I_LEVEL_TN/ This is how this field is named in Wireshark. Change-Id: I140443c48af8e4bb1b6279e6de986879b7d9c276 --- M src/gsm_rlcmac.cpp M src/gsm_rlcmac.h M src/pdch.cpp M tests/rlcmac/RLCMACTest.err 4 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/46/17246/1 diff --git a/src/gsm_rlcmac.cpp b/src/gsm_rlcmac.cpp index c681466..8249ced 100644 --- a/src/gsm_rlcmac.cpp +++ b/src/gsm_rlcmac.cpp @@ -1294,7 +1294,7 @@ M_NEXT_EXIST (Packet_Resource_Request_t, Exist_SIGN_VAR, 1), M_UINT (Packet_Resource_Request_t, SIGN_VAR, 6), - M_TYPE_ARRAY (Packet_Resource_Request_t, Slot, InterferenceMeasurementReport_t, 8), + M_TYPE_ARRAY (Packet_Resource_Request_t, I_LEVEL_TN, InterferenceMeasurementReport_t, 8), M_NEXT_EXIST_OR_NULL(Packet_Resource_Request_t, Exist_AdditionsR99, 1), M_TYPE (Packet_Resource_Request_t, AdditionsR99, PRR_AdditionsR99_t), diff --git a/src/gsm_rlcmac.h b/src/gsm_rlcmac.h index 6b46f17..1465313 100644 --- a/src/gsm_rlcmac.h +++ b/src/gsm_rlcmac.h @@ -1607,7 +1607,7 @@ guint8 Exist_SIGN_VAR; guint8 SIGN_VAR; - InterferenceMeasurementReport_t Slot[8]; + InterferenceMeasurementReport_t I_LEVEL_TN[8]; guint8 Exist_AdditionsR99; PRR_AdditionsR99_t AdditionsR99; diff --git a/src/pdch.cpp b/src/pdch.cpp index f4544b2..7cf75c5 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -80,13 +80,13 @@ if (qr->Exist_SIGN_VAR) meas->set_ms_sign_var((qr->SIGN_VAR + 2) / 4); /* SIGN_VAR * 0.25 dB */ - for (i = 0; i < OSMO_MIN(ARRAY_SIZE(qr->Slot), ARRAY_SIZE(meas->ts)); i++) + for (i = 0; i < OSMO_MIN(ARRAY_SIZE(qr->I_LEVEL_TN), ARRAY_SIZE(meas->ts)); i++) { - if (qr->Slot[i].Exist) { + if (qr->I_LEVEL_TN[i].Exist) { LOGP(DRLCMAC, LOGL_INFO, "Packet resource request: i_level[%d] = %d\n", - i, qr->Slot[i].I_LEVEL); - meas->set_ms_i_level(i, -2 * qr->Slot[i].I_LEVEL); + i, qr->I_LEVEL_TN[i].I_LEVEL); + meas->set_ms_i_level(i, -2 * qr->I_LEVEL_TN[i].I_LEVEL); } } } diff --git a/tests/rlcmac/RLCMACTest.err b/tests/rlcmac/RLCMACTest.err index a7e501e..5b89ec8 100644 --- a/tests/rlcmac/RLCMACTest.err +++ b/tests/rlcmac/RLCMACTest.err @@ -22,8 +22,8 @@ DCSN1 INFO csnStreamEncoder (type=3): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 3 | TLLI = 2274915399 | Padding = 1|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 28 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 0 | : Channel_Quality_Report | C_VALUE = 18 | RXQUAL = 0 | SIGN_VAR = 7 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 0 | Padding = 3|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 28 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 0 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 0 | : Channel_Quality_Report | C_VALUE = 18 | RXQUAL = 0 | SIGN_VAR = 7 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 0 | Padding = 3|43|43|43|43|43|43|43|43| -DCSN1 INFO csnStreamDecoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | Choice PacketResourceRequestID = 1 | u.TLLI = 0xc4f70250 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 3 | u.Content length = 67 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Slot | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| -DCSN1 INFO csnStreamEncoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | u.TLLI = 1 | u.TLLI = 3304522320 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | u.Content = 3 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | u.Content length = 67 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Slot : | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| +DCSN1 INFO csnStreamDecoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | Choice PacketResourceRequestID = 1 | u.TLLI = 0xc4f70250 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 3 | u.Content length = 67 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | I_LEVEL_TN | Exist = 0 | I_LEVEL_TN | Exist = 0 | I_LEVEL_TN | Exist = 0 | I_LEVEL_TN | Exist = 0 | I_LEVEL_TN | Exist = 0 | I_LEVEL_TN | Exist = 0 | I_LEVEL_TN | Exist = 0 | I_LEVEL_TN | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| +DCSN1 INFO csnStreamEncoder (type=5): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 5 | Exist_ACCESS_TYPE = 1 | ACCESS_TYPE = 0 | : ID | u.TLLI = 1 | u.TLLI = 3304522320 | : End ID | Exist_MS_Radio_Access_capability = 1 | : MS_Radio_Access_capability | MS_RA_capability_value { | u.Content = 3 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 11 | GPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 11 | EGPRS_Extended_Dynamic_Allocation_Capability = 1 | Exist_DTM_GPRS_multislot_class = 1 | DTM_GPRS_multislot_class = 3 | Single_Slot_DTM = 0 | : DTM_EGPRS_Params | Exist_DTM_EGPRS_multislot_class = 1 | DTM_EGPRS_multislot_class = 3 | : End DTM_EGPRS_Params | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 1 | Eight_PSK_Power_Capability = 2 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 1 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 1 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 1 | HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 1 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 1 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 1 | DTM_GPRS_HighMultislotClass = 2 | : DTM_EGPRS_HighMultislotClass | Exist_DTM_EGPRS_HighMultislotClass = 1 | DTM_EGPRS_HighMultislotClass = 2 | : End DTM_EGPRS_HighMultislotClass | PS_HandoverCapability = 0 | u.Content length = 67 | MS_RA_capability_value } | : End MS_Radio_Access_capability | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 3 | RADIO_PRIORITY = 3 | RLC_MODE = 1 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 0 | : End Channel_Request_Description | Exist_CHANGE_MARK = 0 | C_VALUE = 63 | Exist_SIGN_VAR = 0 | I_LEVEL_TN : | Exist = 0 | I_LEVEL_TN : | Exist = 0 | I_LEVEL_TN : | Exist = 0 | I_LEVEL_TN : | Exist = 0 | I_LEVEL_TN : | Exist = 0 | I_LEVEL_TN : | Exist = 0 | I_LEVEL_TN : | Exist = 0 | I_LEVEL_TN : | Exist = 0 | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_EGPRS_BEP_LinkQualityMeasurements = 0 | Exist_EGPRS_TimeslotLinkQualityMeasurements = 0 | Exist_PFI = 0 | MS_RAC_AdditionalInformationAvailable = 1 | RetransmissionOfPRR = 0 | Exist_AdditionsR5 = 0 | : End AdditionsR99 | Padding = 43| DCSN1 INFO csnStreamDecoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 1 | MEAN_BEP_GMSK = 31 | CV_BEP_GMSK = 7 | Exist_MEAN_CV_BEP_8PSK = 0 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 0 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 0 | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | Desc length = 15 | offset = 0 | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | : End Desc | : End EGPRS_AckNack | Padding = 11|43|43|43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 1 | MEAN_BEP_GMSK = 31 | CV_BEP_GMSK = 7 | Exist_MEAN_CV_BEP_8PSK = 0 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 0 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 0 | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 1 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 2 | Exist_CRBB = 0 | Desc length = 15 | : End Desc | : End EGPRS_AckNack | Padding = 11|43|43|43|43|43|43|43|43|43|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I140443c48af8e4bb1b6279e6de986879b7d9c276 Gerrit-Change-Number: 17246 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sun Feb 23 09:56:49 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Sun, 23 Feb 2020 09:56:49 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: improve dissection of Packet Resource Request message In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17050 ) Change subject: gsm_rlcmac: improve dissection of Packet Resource Request message ...................................................................... Patch Set 3: Code-Review-1 I think we should not merge this change unless the problem I described in [1] is resolved. This is not a fault of this change, but a weakness of the CSN.1 codec. We should read the source code of Pycrate and check how it handles optional fields. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ibb4cbd3f5865415fd547e95fc24ff31df1aed4c0 Gerrit-Change-Number: 17050 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Sun, 23 Feb 2020 09:56:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Sun Feb 23 20:11:40 2020 From: admin at opensuse.org (OBS Notification) Date: Sun, 23 Feb 2020 20:11:40 +0000 Subject: Build failure of network:osmocom:latest/eclipse-titan in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5e52dc936468d_37242ac2db3e45f422611f@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/eclipse-titan/Raspbian_10/armv7l Package network:osmocom:latest/eclipse-titan failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:latest eclipse-titan Last lines of build log: [ 793s] -h: generate TTCN-3 code allowing type substitution [ 793s] -m: generate only the UsefulTtcn3Types and XSD predefined modules [ 793s] -o: generate all definitions into one module (called XSD_Definitions) [ 793s] -p: do not generate the UsefulTtcn3Types and XSD predefined modules [ 793s] -q: quiet mode - disable the issue of status messages [ 793s] -s: parse and validate only - no TTCN-3 module generation [ 793s] -t: disable the generation of timing information in TTCN-3 modules [ 793s] -v: show version information [ 793s] -w: suppress warnings [ 793s] -x: disable schema validation but generate TTCN-3 modules [ 793s] -z: zap URI scheme from module name [ 793s] make[4]: *** [Makefile:284: TitanLoggerApi.ttcn] Error 1 [ 793s] make[4]: Leaving directory '/usr/src/packages/BUILD/core' [ 793s] make[3]: *** [../../Makefile.genrules:60: ../../core/RInt.o] Error 2 [ 793s] make[3]: Leaving directory '/usr/src/packages/BUILD/mctr2/mctr' [ 793s] make[2]: *** [Makefile:32: all] Error 2 [ 793s] make[2]: Leaving directory '/usr/src/packages/BUILD/mctr2' [ 793s] make[1]: *** [Makefile:65: all] Error 2 [ 793s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 793s] dh_auto_build: make -j1 returned exit code 2 [ 793s] make: *** [debian/rules:6: build] Error 2 [ 793s] dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 [ 793s] ### VM INTERACTION START ### [ 796s] [ 778.756504] sysrq: SysRq : Power Off [ 796s] [ 778.763863] reboot: Power down [ 797s] ### VM INTERACTION END ### [ 797s] [ 797s] armbuild21 failed "build eclipse-titan_6.5.0-1.dsc" at Sun Feb 23 20:11:31 UTC 2020. [ 797s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:02:50 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 09:02:50 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: also verify encoding of MS RA Capability In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17245 ) Change subject: tests/rlcmac: also verify encoding of MS RA Capability ...................................................................... Patch Set 1: Code-Review-1 (2 comments) https://gerrit.osmocom.org/c/osmo-pcu/+/17245/1/src/gsm_rlcmac.cpp File src/gsm_rlcmac.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17245/1/src/gsm_rlcmac.cpp at 5770 PS1, Line 5770: int encode_gsm_ra_cap(bitvec *vector, MS_Radio_Access_capability_t *data) That's not used at all by osmo-pcu itself, so move it to the test cpp file. https://gerrit.osmocom.org/c/osmo-pcu/+/17245/1/tests/rlcmac/RLCMACTest.cpp File tests/rlcmac/RLCMACTest.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17245/1/tests/rlcmac/RLCMACTest.cpp at 246 PS1, Line 246: /* Make sure there's 1 value (currently fails due to failed decoding) */ is this true anymore? (failure happening). -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic46d6e56768f516203d27d8e7a5adb77afdf32b7 Gerrit-Change-Number: 17245 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 09:02:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:04:24 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 09:04:24 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: fix Packet_Resource_Request_t: s/Slot/I_LEVEL_TN/ In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17246 ) Change subject: gsm_rlcmac: fix Packet_Resource_Request_t: s/Slot/I_LEVEL_TN/ ...................................................................... Patch Set 1: Better reference wireshark.git de028e81c53f9c45ccc5adb3bffd2f16ae2017bf here. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I140443c48af8e4bb1b6279e6de986879b7d9c276 Gerrit-Change-Number: 17246 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 09:04:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:04:56 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 09:04:56 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: fix Packet_Resource_Request_t: s/Slot/I_LEVEL_TN/ In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17246 ) Change subject: gsm_rlcmac: fix Packet_Resource_Request_t: s/Slot/I_LEVEL_TN/ ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I140443c48af8e4bb1b6279e6de986879b7d9c276 Gerrit-Change-Number: 17246 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 09:04:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:08:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 24 Feb 2020 09:08:50 +0000 Subject: Change in osmo-ci[master]: README: Update version number of poky toolchain References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17247 ) Change subject: README: Update version number of poky toolchain ...................................................................... README: Update version number of poky toolchain Change-Id: Ic360a909c4615a3d6bfcea8f2e1c70a70b935ab4 --- M ansible/files/README.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/47/17247/1 diff --git a/ansible/files/README.md b/ansible/files/README.md index 1112caa..addfca7 100644 --- a/ansible/files/README.md +++ b/ansible/files/README.md @@ -20,4 +20,4 @@ The filename depends on the variable `poky_installer_file`. -`./poky-glibc-x86_64-meta-toolchain-osmo-armv5te-toolchain-osmo-2.3.2.sh` +`./poky-glibc-x86_64-meta-toolchain-osmo-armv5te-toolchain-osmo-2.3.4.sh` -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ic360a909c4615a3d6bfcea8f2e1c70a70b935ab4 Gerrit-Change-Number: 17247 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:08:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 24 Feb 2020 09:08:50 +0000 Subject: Change in osmo-ci[master]: osmocom-nightly/latest: Build open5gs References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17248 ) Change subject: osmocom-nightly/latest: Build open5gs ...................................................................... osmocom-nightly/latest: Build open5gs Change-Id: I6752288868e5ee1378c0776b1be9f06750017c41 --- M scripts/osmocom-latest-packages.sh M scripts/osmocom-nightly-packages.sh 2 files changed, 31 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/48/17248/1 diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 3770ee1..bcc3067 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -37,7 +37,7 @@ get_last_tag() { project="$1" - if [ "$project" = "limesuite" ]; then + if [ "$project" = "limesuite" ] || [ "$project" = "open5gs" ]; then ver_regexp="^v[0-9]*.[0-9]*.[0-9]*$" else ver_regexp="^[0-9]*.[0-9]*.[0-9]*$" @@ -54,6 +54,10 @@ cd "$TOP" if [ "$project" = "limesuite" ]; then [ -d "$project" ] || git clone "https://github.com/myriadrf/LimeSuite" "$project" + elif [ "$project" = "open5gs" ]; then + if [ ! -d "$project" ]; then + git clone "https://github.com/open5gs/open5gs" "$project" + fi else [ -d "$project" ] || osmo_git_clone_date "$(osmo_git_clone_url "$project")" fi @@ -61,6 +65,9 @@ git fetch VER=$(get_last_tag "$project") git checkout -f -B "$VER" "refs/tags/$VER" + if [ "$project" = "open5gs" ]; then + meson subprojects download freeDiameter + fi } # Copy an already checked out repository dir and apply its debian 8 patch. @@ -93,7 +100,12 @@ osmo_obs_add_debian_dependency "./debian/control" "osmocom-latest" - if [ -x ./git-version-gen ]; then + if [ "$project" = "open5gs" ]; then + # we cannot control the output directory of the generated source :( + dpkg-buildpackage -S -uc -us -d + mkdir -p "$output" + mv "../$name"*.tar* "../$name"*.dsc "$output" + elif [ -x ./git-version-gen ]; then gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$output" \ "--git-debian-branch=$VER" --git-ignore-new $gitbpargs \ --git-postexport='cp $GBP_GIT_DIR/../.tarball-version $GBP_TMP_DIR/' @@ -159,6 +171,7 @@ checkout libosmo-dsp checkout osmo-sysmon checkout osmo-remsim + checkout open5gs checkout_copy_debian8_jessie "osmo-gsm-manuals" @@ -191,6 +204,7 @@ build libosmo-dsp build osmo-sysmon build osmo-remsim + build open5gs cd "$TOP/$PROJ" osc ci -m "Latest Tagged versions of $DT" diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index d49d968..6094db2 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -108,8 +108,11 @@ fi mkdir -p "$DATA/$name" - # source code build without dependency checks and unsigned source and unsigned change log - if [ -f .tarball-version ]; then + if [ "$name" = "open5gs" ]; then + # we cannot control the output directory of the generated source :( + dpkg-buildpackage -S -uc -us -d + mv "../$name"*.tar* "../$name"*.dsc "$DATA/$name/" + elif [ -f .tarball-version ]; then gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$DATA/$name" \ --git-ignore-new $gitbpargs \ --git-postexport='cp $GBP_GIT_DIR/../.tarball-version $GBP_TMP_DIR/' @@ -153,6 +156,14 @@ git checkout "$TAG" } +checkout_open5gs() { + cd "$REPO" + git clone https://github.com/open5gs/open5gs + cd open5gs + meson subprojects download freeDiameter +} + + # Copy an already checked out repository dir and apply its debian 8 patch. # $1: Osmocom repository checkout_copy_debian8_jessie() { @@ -207,6 +218,7 @@ checkout libosmo-dsp checkout osmo-sysmon checkout osmo-remsim + checkout_open5gs checkout_copy_debian8_jessie "osmo-gsm-manuals" checkout_copy_debian8_jessie "osmo-trx" @@ -244,6 +256,7 @@ build libosmo-dsp build osmo-sysmon build osmo-remsim + build open5gs download_bumpversion -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6752288868e5ee1378c0776b1be9f06750017c41 Gerrit-Change-Number: 17248 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:10:00 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 09:10:00 +0000 Subject: Change in osmo-ci[master]: README: Update version number of poky toolchain In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17247 ) Change subject: README: Update version number of poky toolchain ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ic360a909c4615a3d6bfcea8f2e1c70a70b935ab4 Gerrit-Change-Number: 17247 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 09:10:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:11:06 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 24 Feb 2020 09:11:06 +0000 Subject: Change in osmo-ci[master]: README: Update version number of poky toolchain In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17247 ) Change subject: README: Update version number of poky toolchain ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ic360a909c4615a3d6bfcea8f2e1c70a70b935ab4 Gerrit-Change-Number: 17247 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 09:11:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:11:16 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 24 Feb 2020 09:11:16 +0000 Subject: Change in osmo-ci[master]: osmocom-nightly/latest: Build open5gs In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17248 ) Change subject: osmocom-nightly/latest: Build open5gs ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6752288868e5ee1378c0776b1be9f06750017c41 Gerrit-Change-Number: 17248 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Mon, 24 Feb 2020 09:11:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:11:29 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 24 Feb 2020 09:11:29 +0000 Subject: Change in osmo-ci[master]: README: Update version number of poky toolchain In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17247 ) Change subject: README: Update version number of poky toolchain ...................................................................... README: Update version number of poky toolchain Change-Id: Ic360a909c4615a3d6bfcea8f2e1c70a70b935ab4 --- M ansible/files/README.md 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: pespin: Looks good to me, approved laforge: Verified diff --git a/ansible/files/README.md b/ansible/files/README.md index 1112caa..addfca7 100644 --- a/ansible/files/README.md +++ b/ansible/files/README.md @@ -20,4 +20,4 @@ The filename depends on the variable `poky_installer_file`. -`./poky-glibc-x86_64-meta-toolchain-osmo-armv5te-toolchain-osmo-2.3.2.sh` +`./poky-glibc-x86_64-meta-toolchain-osmo-armv5te-toolchain-osmo-2.3.4.sh` -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ic360a909c4615a3d6bfcea8f2e1c70a70b935ab4 Gerrit-Change-Number: 17247 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:12:32 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 24 Feb 2020 09:12:32 +0000 Subject: Change in osmo-pcu[master]: gsm_rlcmac: fix Packet_Resource_Request_t: s/Slot/I_LEVEL_TN/ In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17246 ) Change subject: gsm_rlcmac: fix Packet_Resource_Request_t: s/Slot/I_LEVEL_TN/ ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I140443c48af8e4bb1b6279e6de986879b7d9c276 Gerrit-Change-Number: 17246 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 09:12:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:12:48 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 09:12:48 +0000 Subject: Change in osmo-ci[master]: osmocom-nightly/latest: Build open5gs In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17248 ) Change subject: osmocom-nightly/latest: Build open5gs ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-ci/+/17248/1/scripts/osmocom-latest-packages.sh File scripts/osmocom-latest-packages.sh: https://gerrit.osmocom.org/c/osmo-ci/+/17248/1/scripts/osmocom-latest-packages.sh at 58 PS1, Line 58: if [ ! -d "$project" ]; then Curious why you didn't follow one line style like in other git commands here. [ -d "$project" ] || git clone "https://github.com/open5gs/open5gs" "$project" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6752288868e5ee1378c0776b1be9f06750017c41 Gerrit-Change-Number: 17248 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 09:12:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:42:07 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 09:42:07 +0000 Subject: Change in osmo-gsm-tester[master]: remote: Fix comment typo References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17249 ) Change subject: remote: Fix comment typo ...................................................................... remote: Fix comment typo Change-Id: Ie466a95d354dc8c9d6960f713948426dadc58241 --- M src/osmo_gsm_tester/remote.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/49/17249/1 diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index bd657c0..c5246ce 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -174,7 +174,7 @@ def change_elf_rpath(self, binary_path, paths): ''' Change RPATH field in ELF executable binary. - This feature can be used to tell the loaded to load the trial libraries, as + This feature can be used to tell the loader to load the trial libraries, as LD_LIBRARY_PATH is disabled for paths with modified capabilities. ''' patchelf_bin = self.remote_env.get('PATCHELF_BIN', None) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17249 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ie466a95d354dc8c9d6960f713948426dadc58241 Gerrit-Change-Number: 17249 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:54:48 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 24 Feb 2020 09:54:48 +0000 Subject: Change in osmo-ci[master]: osmocom-nightly/latest: Build open5gs In-Reply-To: References: Message-ID: Hello pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ci/+/17248 to look at the new patch set (#2). Change subject: osmocom-nightly/latest: Build open5gs ...................................................................... osmocom-nightly/latest: Build open5gs This is unfortunately harder than expected. The problem is the use of meson external dependencies using 'wrap', specifically for freeDiameter. As a debian source package needs to include the entire source, the dpkg helpers are calling 'meson --wrap-mode=nodownload' at build time. This in turn requires us to download the freeDiameter after the git clone of open5gs. Unfortunately this creates a git checkout in a sub directory of the open5gs repo, which is not part of the git history. git-buildpackage hence generates a source tarball *without* freeDiameter. I tried very hard in several methods like * git commit subprojects/freeDiameter * adding subprojects/freeDiameter as git submodule unfortuantely none of them helped. In the end, I resorted to using 'dpkg-buildpackage' instead of 'git-buildpackage' (gbp), which then has other disadvantages, such as not being able to determine the output directory to which the .tar.* and .dsc files are written to. In the end, the solution implemented here is the only one I could make work. Change-Id: I6752288868e5ee1378c0776b1be9f06750017c41 --- M scripts/osmocom-latest-packages.sh M scripts/osmocom-nightly-packages.sh 2 files changed, 31 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/48/17248/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6752288868e5ee1378c0776b1be9f06750017c41 Gerrit-Change-Number: 17248 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 09:55:05 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 24 Feb 2020 09:55:05 +0000 Subject: Change in osmo-ci[master]: osmocom-nightly/latest: Build open5gs In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17248 ) Change subject: osmocom-nightly/latest: Build open5gs ...................................................................... Patch Set 2: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6752288868e5ee1378c0776b1be9f06750017c41 Gerrit-Change-Number: 17248 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 09:55:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 10:02:36 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 24 Feb 2020 10:02:36 +0000 Subject: Change in osmo-ci[master]: osmocom-nightly/latest: Build open5gs In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17248 ) Change subject: osmocom-nightly/latest: Build open5gs ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-ci/+/17248/1/scripts/osmocom-latest-packages.sh File scripts/osmocom-latest-packages.sh: https://gerrit.osmocom.org/c/osmo-ci/+/17248/1/scripts/osmocom-latest-packages.sh at 58 PS1, Line 58: if [ ! -d "$project" ]; then > Curious why you didn't follow one line style like in other git commands here. [?] I didn't really look at other git clone statements but rather at the surrounding code few lines above and below, where if clauses are used. Also, we actually have an if-elif-else here... -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6752288868e5ee1378c0776b1be9f06750017c41 Gerrit-Change-Number: 17248 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 10:02:36 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 10:02:44 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Mon, 24 Feb 2020 10:02:44 +0000 Subject: Change in osmo-ci[master]: osmocom-nightly/latest: Build open5gs In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17248 ) Change subject: osmocom-nightly/latest: Build open5gs ...................................................................... osmocom-nightly/latest: Build open5gs This is unfortunately harder than expected. The problem is the use of meson external dependencies using 'wrap', specifically for freeDiameter. As a debian source package needs to include the entire source, the dpkg helpers are calling 'meson --wrap-mode=nodownload' at build time. This in turn requires us to download the freeDiameter after the git clone of open5gs. Unfortunately this creates a git checkout in a sub directory of the open5gs repo, which is not part of the git history. git-buildpackage hence generates a source tarball *without* freeDiameter. I tried very hard in several methods like * git commit subprojects/freeDiameter * adding subprojects/freeDiameter as git submodule unfortuantely none of them helped. In the end, I resorted to using 'dpkg-buildpackage' instead of 'git-buildpackage' (gbp), which then has other disadvantages, such as not being able to determine the output directory to which the .tar.* and .dsc files are written to. In the end, the solution implemented here is the only one I could make work. Change-Id: I6752288868e5ee1378c0776b1be9f06750017c41 --- M scripts/osmocom-latest-packages.sh M scripts/osmocom-nightly-packages.sh 2 files changed, 31 insertions(+), 4 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 3770ee1..bcc3067 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -37,7 +37,7 @@ get_last_tag() { project="$1" - if [ "$project" = "limesuite" ]; then + if [ "$project" = "limesuite" ] || [ "$project" = "open5gs" ]; then ver_regexp="^v[0-9]*.[0-9]*.[0-9]*$" else ver_regexp="^[0-9]*.[0-9]*.[0-9]*$" @@ -54,6 +54,10 @@ cd "$TOP" if [ "$project" = "limesuite" ]; then [ -d "$project" ] || git clone "https://github.com/myriadrf/LimeSuite" "$project" + elif [ "$project" = "open5gs" ]; then + if [ ! -d "$project" ]; then + git clone "https://github.com/open5gs/open5gs" "$project" + fi else [ -d "$project" ] || osmo_git_clone_date "$(osmo_git_clone_url "$project")" fi @@ -61,6 +65,9 @@ git fetch VER=$(get_last_tag "$project") git checkout -f -B "$VER" "refs/tags/$VER" + if [ "$project" = "open5gs" ]; then + meson subprojects download freeDiameter + fi } # Copy an already checked out repository dir and apply its debian 8 patch. @@ -93,7 +100,12 @@ osmo_obs_add_debian_dependency "./debian/control" "osmocom-latest" - if [ -x ./git-version-gen ]; then + if [ "$project" = "open5gs" ]; then + # we cannot control the output directory of the generated source :( + dpkg-buildpackage -S -uc -us -d + mkdir -p "$output" + mv "../$name"*.tar* "../$name"*.dsc "$output" + elif [ -x ./git-version-gen ]; then gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$output" \ "--git-debian-branch=$VER" --git-ignore-new $gitbpargs \ --git-postexport='cp $GBP_GIT_DIR/../.tarball-version $GBP_TMP_DIR/' @@ -159,6 +171,7 @@ checkout libosmo-dsp checkout osmo-sysmon checkout osmo-remsim + checkout open5gs checkout_copy_debian8_jessie "osmo-gsm-manuals" @@ -191,6 +204,7 @@ build libosmo-dsp build osmo-sysmon build osmo-remsim + build open5gs cd "$TOP/$PROJ" osc ci -m "Latest Tagged versions of $DT" diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index d49d968..6094db2 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -108,8 +108,11 @@ fi mkdir -p "$DATA/$name" - # source code build without dependency checks and unsigned source and unsigned change log - if [ -f .tarball-version ]; then + if [ "$name" = "open5gs" ]; then + # we cannot control the output directory of the generated source :( + dpkg-buildpackage -S -uc -us -d + mv "../$name"*.tar* "../$name"*.dsc "$DATA/$name/" + elif [ -f .tarball-version ]; then gbp buildpackage -S -uc -us -d --git-ignore-branch "--git-export-dir=$DATA/$name" \ --git-ignore-new $gitbpargs \ --git-postexport='cp $GBP_GIT_DIR/../.tarball-version $GBP_TMP_DIR/' @@ -153,6 +156,14 @@ git checkout "$TAG" } +checkout_open5gs() { + cd "$REPO" + git clone https://github.com/open5gs/open5gs + cd open5gs + meson subprojects download freeDiameter +} + + # Copy an already checked out repository dir and apply its debian 8 patch. # $1: Osmocom repository checkout_copy_debian8_jessie() { @@ -207,6 +218,7 @@ checkout libosmo-dsp checkout osmo-sysmon checkout osmo-remsim + checkout_open5gs checkout_copy_debian8_jessie "osmo-gsm-manuals" checkout_copy_debian8_jessie "osmo-trx" @@ -244,6 +256,7 @@ build libosmo-dsp build osmo-sysmon build osmo-remsim + build open5gs download_bumpversion -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6752288868e5ee1378c0776b1be9f06750017c41 Gerrit-Change-Number: 17248 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 10:16:56 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 10:16:56 +0000 Subject: Change in libosmocore[master]: Import 'neocon' terminal program from Openmoko In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17242 ) Change subject: Import 'neocon' terminal program from Openmoko ...................................................................... Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4f4f0dae6774447eb370fc1488a4689b1d5d54f8 Gerrit-Change-Number: 17242 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 10:16:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 14:23:22 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 14:23:22 +0000 Subject: Change in osmo-gsm-tester[master]: srsue: Create netns on demand References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17250 ) Change subject: srsue: Create netns on demand ...................................................................... srsue: Create netns on demand Already existing script osmo-gsm-tester_netns_setup.sh is modified to support only creating the entns without moving an iface to it. Change-Id: I1b7e186b0146f932fe37fbea68e4dfa3120b7a74 --- M src/osmo_gsm_tester/remote.py M src/osmo_gsm_tester/srs_ue.py M src/osmo_gsm_tester/util.py M utils/bin/osmo-gsm-tester_netns_setup.sh 4 files changed, 31 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/50/17250/1 diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index c5246ce..10ba069 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -171,6 +171,13 @@ SETCAP_NETSYS_ADMIN_BIN = 'osmo-gsm-tester_setcap_netsys_admin.sh' self.run_remote_sync('setcap-netsysadm', ('sudo', SETCAP_NETSYS_ADMIN_BIN, binary_path)) + def create_netns(self, netns): + ''' + It creates the netns if it doesn't already exist. + ''' + NETNS_SETUP_BIN = 'osmo-gsm-tester_netns_setup.sh' + self.run_remote_sync('create_netns', ('sudo', NETNS_SETUP_BIN, netns)) + def change_elf_rpath(self, binary_path, paths): ''' Change RPATH field in ELF executable binary. diff --git a/src/osmo_gsm_tester/srs_ue.py b/src/osmo_gsm_tester/srs_ue.py index 4a99ad9..0accaea 100644 --- a/src/osmo_gsm_tester/srs_ue.py +++ b/src/osmo_gsm_tester/srs_ue.py @@ -125,6 +125,9 @@ self.log('Applying CAP_SYS_ADMIN+CAP_NET_ADMIN capability to srsue') self.rem_host.setcap_netsys_admin(remote_binary) + self.log('Creating netns %s' % self.netns()) + self.rem_host.create_netns(self.netns()) + #'strace', '-ff', args = (remote_binary, self.remote_config_file, '--phy.nof_phy_threads=1', @@ -159,6 +162,9 @@ self.log('Applying CAP_SYS_ADMIN+CAP_NET_ADMIN capability to srsue') util.setcap_netsys_admin(binary, self.run_dir.new_dir('setcap_netsys_admin')) + self.log('Creating netns %s' % self.netns()) + util.create_netns(self.netns(), self.run_dir.new_dir('create_netns')) + args = (binary, os.path.abspath(self.config_file), '--phy.nof_phy_threads=1', '--gw.netns=' + self.netns(), diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index de37078..a5b2bbf 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -110,15 +110,22 @@ proc = Process(SETCAP_NETSYS_ADMIN_BIN, run_dir, ['sudo', SETCAP_NETSYS_ADMIN_BIN, binary]) proc.launch_sync() -def move_iface_to_netns(ifname, netns, run_dir): +def create_netns(netns, run_dir): ''' - Moves an iface to a netns. It creates the netns if it doesn't exist. - fail_iface_not_found=False is handy in order to assume the iface is already - in another netns and thus cannot be foud. + It creates the netns if it doesn't already exist. ''' from .process import Process NETNS_SETUP_BIN = 'osmo-gsm-tester_netns_setup.sh' - proc = Process('move_netns', run_dir, ['sudo', NETNS_SETUP_BIN, ifname, netns]) + proc = Process('create_netns', ('sudo', NETNS_SETUP_BIN, netns)) + proc.launch_sync() + +def move_iface_to_netns(ifname, netns, run_dir): + ''' + Moves an iface to a netns. It creates the netns if it doesn't exist. + ''' + from .process import Process + NETNS_SETUP_BIN = 'osmo-gsm-tester_netns_setup.sh' + proc = Process('move_netns', run_dir, ['sudo', NETNS_SETUP_BIN, netns, ifname]) proc.launch_sync() def import_path_prepend(pathname): diff --git a/utils/bin/osmo-gsm-tester_netns_setup.sh b/utils/bin/osmo-gsm-tester_netns_setup.sh index 1600c44..e3d09ea 100755 --- a/utils/bin/osmo-gsm-tester_netns_setup.sh +++ b/utils/bin/osmo-gsm-tester_netns_setup.sh @@ -1,11 +1,7 @@ #!/bin/bash -e -ifname="$1" -netns="$2" -shift -shift - - +netns="$1" +ifname="$2" # optional if [ -f "/var/run/netns/${netns}" ]; then echo "netns $netns already exists" @@ -14,6 +10,10 @@ ip netns add "$netns" fi +if [ "x$ifname" = "x" ]; then + exit 0 +fi + if [ -d "/sys/class/net/${ifname}" ]; then echo "Moving iface $ifname to netns $netns" ip link set $ifname netns $netns -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17250 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I1b7e186b0146f932fe37fbea68e4dfa3120b7a74 Gerrit-Change-Number: 17250 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 17:03:58 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 17:03:58 +0000 Subject: Change in osmo-gsm-tester[master]: remote: Fix comment typo In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17249 ) Change subject: remote: Fix comment typo ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17249 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ie466a95d354dc8c9d6960f713948426dadc58241 Gerrit-Change-Number: 17249 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 17:03:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 17:04:01 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 17:04:01 +0000 Subject: Change in osmo-gsm-tester[master]: srsue: Create netns on demand In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17250 ) Change subject: srsue: Create netns on demand ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17250 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I1b7e186b0146f932fe37fbea68e4dfa3120b7a74 Gerrit-Change-Number: 17250 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 17:04:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 17:04:04 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 17:04:04 +0000 Subject: Change in osmo-gsm-tester[master]: remote: Fix comment typo In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17249 ) Change subject: remote: Fix comment typo ...................................................................... remote: Fix comment typo Change-Id: Ie466a95d354dc8c9d6960f713948426dadc58241 --- M src/osmo_gsm_tester/remote.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index bd657c0..c5246ce 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -174,7 +174,7 @@ def change_elf_rpath(self, binary_path, paths): ''' Change RPATH field in ELF executable binary. - This feature can be used to tell the loaded to load the trial libraries, as + This feature can be used to tell the loader to load the trial libraries, as LD_LIBRARY_PATH is disabled for paths with modified capabilities. ''' patchelf_bin = self.remote_env.get('PATCHELF_BIN', None) -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17249 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ie466a95d354dc8c9d6960f713948426dadc58241 Gerrit-Change-Number: 17249 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 17:04:05 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 17:04:05 +0000 Subject: Change in osmo-gsm-tester[master]: srsue: Create netns on demand In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17250 ) Change subject: srsue: Create netns on demand ...................................................................... srsue: Create netns on demand Already existing script osmo-gsm-tester_netns_setup.sh is modified to support only creating the entns without moving an iface to it. Change-Id: I1b7e186b0146f932fe37fbea68e4dfa3120b7a74 --- M src/osmo_gsm_tester/remote.py M src/osmo_gsm_tester/srs_ue.py M src/osmo_gsm_tester/util.py M utils/bin/osmo-gsm-tester_netns_setup.sh 4 files changed, 31 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/remote.py b/src/osmo_gsm_tester/remote.py index c5246ce..10ba069 100644 --- a/src/osmo_gsm_tester/remote.py +++ b/src/osmo_gsm_tester/remote.py @@ -171,6 +171,13 @@ SETCAP_NETSYS_ADMIN_BIN = 'osmo-gsm-tester_setcap_netsys_admin.sh' self.run_remote_sync('setcap-netsysadm', ('sudo', SETCAP_NETSYS_ADMIN_BIN, binary_path)) + def create_netns(self, netns): + ''' + It creates the netns if it doesn't already exist. + ''' + NETNS_SETUP_BIN = 'osmo-gsm-tester_netns_setup.sh' + self.run_remote_sync('create_netns', ('sudo', NETNS_SETUP_BIN, netns)) + def change_elf_rpath(self, binary_path, paths): ''' Change RPATH field in ELF executable binary. diff --git a/src/osmo_gsm_tester/srs_ue.py b/src/osmo_gsm_tester/srs_ue.py index 4a99ad9..0accaea 100644 --- a/src/osmo_gsm_tester/srs_ue.py +++ b/src/osmo_gsm_tester/srs_ue.py @@ -125,6 +125,9 @@ self.log('Applying CAP_SYS_ADMIN+CAP_NET_ADMIN capability to srsue') self.rem_host.setcap_netsys_admin(remote_binary) + self.log('Creating netns %s' % self.netns()) + self.rem_host.create_netns(self.netns()) + #'strace', '-ff', args = (remote_binary, self.remote_config_file, '--phy.nof_phy_threads=1', @@ -159,6 +162,9 @@ self.log('Applying CAP_SYS_ADMIN+CAP_NET_ADMIN capability to srsue') util.setcap_netsys_admin(binary, self.run_dir.new_dir('setcap_netsys_admin')) + self.log('Creating netns %s' % self.netns()) + util.create_netns(self.netns(), self.run_dir.new_dir('create_netns')) + args = (binary, os.path.abspath(self.config_file), '--phy.nof_phy_threads=1', '--gw.netns=' + self.netns(), diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py index de37078..a5b2bbf 100644 --- a/src/osmo_gsm_tester/util.py +++ b/src/osmo_gsm_tester/util.py @@ -110,15 +110,22 @@ proc = Process(SETCAP_NETSYS_ADMIN_BIN, run_dir, ['sudo', SETCAP_NETSYS_ADMIN_BIN, binary]) proc.launch_sync() -def move_iface_to_netns(ifname, netns, run_dir): +def create_netns(netns, run_dir): ''' - Moves an iface to a netns. It creates the netns if it doesn't exist. - fail_iface_not_found=False is handy in order to assume the iface is already - in another netns and thus cannot be foud. + It creates the netns if it doesn't already exist. ''' from .process import Process NETNS_SETUP_BIN = 'osmo-gsm-tester_netns_setup.sh' - proc = Process('move_netns', run_dir, ['sudo', NETNS_SETUP_BIN, ifname, netns]) + proc = Process('create_netns', ('sudo', NETNS_SETUP_BIN, netns)) + proc.launch_sync() + +def move_iface_to_netns(ifname, netns, run_dir): + ''' + Moves an iface to a netns. It creates the netns if it doesn't exist. + ''' + from .process import Process + NETNS_SETUP_BIN = 'osmo-gsm-tester_netns_setup.sh' + proc = Process('move_netns', run_dir, ['sudo', NETNS_SETUP_BIN, netns, ifname]) proc.launch_sync() def import_path_prepend(pathname): diff --git a/utils/bin/osmo-gsm-tester_netns_setup.sh b/utils/bin/osmo-gsm-tester_netns_setup.sh index 1600c44..e3d09ea 100755 --- a/utils/bin/osmo-gsm-tester_netns_setup.sh +++ b/utils/bin/osmo-gsm-tester_netns_setup.sh @@ -1,11 +1,7 @@ #!/bin/bash -e -ifname="$1" -netns="$2" -shift -shift - - +netns="$1" +ifname="$2" # optional if [ -f "/var/run/netns/${netns}" ]; then echo "netns $netns already exists" @@ -14,6 +10,10 @@ ip netns add "$netns" fi +if [ "x$ifname" = "x" ]; then + exit 0 +fi + if [ -d "/sys/class/net/${ifname}" ]; then echo "Moving iface $ifname to netns $netns" ip link set $ifname netns $netns -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17250 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I1b7e186b0146f932fe37fbea68e4dfa3120b7a74 Gerrit-Change-Number: 17250 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 18:02:47 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 24 Feb 2020 18:02:47 +0000 Subject: Change in osmo-ci[master]: ansible/setup-simtest.yml: Python2 is deprecated, switch to Python3 References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17251 ) Change subject: ansible/setup-simtest.yml: Python2 is deprecated, switch to Python3 ...................................................................... ansible/setup-simtest.yml: Python2 is deprecated, switch to Python3 PySIM is about to switch to Python3, so Jenkins must be ready. Change-Id: I555af88b0e6a5c082e1e0cbd6915649a8a942052 --- M ansible/setup-simtest.yml 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/51/17251/1 diff --git a/ansible/setup-simtest.yml b/ansible/setup-simtest.yml index 2cbd45b..8ab6f7e 100644 --- a/ansible/setup-simtest.yml +++ b/ansible/setup-simtest.yml @@ -15,11 +15,11 @@ with_items: - vim - ca-certificates - - python-minimal - - python-setuptools - - python-pip - - python-serial - - python-pyscard + - python3-minimal + - python3-setuptools + - python3-pip + - python3-serial + - python3-pyscard - virtualenv roles: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I555af88b0e6a5c082e1e0cbd6915649a8a942052 Gerrit-Change-Number: 17251 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 18:03:31 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 24 Feb 2020 18:03:31 +0000 Subject: Change in pysim[master]: Python2 is deprecated, switch to Python3 In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#10) to the change originally created by gnutoo. ( https://gerrit.osmocom.org/c/pysim/+/15504 ) Change subject: Python2 is deprecated, switch to Python3 ...................................................................... Python2 is deprecated, switch to Python3 Signed-off-by: Denis 'GNUtoo' Carikli Depends: (osmo-ci) I555af88b0e6a5c082e1e0cbd6915649a8a942052 Change-Id: I430d173535e0cd5bb895b9dfc9070cbc40cfc8ff --- M contrib/jenkins.sh M pySim-prog.py M pySim-read.py M pySim/card_handler.py 4 files changed, 7 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/04/15504/10 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/15504 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I430d173535e0cd5bb895b9dfc9070cbc40cfc8ff Gerrit-Change-Number: 15504 Gerrit-PatchSet: 10 Gerrit-Owner: gnutoo Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 18:44:46 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 24 Feb 2020 18:44:46 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: also verify encoding of MS RA Capability In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17245 ) Change subject: tests/rlcmac: also verify encoding of MS RA Capability ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17245/1/tests/rlcmac/RLCMACTest.cpp File tests/rlcmac/RLCMACTest.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17245/1/tests/rlcmac/RLCMACTest.cpp at 246 PS1, Line 246: /* Make sure there's 1 value (currently fails due to failed decoding) */ > is this true anymore? (failure happening). Not anymore. This comment needs to be removed in a separate change. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic46d6e56768f516203d27d8e7a5adb77afdf32b7 Gerrit-Change-Number: 17245 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 18:44:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 19:12:28 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Mon, 24 Feb 2020 19:12:28 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: also verify encoding of MS RA Capability In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17245 ) Change subject: tests/rlcmac: also verify encoding of MS RA Capability ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-pcu/+/17245/1/src/gsm_rlcmac.cpp File src/gsm_rlcmac.cpp: https://gerrit.osmocom.org/c/osmo-pcu/+/17245/1/src/gsm_rlcmac.cpp at 5770 PS1, Line 5770: int encode_gsm_ra_cap(bitvec *vector, MS_Radio_Access_capability_t *data) > That's not used at all by osmo-pcu itself, so move it to the test cpp file. Is it really that critical and deserves CR-1? CSNDESCR_MS_Radio_Access_capability_t is a static (private) member of src/gsm_rlcmac.cpp, so we cannot access it from the outside. We could make it public, but I don't think it makes sense. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic46d6e56768f516203d27d8e7a5adb77afdf32b7 Gerrit-Change-Number: 17245 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 19:12:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 19:38:02 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 19:38:02 +0000 Subject: Change in osmo-gsm-tester[master]: Add test log to junit output References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17252 ) Change subject: Add test log to junit output ...................................................................... Add test log to junit output Change-Id: Ieb5566a41ecf3a9512db579eb37e8d8ed5325057 --- M src/osmo_gsm_tester/log.py M src/osmo_gsm_tester/report.py M src/osmo_gsm_tester/test.py 3 files changed, 16 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/52/17252/1 diff --git a/src/osmo_gsm_tester/log.py b/src/osmo_gsm_tester/log.py index 7c4ae44..d60bf0b 100644 --- a/src/osmo_gsm_tester/log.py +++ b/src/osmo_gsm_tester/log.py @@ -574,6 +574,9 @@ self.log_file.flush() self.log_file.close() + def log_file_path(self): + return self.path + def run_logging_exceptions(func, *func_args, return_on_failure=None, **func_kwargs): try: return func(*func_args, **func_kwargs) diff --git a/src/osmo_gsm_tester/report.py b/src/osmo_gsm_tester/report.py index 4919937..6ee3464 100644 --- a/src/osmo_gsm_tester/report.py +++ b/src/osmo_gsm_tester/report.py @@ -20,6 +20,7 @@ import math from datetime import datetime import xml.etree.ElementTree as et +from xml.sax.saxutils import escape from . import test def trial_to_junit_write(trial, junit_path): @@ -63,6 +64,13 @@ elif t.status != test.Test.PASS: error = et.SubElement(testcase, 'error') error.text = 'could not run' + sout = et.SubElement(testcase, 'system-out') + log_file = t.log_file_path() + if log_file is not None: + with open(log_file, 'r') as myfile: + sout.text = escape(myfile.read()) + else: + sout.text = 'test log file not available' return testcase def trial_to_text(trial): diff --git a/src/osmo_gsm_tester/test.py b/src/osmo_gsm_tester/test.py index 4d4353a..66e8656 100644 --- a/src/osmo_gsm_tester/test.py +++ b/src/osmo_gsm_tester/test.py @@ -86,7 +86,6 @@ finally: if self.log_target: self.log_target.remove() - self.log_target = None def name(self): l = log.get_line_for_src(self.path) @@ -119,4 +118,9 @@ self.status = Test.SKIP self.duration = 0 + def log_file_path(self): + if self.log_target is None: + return None + return self.log_target.log_file_path() + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17252 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ieb5566a41ecf3a9512db579eb37e8d8ed5325057 Gerrit-Change-Number: 17252 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Mon Feb 24 19:41:29 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Mon, 24 Feb 2020 19:41:29 +0000 Subject: Change in osmo-ci[master]: ansible/setup-simtest.yml: Python2 is deprecated, switch to Python3 In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17251 ) Change subject: ansible/setup-simtest.yml: Python2 is deprecated, switch to Python3 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I555af88b0e6a5c082e1e0cbd6915649a8a942052 Gerrit-Change-Number: 17251 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 24 Feb 2020 19:41:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 11:06:54 2020 From: gerrit-no-reply at lists.osmocom.org (herlesupreeth) Date: Tue, 25 Feb 2020 11:06:54 +0000 Subject: Change in pysim[master]: Cosmetic/indentation fix In-Reply-To: References: Message-ID: herlesupreeth has abandoned this change. ( https://gerrit.osmocom.org/c/pysim/+/16973 ) Change subject: Cosmetic/indentation fix ...................................................................... Abandoned Already fixed in another commit -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I45d8cb42755003106f9cf21c5f11bdb1d6c817b7 Gerrit-Change-Number: 16973 Gerrit-PatchSet: 5 Gerrit-Owner: herlesupreeth Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: abandon -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 11:18:39 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 25 Feb 2020 11:18:39 +0000 Subject: Change in osmo-ggsn[master]: add Linux network namespace support for TUN device References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/17253 ) Change subject: add Linux network namespace support for TUN device ...................................................................... add Linux network namespace support for TUN device Change-Id: Idd0ad8fa9c8e7ba0aeec1b52947598d4d297b620 --- M lib/Makefile.am A lib/netns.c A lib/netns.h M sgsnemu/cmdline.c M sgsnemu/cmdline.ggo M sgsnemu/cmdline.h M sgsnemu/sgsnemu.c 7 files changed, 294 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/53/17253/1 diff --git a/lib/Makefile.am b/lib/Makefile.am index 533d777..f2c5dc9 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,10 +1,10 @@ noinst_LIBRARIES = libmisc.a -noinst_HEADERS = gnugetopt.h ippool.h lookup.h syserr.h tun.h in46_addr.h netdev.h gtp-kernel.h util.h +noinst_HEADERS = gnugetopt.h ippool.h lookup.h syserr.h tun.h in46_addr.h netdev.h gtp-kernel.h netns.h util.h AM_CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -ggdb $(LIBOSMOCORE_CFLAGS) -libmisc_a_SOURCES = getopt1.c getopt.c ippool.c lookup.c tun.c debug.c in46_addr.c netdev.c util.c +libmisc_a_SOURCES = getopt1.c getopt.c ippool.c lookup.c tun.c debug.c in46_addr.c netdev.c netns.c util.c if ENABLE_GTP_KERNEL AM_CFLAGS += -DGTP_KERNEL $(LIBGTPNL_CFLAGS) diff --git a/lib/netns.c b/lib/netns.c new file mode 100644 index 0000000..6734b5d --- /dev/null +++ b/lib/netns.c @@ -0,0 +1,147 @@ +/* + * Copyright (C) 2014-2017, Travelping GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#if defined(__linux__) + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "netns.h" + +#define NETNS_PATH "/var/run/netns" + +static int default_nsfd; + +int switch_ns(int nsfd, sigset_t *oldmask) +{ + sigset_t intmask; + + sigfillset(&intmask); + sigprocmask(SIG_BLOCK, &intmask, oldmask); + + return setns(nsfd, CLONE_NEWNET); +} + +void restore_ns(sigset_t *oldmask) +{ + setns(default_nsfd, CLONE_NEWNET); + + sigprocmask(SIG_SETMASK, oldmask, NULL); +} + +int open_ns(int nsfd, const char *pathname, int flags) +{ + sigset_t intmask, oldmask; + int fd; + int errsv; + + sigfillset(&intmask); + sigprocmask(SIG_BLOCK, &intmask, &oldmask); + + setns(nsfd, CLONE_NEWNET); + fd = open(pathname, flags); + errsv = errno; + setns(default_nsfd, CLONE_NEWNET); + + sigprocmask(SIG_SETMASK, &oldmask, NULL); + + errno = errsv; + return fd; +} + +int socket_ns(int nsfd, int domain, int type, int protocol) +{ + sigset_t intmask, oldmask; + int sk; + int errsv; + + sigfillset(&intmask); + sigprocmask(SIG_BLOCK, &intmask, &oldmask); + + setns(nsfd, CLONE_NEWNET); + sk = socket(domain, type, protocol); + errsv = errno; + setns(default_nsfd, CLONE_NEWNET); + + sigprocmask(SIG_SETMASK, &oldmask, NULL); + + errno = errsv; + return sk; +} + +void init_netns() +{ + if ((default_nsfd = open("/proc/self/ns/net", O_RDONLY)) < 0) { + perror("init_netns"); + exit(EXIT_FAILURE); + } +} + +int get_nsfd(const char *name) +{ + int r; + sigset_t intmask, oldmask; + char path[MAXPATHLEN] = NETNS_PATH; + + r = mkdir(path, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH); + if (r < 0 && errno != EEXIST) + return r; + + snprintf(path, sizeof(path), "%s/%s", NETNS_PATH, name); + r = open(path, O_RDONLY|O_CREAT|O_EXCL, 0); + if (r < 0) { + if (errno == EEXIST) + return open(path, O_RDONLY); + + return r; + } + close(r); + + sigfillset(&intmask); + sigprocmask(SIG_BLOCK, &intmask, &oldmask); + + unshare(CLONE_NEWNET); + mount("/proc/self/ns/net", path, "none", MS_BIND, NULL); + + setns(default_nsfd, CLONE_NEWNET); + + sigprocmask(SIG_SETMASK, &oldmask, NULL); + + return open(path, O_RDONLY); +} + +#endif diff --git a/lib/netns.h b/lib/netns.h new file mode 100644 index 0000000..168e44f --- /dev/null +++ b/lib/netns.h @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2014-2017, Travelping GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#ifndef __NETNS_H +#define __NETNS_H + +#if defined(__linux__) + +void init_netns(void); + +int switch_ns(int nsfd, sigset_t *oldmask); +void restore_ns(sigset_t *oldmask); + +int open_ns(int nsfd, const char *pathname, int flags); +int socket_ns(int nsfd, int domain, int type, int protocol); +int get_nsfd(const char *name); + +#endif + +#endif diff --git a/sgsnemu/cmdline.c b/sgsnemu/cmdline.c index b062533..13d0295 100644 --- a/sgsnemu/cmdline.c +++ b/sgsnemu/cmdline.c @@ -72,6 +72,7 @@ " --ipup=STRING Script to run after link-up", " --ipdown=STRING Script to run after link-down", " --tun-device=STRING Name of the local network interface", + " --netns=STRING Network namespace to use", "\n Mode: pinghost\n generate ICMP payload inside G-PDU without setting up tun interface", " --pinghost=STRING Ping remote host", " --pingrate=INT Number of ping req per second (default=`1')", @@ -163,6 +164,7 @@ args_info->ipup_given = 0; args_info->ipdown_given = 0; args_info->tun_device_given = 0; + args_info->netns_given = 0; args_info->pinghost_given = 0; args_info->pingrate_given = 0; args_info->pingsize_given = 0; @@ -244,6 +246,8 @@ args_info->ipdown_orig = NULL; args_info->tun_device_arg = NULL; args_info->tun_device_orig = NULL; + args_info->netns_arg = NULL; + args_info->netns_orig = NULL; args_info->pinghost_arg = NULL; args_info->pinghost_orig = NULL; args_info->pingrate_arg = 1; @@ -300,13 +304,14 @@ args_info->ipup_help = gengetopt_args_info_help[35]; args_info->ipdown_help = gengetopt_args_info_help[36]; args_info->tun_device_help = gengetopt_args_info_help[37]; - args_info->pinghost_help = gengetopt_args_info_help[39]; - args_info->pingrate_help = gengetopt_args_info_help[40]; - args_info->pingsize_help = gengetopt_args_info_help[41]; - args_info->pingcount_help = gengetopt_args_info_help[42]; - args_info->pingquiet_help = gengetopt_args_info_help[43]; - args_info->no_tx_gpdu_seq_help = gengetopt_args_info_help[44]; - args_info->pdp_type_help = gengetopt_args_info_help[45]; + args_info->netns_help = gengetopt_args_info_help[38]; + args_info->pinghost_help = gengetopt_args_info_help[40]; + args_info->pingrate_help = gengetopt_args_info_help[41]; + args_info->pingsize_help = gengetopt_args_info_help[42]; + args_info->pingcount_help = gengetopt_args_info_help[43]; + args_info->pingquiet_help = gengetopt_args_info_help[44]; + args_info->no_tx_gpdu_seq_help = gengetopt_args_info_help[45]; + args_info->pdp_type_help = gengetopt_args_info_help[46]; } @@ -432,6 +437,8 @@ free_string_field(&(args_info->ipdown_orig)); free_string_field(&(args_info->tun_device_arg)); free_string_field(&(args_info->tun_device_orig)); + free_string_field(&(args_info->netns_arg)); + free_string_field(&(args_info->netns_orig)); free_string_field(&(args_info->pinghost_arg)); free_string_field(&(args_info->pinghost_orig)); free_string_field(&(args_info->pingrate_orig)); @@ -545,6 +552,8 @@ if (args_info->tun_device_given) write_into_file(outfile, "tun-device", args_info->tun_device_orig, 0); + if (args_info->netns_given) + write_into_file(outfile, "netns", args_info->netns_orig, 0); if (args_info->pinghost_given) write_into_file(outfile, "pinghost", args_info->pinghost_orig, 0); @@ -709,6 +718,12 @@ prog_name, (additional_error ? additional_error : "")); error_occurred = 1; } + if (args_info->netns_given && !args_info->createif_given) { + fprintf(stderr, + "%s: '--netns' option depends on option 'createif'%s\n", + prog_name, (additional_error ? additional_error : "")); + error_occurred = 1; + } if (args_info->pingrate_given && !args_info->pinghost_given) { fprintf(stderr, "%s: '--pingrate' option depends on option 'pinghost'%s\n", @@ -954,6 +969,7 @@ {"ipup", 1, NULL, 0}, {"ipdown", 1, NULL, 0}, {"tun-device", 1, NULL, 0}, + {"netns", 1, NULL, 0}, {"pinghost", 1, NULL, 0}, {"pingrate", 1, NULL, 0}, {"pingsize", 1, NULL, 0}, @@ -1494,6 +1510,22 @@ goto failure; } + /* Network namespace to use. */ + else if (strcmp + (long_options[option_index].name, + "netns") == 0) { + args_info->createif_mode_counter += 1; + + if (update_arg((void *)&(args_info->netns_arg), + &(args_info->netns_orig), + &(args_info->netns_given), + &(local_args_info.netns_given), + optarg, 0, 0, ARG_STRING, + check_ambiguity, override, 0, 0, + "netns", '-', additional_error)) + goto failure; + + } /* Ping remote host. */ else if (strcmp (long_options[option_index].name, @@ -1609,11 +1641,12 @@ int createif_given[] = { args_info->createif_given, args_info->net_given, args_info->defaultroute_given, args_info->ipup_given, - args_info->ipdown_given, args_info->tun_device_given, -1 + args_info->ipdown_given, args_info->tun_device_given, + args_info->netns_given, -1 }; const char *createif_desc[] = { "--createif", "--net", "--defaultroute", "--ipup", - "--ipdown", "--tun-device", 0 + "--ipdown", "--tun-device", "--netns", 0 }; int pinghost_given[] = { args_info->pinghost_given, args_info->pingrate_given, diff --git a/sgsnemu/cmdline.ggo b/sgsnemu/cmdline.ggo index 0f415f5..0d074aa 100644 --- a/sgsnemu/cmdline.ggo +++ b/sgsnemu/cmdline.ggo @@ -59,6 +59,7 @@ modeoption "ipup" - "Script to run after link-up" string dependon="createif" no mode="createif" modeoption "ipdown" - "Script to run after link-down" string dependon="createif" no mode="createif" modeoption "tun-device" - "Name of the local network interface" string dependon="createif" no mode="createif" +modeoption "netns" - "Network namespace to use" string dependon="createif" no mode="createif" modeoption "pinghost" - "Ping remote host" string no mode="pinghost" modeoption "pingrate" - "Number of ping req per second" int default="1" dependon="pinghost" no mode="pinghost" diff --git a/sgsnemu/cmdline.h b/sgsnemu/cmdline.h index 24f772b..c7c8521 100644 --- a/sgsnemu/cmdline.h +++ b/sgsnemu/cmdline.h @@ -242,6 +242,12 @@ /**< @brief Name of the local network interface original value given at command line. */ const char *tun_device_help; /**< @brief Name of the local network interface help description. */ + char *netns_arg; + /**< @brief Network namespace to use. */ + char *netns_orig; + /**< @brief Network namespace to use original value given at command line. */ + const char *netns_help; + /**< @brief Network namespace to use help description. */ char *pinghost_arg; /**< @brief Ping remote host. */ char *pinghost_orig; @@ -355,6 +361,8 @@ /**< @brief Whether ipdown was given. */ unsigned int tun_device_given; /**< @brief Whether tun-device was given. */ + unsigned int netns_given; + /**< @brief Whether netns was given. */ unsigned int pinghost_given; /**< @brief Whether pinghost was given. */ unsigned int pingrate_given; diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 7904c49..2c0ce1b 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -50,6 +50,7 @@ #include "../lib/tun.h" #include "../lib/ippool.h" #include "../lib/syserr.h" +#include "../lib/netns.h" #include "../gtp/pdp.h" #include "../gtp/gtp.h" #include "cmdline.h" @@ -81,12 +82,16 @@ int maxfd = 0; /* For select() */ int echoversion = 1; /* First try this version */ void *tall_sgsnemu_ctx; /* root talloc ctx */ +#if defined(__linux__) +int netns = -1; /* network namespace */ +#endif /* Struct with local versions of gengetopt options */ struct { int debug; /* Print debug messages */ int createif; /* Create local network interface */ char *tun_dev_name; + char *netns; struct in46_addr netaddr, destaddr, net; /* Network interface */ size_t prefixlen; char *ipup, *ipdown; /* Filename of scripts */ @@ -294,6 +299,8 @@ printf("createif: %d\n", args_info.createif_flag); if (args_info.tun_device_arg) printf("tun-device: %s\n", args_info.tun_device_arg); + if (args_info.netns_arg) + printf("netns: %s\n", args_info.netns_arg); if (args_info.ipup_arg) printf("ipup: %s\n", args_info.ipup_arg); if (args_info.ipdown_arg) @@ -352,6 +359,8 @@ printf("createif: %d\n", args_info.createif_flag); if (args_info.tun_device_arg) printf("tun-device: %s\n", args_info.tun_device_arg); + if (args_info.netns_arg) + printf("netns: %s\n", args_info.netns_arg); if (args_info.ipup_arg) printf("ipup: %s\n", args_info.ipup_arg); if (args_info.ipdown_arg) @@ -870,6 +879,7 @@ /* createif */ options.createif = args_info.createif_flag; options.tun_dev_name = args_info.tun_device_arg; + options.netns = args_info.netns_arg; /* net */ /* Store net as in_addr net and mask */ @@ -1313,10 +1323,23 @@ static int delete_context(struct pdp_t *pdp) { + if (tun && options.ipdown) { +#if defined(__linux__) + sigset_t oldmask; - if (tun && options.ipdown) + if ((options.netns)) { + switch_ns(netns, &oldmask); + } +#endif tun_runscript(tun, options.ipdown); +#if defined(__linux__) + if ((options.netns)) { + restore_ns(&oldmask); + } +#endif + } + ipdel((struct iphash_t *)pdp->peer[0]); memset(pdp->peer[0], 0, sizeof(struct iphash_t)); /* To be sure */ @@ -1377,6 +1400,9 @@ static int create_pdp_conf(struct pdp_t *pdp, void *cbp, int cause) { struct in46_addr addr; +#if defined(__linux__) + sigset_t oldmask; +#endif struct iphash_t *iph = (struct iphash_t *)cbp; @@ -1430,6 +1456,12 @@ break; } +#if defined(__linux__) + if ((options.createif) && (options.netns)) { + switch_ns(netns, &oldmask); + } +#endif + if ((options.createif) && (!options.net.len)) { size_t prefixlen = 32; if (addr.len == 16) @@ -1470,6 +1502,12 @@ free(forwarding); } +#if defined(__linux__) + if ((options.createif) && (options.netns)) { + restore_ns(&oldmask); + } +#endif + ipset(iph, &addr); state = 2; /* Connected */ @@ -1543,6 +1581,9 @@ struct timezone tz; /* Used for calculating ping times */ struct timeval tv; int diff; +#if defined(__linux__) + sigset_t oldmask; +#endif signal(SIGTERM, signal_handler); signal(SIGHUP, signal_handler); @@ -1552,6 +1593,10 @@ msgb_talloc_ctx_init(tall_sgsnemu_ctx, 0); osmo_init_logging2(tall_sgsnemu_ctx, &log_info); +#if defined(__linux__) + init_netns(); +#endif + /* Process options given in configuration file and command line */ if (process_options(argc, argv)) exit(1); @@ -1575,6 +1620,13 @@ else gtp_set_cb_data_ind(gsn, encaps_ping); +#if defined(__linux__) + if ((options.createif) && (options.netns)) { + netns = get_nsfd(options.netns); + switch_ns(netns, &oldmask); + } +#endif + if (options.createif) { printf("Setting up interface\n"); /* Create a tunnel interface */ @@ -1600,6 +1652,12 @@ tun_runscript(tun, options.ipup); } +#if defined(__linux__) + if ((options.createif) && (options.netns)) { + restore_ns(&oldmask); + } +#endif + /* Initialise hash tables */ memset(&iphash, 0, sizeof(iphash)); memset(&iparr, 0, sizeof(iparr)); -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17253 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: Idd0ad8fa9c8e7ba0aeec1b52947598d4d297b620 Gerrit-Change-Number: 17253 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 11:18:40 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 25 Feb 2020 11:18:40 +0000 Subject: Change in osmo-ggsn[master]: netns: Improve error checking References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/17254 ) Change subject: netns: Improve error checking ...................................................................... netns: Improve error checking Change-Id: I9b9c8fd6eeaaa7d190b8e2a34ca82088904c7708 --- M lib/netns.c M lib/netns.h M sgsnemu/sgsnemu.c 3 files changed, 52 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/54/17254/1 diff --git a/lib/netns.c b/lib/netns.c index 6734b5d..442c23c 100644 --- a/lib/netns.c +++ b/lib/netns.c @@ -56,11 +56,13 @@ return setns(nsfd, CLONE_NEWNET); } -void restore_ns(sigset_t *oldmask) +int restore_ns(sigset_t *oldmask) { - setns(default_nsfd, CLONE_NEWNET); + int rc; + if ((rc = setns(default_nsfd, CLONE_NEWNET)) < 0) + return rc; - sigprocmask(SIG_SETMASK, oldmask, NULL); + return sigprocmask(SIG_SETMASK, oldmask, NULL); } int open_ns(int nsfd, const char *pathname, int flags) @@ -103,12 +105,11 @@ return sk; } -void init_netns() +int init_netns() { - if ((default_nsfd = open("/proc/self/ns/net", O_RDONLY)) < 0) { - perror("init_netns"); - exit(EXIT_FAILURE); - } + if ((default_nsfd = open("/proc/self/ns/net", O_RDONLY)) < 0) + return default_nsfd; + return 0; } int get_nsfd(const char *name) @@ -137,7 +138,8 @@ unshare(CLONE_NEWNET); mount("/proc/self/ns/net", path, "none", MS_BIND, NULL); - setns(default_nsfd, CLONE_NEWNET); + if ((r = setns(default_nsfd, CLONE_NEWNET)) < 0) + return r; sigprocmask(SIG_SETMASK, &oldmask, NULL); diff --git a/lib/netns.h b/lib/netns.h index 168e44f..3b91ba3 100644 --- a/lib/netns.h +++ b/lib/netns.h @@ -21,10 +21,10 @@ #if defined(__linux__) -void init_netns(void); +int init_netns(void); int switch_ns(int nsfd, sigset_t *oldmask); -void restore_ns(sigset_t *oldmask); +int restore_ns(sigset_t *oldmask); int open_ns(int nsfd, const char *pathname, int flags); int socket_ns(int nsfd, int domain, int type, int protocol); diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 2c0ce1b..f105d0a 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -1328,14 +1328,22 @@ sigset_t oldmask; if ((options.netns)) { - switch_ns(netns, &oldmask); + if (switch_ns(netns, &oldmask) < 0) { + SYS_ERR(DSGSN, LOGL_ERROR, 0, + "Failed to switch to netns %s: %s\n", + options.netns, strerror(errno)); + } } #endif tun_runscript(tun, options.ipdown); #if defined(__linux__) if ((options.netns)) { - restore_ns(&oldmask); + if (restore_ns(&oldmask) < 0) { + SYS_ERR(DSGSN, LOGL_ERROR, 0, + "Failed to switch to original netns: %s\n", + strerror(errno)); + } } #endif } @@ -1458,7 +1466,11 @@ #if defined(__linux__) if ((options.createif) && (options.netns)) { - switch_ns(netns, &oldmask); + if (switch_ns(netns, &oldmask) < 0) { + SYS_ERR(DSGSN, LOGL_ERROR, 0, + "Failed to switch to netns %s: %s\n", + options.netns, strerror(errno)); + } } #endif @@ -1504,7 +1516,10 @@ #if defined(__linux__) if ((options.createif) && (options.netns)) { - restore_ns(&oldmask); + if (restore_ns(&oldmask) < 0) { + SYS_ERR(DSGSN, LOGL_ERROR, 0, "Failed to switch to original netns: %s\n", + strerror(errno)); + } } #endif @@ -1572,7 +1587,7 @@ fd_set fds; /* For select() */ struct timeval idleTime; /* How long to select() */ struct pdp_t *pdp; - int n; + int n, rc; int starttime = time(NULL); /* Time program was started */ int stoptime = 0; /* Time to exit */ int pingtimeout = 0; /* Time to print ping statistics */ @@ -1594,7 +1609,10 @@ osmo_init_logging2(tall_sgsnemu_ctx, &log_info); #if defined(__linux__) - init_netns(); + if ((rc = init_netns()) < 0) { + SYS_ERR(DSGSN, LOGL_ERROR, 0, "Failed to initialize netns: %s", strerror(errno)); + exit(1); + } #endif /* Process options given in configuration file and command line */ @@ -1622,8 +1640,16 @@ #if defined(__linux__) if ((options.createif) && (options.netns)) { - netns = get_nsfd(options.netns); - switch_ns(netns, &oldmask); + if ((netns = get_nsfd(options.netns)) < 0) { + SYS_ERR(DSGSN, LOGL_ERROR, 0, "Failed to obtain fd for netns %s: %s\n", + options.netns, strerror(errno)); + exit(1); + } + if (switch_ns(netns, &oldmask) < 0) { + SYS_ERR(DSGSN, LOGL_ERROR, 0, "Failed to switch to netns %s: %s\n", + options.netns, strerror(errno)); + exit(1); + } } #endif @@ -1654,7 +1680,11 @@ #if defined(__linux__) if ((options.createif) && (options.netns)) { - restore_ns(&oldmask); + if ((rc = restore_ns(&oldmask)) < 0) { + SYS_ERR(DSGSN, LOGL_ERROR, 0, "Failed to switch to original netns: %s\n", + strerror(errno)); + exit(1); + } } #endif -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17254 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I9b9c8fd6eeaaa7d190b8e2a34ca82088904c7708 Gerrit-Change-Number: 17254 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 11:19:01 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 25 Feb 2020 11:19:01 +0000 Subject: Change in osmo-ggsn[master]: add Linux network namespace support for TUN device In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/17253 ) Change subject: add Linux network namespace support for TUN device ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17253 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: Idd0ad8fa9c8e7ba0aeec1b52947598d4d297b620 Gerrit-Change-Number: 17253 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 25 Feb 2020 11:19:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 13:13:19 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 25 Feb 2020 13:13:19 +0000 Subject: Change in osmo-ggsn[master]: cosmetic: Fix comment typo References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/17256 ) Change subject: cosmetic: Fix comment typo ...................................................................... cosmetic: Fix comment typo Change-Id: I8240b388ffb8c1806bf0d34a9e59146b403a13be --- M ggsn/icmpv6.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/56/17256/1 diff --git a/ggsn/icmpv6.c b/ggsn/icmpv6.c index b7b97eb..12119b8 100644 --- a/ggsn/icmpv6.c +++ b/ggsn/icmpv6.c @@ -1,7 +1,7 @@ /* Minimal ICMPv6 code for generating router advertisements as required by * relevant 3GPP specs for a GGSN with IPv6 PDP contexts */ -/* (C) 2017 by Harald Welte +/* (C) 2017 by Harald Welte * * The contents of this file may be used under the terms of the GNU * General Public License Version 2, provided that the above copyright @@ -95,7 +95,7 @@ /*! construct a 3GPP 29.061 compliant router advertisement for a given prefix * \param[in] saddr Source IPv6 address for router advertisement * \param[in] daddr Destination IPv6 address for router advertisement IPv6 header - * \param[in] prefix The single prefix to be advertised (/64 implied!)i + * \param[in] prefix The single prefix to be advertised (/64 implied!) * \returns callee-allocated message buffer containing router advertisement */ struct msgb *icmpv6_construct_ra(const struct in6_addr *saddr, const struct in6_addr *daddr, -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I8240b388ffb8c1806bf0d34a9e59146b403a13be Gerrit-Change-Number: 17256 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 13:22:37 2020 From: gerrit-no-reply at lists.osmocom.org (roh) Date: Tue, 25 Feb 2020 13:22:37 +0000 Subject: Change in osmo-ccid-firmware[master]: Implement CI scripts for testing the resulting binary on hardware for... In-Reply-To: References: Message-ID: roh has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 ) Change subject: Implement CI scripts for testing the resulting binary on hardware for jenkins ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 Gerrit-Change-Number: 17099 Gerrit-PatchSet: 4 Gerrit-Owner: roh Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: roh Gerrit-Comment-Date: Tue, 25 Feb 2020 13:22:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 13:22:46 2020 From: gerrit-no-reply at lists.osmocom.org (roh) Date: Tue, 25 Feb 2020 13:22:46 +0000 Subject: Change in osmo-ccid-firmware[master]: Implement CI scripts for testing the resulting binary on hardware for... In-Reply-To: References: Message-ID: roh has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 ) Change subject: Implement CI scripts for testing the resulting binary on hardware for jenkins ...................................................................... Implement CI scripts for testing the resulting binary on hardware for jenkins Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 --- A tests/README A tests/run-tests A tests/sysmo-octsim/01_check_rig.out A tests/sysmo-octsim/01_check_rig.sh A tests/sysmo-octsim/02_flash_dfu.out A tests/sysmo-octsim/02_flash_dfu.sh A tests/sysmo-octsim/03_check_lsusb.out A tests/sysmo-octsim/03_check_lsusb.sh A tests/sysmo-octsim/04_check_dfu_lsusb.out A tests/sysmo-octsim/04_check_dfu_lsusb.sh A tests/sysmo-octsim/README A tests/sysmo-octsim/ctl_reset_target.sh A tests/sysmo-octsim/ctl_reset_to_dfu.sh A tests/sysmo-octsim/fetch_image.sh A tests/sysmo-octsim/flash_octsim_dfu.sh A tests/sysmo-octsim/get_installed_version.sh A tests/sysmo-octsim/prepare A tests/sysmo-octsim/regen A tests/sysmo-octsim/run-tests A tests/sysmo-octsim/test-data 20 files changed, 506 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve roh: Looks good to me, approved Hoernchen: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/tests/README b/tests/README new file mode 100644 index 0000000..552ac71 --- /dev/null +++ b/tests/README @@ -0,0 +1,7 @@ +osmo-ccid-firmware +================== + +this testbed is the hardware-CI interface to make sure the firmware built is also working when flashed onto hardware. + +to run it you will need a usb controlled relay board like the devantech_Ltd._USB-RLY08 and a sysmo-octsim board. + diff --git a/tests/run-tests b/tests/run-tests new file mode 100755 index 0000000..bfc942d --- /dev/null +++ b/tests/run-tests @@ -0,0 +1,14 @@ +#!/bin/sh +echo "==========================================================" +echo " EXECUTING TESTS FOR SYSMO-OCTSIM" +echo "==========================================================" +echo "" +cd ./sysmo-octsim +echo "Location $PWD" +echo "" +sh ./run-tests +cd .. +echo "" +echo "" +echo "" +echo "" diff --git a/tests/sysmo-octsim/01_check_rig.out b/tests/sysmo-octsim/01_check_rig.out new file mode 100644 index 0000000..1bd7d66 --- /dev/null +++ b/tests/sysmo-octsim/01_check_rig.out @@ -0,0 +1,90 @@ + +ID 04d8:ffee Microchip Technology, Inc. Devantech USB-ISS +Device Descriptor: + bLength 18 + bDescriptorType 1 + bcdUSB 2.00 + bDeviceClass 2 Communications + bDeviceSubClass 0 + bDeviceProtocol 0 + bMaxPacketSize0 8 + idVendor 0x04d8 Microchip Technology, Inc. + idProduct 0xffee Devantech USB-ISS + bcdDevice 1.00 + iManufacturer 1 Devantech Ltd. + iProduct 2 USB-RLY08 + iSerial 3 00021197 + bNumConfigurations 1 + Configuration Descriptor: + bLength 9 + bDescriptorType 2 + wTotalLength 0x0043 + bNumInterfaces 2 + bConfigurationValue 1 + iConfiguration 0 + bmAttributes 0xc0 + Self Powered + MaxPower 100mA + Interface Descriptor: + bLength 9 + bDescriptorType 4 + bInterfaceNumber 0 + bAlternateSetting 0 + bNumEndpoints 1 + bInterfaceClass 2 Communications + bInterfaceSubClass 2 Abstract (modem) + bInterfaceProtocol 1 AT-commands (v.25ter) + iInterface 0 + CDC Header: + bcdCDC 1.10 + CDC ACM: + bmCapabilities 0x02 + line coding and serial state + CDC Union: + bMasterInterface 0 + bSlaveInterface 1 + CDC Call Management: + bmCapabilities 0x00 + bDataInterface 1 + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x81 EP 1 IN + bmAttributes 3 + Transfer Type Interrupt + Synch Type None + Usage Type Data + wMaxPacketSize 0x0008 1x 8 bytes + bInterval 2 + Interface Descriptor: + bLength 9 + bDescriptorType 4 + bInterfaceNumber 1 + bAlternateSetting 0 + bNumEndpoints 2 + bInterfaceClass 10 CDC Data + bInterfaceSubClass 0 + bInterfaceProtocol 0 + iInterface 0 + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x02 EP 2 OUT + bmAttributes 2 + Transfer Type Bulk + Synch Type None + Usage Type Data + wMaxPacketSize 0x0040 1x 64 bytes + bInterval 0 + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x82 EP 2 IN + bmAttributes 2 + Transfer Type Bulk + Synch Type None + Usage Type Data + wMaxPacketSize 0x0040 1x 64 bytes + bInterval 0 +Device Status: 0x0001 + Self Powered diff --git a/tests/sysmo-octsim/01_check_rig.sh b/tests/sysmo-octsim/01_check_rig.sh new file mode 100755 index 0000000..3831fb6 --- /dev/null +++ b/tests/sysmo-octsim/01_check_rig.sh @@ -0,0 +1,4 @@ +#!/bin/sh +. ./test-data + +lsusb -d 04d8:ffee -v 2>/dev/null | sed -e "s/$Bus.*Device.*:\ ID/ID/g" diff --git a/tests/sysmo-octsim/02_flash_dfu.out b/tests/sysmo-octsim/02_flash_dfu.out new file mode 100644 index 0000000..eacc4d1 --- /dev/null +++ b/tests/sysmo-octsim/02_flash_dfu.out @@ -0,0 +1,23 @@ +fetch image +done +resetting target to dfu +done +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Opening DFU capable USB device... +ID 1d50:6141 +Run-time device DFU version 0110 +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 0110 +Device returned transfer size 512 +Copying data from PC to DFU device +Download done. +Resetting USB to switch back to runtime mode diff --git a/tests/sysmo-octsim/02_flash_dfu.sh b/tests/sysmo-octsim/02_flash_dfu.sh new file mode 100755 index 0000000..c51d5b1 --- /dev/null +++ b/tests/sysmo-octsim/02_flash_dfu.sh @@ -0,0 +1,9 @@ +#!/bin/sh +. ./test-data + +./get_installed_version.sh +./fetch_image.sh +./ctl_reset_to_dfu.sh +./flash_octsim_dfu.sh +sleep 1 +./get_installed_version.sh diff --git a/tests/sysmo-octsim/03_check_lsusb.out b/tests/sysmo-octsim/03_check_lsusb.out new file mode 100644 index 0000000..bdc7672 --- /dev/null +++ b/tests/sysmo-octsim/03_check_lsusb.out @@ -0,0 +1,179 @@ + +ID 1d50:6141 OpenMoko, Inc. +Device Descriptor: + bLength 18 + bDescriptorType 1 + bcdUSB 2.00 + bDeviceClass 2 Communications + bDeviceSubClass 0 + bDeviceProtocol 0 + bMaxPacketSize0 64 + idVendor 0x1d50 OpenMoko, Inc. + idProduct 0x6141 + bcdDevice 0.00 + iManufacturer 1 sysmocom - s.f.m.c. GmbH + iProduct 2 sysmoOCTSIM + iSerial 7 ecc68ade3335355320202034463715ff + bNumConfigurations 1 + Configuration Descriptor: + bLength 9 + bDescriptorType 2 + wTotalLength 0x00a9 + bNumInterfaces 4 + bConfigurationValue 1 + iConfiguration 3 A + bmAttributes 0x80 + (Bus Powered) + MaxPower 500mA + Interface Descriptor: + bLength 9 + bDescriptorType 4 + bInterfaceNumber 1 + bAlternateSetting 0 + bNumEndpoints 1 + bInterfaceClass 2 Communications + bInterfaceSubClass 2 Abstract (modem) + bInterfaceProtocol 0 + iInterface 4 debug UART + CDC Header: + bcdCDC 10.01 + CDC Call Management: + bmCapabilities 0x01 + call management + bDataInterface 0 + CDC ACM: + bmCapabilities 0x02 + line coding and serial state + CDC Union: + bMasterInterface 1 + bSlaveInterface 2 + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x82 EP 2 IN + bmAttributes 3 + Transfer Type Interrupt + Synch Type None + Usage Type Data + wMaxPacketSize 0x0040 1x 64 bytes + bInterval 10 + Interface Descriptor: + bLength 9 + bDescriptorType 4 + bInterfaceNumber 2 + bAlternateSetting 0 + bNumEndpoints 2 + bInterfaceClass 10 CDC Data + bInterfaceSubClass 0 + bInterfaceProtocol 0 + iInterface 5 debug UART + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x01 EP 1 OUT + bmAttributes 2 + Transfer Type Bulk + Synch Type None + Usage Type Data + wMaxPacketSize 0x0040 1x 64 bytes + bInterval 0 + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x81 EP 1 IN + bmAttributes 2 + Transfer Type Bulk + Synch Type None + Usage Type Data + wMaxPacketSize 0x0040 1x 64 bytes + bInterval 0 + Interface Descriptor: + bLength 9 + bDescriptorType 4 + bInterfaceNumber 0 + bAlternateSetting 0 + bNumEndpoints 3 + bInterfaceClass 11 Chip/SmartCard + bInterfaceSubClass 0 + bInterfaceProtocol 0 + iInterface 6 CCID + ChipCard Interface Descriptor: + bLength 54 + bDescriptorType 33 + bcdCCID 1.10 (Warning: Only accurate for version 1.0) + nMaxSlotIndex 7 + bVoltageSupport 7 5.0V 3.0V 1.8V + dwProtocols 1 T=0 + dwDefaultClock 2500 + dwMaxiumumClock 20000 + bNumClockSupported 4 + dwDataRate 6720 bps + dwMaxDataRate 921600 bps + bNumDataRatesSupp. 0 + dwMaxIFSD 0 + dwSyncProtocols 00000000 + dwMechanical 00000000 + dwFeatures 000100B0 + Auto clock change + Auto baud rate change + Auto PPS made by CCID + TPDU level exchange + dwMaxCCIDMsgLen 272 + bClassGetResponse echo + bClassEnvelope echo + wlcdLayout none + bPINSupport 0 + bMaxCCIDBusySlots 8 + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x02 EP 2 OUT + bmAttributes 2 + Transfer Type Bulk + Synch Type None + Usage Type Data + wMaxPacketSize 0x0040 1x 64 bytes + bInterval 0 + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x83 EP 3 IN + bmAttributes 2 + Transfer Type Bulk + Synch Type None + Usage Type Data + wMaxPacketSize 0x0040 1x 64 bytes + bInterval 0 + Endpoint Descriptor: + bLength 7 + bDescriptorType 5 + bEndpointAddress 0x84 EP 4 IN + bmAttributes 3 + Transfer Type Interrupt + Synch Type None + Usage Type Data + wMaxPacketSize 0x0040 1x 64 bytes + bInterval 16 + Interface Descriptor: + bLength 9 + bDescriptorType 4 + bInterfaceNumber 3 + bAlternateSetting 0 + bNumEndpoints 0 + bInterfaceClass 254 Application Specific Interface + bInterfaceSubClass 1 Device Firmware Update + bInterfaceProtocol 1 + iInterface 8 sysmoOCTSIM DFU (Runtime) + Device Firmware Upgrade Interface Descriptor: + bLength 9 + bDescriptorType 33 + bmAttributes 8 + Will Detach + Manifestation Intolerant + Upload Unsupported + Download Unsupported + wDetachTimeout 0 milliseconds + wTransferSize 512 bytes + bcdDFUVersion 1.00 +Device Status: 0x0000 + (Bus Powered) diff --git a/tests/sysmo-octsim/03_check_lsusb.sh b/tests/sysmo-octsim/03_check_lsusb.sh new file mode 100755 index 0000000..f12e7d4 --- /dev/null +++ b/tests/sysmo-octsim/03_check_lsusb.sh @@ -0,0 +1,4 @@ +#!/bin/sh +. ./test-data + +lsusb -d 1d50:6141 -v 2>/dev/null | sed -e "s/$Bus.*Device.*:\ ID/ID/g"|sed -e "s/^.*iProduct.*2.*sysmoOCTSIM.*$/ iProduct 2 sysmoOCTSIM/g" diff --git a/tests/sysmo-octsim/04_check_dfu_lsusb.out b/tests/sysmo-octsim/04_check_dfu_lsusb.out new file mode 100644 index 0000000..4e8e136 --- /dev/null +++ b/tests/sysmo-octsim/04_check_dfu_lsusb.out @@ -0,0 +1,54 @@ +resetting target to dfu +done + +ID 1d50:6141 OpenMoko, Inc. +Device Descriptor: + bLength 18 + bDescriptorType 1 + bcdUSB 2.00 + bDeviceClass 0 + bDeviceSubClass 0 + bDeviceProtocol 0 + bMaxPacketSize0 64 + idVendor 0x1d50 OpenMoko, Inc. + idProduct 0x6141 + bcdDevice 0.00 + iManufacturer 1 sysmocom + iProduct 2 sysmoOCTSIM (osmo-ASF4-DFU) + iSerial 0 + bNumConfigurations 1 + Configuration Descriptor: + bLength 9 + bDescriptorType 2 + wTotalLength 0x001b + bNumInterfaces 1 + bConfigurationValue 1 + iConfiguration 0 + bmAttributes 0x80 + (Bus Powered) + MaxPower 100mA + Interface Descriptor: + bLength 9 + bDescriptorType 4 + bInterfaceNumber 0 + bAlternateSetting 0 + bNumEndpoints 0 + bInterfaceClass 254 Application Specific Interface + bInterfaceSubClass 1 Device Firmware Update + bInterfaceProtocol 2 + iInterface 3 SAM D5x/E5x DFU bootloader (DFU mode) + Device Firmware Upgrade Interface Descriptor: + bLength 9 + bDescriptorType 33 + bmAttributes 9 + Will Detach + Manifestation Intolerant + Upload Unsupported + Download Supported + wDetachTimeout 0 milliseconds + wTransferSize 512 bytes + bcdDFUVersion 1.10 +Device Status: 0x0000 + (Bus Powered) +resetting target +done diff --git a/tests/sysmo-octsim/04_check_dfu_lsusb.sh b/tests/sysmo-octsim/04_check_dfu_lsusb.sh new file mode 100755 index 0000000..eef2246 --- /dev/null +++ b/tests/sysmo-octsim/04_check_dfu_lsusb.sh @@ -0,0 +1,6 @@ +#!/bin/sh +. ./test-data + +./ctl_reset_to_dfu.sh +lsusb -d 1d50:6141 -v 2>/dev/null | sed -e "s/$Bus.*Device.*:\ ID/ID/g" +./ctl_reset_target.sh diff --git a/tests/sysmo-octsim/README b/tests/sysmo-octsim/README new file mode 100644 index 0000000..b3ac561 --- /dev/null +++ b/tests/sysmo-octsim/README @@ -0,0 +1,4 @@ +This testsuite assumes you have installed the following utilities: +- lsusb +- dfu-util +- wget diff --git a/tests/sysmo-octsim/ctl_reset_target.sh b/tests/sysmo-octsim/ctl_reset_target.sh new file mode 100755 index 0000000..6eed990 --- /dev/null +++ b/tests/sysmo-octsim/ctl_reset_target.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +#usb_rly08 serial +USB_RELAY="/dev/serial/by-id/usb-Devantech_Ltd._USB-RLY08_00021197-if00" + +#usb_rly08 +# relay1 = usbpower +# relay2 = dfu-btn + +#12 off +echo "resetting target" +echo -n "op" > $USB_RELAY +sleep 1 +# 1 on +echo -n "e" > $USB_RELAY +sleep 1 +echo "done" diff --git a/tests/sysmo-octsim/ctl_reset_to_dfu.sh b/tests/sysmo-octsim/ctl_reset_to_dfu.sh new file mode 100755 index 0000000..969ca0c --- /dev/null +++ b/tests/sysmo-octsim/ctl_reset_to_dfu.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +#usb_rly08 serial +USB_RELAY="/dev/serial/by-id/usb-Devantech_Ltd._USB-RLY08_00021197-if00" + +#usb_rly08 +# relay1 = usbpower +# relay2 = dfu-btn + +echo "resetting target to dfu" +#12 off +echo -n "op" > $USB_RELAY +sleep 1 +# 2 on +echo -n "f" > $USB_RELAY +sleep 1 +# 1 on +echo -n "e" > $USB_RELAY +sleep 1 +# 2 off +echo -n "p" > $USB_RELAY +sleep 1 +echo "done" diff --git a/tests/sysmo-octsim/fetch_image.sh b/tests/sysmo-octsim/fetch_image.sh new file mode 100755 index 0000000..c0a4f8f --- /dev/null +++ b/tests/sysmo-octsim/fetch_image.sh @@ -0,0 +1,6 @@ +#!/bin/sh +. ./test-data + +echo "fetch image" +wget -O dl/sysmoOCTSIM-latest.bin http://ftp.osmocom.org/binaries/osmo-ccid-firmware/latest/sysmoOCTSIM.bin -nv +echo "done" diff --git a/tests/sysmo-octsim/flash_octsim_dfu.sh b/tests/sysmo-octsim/flash_octsim_dfu.sh new file mode 100755 index 0000000..5b9c19a --- /dev/null +++ b/tests/sysmo-octsim/flash_octsim_dfu.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +dfu-util --device 1d50:6141 --alt 0 --reset --download dl/sysmoOCTSIM-latest.bin 2>/dev/null |grep -v "Download\t"|grep -v "\[" diff --git a/tests/sysmo-octsim/get_installed_version.sh b/tests/sysmo-octsim/get_installed_version.sh new file mode 100755 index 0000000..be61865 --- /dev/null +++ b/tests/sysmo-octsim/get_installed_version.sh @@ -0,0 +1,5 @@ +#!/bin/sh +. ./test-data + +echo -n "fw version: " 1>&2 +lsusb -d 1d50:6141 -v 2>/dev/null | grep iProduct|awk '{}{print $4}' 1>&2 diff --git a/tests/sysmo-octsim/prepare b/tests/sysmo-octsim/prepare new file mode 100755 index 0000000..bb95e40 --- /dev/null +++ b/tests/sysmo-octsim/prepare @@ -0,0 +1,8 @@ +#!/bin/sh + +. ./test-data + +echo "================ PREPARING TEST RIG ================" +./ctl_reset_target.sh +echo "================ TEST RIG PREPARED =================" +echo "" diff --git a/tests/sysmo-octsim/regen b/tests/sysmo-octsim/regen new file mode 100755 index 0000000..7ed1fab --- /dev/null +++ b/tests/sysmo-octsim/regen @@ -0,0 +1,11 @@ +#!/bin/sh + +echo "Regenerating test output..." +./prepare +./01_check_rig.sh > ./01_check_rig.out +./02_flash_dfu.sh > ./02_flash_dfu.out +./03_check_lsusb.sh > ./03_check_lsusb.out +./04_check_dfu_lsusb.sh > ./04_check_dfu_lsusb.out +echo "Reference output regenerated!" +echo "" + diff --git a/tests/sysmo-octsim/run-tests b/tests/sysmo-octsim/run-tests new file mode 100755 index 0000000..b67c425 --- /dev/null +++ b/tests/sysmo-octsim/run-tests @@ -0,0 +1,39 @@ +#!/bin/sh + +# default: execute all tests +TESTS="01_check_rig.sh 02_flash_dfu.sh 03_check_lsusb.sh 04_check_dfu_lsusb.sh" + +# if command line specifies some specific tests, execute only those +if [ $# -ge 1 ]; then + TESTS=$* +fi + +TMP=`tempfile` +NUM_FAIL=0 + +# prepare test card +./prepare + +for T in $TESTS; do + echo "==> Executing Testcase $T" + EXPOUT=${T%%.sh}.out + rm $TMP + ./$T > $TMP + diff -u $EXPOUT $TMP + if [ $? -eq 0 ]; then + echo "Test $T passed" + else + echo "Test $T FAILED!" + NUM_FAIL=$((NUM_FAIL+1)) + fi +done + +echo +echo +echo "Summary: $NUM_FAIL Tests failed" + +if [ $NUM_FAIL -gt 0 ]; then + exit 1 +else + exit 0 +fi diff --git a/tests/sysmo-octsim/test-data b/tests/sysmo-octsim/test-data new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/sysmo-octsim/test-data -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17099 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I3ddd2b9afda0e15883603566259c6e58571d2bc8 Gerrit-Change-Number: 17099 Gerrit-PatchSet: 5 Gerrit-Owner: roh Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: roh Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 13:40:55 2020 From: gerrit-no-reply at lists.osmocom.org (roh) Date: Tue, 25 Feb 2020 13:40:55 +0000 Subject: Change in osmo-ccid-firmware[master]: generic improvements for the testsbed: * fix run-tests so it can retu... References: Message-ID: roh has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17257 ) Change subject: generic improvements for the testsbed: * fix run-tests so it can return != 0 * bail out if prepare fails * add more sanity checks to prepare * generalize usb-ids, paths * add test for flashing from application mode * add test reading simcards via pysim ...................................................................... generic improvements for the testsbed: * fix run-tests so it can return != 0 * bail out if prepare fails * add more sanity checks to prepare * generalize usb-ids, paths * add test for flashing from application mode * add test reading simcards via pysim Change-Id: I246224e29e5936b4fe40cf7d7a5ff83c9940d121 --- M tests/run-tests M tests/sysmo-octsim/01_check_rig.sh M tests/sysmo-octsim/03_check_lsusb.sh M tests/sysmo-octsim/04_check_dfu_lsusb.sh A tests/sysmo-octsim/05_flash_dfu_from_app.out A tests/sysmo-octsim/05_flash_dfu_from_app.sh A tests/sysmo-octsim/06_test_simcards.out A tests/sysmo-octsim/06_test_simcards.sh M tests/sysmo-octsim/README M tests/sysmo-octsim/ctl_reset_target.sh M tests/sysmo-octsim/ctl_reset_to_dfu.sh M tests/sysmo-octsim/fetch_image.sh M tests/sysmo-octsim/flash_octsim_dfu.sh M tests/sysmo-octsim/get_installed_version.sh M tests/sysmo-octsim/prepare M tests/sysmo-octsim/regen M tests/sysmo-octsim/run-tests M tests/sysmo-octsim/test-data 18 files changed, 206 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/57/17257/1 diff --git a/tests/run-tests b/tests/run-tests index bfc942d..802765d 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -3,12 +3,23 @@ echo " EXECUTING TESTS FOR SYSMO-OCTSIM" echo "==========================================================" echo "" +NUM_FAIL=0 cd ./sysmo-octsim echo "Location $PWD" echo "" sh ./run-tests +if [ ! $? -eq 0 ]; then + NUM_FAIL=$((NUM_FAIL+1)) +fi + cd .. echo "" echo "" echo "" echo "" + +if [ $NUM_FAIL -gt 0 ]; then + exit 1 +else + exit 0 +fi diff --git a/tests/sysmo-octsim/01_check_rig.sh b/tests/sysmo-octsim/01_check_rig.sh index 3831fb6..d9a6811 100755 --- a/tests/sysmo-octsim/01_check_rig.sh +++ b/tests/sysmo-octsim/01_check_rig.sh @@ -1,4 +1,4 @@ #!/bin/sh . ./test-data -lsusb -d 04d8:ffee -v 2>/dev/null | sed -e "s/$Bus.*Device.*:\ ID/ID/g" +lsusb -d $USBD_RELAY -v 2>/dev/null | sed -e "s/$Bus.*Device.*:\ ID/ID/g" diff --git a/tests/sysmo-octsim/03_check_lsusb.sh b/tests/sysmo-octsim/03_check_lsusb.sh index f12e7d4..f1508ad 100755 --- a/tests/sysmo-octsim/03_check_lsusb.sh +++ b/tests/sysmo-octsim/03_check_lsusb.sh @@ -1,4 +1,4 @@ #!/bin/sh . ./test-data -lsusb -d 1d50:6141 -v 2>/dev/null | sed -e "s/$Bus.*Device.*:\ ID/ID/g"|sed -e "s/^.*iProduct.*2.*sysmoOCTSIM.*$/ iProduct 2 sysmoOCTSIM/g" +lsusb -d $USBD_TARGET -v 2>/dev/null | sed -e "s/$Bus.*Device.*:\ ID/ID/g"|sed -e "s/^.*iProduct.*2.*sysmoOCTSIM.*$/ iProduct 2 sysmoOCTSIM/g" diff --git a/tests/sysmo-octsim/04_check_dfu_lsusb.sh b/tests/sysmo-octsim/04_check_dfu_lsusb.sh index eef2246..bc6bbb2 100755 --- a/tests/sysmo-octsim/04_check_dfu_lsusb.sh +++ b/tests/sysmo-octsim/04_check_dfu_lsusb.sh @@ -2,5 +2,5 @@ . ./test-data ./ctl_reset_to_dfu.sh -lsusb -d 1d50:6141 -v 2>/dev/null | sed -e "s/$Bus.*Device.*:\ ID/ID/g" +lsusb -d $USBD_TARGET -v 2>/dev/null | sed -e "s/$Bus.*Device.*:\ ID/ID/g" ./ctl_reset_target.sh diff --git a/tests/sysmo-octsim/05_flash_dfu_from_app.out b/tests/sysmo-octsim/05_flash_dfu_from_app.out new file mode 100644 index 0000000..3da656a --- /dev/null +++ b/tests/sysmo-octsim/05_flash_dfu_from_app.out @@ -0,0 +1,26 @@ +resetting target +done +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Opening DFU capable USB device... +ID 1d50:6141 +Run-time device DFU version 0100 +Claiming USB DFU Runtime Interface... +Determining device status: state = appIDLE, status = 0 +Device really in Runtime Mode, send DFU detach request... +Device will detach and reattach... +Opening DFU USB Device... +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 0110 +Device returned transfer size 512 +Copying data from PC to DFU device +Download done. +Resetting USB to switch back to runtime mode diff --git a/tests/sysmo-octsim/05_flash_dfu_from_app.sh b/tests/sysmo-octsim/05_flash_dfu_from_app.sh new file mode 100755 index 0000000..a4e2d98 --- /dev/null +++ b/tests/sysmo-octsim/05_flash_dfu_from_app.sh @@ -0,0 +1,9 @@ +#!/bin/sh +. ./test-data + +./get_installed_version.sh +#./fetch_image.sh +./ctl_reset_target.sh +./flash_octsim_dfu.sh +sleep 1 +./get_installed_version.sh diff --git a/tests/sysmo-octsim/06_test_simcards.out b/tests/sysmo-octsim/06_test_simcards.out new file mode 100644 index 0000000..addd462 --- /dev/null +++ b/tests/sysmo-octsim/06_test_simcards.out @@ -0,0 +1,117 @@ +resetting target +done +card slot 0 +Using PC/SC reader (dev=0) interface +Reading ... +ICCID: 8988211000000090160 +IMSI: 001640000069444 +SMSP: ffffffffffffffffffffffffffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000 +SPN: Not available +Display HPLMN: False +Display OPLMN: False +PLMNsel: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +PLMNwAcT: + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + +OPLMNwAcT: + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + +HPLMNAcT: + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + +ACC: 0040 +MSISDN: Can't read file -- Length of MSISDN (136 bytes) is out of range +AD: 00000002 +Done ! + + +card slot 4 +Using PC/SC reader (dev=4) interface +Reading ... +ICCID: 8988211000000271083 +IMSI: 001640000069555 +SMSP: ffffffffffffffffffffffffffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000 +SPN: Not available +Display HPLMN: False +Display OPLMN: False +PLMNsel: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +PLMNwAcT: + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + +OPLMNwAcT: + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + +HPLMNAcT: + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + ffffffffff # unused + +ACC: 0100 +MSISDN: Not available +AD: 00000002 +Done ! + diff --git a/tests/sysmo-octsim/06_test_simcards.sh b/tests/sysmo-octsim/06_test_simcards.sh new file mode 100755 index 0000000..43c121b --- /dev/null +++ b/tests/sysmo-octsim/06_test_simcards.sh @@ -0,0 +1,13 @@ +#!/bin/sh +. ./test-data + +./ctl_reset_target.sh +sleep 1 +./get_installed_version.sh + +echo "card slot 0" +$PYSIMREAD -p 0 +echo "" +echo "card slot 4" +$PYSIMREAD -p 4 + diff --git a/tests/sysmo-octsim/README b/tests/sysmo-octsim/README index b3ac561..162b876 100644 --- a/tests/sysmo-octsim/README +++ b/tests/sysmo-octsim/README @@ -2,3 +2,4 @@ - lsusb - dfu-util - wget +- pysim diff --git a/tests/sysmo-octsim/ctl_reset_target.sh b/tests/sysmo-octsim/ctl_reset_target.sh index 6eed990..1ce1a39 100755 --- a/tests/sysmo-octsim/ctl_reset_target.sh +++ b/tests/sysmo-octsim/ctl_reset_target.sh @@ -1,7 +1,5 @@ #!/bin/sh - -#usb_rly08 serial -USB_RELAY="/dev/serial/by-id/usb-Devantech_Ltd._USB-RLY08_00021197-if00" +. ./test-data #usb_rly08 # relay1 = usbpower diff --git a/tests/sysmo-octsim/ctl_reset_to_dfu.sh b/tests/sysmo-octsim/ctl_reset_to_dfu.sh index 969ca0c..1b3e23a 100755 --- a/tests/sysmo-octsim/ctl_reset_to_dfu.sh +++ b/tests/sysmo-octsim/ctl_reset_to_dfu.sh @@ -1,7 +1,5 @@ #!/bin/sh - -#usb_rly08 serial -USB_RELAY="/dev/serial/by-id/usb-Devantech_Ltd._USB-RLY08_00021197-if00" +. ./test-data #usb_rly08 # relay1 = usbpower diff --git a/tests/sysmo-octsim/fetch_image.sh b/tests/sysmo-octsim/fetch_image.sh index c0a4f8f..dc90422 100755 --- a/tests/sysmo-octsim/fetch_image.sh +++ b/tests/sysmo-octsim/fetch_image.sh @@ -2,5 +2,5 @@ . ./test-data echo "fetch image" -wget -O dl/sysmoOCTSIM-latest.bin http://ftp.osmocom.org/binaries/osmo-ccid-firmware/latest/sysmoOCTSIM.bin -nv +wget -O $DFU_IMAGE http://ftp.osmocom.org/binaries/osmo-ccid-firmware/latest/sysmoOCTSIM.bin -nv echo "done" diff --git a/tests/sysmo-octsim/flash_octsim_dfu.sh b/tests/sysmo-octsim/flash_octsim_dfu.sh index 5b9c19a..f86a8f9 100755 --- a/tests/sysmo-octsim/flash_octsim_dfu.sh +++ b/tests/sysmo-octsim/flash_octsim_dfu.sh @@ -1,3 +1,5 @@ #!/bin/sh +. ./test-data -dfu-util --device 1d50:6141 --alt 0 --reset --download dl/sysmoOCTSIM-latest.bin 2>/dev/null |grep -v "Download\t"|grep -v "\[" +dfu-util --device $USBD_TARGET --alt 0 --reset --download $DFU_IMAGE 2>/dev/null |grep -v "Download\t"|grep -v "\[" +sleep 1 diff --git a/tests/sysmo-octsim/get_installed_version.sh b/tests/sysmo-octsim/get_installed_version.sh index be61865..550e089 100755 --- a/tests/sysmo-octsim/get_installed_version.sh +++ b/tests/sysmo-octsim/get_installed_version.sh @@ -1,5 +1,5 @@ #!/bin/sh . ./test-data -echo -n "fw version: " 1>&2 -lsusb -d 1d50:6141 -v 2>/dev/null | grep iProduct|awk '{}{print $4}' 1>&2 +echo -n "installed fw version: " 1>&2 +lsusb -d $USBD_TARGET -v 2>/dev/null | grep iProduct|awk '{}{print $4}' 1>&2 diff --git a/tests/sysmo-octsim/prepare b/tests/sysmo-octsim/prepare index bb95e40..0401d6b 100755 --- a/tests/sysmo-octsim/prepare +++ b/tests/sysmo-octsim/prepare @@ -3,6 +3,9 @@ . ./test-data echo "================ PREPARING TEST RIG ================" +if [ ! -h "$USB_RELAY" ]; then echo "ERROR: usb relay device - symlink missing" ; exit 1; fi +if [ ! -c "$USB_RELAY" ]; then echo "ERROR: usb relay device - not a char device" ; exit 1; fi +if [ ! -h "$USB_RELAY" ]; then echo "ERROR: usb relay device - not writable" ; exit 1; fi ./ctl_reset_target.sh echo "================ TEST RIG PREPARED =================" echo "" diff --git a/tests/sysmo-octsim/regen b/tests/sysmo-octsim/regen index 7ed1fab..37a1d1b 100755 --- a/tests/sysmo-octsim/regen +++ b/tests/sysmo-octsim/regen @@ -6,6 +6,8 @@ ./02_flash_dfu.sh > ./02_flash_dfu.out ./03_check_lsusb.sh > ./03_check_lsusb.out ./04_check_dfu_lsusb.sh > ./04_check_dfu_lsusb.out +./05_flash_dfu_from_app.sh > ./05_flash_dfu_from_app.out +./06_test_simcards.sh > ./06_test_simcards.out echo "Reference output regenerated!" echo "" diff --git a/tests/sysmo-octsim/run-tests b/tests/sysmo-octsim/run-tests index b67c425..f4d5162 100755 --- a/tests/sysmo-octsim/run-tests +++ b/tests/sysmo-octsim/run-tests @@ -1,7 +1,7 @@ #!/bin/sh # default: execute all tests -TESTS="01_check_rig.sh 02_flash_dfu.sh 03_check_lsusb.sh 04_check_dfu_lsusb.sh" +TESTS="01_check_rig.sh 02_flash_dfu.sh 03_check_lsusb.sh 04_check_dfu_lsusb.sh 05_flash_dfu_from_app.sh 06_test_simcards.sh" # if command line specifies some specific tests, execute only those if [ $# -ge 1 ]; then @@ -13,6 +13,12 @@ # prepare test card ./prepare +if [ $? -eq 0 ]; then + echo "Prepare done" +else + echo "Prepare Test FAILED!" + exit 2 +fi for T in $TESTS; do echo "==> Executing Testcase $T" diff --git a/tests/sysmo-octsim/test-data b/tests/sysmo-octsim/test-data index e69de29..9220aad 100644 --- a/tests/sysmo-octsim/test-data +++ b/tests/sysmo-octsim/test-data @@ -0,0 +1,6 @@ +#usb_rly08 serial +USB_RELAY="/dev/serial/by-id/usb-Devantech_Ltd._USB-RLY08_00021197-if00" +USBD_RELAY="04d8:ffee" +USBD_TARGET="1d50:6141" +DFU_IMAGE="dl/sysmoOCTSIM-latest.bin" +PYSIMREAD="/home/jenkins/dep/pysim/pySim-read.py" -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I246224e29e5936b4fe40cf7d7a5ff83c9940d121 Gerrit-Change-Number: 17257 Gerrit-PatchSet: 1 Gerrit-Owner: roh Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 16:03:15 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 25 Feb 2020 16:03:15 +0000 Subject: Change in osmo-trx[master]: cosmetic: fix several typos found by codespell References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/17258 ) Change subject: cosmetic: fix several typos found by codespell ...................................................................... cosmetic: fix several typos found by codespell Change-Id: Id1f6766572fd313463201e6d03964965f227db25 --- M COPYING M CommonLibs/Vector.h M Transceiver52M/signalVector.cpp 3 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/58/17258/1 diff --git a/COPYING b/COPYING index 879341e..b1f53c4 100644 --- a/COPYING +++ b/COPYING @@ -666,7 +666,7 @@ ========================================================================= This marks the end of the AGPLv3 text. The following text is appended to the -same file for convience but constituting a distinct document, not part of the +same file for convenience but constituting a distinct document, not part of the actual AGPL text and not part of an attempt to create a deriviative work based on the AGPLv3 text. diff --git a/CommonLibs/Vector.h b/CommonLibs/Vector.h index 012a0fa..d55c5b3 100644 --- a/CommonLibs/Vector.h +++ b/CommonLibs/Vector.h @@ -232,7 +232,7 @@ assert(mStart+span<=mEnd); for (i = 0; i < span; i++, src++, dst++) *dst = *src; - /*TODO if not non-trivially copyable type class, optimize: + /*TODO if not non-trivially copiable type class, optimize: memcpy(dst,mStart,span*sizeof(T)); */ } diff --git a/Transceiver52M/signalVector.cpp b/Transceiver52M/signalVector.cpp index 710eda5..4410156 100644 --- a/Transceiver52M/signalVector.cpp +++ b/Transceiver52M/signalVector.cpp @@ -47,7 +47,7 @@ complex *src = vector.mData; for (i = 0; i < size(); i++, src++, dst++) *dst = *src; - /* TODO: optimize for non non-trivially copyable types: */ + /* TODO: optimize for non non-trivially copiable types: */ /*memcpy(mData, vector.mData, bytes()); */ mStart = mData + vector.getStart(); } @@ -70,7 +70,7 @@ complex *src = mStart + this->size() - num; for (i = 0; i < num; i++, src++, dst++) *dst = *src; - /* TODO: optimize for non non-trivially copyable types: */ + /* TODO: optimize for non non-trivially copiable types: */ /*memmove(mData, mStart + this->size() - num, num * sizeof(complex)); */ return num; -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Id1f6766572fd313463201e6d03964965f227db25 Gerrit-Change-Number: 17258 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 16:04:02 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 25 Feb 2020 16:04:02 +0000 Subject: Change in osmo-trx[master]: cosmetic: fix several typos found by codespell In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17258 ) Change subject: cosmetic: fix several typos found by codespell ...................................................................... Patch Set 1: I'm actually submitting this commit as an excuse to test the new osmo-trx gerrit job running also on RPI4 :) -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Id1f6766572fd313463201e6d03964965f227db25 Gerrit-Change-Number: 17258 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Tue, 25 Feb 2020 16:04:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 17:29:13 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 25 Feb 2020 17:29:13 +0000 Subject: Change in osmo-bts[master]: bts-trx: trx_if.c: Fix some printf formats References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17259 ) Change subject: bts-trx: trx_if.c: Fix some printf formats ...................................................................... bts-trx: trx_if.c: Fix some printf formats Compiler from raspberrypi4 warns/errors about those. Change-Id: I4f973eb4ffdf8869b522d14e25853357fcd1e984 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/59/17259/1 diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 099c330..f717a0c 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -394,8 +394,8 @@ goto parse_err; if (p - buf_in >= sizeof(rsp->cmd)) { - LOGP(DTRX, LOGL_ERROR, "cmd buffer too small %lu >= %lu\n", - p - buf_in, sizeof(rsp->cmd)); + LOGP(DTRX, LOGL_ERROR, "cmd buffer too small %lu >= %zu\n", + (long unsigned) (p - buf_in), sizeof(rsp->cmd)); goto parse_err; } @@ -415,7 +415,7 @@ k = p + strlen(p); if (strlen(k) >= sizeof(rsp->params)) { - LOGP(DTRX, LOGL_ERROR, "params buffer too small %lu >= %lu\n", + LOGP(DTRX, LOGL_ERROR, "params buffer too small %zu >= %zu\n", strlen(k), sizeof(rsp->params)); goto parse_err; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4f973eb4ffdf8869b522d14e25853357fcd1e984 Gerrit-Change-Number: 17259 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 17:42:22 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 25 Feb 2020 17:42:22 +0000 Subject: Change in osmo-bts[master]: bts-trx: trx_if.c: Fix some printf formats In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17259 ) Change subject: bts-trx: trx_if.c: Fix some printf formats ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4f973eb4ffdf8869b522d14e25853357fcd1e984 Gerrit-Change-Number: 17259 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 25 Feb 2020 17:42:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 17:42:25 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 25 Feb 2020 17:42:25 +0000 Subject: Change in osmo-bts[master]: bts-trx: trx_if.c: Fix some printf formats In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17259 ) Change subject: bts-trx: trx_if.c: Fix some printf formats ...................................................................... bts-trx: trx_if.c: Fix some printf formats Compiler from raspberrypi4 warns/errors about those. Change-Id: I4f973eb4ffdf8869b522d14e25853357fcd1e984 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 099c330..f717a0c 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -394,8 +394,8 @@ goto parse_err; if (p - buf_in >= sizeof(rsp->cmd)) { - LOGP(DTRX, LOGL_ERROR, "cmd buffer too small %lu >= %lu\n", - p - buf_in, sizeof(rsp->cmd)); + LOGP(DTRX, LOGL_ERROR, "cmd buffer too small %lu >= %zu\n", + (long unsigned) (p - buf_in), sizeof(rsp->cmd)); goto parse_err; } @@ -415,7 +415,7 @@ k = p + strlen(p); if (strlen(k) >= sizeof(rsp->params)) { - LOGP(DTRX, LOGL_ERROR, "params buffer too small %lu >= %lu\n", + LOGP(DTRX, LOGL_ERROR, "params buffer too small %zu >= %zu\n", strlen(k), sizeof(rsp->params)); goto parse_err; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17259 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I4f973eb4ffdf8869b522d14e25853357fcd1e984 Gerrit-Change-Number: 17259 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 17:51:22 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 25 Feb 2020 17:51:22 +0000 Subject: Change in osmo-bts[master]: cosmetic: Fix some typos with codespell References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17260 ) Change subject: cosmetic: Fix some typos with codespell ...................................................................... cosmetic: Fix some typos with codespell Change-Id: I1bbb4871f764816dcbba86d833194be601fa9228 --- M doc/manuals/abis/rsl.adoc M src/osmo-bts-litecell15/misc/lc15bts_swd.c M src/osmo-bts-oc2g/misc/oc2gbts_swd.c M src/osmo-bts-trx/scheduler_trx.c 4 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/60/17260/1 diff --git a/doc/manuals/abis/rsl.adoc b/doc/manuals/abis/rsl.adoc index 4d7e430..20ee836 100644 --- a/doc/manuals/abis/rsl.adoc +++ b/doc/manuals/abis/rsl.adoc @@ -423,9 +423,9 @@ procedure according to <>, with these modifications: * The 'C-bits' part of the 'Channel Number' IE take the non-standard binary - value 11000 (C5 thru C1 as seen in 3GPP TS 08.58 ? 9.3.1). + value 11000 (C5 through C1 as seen in 3GPP TS 08.58 ? 9.3.1). * The 'A-bits' part of the 'Activation Type' IE take the non-standard binary - value 1111, with an additional fourth bit (add A4 to A3 thru A1 as seen in + value 1111, with an additional fourth bit (add A4 to A3 through A1 as seen in 3GPP TS 08.58 ? 9.3.3; all remaining reserved bits as well as the 'R' bit are coded as zero). * The normally mandatory 'Channel Mode' IE is omitted; none of the optional IEs diff --git a/src/osmo-bts-litecell15/misc/lc15bts_swd.c b/src/osmo-bts-litecell15/misc/lc15bts_swd.c index 59c7b61..eac64d6 100644 --- a/src/osmo-bts-litecell15/misc/lc15bts_swd.c +++ b/src/osmo-bts-litecell15/misc/lc15bts_swd.c @@ -161,7 +161,7 @@ the value must be in the range of [0,'swd_num_events'[ (see lc15bts_swd_init). For example, if 'swd_num_events' was 64, 'swd_event' events are numbered 0 to 63. WARNING: if this function can be used from multiple threads at the same time, - it must be protected with a kind of mutex to avoid loosing event notification. + it must be protected with a kind of mutex to avoid losing event notification. */ int lc15bts_swd_event(struct lc15bts_mgr_instance *mgr, enum mgr_swd_events swd_event) { diff --git a/src/osmo-bts-oc2g/misc/oc2gbts_swd.c b/src/osmo-bts-oc2g/misc/oc2gbts_swd.c index 59b795a..1ccef5b 100644 --- a/src/osmo-bts-oc2g/misc/oc2gbts_swd.c +++ b/src/osmo-bts-oc2g/misc/oc2gbts_swd.c @@ -161,7 +161,7 @@ the value must be in the range of [0,'swd_num_events'[ (see oc2gbts_swd_init). For example, if 'swd_num_events' was 64, 'swd_event' events are numbered 0 to 63. WARNING: if this function can be used from multiple threads at the same time, - it must be protected with a kind of mutex to avoid loosing event notification. + it must be protected with a kind of mutex to avoid losing event notification. */ int oc2gbts_swd_event(struct oc2gbts_mgr_instance *mgr, enum mgr_swd_events swd_event) { diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 5abb73b..d703f7f 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -956,7 +956,7 @@ } /* Copy burst to buffer of 4 bursts. If the burst indication contains - * no data, ensure that the buffer does not stay uninitalized */ + * no data, ensure that the buffer does not stay uninitialized */ burst = *bursts_p + bid * 116; if (bi->burst_len > 0) { memcpy(burst, bi->burst + 3, 58); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17260 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1bbb4871f764816dcbba86d833194be601fa9228 Gerrit-Change-Number: 17260 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 17:57:15 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 25 Feb 2020 17:57:15 +0000 Subject: Change in osmo-ci[master]: job: Update master and gerrit osmo-bts jobs to also build on ARM plat... References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17261 ) Change subject: job: Update master and gerrit osmo-bts jobs to also build on ARM platform ...................................................................... job: Update master and gerrit osmo-bts jobs to also build on ARM platform Related: OS#4301 Change-Id: I72e228ff1a126f6c41c5fd6a530de85e177a0d21 --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 23 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/61/17261/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index e946674..15f8b5a 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -90,6 +90,7 @@ - osmo-bsc - osmo-bts: + slave_axis: !!python/tuple [osmocom-master-debian9, rpi4-deb9build-ansible] a1_name: FIRMWARE_VERSION a1: !!python/tuple [master, femtobts_v2.7, superfemto_v2.4, superfemto_v3.0.1pre, superfemto_v3.1, superfemto_v5.1, v2017.01, litecell15, oc2g, oc2g-next] a2_name: BTS_MODEL @@ -97,16 +98,17 @@ a3_name: WITH_MANUALS a3: !!python/tuple ["1", "0"] combination_filter: > - (FIRMWARE_VERSION == "master" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo" && WITH_MANUALS == "1") || - (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "litecell15" && BTS_MODEL == "lc15" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "oc2g" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "oc2g-next" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0") + (FIRMWARE_VERSION == "master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "master" && BTS_MODEL == "trx" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") || + (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "litecell15" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "oc2g" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "oc2g-next" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") concurrent: false cmd: 'ASCIIDOC_WARNINGS_CHECK="1" ./contrib/jenkins_bts_model.sh "$BTS_MODEL"' diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 688ee15..1e15e9d 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -176,6 +176,7 @@ - osmo-bsc - osmo-bts: + slave_axis: !!python/tuple [osmocom-master-debian9, rpi4-deb9build-ansible] a1_name: FIRMWARE_VERSION a1: !!python/tuple [master, femtobts_v2.7, superfemto_v2.4, superfemto_v3.0.1pre, superfemto_v3.1, superfemto_v5.1, v2017.01, origin/nrw/litecell15, origin/nrw/oc2g] a2_name: BTS_MODEL @@ -183,15 +184,16 @@ a3_name: WITH_MANUALS a3: !!python/tuple ["1", "0"] combination_filter: > - (FIRMWARE_VERSION == "master" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo" && WITH_MANUALS == "1") || - (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "origin/nrw/litecell15" && BTS_MODEL == "lc15" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "origin/nrw/oc2g" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0") + (FIRMWARE_VERSION == "master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "master" && BTS_MODEL == "trx" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") || + (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "origin/nrw/litecell15" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "origin/nrw/oc2g" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") concurrent: false cmd: 'PUBLISH=1 ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins_bts_model.sh "$BTS_MODEL"' -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I72e228ff1a126f6c41c5fd6a530de85e177a0d21 Gerrit-Change-Number: 17261 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 17:57:46 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 25 Feb 2020 17:57:46 +0000 Subject: Change in osmo-ci[master]: job: Update master and gerrit osmo-trx jobs to also build on ARM plat... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17228 ) Change subject: job: Update master and gerrit osmo-trx jobs to also build on ARM platform ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0049ab35b5106d5af8474903e203f66b044ff5ca Gerrit-Change-Number: 17228 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 25 Feb 2020 17:57:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 17:57:49 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 25 Feb 2020 17:57:49 +0000 Subject: Change in osmo-ci[master]: hosts: Add rpi4-deb9build-ansible In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17229 ) Change subject: hosts: Add rpi4-deb9build-ansible ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3bea29c3a9fa9b4b6dc4df3cdde4bb9dbf7de47d Gerrit-Change-Number: 17229 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 25 Feb 2020 17:57:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 17:58:08 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 25 Feb 2020 17:58:08 +0000 Subject: Change in osmo-ci[master]: job: Update master and gerrit osmo-bts jobs to also build on ARM plat... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17261 ) Change subject: job: Update master and gerrit osmo-bts jobs to also build on ARM platform ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I72e228ff1a126f6c41c5fd6a530de85e177a0d21 Gerrit-Change-Number: 17261 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 25 Feb 2020 17:58:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 18:01:26 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Tue, 25 Feb 2020 18:01:26 +0000 Subject: Change in osmo-ci[master]: job: master-buids.yml: Drop specific scm and poll branch for master-o... References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17262 ) Change subject: job: master-buids.yml: Drop specific scm and poll branch for master-osmo-pcu ...................................................................... job: master-buids.yml: Drop specific scm and poll branch for master-osmo-pcu Change-Id: I12f0c5c83786feba0aef74143fab3a836e83cd9d --- M jobs/master-builds.yml 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/62/17262/1 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 1e15e9d..d10ee18 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -253,11 +253,6 @@ - osmo-pcap - osmo-pcu: - scm: - - git: - branches: - - '*/master' - - '*/jerlbeck/master' a1_name: FIRMWARE_VERSION a1: !!python/tuple [master, v2017.01, origin/nrw/litecell15] a2_name: with_vty -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17262 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I12f0c5c83786feba0aef74143fab3a836e83cd9d Gerrit-Change-Number: 17262 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 18:11:34 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 25 Feb 2020 18:11:34 +0000 Subject: Change in osmo-bts[master]: cosmetic: Fix some typos with codespell In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17260 ) Change subject: cosmetic: Fix some typos with codespell ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17260 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1bbb4871f764816dcbba86d833194be601fa9228 Gerrit-Change-Number: 17260 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Tue, 25 Feb 2020 18:11:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue Feb 25 18:12:22 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Tue, 25 Feb 2020 18:12:22 +0000 Subject: Change in osmo-trx[master]: cosmetic: fix several typos found by codespell In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17258 ) Change subject: cosmetic: fix several typos found by codespell ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Id1f6766572fd313463201e6d03964965f227db25 Gerrit-Change-Number: 17258 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 25 Feb 2020 18:12:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From admin at opensuse.org Tue Feb 25 21:47:34 2020 From: admin at opensuse.org (OBS Notification) Date: Tue, 25 Feb 2020 21:47:34 +0000 Subject: Build failure of network:osmocom:latest/limesuite in Raspbian_10/armv7l In-Reply-To: References: Message-ID: <5e5595fbf0ccb_73752afbde1a45f058526c@build.opensuse.org> Visit https://build.opensuse.org/package/live_build_log/network:osmocom:latest/limesuite/Raspbian_10/armv7l Package network:osmocom:latest/limesuite failed to build in Raspbian_10/armv7l Check out the package for editing: osc checkout network:osmocom:latest limesuite Last lines of build log: [ 1044s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o -c /usr/src/packages/BUILD/src/boards_wxgui/pnlGPIO.cpp [ 1052s] [ 77%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_gui.cpp.o [ 1052s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_gui.cpp.o -c /usr/src/packages/BUILD/src/limeRFE/limeRFE_gui.cpp [ 1056s] [ 77%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_wxgui.cpp.o [ 1056s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_wxgui.cpp.o -c /usr/src/packages/BUILD/src/limeRFE/limeRFE_wxgui.cpp [ 1072s] [ 78%] Building CXX object src/CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_cmd.cpp.o [ 1073s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/c++ -DLIME_DLL -DWIN32_LEAN_AND_MEAN -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/usr/src/packages/BUILD/src/lms7002_wxgui -I/usr/src/packages/BUILD/src/LMS_Programing -I/usr/src/packages/BUILD/src/utilities_gui -I/usr/src/packages/BUILD/src/RFSpark -I/usr/src/packages/BUILD/src/FPGAcontrols_wxgui -I/usr/src/packages/BUILD/src/numericSlider -I/usr/src/packages/BUILD/src/fftviewer_wxgui -I/usr/src/packages/BUILD/src/lms7suiteEvents -I/usr/src/packages/BUILD/src/boards_wxgui -I/usr/src/packages/BUILD/src/limeRFE -I/usr/src/packages/BUILD/src -I/usr/src/packages/BUILD/src/API -I/usr/src/packages/BUILD/src/lime -I/usr/src/packages/BUILD/src/GFIR -I/usr/src/packages/BUILD/src/protocols -I/usr/src/packages/BUILD/src/ConnectionRegistry -I/usr/src/packages/BUILD/src/lms7002m_mcu -I/usr/src/packages/BUILD/src/ADF4002 -I/usr/src/packages/BUILD/src/Si5351C -I/usr/src/packages/BUILD/src/lms7002m -I/usr/src/packages/BUILD/src/FPGA_common -I/usr/src/packages/BUILD/external/cpp-feather-ini-parser -I/usr/src/packages/BUILD/external/kissFFT -I/usr/include/libusb-1.0 -I/usr/src/packages/BUILD/src/oglGraph -isystem /usr/lib/arm-linux-gnueabihf/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -march=native -fvisibility=hidden -std=gnu++11 -o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_cmd.cpp.o -c /usr/src/packages/BUILD/src/limeRFE/limeRFE_cmd.cpp [ 1080s] [ 79%] Linking CXX executable ../bin/LimeSuiteGUI [ 1080s] cd /usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/LimeSuiteGUI.dir/link.txt --verbose=1 [ 1081s] /usr/bin/c++ -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility-inlines-hidden -pthread -O3 -DNDEBUG -Wl,-z,relro -rdynamic CMakeFiles/LimeSuiteGUI.dir/ADF4002/ADF4002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlXBUF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCalibrations_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTRF_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCDS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLimeLightPAD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIST_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewIRAM.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_gui_utilities.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlSX_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgVCOfrequencies.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRBB_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlLDO_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlAFE_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlGains_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/CoefficientFileParser.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlRxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_mainPanel.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/dlgViewSFR.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlCLKGEN_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlMCU_BD_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlBIAS_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_dlgGFIR_Coefficients.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlTxTSP_view.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7002_wxgui/lms7002_pnlR3.cpp.o CMakeFiles/LimeSuiteGUI.dir/LMS_Programing/LMS_Programing_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgConnectionSettings.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/pnlMiniLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/pnlAPI.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/SPI_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgFullMessageLog.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/dlgDeviceInfo.cpp.o CMakeFiles/LimeSuiteGUI.dir/utilities_gui/utilities_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteAppFrame.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/RFSpark_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/Si5351C/Si5351C_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteApp.cpp.o CMakeFiles/LimeSuiteGUI.dir/FPGAcontrols_wxgui/FPGAcontrols_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/dlgAbout.cpp.o CMakeFiles/LimeSuiteGUI.dir/numericSlider/numericSlider.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/fftviewer_wxgui/fftviewer_frFFTviewer.cpp.o CMakeFiles/LimeSuiteGUI.dir/lms7suiteEvents/lms7suiteEvents.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlBoardControls.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlQSpark.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnluLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlUltimateEVB.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlBuffers.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlCoreSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeNetMicro.cpp.o CMakeFiles/LimeSuiteGUI.dir/__/external/kissFFT/kiss_fft.c.o CMakeFiles/LimeSuiteGUI.dir/windowFunction.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlLimeSDR.cpp.o CMakeFiles/LimeSuiteGUI.dir/boards_wxgui/pnlGPIO.cpp.o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_gui.cpp.o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_wxgui.cpp.o CMakeFiles/LimeSuiteGUI.dir/limeRFE/limeRFE_cmd.cpp.o -o ../bin/LimeSuiteGUI -Wl,-rpath,/usr/src/packages/BUILD/obj-arm-linux-gnueabihf/src: libLimeSuite.so.20.01.0 oglGraph/liboglGraph.a -L/usr/lib/arm-linux-gnueabihf -pthread -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 -lusb-1.0 -lGL -lwx_gtk2u_richtext-3.0 -lwx_baseu_xml-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu-3.0 -lwx_gtk2u_gl-3.0 [ 1087s] /usr/bin/ld: libLimeSuite.so.20.01.0: undefined reference to `__atomic_store_8' [ 1087s] /usr/bin/ld: libLimeSuite.so.20.01.0: undefined reference to `__atomic_load_8' [ 1087s] collect2: error: ld returned 1 exit status [ 1087s] make[3]: *** [src/CMakeFiles/LimeSuiteGUI.dir/build.make:990: bin/LimeSuiteGUI] Error 1 [ 1087s] make[3]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 1087s] make[2]: *** [CMakeFiles/Makefile2:142: src/CMakeFiles/LimeSuiteGUI.dir/all] Error 2 [ 1087s] make[2]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 1087s] make[1]: *** [Makefile:133: all] Error 2 [ 1087s] make[1]: Leaving directory '/usr/src/packages/BUILD/obj-arm-linux-gnueabihf' [ 1087s] dh_auto_build: cd obj-arm-linux-gnueabihf && make -j2 returned exit code 2 [ 1087s] make: *** [debian/rules:28: binary] Error 2 [ 1087s] dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 [ 1087s] ### VM INTERACTION START ### [ 1090s] [ 1049.035228] sysrq: SysRq : Power Off [ 1090s] [ 1049.059236] reboot: Power down [ 1090s] ### VM INTERACTION END ### [ 1090s] [ 1090s] armbuild02 failed "build limesuite_20.01.0-1.dsc" at Tue Feb 25 21:47:18 UTC 2020. [ 1090s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/) From gerrit-no-reply at lists.osmocom.org Tue Feb 25 23:15:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Tue, 25 Feb 2020 23:15:59 +0000 Subject: Change in osmocom-bb[master]: layer23: Terminate process if L2 socket fails/dissappears References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17263 ) Change subject: layer23: Terminate process if L2 socket fails/dissappears ...................................................................... layer23: Terminate process if L2 socket fails/dissappears We don't recover from this situation at all, so it's best to terminate the process. Change-Id: I487d18e4afe2cae9f777a30864e680b5dc821fc1 --- M src/host/layer23/src/common/l1l2_interface.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/63/17263/1 diff --git a/src/host/layer23/src/common/l1l2_interface.c b/src/host/layer23/src/common/l1l2_interface.c index c07b0a1..cd5f910 100644 --- a/src/host/layer23/src/common/l1l2_interface.c +++ b/src/host/layer23/src/common/l1l2_interface.c @@ -62,6 +62,7 @@ if (rc >= 0) rc = -EIO; layer2_close((struct osmocom_ms *) fd->data); + exit(102); return rc; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I487d18e4afe2cae9f777a30864e680b5dc821fc1 Gerrit-Change-Number: 17263 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 07:06:52 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 26 Feb 2020 07:06:52 +0000 Subject: Change in osmo-ci[master]: ansible/setup-simtest.yml: Python2 is deprecated, switch to Python3 In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17251 ) Change subject: ansible/setup-simtest.yml: Python2 is deprecated, switch to Python3 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I555af88b0e6a5c082e1e0cbd6915649a8a942052 Gerrit-Change-Number: 17251 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 26 Feb 2020 07:06:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 07:09:05 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 26 Feb 2020 07:09:05 +0000 Subject: Change in osmo-ci[master]: job: Update master and gerrit osmo-trx jobs to also build on ARM plat... In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17228 ) Change subject: job: Update master and gerrit osmo-trx jobs to also build on ARM platform ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0049ab35b5106d5af8474903e203f66b044ff5ca Gerrit-Change-Number: 17228 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 26 Feb 2020 07:09:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 07:09:55 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 26 Feb 2020 07:09:55 +0000 Subject: Change in osmo-ci[master]: hosts: Add rpi4-deb9build-ansible In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17229 ) Change subject: hosts: Add rpi4-deb9build-ansible ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3bea29c3a9fa9b4b6dc4df3cdde4bb9dbf7de47d Gerrit-Change-Number: 17229 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 26 Feb 2020 07:09:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 07:11:36 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 26 Feb 2020 07:11:36 +0000 Subject: Change in osmo-ci[master]: job: Update master and gerrit osmo-bts jobs to also build on ARM plat... In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17261 ) Change subject: job: Update master and gerrit osmo-bts jobs to also build on ARM platform ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I72e228ff1a126f6c41c5fd6a530de85e177a0d21 Gerrit-Change-Number: 17261 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 26 Feb 2020 07:11:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 07:12:58 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 26 Feb 2020 07:12:58 +0000 Subject: Change in osmo-ci[master]: job: master-buids.yml: Drop specific scm and poll branch for master-o... In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17262 ) Change subject: job: master-buids.yml: Drop specific scm and poll branch for master-osmo-pcu ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17262 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I12f0c5c83786feba0aef74143fab3a836e83cd9d Gerrit-Change-Number: 17262 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 26 Feb 2020 07:12:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 07:13:06 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Wed, 26 Feb 2020 07:13:06 +0000 Subject: Change in osmo-ci[master]: job: Update master and gerrit osmo-bts jobs to also build on ARM plat... In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17261 ) Change subject: job: Update master and gerrit osmo-bts jobs to also build on ARM platform ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I72e228ff1a126f6c41c5fd6a530de85e177a0d21 Gerrit-Change-Number: 17261 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 26 Feb 2020 07:13:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 07:56:00 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 26 Feb 2020 07:56:00 +0000 Subject: Change in osmocom-bb[master]: layer23: Terminate process if L2 socket fails/dissappears In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17263 ) Change subject: layer23: Terminate process if L2 socket fails/dissappears ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I487d18e4afe2cae9f777a30864e680b5dc821fc1 Gerrit-Change-Number: 17263 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Wed, 26 Feb 2020 07:56:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 07:56:15 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 26 Feb 2020 07:56:15 +0000 Subject: Change in osmo-ci[master]: ansible/setup-simtest.yml: Python2 is deprecated, switch to Python3 In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17251 ) Change subject: ansible/setup-simtest.yml: Python2 is deprecated, switch to Python3 ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I555af88b0e6a5c082e1e0cbd6915649a8a942052 Gerrit-Change-Number: 17251 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 26 Feb 2020 07:56:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 07:56:23 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 26 Feb 2020 07:56:23 +0000 Subject: Change in osmo-ci[master]: ansible/setup-simtest.yml: Python2 is deprecated, switch to Python3 In-Reply-To: References: Message-ID: fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17251 ) Change subject: ansible/setup-simtest.yml: Python2 is deprecated, switch to Python3 ...................................................................... ansible/setup-simtest.yml: Python2 is deprecated, switch to Python3 PySIM is about to switch to Python3, so Jenkins must be ready. Change-Id: I555af88b0e6a5c082e1e0cbd6915649a8a942052 --- M ansible/setup-simtest.yml 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve osmith: Looks good to me, approved fixeria: Verified diff --git a/ansible/setup-simtest.yml b/ansible/setup-simtest.yml index 2cbd45b..8ab6f7e 100644 --- a/ansible/setup-simtest.yml +++ b/ansible/setup-simtest.yml @@ -15,11 +15,11 @@ with_items: - vim - ca-certificates - - python-minimal - - python-setuptools - - python-pip - - python-serial - - python-pyscard + - python3-minimal + - python3-setuptools + - python3-pip + - python3-serial + - python3-pyscard - virtualenv roles: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I555af88b0e6a5c082e1e0cbd6915649a8a942052 Gerrit-Change-Number: 17251 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria Gerrit-Reviewer: fixeria Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:08:34 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 26 Feb 2020 08:08:34 +0000 Subject: Change in pysim[master]: Python2 is deprecated, switch to Python3 In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#11) to the change originally created by gnutoo. ( https://gerrit.osmocom.org/c/pysim/+/15504 ) Change subject: Python2 is deprecated, switch to Python3 ...................................................................... Python2 is deprecated, switch to Python3 Signed-off-by: Denis 'GNUtoo' Carikli Depends: (osmo-ci) I555af88b0e6a5c082e1e0cbd6915649a8a942052 Change-Id: I430d173535e0cd5bb895b9dfc9070cbc40cfc8ff --- M contrib/jenkins.sh M pySim-prog.py M pySim-read.py M pySim/card_handler.py M tests/pysim-test.sh 5 files changed, 11 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/04/15504/11 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/15504 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I430d173535e0cd5bb895b9dfc9070cbc40cfc8ff Gerrit-Change-Number: 15504 Gerrit-PatchSet: 11 Gerrit-Owner: gnutoo Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:39:27 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:39:27 +0000 Subject: Change in osmo-ci[master]: job: Update master and gerrit osmo-trx jobs to also build on ARM plat... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17228 ) Change subject: job: Update master and gerrit osmo-trx jobs to also build on ARM platform ...................................................................... job: Update master and gerrit osmo-trx jobs to also build on ARM platform Related: OS#4301 Change-Id: I0049ab35b5106d5af8474903e203f66b044ff5ca --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 10 insertions(+), 8 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved pespin: Verified diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 80a3b08..e946674 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -206,14 +206,15 @@ - osmo-sip-connector - osmo-trx: + slave_axis: !!python/tuple [osmocom-master-debian9,rpi4-deb9build-ansible] a1_name: INSTR - # ARM variants temporarily disabled due to issue OS#3061 (mind the combination_filter below!) - # a1: !!python/tuple [--with-sse, --with-neon, --with-neon-vfpv4] - a1: !!python/tuple [--with-sse] + a1: !!python/tuple [--with-sse, --with-neon, --with-neon-vfpv4] a2_name: WITH_MANUALS a2: !!python/tuple ["1", "0"] combination_filter: > - (INSTR == "--with-sse" && WITH_MANUALS == "1") + (INSTR == "--with-sse" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || + (INSTR == "--with-neon" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") || + (INSTR == "--with-neon-vfpv4" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") cmd: 'ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh' - osmocom-bb diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 78aeb7c..688ee15 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -299,14 +299,15 @@ email: gerrit-log at lists.osmocom.org laforge at gnumonks.org 246tnt at gmail.com - osmo-trx: + slave_axis: !!python/tuple [osmocom-master-debian9,rpi4-deb9build-ansible] a1_name: INSTR - # ARM variants temporarily disabled due to issue OS#3061 (mind the combination_filter below!) - # a1: !!python/tuple [--with-sse, --with-neon, --with-neon-vfpv4] - a1: !!python/tuple [--with-sse] + a1: !!python/tuple [--with-sse, --with-neon, --with-neon-vfpv4] a2_name: WITH_MANUALS a2: !!python/tuple ["1", "0"] combination_filter: > - (INSTR == "--with-sse" && WITH_MANUALS == "1") + (INSTR == "--with-sse" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || + (INSTR == "--with-neon" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") || + (INSTR == "--with-neon-vfpv4" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") cmd: 'PUBLISH=1 ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh' - osmocom-bb -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0049ab35b5106d5af8474903e203f66b044ff5ca Gerrit-Change-Number: 17228 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:39:27 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:39:27 +0000 Subject: Change in osmo-ci[master]: hosts: Add rpi4-deb9build-ansible In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17229 ) Change subject: hosts: Add rpi4-deb9build-ansible ...................................................................... hosts: Add rpi4-deb9build-ansible Change-Id: I3bea29c3a9fa9b4b6dc4df3cdde4bb9dbf7de47d --- M ansible/hosts 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved pespin: Verified diff --git a/ansible/hosts b/ansible/hosts index 85b25d6..5098b3e 100644 --- a/ansible/hosts +++ b/ansible/hosts @@ -14,6 +14,7 @@ build2-deb9build-ansible ansible_host=2a01:4f8:10b:2ad9::1:6 osmocom_jenkins_slave_fstrim=True host2-deb8build-ansible ansible_host=2a01:4f8:120:8470::1:2 host2-deb9build-ansible ansible_host=2a01:4f8:120:8470::1:3 osmocom_jenkins_slave_fstrim=True +rpi4-deb9build-ansible ansible_host=10.9.25.51 [simtester] simtest ansible_host=10.9.25.80 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17229 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I3bea29c3a9fa9b4b6dc4df3cdde4bb9dbf7de47d Gerrit-Change-Number: 17229 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:39:28 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:39:28 +0000 Subject: Change in osmo-ci[master]: job: Update master and gerrit osmo-bts jobs to also build on ARM plat... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17261 ) Change subject: job: Update master and gerrit osmo-bts jobs to also build on ARM platform ...................................................................... job: Update master and gerrit osmo-bts jobs to also build on ARM platform Related: OS#4301 Change-Id: I72e228ff1a126f6c41c5fd6a530de85e177a0d21 --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 23 insertions(+), 19 deletions(-) Approvals: osmith: Looks good to me, approved pespin: Verified diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index e946674..15f8b5a 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -90,6 +90,7 @@ - osmo-bsc - osmo-bts: + slave_axis: !!python/tuple [osmocom-master-debian9, rpi4-deb9build-ansible] a1_name: FIRMWARE_VERSION a1: !!python/tuple [master, femtobts_v2.7, superfemto_v2.4, superfemto_v3.0.1pre, superfemto_v3.1, superfemto_v5.1, v2017.01, litecell15, oc2g, oc2g-next] a2_name: BTS_MODEL @@ -97,16 +98,17 @@ a3_name: WITH_MANUALS a3: !!python/tuple ["1", "0"] combination_filter: > - (FIRMWARE_VERSION == "master" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo" && WITH_MANUALS == "1") || - (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "litecell15" && BTS_MODEL == "lc15" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "oc2g" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "oc2g-next" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0") + (FIRMWARE_VERSION == "master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "master" && BTS_MODEL == "trx" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") || + (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "litecell15" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "oc2g" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "oc2g-next" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") concurrent: false cmd: 'ASCIIDOC_WARNINGS_CHECK="1" ./contrib/jenkins_bts_model.sh "$BTS_MODEL"' diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 688ee15..1e15e9d 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -176,6 +176,7 @@ - osmo-bsc - osmo-bts: + slave_axis: !!python/tuple [osmocom-master-debian9, rpi4-deb9build-ansible] a1_name: FIRMWARE_VERSION a1: !!python/tuple [master, femtobts_v2.7, superfemto_v2.4, superfemto_v3.0.1pre, superfemto_v3.1, superfemto_v5.1, v2017.01, origin/nrw/litecell15, origin/nrw/oc2g] a2_name: BTS_MODEL @@ -183,15 +184,16 @@ a3_name: WITH_MANUALS a3: !!python/tuple ["1", "0"] combination_filter: > - (FIRMWARE_VERSION == "master" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo" && WITH_MANUALS == "1") || - (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "origin/nrw/litecell15" && BTS_MODEL == "lc15" && WITH_MANUALS == "0") || - (FIRMWARE_VERSION == "origin/nrw/oc2g" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0") + (FIRMWARE_VERSION == "master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "master" && BTS_MODEL == "trx" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") || + (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "origin/nrw/litecell15" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (FIRMWARE_VERSION == "origin/nrw/oc2g" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") concurrent: false cmd: 'PUBLISH=1 ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins_bts_model.sh "$BTS_MODEL"' -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I72e228ff1a126f6c41c5fd6a530de85e177a0d21 Gerrit-Change-Number: 17261 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:39:49 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:39:49 +0000 Subject: Change in osmo-ci[master]: job: master-buids.yml: Drop specific scm and poll branch for master-o... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17262 ) Change subject: job: master-buids.yml: Drop specific scm and poll branch for master-osmo-pcu ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17262 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I12f0c5c83786feba0aef74143fab3a836e83cd9d Gerrit-Change-Number: 17262 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 26 Feb 2020 08:39:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:39:54 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:39:54 +0000 Subject: Change in osmo-ci[master]: job: master-buids.yml: Drop specific scm and poll branch for master-o... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17262 ) Change subject: job: master-buids.yml: Drop specific scm and poll branch for master-osmo-pcu ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17262 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I12f0c5c83786feba0aef74143fab3a836e83cd9d Gerrit-Change-Number: 17262 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 26 Feb 2020 08:39:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:39:58 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:39:58 +0000 Subject: Change in osmo-ci[master]: job: master-buids.yml: Drop specific scm and poll branch for master-o... In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17262 ) Change subject: job: master-buids.yml: Drop specific scm and poll branch for master-osmo-pcu ...................................................................... job: master-buids.yml: Drop specific scm and poll branch for master-osmo-pcu Change-Id: I12f0c5c83786feba0aef74143fab3a836e83cd9d --- M jobs/master-builds.yml 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, approved; Verified osmith: Looks good to me, approved diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 1e15e9d..d10ee18 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -253,11 +253,6 @@ - osmo-pcap - osmo-pcu: - scm: - - git: - branches: - - '*/master' - - '*/jerlbeck/master' a1_name: FIRMWARE_VERSION a1: !!python/tuple [master, v2017.01, origin/nrw/litecell15] a2_name: with_vty -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17262 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I12f0c5c83786feba0aef74143fab3a836e83cd9d Gerrit-Change-Number: 17262 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:41:46 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:41:46 +0000 Subject: Change in osmocom-bb[master]: layer23: Terminate process if L2 socket fails/dissappears In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17263 ) Change subject: layer23: Terminate process if L2 socket fails/dissappears ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I487d18e4afe2cae9f777a30864e680b5dc821fc1 Gerrit-Change-Number: 17263 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 08:41:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:41:48 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:41:48 +0000 Subject: Change in osmocom-bb[master]: layer23: Terminate process if L2 socket fails/dissappears In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17263 ) Change subject: layer23: Terminate process if L2 socket fails/dissappears ...................................................................... layer23: Terminate process if L2 socket fails/dissappears We don't recover from this situation at all, so it's best to terminate the process. Change-Id: I487d18e4afe2cae9f777a30864e680b5dc821fc1 --- M src/host/layer23/src/common/l1l2_interface.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/host/layer23/src/common/l1l2_interface.c b/src/host/layer23/src/common/l1l2_interface.c index c07b0a1..cd5f910 100644 --- a/src/host/layer23/src/common/l1l2_interface.c +++ b/src/host/layer23/src/common/l1l2_interface.c @@ -62,6 +62,7 @@ if (rc >= 0) rc = -EIO; layer2_close((struct osmocom_ms *) fd->data); + exit(102); return rc; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I487d18e4afe2cae9f777a30864e680b5dc821fc1 Gerrit-Change-Number: 17263 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:42:11 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:42:11 +0000 Subject: Change in osmo-ggsn[master]: cosmetic: Fix comment typo In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/17256 ) Change subject: cosmetic: Fix comment typo ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I8240b388ffb8c1806bf0d34a9e59146b403a13be Gerrit-Change-Number: 17256 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 08:42:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:42:14 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:42:14 +0000 Subject: Change in osmo-ggsn[master]: cosmetic: Fix comment typo In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/17256 ) Change subject: cosmetic: Fix comment typo ...................................................................... cosmetic: Fix comment typo Change-Id: I8240b388ffb8c1806bf0d34a9e59146b403a13be --- M ggsn/icmpv6.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/ggsn/icmpv6.c b/ggsn/icmpv6.c index b7b97eb..12119b8 100644 --- a/ggsn/icmpv6.c +++ b/ggsn/icmpv6.c @@ -1,7 +1,7 @@ /* Minimal ICMPv6 code for generating router advertisements as required by * relevant 3GPP specs for a GGSN with IPv6 PDP contexts */ -/* (C) 2017 by Harald Welte +/* (C) 2017 by Harald Welte * * The contents of this file may be used under the terms of the GNU * General Public License Version 2, provided that the above copyright @@ -95,7 +95,7 @@ /*! construct a 3GPP 29.061 compliant router advertisement for a given prefix * \param[in] saddr Source IPv6 address for router advertisement * \param[in] daddr Destination IPv6 address for router advertisement IPv6 header - * \param[in] prefix The single prefix to be advertised (/64 implied!)i + * \param[in] prefix The single prefix to be advertised (/64 implied!) * \returns callee-allocated message buffer containing router advertisement */ struct msgb *icmpv6_construct_ra(const struct in6_addr *saddr, const struct in6_addr *daddr, -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I8240b388ffb8c1806bf0d34a9e59146b403a13be Gerrit-Change-Number: 17256 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:45:03 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:45:03 +0000 Subject: Change in osmo-ggsn[master]: add Linux network namespace support for TUN device In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/17253 ) Change subject: add Linux network namespace support for TUN device ...................................................................... Patch Set 1: (3 comments) https://gerrit.osmocom.org/c/osmo-ggsn/+/17253/1/lib/netns.c File lib/netns.c: https://gerrit.osmocom.org/c/osmo-ggsn/+/17253/1/lib/netns.c at 53 PS1, Line 53: sigfillset(&intmask); no return checking, but then... should those ever fail? one might also wrap them in OSMO_ASSERT() calls if proper error handling is too much? https://gerrit.osmocom.org/c/osmo-ggsn/+/17253/1/lib/netns.c at 78 PS1, Line 78: setns(default_nsfd, CLONE_NEWNET); I think at least here the setns() call should be skipped if the open fails. Yes, we return 'rc' below, but I guess we should return early on failure. https://gerrit.osmocom.org/c/osmo-ggsn/+/17253/1/lib/netns.c at 96 PS1, Line 96: sk = socket(domain, type, protocol); same here with the socket... -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17253 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: Idd0ad8fa9c8e7ba0aeec1b52947598d4d297b620 Gerrit-Change-Number: 17253 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 08:45:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:45:38 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:45:38 +0000 Subject: Change in osmo-trx[master]: cosmetic: fix several typos found by codespell In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17258 ) Change subject: cosmetic: fix several typos found by codespell ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Id1f6766572fd313463201e6d03964965f227db25 Gerrit-Change-Number: 17258 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 26 Feb 2020 08:45:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:45:40 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:45:40 +0000 Subject: Change in osmo-trx[master]: cosmetic: fix several typos found by codespell In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/17258 ) Change subject: cosmetic: fix several typos found by codespell ...................................................................... cosmetic: fix several typos found by codespell Change-Id: Id1f6766572fd313463201e6d03964965f227db25 --- M COPYING M CommonLibs/Vector.h M Transceiver52M/signalVector.cpp 3 files changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/COPYING b/COPYING index 879341e..b1f53c4 100644 --- a/COPYING +++ b/COPYING @@ -666,7 +666,7 @@ ========================================================================= This marks the end of the AGPLv3 text. The following text is appended to the -same file for convience but constituting a distinct document, not part of the +same file for convenience but constituting a distinct document, not part of the actual AGPL text and not part of an attempt to create a deriviative work based on the AGPLv3 text. diff --git a/CommonLibs/Vector.h b/CommonLibs/Vector.h index 012a0fa..d55c5b3 100644 --- a/CommonLibs/Vector.h +++ b/CommonLibs/Vector.h @@ -232,7 +232,7 @@ assert(mStart+span<=mEnd); for (i = 0; i < span; i++, src++, dst++) *dst = *src; - /*TODO if not non-trivially copyable type class, optimize: + /*TODO if not non-trivially copiable type class, optimize: memcpy(dst,mStart,span*sizeof(T)); */ } diff --git a/Transceiver52M/signalVector.cpp b/Transceiver52M/signalVector.cpp index 710eda5..4410156 100644 --- a/Transceiver52M/signalVector.cpp +++ b/Transceiver52M/signalVector.cpp @@ -47,7 +47,7 @@ complex *src = vector.mData; for (i = 0; i < size(); i++, src++, dst++) *dst = *src; - /* TODO: optimize for non non-trivially copyable types: */ + /* TODO: optimize for non non-trivially copiable types: */ /*memcpy(mData, vector.mData, bytes()); */ mStart = mData + vector.getStart(); } @@ -70,7 +70,7 @@ complex *src = mStart + this->size() - num; for (i = 0; i < num; i++, src++, dst++) *dst = *src; - /* TODO: optimize for non non-trivially copyable types: */ + /* TODO: optimize for non non-trivially copiable types: */ /*memmove(mData, mStart + this->size() - num, num * sizeof(complex)); */ return num; -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/17258 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Id1f6766572fd313463201e6d03964965f227db25 Gerrit-Change-Number: 17258 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:45:51 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:45:51 +0000 Subject: Change in osmo-bts[master]: cosmetic: Fix some typos with codespell In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17260 ) Change subject: cosmetic: Fix some typos with codespell ...................................................................... cosmetic: Fix some typos with codespell Change-Id: I1bbb4871f764816dcbba86d833194be601fa9228 --- M doc/manuals/abis/rsl.adoc M src/osmo-bts-litecell15/misc/lc15bts_swd.c M src/osmo-bts-oc2g/misc/oc2gbts_swd.c M src/osmo-bts-trx/scheduler_trx.c 4 files changed, 5 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/doc/manuals/abis/rsl.adoc b/doc/manuals/abis/rsl.adoc index 4d7e430..20ee836 100644 --- a/doc/manuals/abis/rsl.adoc +++ b/doc/manuals/abis/rsl.adoc @@ -423,9 +423,9 @@ procedure according to <>, with these modifications: * The 'C-bits' part of the 'Channel Number' IE take the non-standard binary - value 11000 (C5 thru C1 as seen in 3GPP TS 08.58 ? 9.3.1). + value 11000 (C5 through C1 as seen in 3GPP TS 08.58 ? 9.3.1). * The 'A-bits' part of the 'Activation Type' IE take the non-standard binary - value 1111, with an additional fourth bit (add A4 to A3 thru A1 as seen in + value 1111, with an additional fourth bit (add A4 to A3 through A1 as seen in 3GPP TS 08.58 ? 9.3.3; all remaining reserved bits as well as the 'R' bit are coded as zero). * The normally mandatory 'Channel Mode' IE is omitted; none of the optional IEs diff --git a/src/osmo-bts-litecell15/misc/lc15bts_swd.c b/src/osmo-bts-litecell15/misc/lc15bts_swd.c index 59c7b61..eac64d6 100644 --- a/src/osmo-bts-litecell15/misc/lc15bts_swd.c +++ b/src/osmo-bts-litecell15/misc/lc15bts_swd.c @@ -161,7 +161,7 @@ the value must be in the range of [0,'swd_num_events'[ (see lc15bts_swd_init). For example, if 'swd_num_events' was 64, 'swd_event' events are numbered 0 to 63. WARNING: if this function can be used from multiple threads at the same time, - it must be protected with a kind of mutex to avoid loosing event notification. + it must be protected with a kind of mutex to avoid losing event notification. */ int lc15bts_swd_event(struct lc15bts_mgr_instance *mgr, enum mgr_swd_events swd_event) { diff --git a/src/osmo-bts-oc2g/misc/oc2gbts_swd.c b/src/osmo-bts-oc2g/misc/oc2gbts_swd.c index 59b795a..1ccef5b 100644 --- a/src/osmo-bts-oc2g/misc/oc2gbts_swd.c +++ b/src/osmo-bts-oc2g/misc/oc2gbts_swd.c @@ -161,7 +161,7 @@ the value must be in the range of [0,'swd_num_events'[ (see oc2gbts_swd_init). For example, if 'swd_num_events' was 64, 'swd_event' events are numbered 0 to 63. WARNING: if this function can be used from multiple threads at the same time, - it must be protected with a kind of mutex to avoid loosing event notification. + it must be protected with a kind of mutex to avoid losing event notification. */ int oc2gbts_swd_event(struct oc2gbts_mgr_instance *mgr, enum mgr_swd_events swd_event) { diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 5abb73b..d703f7f 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -956,7 +956,7 @@ } /* Copy burst to buffer of 4 bursts. If the burst indication contains - * no data, ensure that the buffer does not stay uninitalized */ + * no data, ensure that the buffer does not stay uninitialized */ burst = *bursts_p + bid * 116; if (bi->burst_len > 0) { memcpy(burst, bi->burst + 3, 58); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17260 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1bbb4871f764816dcbba86d833194be601fa9228 Gerrit-Change-Number: 17260 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 08:50:12 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 08:50:12 +0000 Subject: Change in osmo-ccid-firmware[master]: generic improvements for the testsbed: * fix run-tests so it can retu... In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17257 ) Change subject: generic improvements for the testsbed: * fix run-tests so it can return != 0 * bail out if prepare fails * add more sanity checks to prepare * generalize usb-ids, paths * add test for flashing from application mode * add test reading simcards via pysim ...................................................................... Patch Set 1: (4 comments) https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17257/1//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17257/1//COMMIT_MSG at 7 PS1, Line 7: generic improvements for the testsbed: first line of the commit log message should be brief one-line summary followed by empty line before detailed log message. Otherwise the entire fist paragraph will be treated as the summary by every tool. https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17257/1/tests/sysmo-octsim/05_flash_dfu_from_app.out File tests/sysmo-octsim/05_flash_dfu_from_app.out: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17257/1/tests/sysmo-octsim/05_flash_dfu_from_app.out at 12 PS1, Line 12: Run-time device DFU version 0100 this kind of matching of the full stdout will break every time the distribution updates dfu-util... Why do we want to match all of the stdout and are not simply happy with the return value / exit code? https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17257/1/tests/sysmo-octsim/05_flash_dfu_from_app.sh File tests/sysmo-octsim/05_flash_dfu_from_app.sh: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17257/1/tests/sysmo-octsim/05_flash_dfu_from_app.sh at 3 PS1, Line 3: is it intentional that we continue this script even if one of the called scripts return error? Otherwise 'set -e' might be used... https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17257/1/tests/sysmo-octsim/run-tests File tests/sysmo-octsim/run-tests: https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17257/1/tests/sysmo-octsim/run-tests at 17 PS1, Line 17: echo "Prepare done" once again here (and probably for all of the shell scripts): Should we use 'set -e' for automatic error checking on every step, or do we want to only selectively manually check at some specific commands like here? -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/17257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: I246224e29e5936b4fe40cf7d7a5ff83c9940d121 Gerrit-Change-Number: 17257 Gerrit-PatchSet: 1 Gerrit-Owner: roh Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 08:50:12 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 09:51:51 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 26 Feb 2020 09:51:51 +0000 Subject: Change in osmo-ci[master]: jobs: Run update-osmo-{ci, python}-on-slaves on rpi4-deb9build-ansible References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17264 ) Change subject: jobs: Run update-osmo-{ci,python}-on-slaves on rpi4-deb9build-ansible ...................................................................... jobs: Run update-osmo-{ci,python}-on-slaves on rpi4-deb9build-ansible Change-Id: I96067ffc0061a85bcc46569b1bf38eade3b8d995 --- M jobs/update-osmo-ci-on-slaves.yml M jobs/update-osmo-python-on-slaves.yml 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/64/17264/1 diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index d47f08e..214888b 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -12,6 +12,7 @@ - host2-deb9build-ansible - build2-deb8build-ansible - build2-deb9build-ansible + - rpi4-deb9build-ansible properties: - build-discarder: days-to-keep: 30 diff --git a/jobs/update-osmo-python-on-slaves.yml b/jobs/update-osmo-python-on-slaves.yml index 4727c6b..5a76c38 100644 --- a/jobs/update-osmo-python-on-slaves.yml +++ b/jobs/update-osmo-python-on-slaves.yml @@ -12,6 +12,7 @@ - host2-deb9build-ansible - build2-deb8build-ansible - build2-deb9build-ansible + - rpi4-deb9build-ansible properties: - build-discarder: days-to-keep: 30 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I96067ffc0061a85bcc46569b1bf38eade3b8d995 Gerrit-Change-Number: 17264 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:09:31 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 26 Feb 2020 10:09:31 +0000 Subject: Change in osmo-ggsn[master]: add Linux network namespace support for TUN device In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/17253 ) Change subject: add Linux network namespace support for TUN device ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-ggsn/+/17253/1/lib/netns.c File lib/netns.c: https://gerrit.osmocom.org/c/osmo-ggsn/+/17253/1/lib/netns.c at 53 PS1, Line 53: sigfillset(&intmask); > no return checking, but then... [?] I'm adding all the improvements regarding error checking on next patch to separate what I did and what was previously done by someone else. -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17253 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: Idd0ad8fa9c8e7ba0aeec1b52947598d4d297b620 Gerrit-Change-Number: 17253 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Assignee: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 10:09:31 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:09:44 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:09:44 +0000 Subject: Change in osmo-ci[master]: Make "ansible_distribution_version >= 9" work References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17265 ) Change subject: Make "ansible_distribution_version >= 9" work ...................................................................... Make "ansible_distribution_version >= 9" work The distribution version must not be quoted in this case (string) but given as an integer. Otherwise it will match only on 9, but not on 10. Change-Id: I6ff3d16d2eac891e6663e8860eec2058478f4b79 --- M ansible/roles/osmocom-jenkins-slave/tasks/debian.yml M ansible/roles/osmocom-jenkins-slave/tasks/main.yml M ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml 3 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/65/17265/1 diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml b/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml index 38228ec..bac2c16 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml @@ -47,4 +47,4 @@ install_recommends: no with_items: - openjdk-8-jre-headless - when: ansible_distribution == 'Debian' and ansible_distribution_version >= '9' + when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9 diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml index ca66bc4..0ed682a 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml @@ -31,7 +31,7 @@ - name: install ttcn3 dependencies include_tasks: ttcn3-slave.yml - when: ttcn3_slave and ansible_distribution == 'Debian' and ansible_distribution_version >= '9' and not (ansible_architecture == "armv7l" or ansible_architecture == "arm64") + when: ttcn3_slave and ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9 and not (ansible_architecture == "armv7l" or ansible_architecture == "arm64") - name: copy .gitconfig copy: diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml index bc90aae..0b2fe63 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml @@ -112,7 +112,7 @@ install_recommends: no with_items: - liblua5.3-dev - when: ansible_distribution == 'Debian' and ansible_distribution_version >= '9' + when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9 - name: install liblimesuite-dev for stretch or later apt: @@ -122,7 +122,7 @@ install_recommends: no with_items: - liblimesuite-dev - when: ansible_distribution == 'Debian' and ansible_distribution_version >= '9' + when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9 - name: install osmo-remsim dependencies apt: @@ -132,7 +132,7 @@ with_items: - libjansson-dev - libulfius-dev - when: ansible_distribution == 'Debian' and ansible_distribution_version == '9' + when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9 - name: install srsLTE build dependencies apt: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6ff3d16d2eac891e6663e8860eec2058478f4b79 Gerrit-Change-Number: 17265 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:09:44 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:09:44 +0000 Subject: Change in osmo-ci[master]: add build2-deb10build-ansible build slave References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17266 ) Change subject: add build2-deb10build-ansible build slave ...................................................................... add build2-deb10build-ansible build slave This is our first Debian 10 build slave Change-Id: Iae80c5f73781d14ffbf124a476894d4631c83dc7 --- M ansible/hosts M jobs/update-osmo-ci-on-slaves.yml M jobs/update-osmo-python-on-slaves.yml 3 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/66/17266/1 diff --git a/ansible/hosts b/ansible/hosts index 5098b3e..33b6b41 100644 --- a/ansible/hosts +++ b/ansible/hosts @@ -12,6 +12,7 @@ admin2-deb9build ansible_host=2a01:4f8:13b:828::1:300 osmocom_jenkins_slave_fstrim=True build2-deb8build-ansible ansible_host=2a01:4f8:10b:2ad9::1:7 build2-deb9build-ansible ansible_host=2a01:4f8:10b:2ad9::1:6 osmocom_jenkins_slave_fstrim=True +build2-deb10build-ansible ansible_host=2a01:4f8:10b:2ad9::1:10 osmocom_jenkins_slave_fstrim=True host2-deb8build-ansible ansible_host=2a01:4f8:120:8470::1:2 host2-deb9build-ansible ansible_host=2a01:4f8:120:8470::1:3 osmocom_jenkins_slave_fstrim=True rpi4-deb9build-ansible ansible_host=10.9.25.51 diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index d47f08e..a2aa27d 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -12,6 +12,7 @@ - host2-deb9build-ansible - build2-deb8build-ansible - build2-deb9build-ansible + - build2-deb10build-ansible properties: - build-discarder: days-to-keep: 30 diff --git a/jobs/update-osmo-python-on-slaves.yml b/jobs/update-osmo-python-on-slaves.yml index 4727c6b..d208436 100644 --- a/jobs/update-osmo-python-on-slaves.yml +++ b/jobs/update-osmo-python-on-slaves.yml @@ -12,6 +12,7 @@ - host2-deb9build-ansible - build2-deb8build-ansible - build2-deb9build-ansible + - build2-deb10build-ansible properties: - build-discarder: days-to-keep: 30 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Iae80c5f73781d14ffbf124a476894d4631c83dc7 Gerrit-Change-Number: 17266 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:09:44 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:09:44 +0000 Subject: Change in osmo-ci[master]: ansible: Install open5gs dependencies on debian10 References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17267 ) Change subject: ansible: Install open5gs dependencies on debian10 ...................................................................... ansible: Install open5gs dependencies on debian10 Change-Id: Ib58a9a91d34c4ebf10171bed8f0b26d9b34892b1 --- M ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/67/17267/1 diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml index 0b2fe63..86acaab 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml @@ -150,3 +150,18 @@ - libuhd-dev - libczmq-dev - libsoapysdr-dev + +- name: install open5gs build dependencies + apt: + name: "{{ item }}" + cache_valid_time: 3600 + update_cache: yes + with_items: + - meson + - ninja-build + - libgcrypt-dev + - libidn11-dev + - libmongoc-dev + - libbson-dev + - libyaml-dev + when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 10 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17267 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib58a9a91d34c4ebf10171bed8f0b26d9b34892b1 Gerrit-Change-Number: 17267 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:09:44 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:09:44 +0000 Subject: Change in osmo-ci[master]: ansible: fix java for debian 10 References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17268 ) Change subject: ansible: fix java for debian 10 ...................................................................... ansible: fix java for debian 10 Change-Id: I8b81edf420534726cd987f3f90efe79ca921f41a --- M ansible/roles/osmocom-jenkins-slave/tasks/debian.yml 1 file changed, 12 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/68/17268/1 diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml b/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml index bac2c16..a8a36a7 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml @@ -39,7 +39,7 @@ default_release: jessie-backports when: ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie' -- name: install java for stretch or later +- name: install java for stretch apt: name: "{{ item }}" cache_valid_time: 3600 @@ -47,4 +47,14 @@ install_recommends: no with_items: - openjdk-8-jre-headless - when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9 + when: ansible_distribution == 'Debian' and ansible_distribution_version == '9' + +- name: install java for buster and later + apt: + name: "{{ item }}" + cache_valid_time: 3600 + update_cache: yes + install_recommends: no + with_items: + - openjdk-11-jre-headless + when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 10 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I8b81edf420534726cd987f3f90efe79ca921f41a Gerrit-Change-Number: 17268 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:10:53 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:10:53 +0000 Subject: Change in osmo-ci[master]: Make "ansible_distribution_version >= 9" work In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17265 ) Change subject: Make "ansible_distribution_version >= 9" work ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6ff3d16d2eac891e6663e8860eec2058478f4b79 Gerrit-Change-Number: 17265 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 10:10:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:10:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:10:59 +0000 Subject: Change in osmo-ci[master]: add build2-deb10build-ansible build slave In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17266 ) Change subject: add build2-deb10build-ansible build slave ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Iae80c5f73781d14ffbf124a476894d4631c83dc7 Gerrit-Change-Number: 17266 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 10:10:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:11:11 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:11:11 +0000 Subject: Change in osmo-ci[master]: ansible: Install open5gs dependencies on debian10 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17267 ) Change subject: ansible: Install open5gs dependencies on debian10 ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17267 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib58a9a91d34c4ebf10171bed8f0b26d9b34892b1 Gerrit-Change-Number: 17267 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 10:11:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:11:18 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:11:18 +0000 Subject: Change in osmo-ci[master]: ansible: fix java for debian 10 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17268 ) Change subject: ansible: fix java for debian 10 ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I8b81edf420534726cd987f3f90efe79ca921f41a Gerrit-Change-Number: 17268 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 10:11:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:11:40 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:11:40 +0000 Subject: Change in osmo-ci[master]: jobs: Run update-osmo-{ci, python}-on-slaves on rpi4-deb9build-ansible In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17264 ) Change subject: jobs: Run update-osmo-{ci,python}-on-slaves on rpi4-deb9build-ansible ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I96067ffc0061a85bcc46569b1bf38eade3b8d995 Gerrit-Change-Number: 17264 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 10:11:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:11:42 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:11:42 +0000 Subject: Change in osmo-ci[master]: jobs: Run update-osmo-{ci, python}-on-slaves on rpi4-deb9build-ansible In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17264 ) Change subject: jobs: Run update-osmo-{ci,python}-on-slaves on rpi4-deb9build-ansible ...................................................................... jobs: Run update-osmo-{ci,python}-on-slaves on rpi4-deb9build-ansible Change-Id: I96067ffc0061a85bcc46569b1bf38eade3b8d995 --- M jobs/update-osmo-ci-on-slaves.yml M jobs/update-osmo-python-on-slaves.yml 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index d47f08e..214888b 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -12,6 +12,7 @@ - host2-deb9build-ansible - build2-deb8build-ansible - build2-deb9build-ansible + - rpi4-deb9build-ansible properties: - build-discarder: days-to-keep: 30 diff --git a/jobs/update-osmo-python-on-slaves.yml b/jobs/update-osmo-python-on-slaves.yml index 4727c6b..5a76c38 100644 --- a/jobs/update-osmo-python-on-slaves.yml +++ b/jobs/update-osmo-python-on-slaves.yml @@ -12,6 +12,7 @@ - host2-deb9build-ansible - build2-deb8build-ansible - build2-deb9build-ansible + - rpi4-deb9build-ansible properties: - build-discarder: days-to-keep: 30 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I96067ffc0061a85bcc46569b1bf38eade3b8d995 Gerrit-Change-Number: 17264 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:12:42 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:12:42 +0000 Subject: Change in osmo-ci[master]: add build2-deb10build-ansible build slave In-Reply-To: References: Message-ID: laforge has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-ci/+/17266 ) Change subject: add build2-deb10build-ansible build slave ...................................................................... add build2-deb10build-ansible build slave This is our first Debian 10 build slave Change-Id: Iae80c5f73781d14ffbf124a476894d4631c83dc7 --- M ansible/hosts M jobs/update-osmo-ci-on-slaves.yml M jobs/update-osmo-python-on-slaves.yml 3 files changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/66/17266/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Iae80c5f73781d14ffbf124a476894d4631c83dc7 Gerrit-Change-Number: 17266 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:13:01 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:13:01 +0000 Subject: Change in osmo-ci[master]: Make "ansible_distribution_version >= 9" work In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17265 ) Change subject: Make "ansible_distribution_version >= 9" work ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6ff3d16d2eac891e6663e8860eec2058478f4b79 Gerrit-Change-Number: 17265 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 10:13:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:13:05 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:13:05 +0000 Subject: Change in osmo-ci[master]: add build2-deb10build-ansible build slave In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17266 ) Change subject: add build2-deb10build-ansible build slave ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Iae80c5f73781d14ffbf124a476894d4631c83dc7 Gerrit-Change-Number: 17266 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 10:13:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:13:09 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:13:09 +0000 Subject: Change in osmo-ci[master]: ansible: Install open5gs dependencies on debian10 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17267 ) Change subject: ansible: Install open5gs dependencies on debian10 ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17267 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib58a9a91d34c4ebf10171bed8f0b26d9b34892b1 Gerrit-Change-Number: 17267 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 10:13:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:13:13 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:13:13 +0000 Subject: Change in osmo-ci[master]: ansible: fix java for debian 10 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17268 ) Change subject: ansible: fix java for debian 10 ...................................................................... Patch Set 2: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I8b81edf420534726cd987f3f90efe79ca921f41a Gerrit-Change-Number: 17268 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 10:13:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:13:20 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 26 Feb 2020 10:13:20 +0000 Subject: Change in pysim[master]: Python2 is deprecated, switch to Python3 In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#12) to the change originally created by gnutoo. ( https://gerrit.osmocom.org/c/pysim/+/15504 ) Change subject: Python2 is deprecated, switch to Python3 ...................................................................... Python2 is deprecated, switch to Python3 Signed-off-by: Denis 'GNUtoo' Carikli Depends: (osmo-ci) I555af88b0e6a5c082e1e0cbd6915649a8a942052 Change-Id: I430d173535e0cd5bb895b9dfc9070cbc40cfc8ff --- M README.md M contrib/jenkins.sh M pySim-prog.py M pySim-read.py M tests/pysim-test.sh 5 files changed, 13 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/04/15504/12 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/15504 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I430d173535e0cd5bb895b9dfc9070cbc40cfc8ff Gerrit-Change-Number: 15504 Gerrit-PatchSet: 12 Gerrit-Owner: gnutoo Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:13:55 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 10:13:55 +0000 Subject: Change in osmo-gsm-tester[master]: Add test log to junit output In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17252 ) Change subject: Add test log to junit output ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17252 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ieb5566a41ecf3a9512db579eb37e8d8ed5325057 Gerrit-Change-Number: 17252 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 10:13:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 10:16:09 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 26 Feb 2020 10:16:09 +0000 Subject: Change in pysim[master]: Python2 is deprecated, switch to Python3 In-Reply-To: References: Message-ID: fixeria has uploaded a new patch set (#13) to the change originally created by gnutoo. ( https://gerrit.osmocom.org/c/pysim/+/15504 ) Change subject: Python2 is deprecated, switch to Python3 ...................................................................... Python2 is deprecated, switch to Python3 Signed-off-by: Denis 'GNUtoo' Carikli Depends: (osmo-ci) I555af88b0e6a5c082e1e0cbd6915649a8a942052 Change-Id: I430d173535e0cd5bb895b9dfc9070cbc40cfc8ff --- M README.md M contrib/jenkins.sh M pySim-prog.py M pySim-read.py M pySim/cards.py M tests/pysim-test.sh 6 files changed, 13 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/04/15504/13 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/15504 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I430d173535e0cd5bb895b9dfc9070cbc40cfc8ff Gerrit-Change-Number: 15504 Gerrit-PatchSet: 13 Gerrit-Owner: gnutoo Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 11:04:46 2020 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Wed, 26 Feb 2020 11:04:46 +0000 Subject: Change in libosmocore[master]: osmo-sim-test: initalize tlv_parsed structure with zeros References: Message-ID: dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17269 ) Change subject: osmo-sim-test: initalize tlv_parsed structure with zeros ...................................................................... osmo-sim-test: initalize tlv_parsed structure with zeros The variable struct tlv_parsed tp in dump_file() is not pre-initalized. Lets make sure that it is pre-initalized to avoid accessing uninitalized memory in error/corner cases. Change-Id: I6b0209b966127a4195e6f4bcb43d49387c7646ce Fixes: CID#208435 --- M utils/osmo-sim-test.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/69/17269/1 diff --git a/utils/osmo-sim-test.c b/utils/osmo-sim-test.c index d33f1ba..52f146d 100644 --- a/utils/osmo-sim-test.c +++ b/utils/osmo-sim-test.c @@ -319,7 +319,7 @@ static int dump_file(struct osim_chan_hdl *chan, uint16_t fid) { - struct tlv_parsed tp; + struct tlv_parsed tp = { 0 }; struct osim_fcp_fd_decoded ffdd; struct msgb *msg, *rmsg; int rc, i, offset; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6b0209b966127a4195e6f4bcb43d49387c7646ce Gerrit-Change-Number: 17269 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 11:08:02 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 26 Feb 2020 11:08:02 +0000 Subject: Change in osmo-ci[master]: jobs: add 'simtest' to the list of to be updated slaves References: Message-ID: fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17270 ) Change subject: jobs: add 'simtest' to the list of to be updated slaves ...................................................................... jobs: add 'simtest' to the list of to be updated slaves Change-Id: I0cc6188aab10ecb8b862710d272c411e47a21f61 --- M jobs/update-osmo-ci-on-slaves.yml M jobs/update-osmo-python-on-slaves.yml 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/70/17270/1 diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index 214888b..f6b182c 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -6,6 +6,7 @@ type: slave name: label values: + - simtest - admin2-deb8build - admin2-deb9build - host2-deb8build-ansible diff --git a/jobs/update-osmo-python-on-slaves.yml b/jobs/update-osmo-python-on-slaves.yml index 5a76c38..91cf5bc 100644 --- a/jobs/update-osmo-python-on-slaves.yml +++ b/jobs/update-osmo-python-on-slaves.yml @@ -6,6 +6,7 @@ type: slave name: label values: + - simtest - admin2-deb8build - admin2-deb9build - host2-deb8build-ansible -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0cc6188aab10ecb8b862710d272c411e47a21f61 Gerrit-Change-Number: 17270 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 12:10:09 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 26 Feb 2020 12:10:09 +0000 Subject: Change in osmo-ggsn[master]: netns: Improve error checking In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17254 to look at the new patch set (#2). Change subject: netns: Improve error checking ...................................................................... netns: Improve error checking Change-Id: I9b9c8fd6eeaaa7d190b8e2a34ca82088904c7708 --- M lib/netns.c M lib/netns.h M sgsnemu/sgsnemu.c 3 files changed, 121 insertions(+), 61 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/54/17254/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17254 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I9b9c8fd6eeaaa7d190b8e2a34ca82088904c7708 Gerrit-Change-Number: 17254 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 12:13:51 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 26 Feb 2020 12:13:51 +0000 Subject: Change in libosmocore[master]: osmo-sim-test: initalize tlv_parsed structure with zeros In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17269 ) Change subject: osmo-sim-test: initalize tlv_parsed structure with zeros ...................................................................... Patch Set 1: Code-Review-1 (2 comments) https://gerrit.osmocom.org/c/libosmocore/+/17269/1/utils/osmo-sim-test.c File utils/osmo-sim-test.c: https://gerrit.osmocom.org/c/libosmocore/+/17269/1/utils/osmo-sim-test.c at 322 PS1, Line 322: struct tlv_parsed tp = { 0 }; tlp_parsed should be properly initialized by tlv_parse(), no need for this. https://gerrit.osmocom.org/c/libosmocore/+/17269/1/utils/osmo-sim-test.c at 381 PS1, Line 381: if (!TLVP_PRESENT(&tp, UICC_FCP_T_FILE_SIZE)) If you want to protect against use of non-parsed tp in here, then add an extra bool "fcp_tlv_parsed" or directly check again after g_class!=0xA0. The wrong thing is using tp without having been through tlv_parse() before. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6b0209b966127a4195e6f4bcb43d49387c7646ce Gerrit-Change-Number: 17269 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 26 Feb 2020 12:13:51 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 12:51:19 2020 From: gerrit-no-reply at lists.osmocom.org (fixeria) Date: Wed, 26 Feb 2020 12:51:19 +0000 Subject: Change in osmo-ci[master]: jobs: add 'simtest' to the list of to be updated slaves In-Reply-To: References: Message-ID: fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17270 ) Change subject: jobs: add 'simtest' to the list of to be updated slaves ...................................................................... Patch Set 1: Verified+1 Code-Review+2 This change is quite obvious. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0cc6188aab10ecb8b862710d272c411e47a21f61 Gerrit-Change-Number: 17270 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 26 Feb 2020 12:51:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:03:12 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:03:12 +0000 Subject: Change in osmo-ci[master]: jobs: add 'simtest' to the list of to be updated slaves In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17270 ) Change subject: jobs: add 'simtest' to the list of to be updated slaves ...................................................................... jobs: add 'simtest' to the list of to be updated slaves Change-Id: I0cc6188aab10ecb8b862710d272c411e47a21f61 --- M jobs/update-osmo-ci-on-slaves.yml M jobs/update-osmo-python-on-slaves.yml 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: fixeria: Looks good to me, approved; Verified diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index 214888b..f6b182c 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -6,6 +6,7 @@ type: slave name: label values: + - simtest - admin2-deb8build - admin2-deb9build - host2-deb8build-ansible diff --git a/jobs/update-osmo-python-on-slaves.yml b/jobs/update-osmo-python-on-slaves.yml index 5a76c38..91cf5bc 100644 --- a/jobs/update-osmo-python-on-slaves.yml +++ b/jobs/update-osmo-python-on-slaves.yml @@ -6,6 +6,7 @@ type: slave name: label values: + - simtest - admin2-deb8build - admin2-deb9build - host2-deb8build-ansible -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0cc6188aab10ecb8b862710d272c411e47a21f61 Gerrit-Change-Number: 17270 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:31:23 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:31:23 +0000 Subject: Change in simtrace2[master]: simtrace2_api: Add osmo_st2_cardem_request_config() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/17244 ) Change subject: simtrace2_api: Add osmo_st2_cardem_request_config() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/17244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ia4822d360a271d2ce9725f761cb95de58663ac3b Gerrit-Change-Number: 17244 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 13:31:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:31:27 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:31:27 +0000 Subject: Change in simtrace2[master]: simtrace2_api: Add osmo_st2_cardem_request_config() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/17244 ) Change subject: simtrace2_api: Add osmo_st2_cardem_request_config() ...................................................................... simtrace2_api: Add osmo_st2_cardem_request_config() In Change-Id I7cdd3f9171dbed45de0089defe29d2b59044bd84 we introduced firmware support for SIMTRACE_MSGT_BD_CEMU_CONFIG. The respective host part was so far only implemented in osmo-remsim-client-st2, but not in libosmo-simtrace2. Let's fix that. Change-Id: Ia4822d360a271d2ce9725f761cb95de58663ac3b --- M host/include/osmocom/simtrace2/simtrace2_api.h M host/lib/simtrace2_api.c 2 files changed, 16 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/host/include/osmocom/simtrace2/simtrace2_api.h b/host/include/osmocom/simtrace2/simtrace2_api.h index d31fb85..012b96c 100644 --- a/host/include/osmocom/simtrace2/simtrace2_api.h +++ b/host/include/osmocom/simtrace2/simtrace2_api.h @@ -48,6 +48,7 @@ int osmo_st2_cardem_request_sw_tx(struct osmo_st2_cardem_inst *ci, const uint8_t *sw); int osmo_st2_cardem_request_set_atr(struct osmo_st2_cardem_inst *ci, const uint8_t *atr, unsigned int atr_len); +int osmo_st2_cardem_request_config(struct osmo_st2_cardem_inst *ci, uint32_t features); int osmo_st2_modem_reset_pulse(struct osmo_st2_slot *slot, uint16_t duration_ms); diff --git a/host/lib/simtrace2_api.c b/host/lib/simtrace2_api.c index b2b2829..b3e4e38 100644 --- a/host/lib/simtrace2_api.c +++ b/host/lib/simtrace2_api.c @@ -204,6 +204,21 @@ return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_SET_ATR); } +int osmo_st2_cardem_request_config(struct osmo_st2_cardem_inst *ci, uint32_t features) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_config *cfg; + + cfg = (struct cardemu_usb_msg_config *) msgb_put(msg, sizeof(*cfg)); + + printf("<= %s(%08x)\n", __func__, features); + + memset(cfg, 0, sizeof(*cfg)); + cfg->features = features; + + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_BD_CEMU_CONFIG); +} + /*********************************************************************** * Modem Control protocol ***********************************************************************/ -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/17244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ia4822d360a271d2ce9725f761cb95de58663ac3b Gerrit-Change-Number: 17244 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:39:23 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:39:23 +0000 Subject: Change in osmo-bts[master]: virtual: Fix VTY commands to specify GSMTAP multicast groups References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17271 ) Change subject: virtual: Fix VTY commands to specify GSMTAP multicast groups ...................................................................... virtual: Fix VTY commands to specify GSMTAP multicast groups osmo-bts-virtual uses GSMTAP over multicast groups to communicate with one or more virtphy instances. There are some well-known default multicast groups, but those can also be overridden via the VTY. The problem is: If you actually try that, osmo-bts-virtual will abort, as we try to talloc_free() when using osmo_talloc_replace_string() on the constant default string. The proper solution is to talloc_strdup() the constant default string when setting the default value in bts_model_phy_link_set_defaults(). Change-Id: Ia96fea891a22e5a3c47ce658eda130ba8d4fc411 --- M src/osmo-bts-virtual/main.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/71/17271/1 diff --git a/src/osmo-bts-virtual/main.c b/src/osmo-bts-virtual/main.c index c329f3a..02b7ae9 100644 --- a/src/osmo-bts-virtual/main.c +++ b/src/osmo-bts-virtual/main.c @@ -119,9 +119,9 @@ void bts_model_phy_link_set_defaults(struct phy_link *plink) { - plink->u.virt.bts_mcast_group = DEFAULT_BTS_MCAST_GROUP; + plink->u.virt.bts_mcast_group = talloc_strdup(plink, DEFAULT_BTS_MCAST_GROUP); plink->u.virt.bts_mcast_port = DEFAULT_BTS_MCAST_PORT; - plink->u.virt.ms_mcast_group = DEFAULT_MS_MCAST_GROUP; + plink->u.virt.ms_mcast_group = talloc_strdup(plink, DEFAULT_MS_MCAST_GROUP); plink->u.virt.ms_mcast_port = DEFAULT_MS_MCAST_PORT; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia96fea891a22e5a3c47ce658eda130ba8d4fc411 Gerrit-Change-Number: 17271 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:47:10 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:47:10 +0000 Subject: Change in osmo-ci[master]: Make "ansible_distribution_version >= 9" work In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17265 ) Change subject: Make "ansible_distribution_version >= 9" work ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6ff3d16d2eac891e6663e8860eec2058478f4b79 Gerrit-Change-Number: 17265 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 13:47:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:47:13 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:47:13 +0000 Subject: Change in osmo-ci[master]: add build2-deb10build-ansible build slave In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17266 ) Change subject: add build2-deb10build-ansible build slave ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Iae80c5f73781d14ffbf124a476894d4631c83dc7 Gerrit-Change-Number: 17266 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 13:47:13 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:47:15 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:47:15 +0000 Subject: Change in osmo-ci[master]: ansible: Install open5gs dependencies on debian10 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17267 ) Change subject: ansible: Install open5gs dependencies on debian10 ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17267 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib58a9a91d34c4ebf10171bed8f0b26d9b34892b1 Gerrit-Change-Number: 17267 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 13:47:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:47:17 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:47:17 +0000 Subject: Change in osmo-ci[master]: ansible: fix java for debian 10 In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17268 ) Change subject: ansible: fix java for debian 10 ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I8b81edf420534726cd987f3f90efe79ca921f41a Gerrit-Change-Number: 17268 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 13:47:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:47:20 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:47:20 +0000 Subject: Change in osmo-ci[master]: Make "ansible_distribution_version >= 9" work In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17265 ) Change subject: Make "ansible_distribution_version >= 9" work ...................................................................... Make "ansible_distribution_version >= 9" work The distribution version must not be quoted in this case (string) but given as an integer. Otherwise it will match only on 9, but not on 10. Change-Id: I6ff3d16d2eac891e6663e8860eec2058478f4b79 --- M ansible/roles/osmocom-jenkins-slave/tasks/debian.yml M ansible/roles/osmocom-jenkins-slave/tasks/main.yml M ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml 3 files changed, 5 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml b/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml index 38228ec..bac2c16 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml @@ -47,4 +47,4 @@ install_recommends: no with_items: - openjdk-8-jre-headless - when: ansible_distribution == 'Debian' and ansible_distribution_version >= '9' + when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9 diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml index ca66bc4..0ed682a 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/main.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/main.yml @@ -31,7 +31,7 @@ - name: install ttcn3 dependencies include_tasks: ttcn3-slave.yml - when: ttcn3_slave and ansible_distribution == 'Debian' and ansible_distribution_version >= '9' and not (ansible_architecture == "armv7l" or ansible_architecture == "arm64") + when: ttcn3_slave and ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9 and not (ansible_architecture == "armv7l" or ansible_architecture == "arm64") - name: copy .gitconfig copy: diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml index bc90aae..0b2fe63 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml @@ -112,7 +112,7 @@ install_recommends: no with_items: - liblua5.3-dev - when: ansible_distribution == 'Debian' and ansible_distribution_version >= '9' + when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9 - name: install liblimesuite-dev for stretch or later apt: @@ -122,7 +122,7 @@ install_recommends: no with_items: - liblimesuite-dev - when: ansible_distribution == 'Debian' and ansible_distribution_version >= '9' + when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9 - name: install osmo-remsim dependencies apt: @@ -132,7 +132,7 @@ with_items: - libjansson-dev - libulfius-dev - when: ansible_distribution == 'Debian' and ansible_distribution_version == '9' + when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9 - name: install srsLTE build dependencies apt: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I6ff3d16d2eac891e6663e8860eec2058478f4b79 Gerrit-Change-Number: 17265 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:47:20 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:47:20 +0000 Subject: Change in osmo-ci[master]: add build2-deb10build-ansible build slave In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17266 ) Change subject: add build2-deb10build-ansible build slave ...................................................................... add build2-deb10build-ansible build slave This is our first Debian 10 build slave Change-Id: Iae80c5f73781d14ffbf124a476894d4631c83dc7 --- M ansible/hosts M jobs/update-osmo-ci-on-slaves.yml M jobs/update-osmo-python-on-slaves.yml 3 files changed, 3 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ansible/hosts b/ansible/hosts index 5098b3e..33b6b41 100644 --- a/ansible/hosts +++ b/ansible/hosts @@ -12,6 +12,7 @@ admin2-deb9build ansible_host=2a01:4f8:13b:828::1:300 osmocom_jenkins_slave_fstrim=True build2-deb8build-ansible ansible_host=2a01:4f8:10b:2ad9::1:7 build2-deb9build-ansible ansible_host=2a01:4f8:10b:2ad9::1:6 osmocom_jenkins_slave_fstrim=True +build2-deb10build-ansible ansible_host=2a01:4f8:10b:2ad9::1:10 osmocom_jenkins_slave_fstrim=True host2-deb8build-ansible ansible_host=2a01:4f8:120:8470::1:2 host2-deb9build-ansible ansible_host=2a01:4f8:120:8470::1:3 osmocom_jenkins_slave_fstrim=True rpi4-deb9build-ansible ansible_host=10.9.25.51 diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index f6b182c..0a42f6b 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -13,6 +13,7 @@ - host2-deb9build-ansible - build2-deb8build-ansible - build2-deb9build-ansible + - build2-deb10build-ansible - rpi4-deb9build-ansible properties: - build-discarder: diff --git a/jobs/update-osmo-python-on-slaves.yml b/jobs/update-osmo-python-on-slaves.yml index 91cf5bc..91113b3 100644 --- a/jobs/update-osmo-python-on-slaves.yml +++ b/jobs/update-osmo-python-on-slaves.yml @@ -13,6 +13,7 @@ - host2-deb9build-ansible - build2-deb8build-ansible - build2-deb9build-ansible + - build2-deb10build-ansible - rpi4-deb9build-ansible properties: - build-discarder: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17266 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Iae80c5f73781d14ffbf124a476894d4631c83dc7 Gerrit-Change-Number: 17266 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:47:21 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:47:21 +0000 Subject: Change in osmo-ci[master]: ansible: Install open5gs dependencies on debian10 In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17267 ) Change subject: ansible: Install open5gs dependencies on debian10 ...................................................................... ansible: Install open5gs dependencies on debian10 Change-Id: Ib58a9a91d34c4ebf10171bed8f0b26d9b34892b1 --- M ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml 1 file changed, 15 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml index 0b2fe63..86acaab 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/osmocom_build_deps.yml @@ -150,3 +150,18 @@ - libuhd-dev - libczmq-dev - libsoapysdr-dev + +- name: install open5gs build dependencies + apt: + name: "{{ item }}" + cache_valid_time: 3600 + update_cache: yes + with_items: + - meson + - ninja-build + - libgcrypt-dev + - libidn11-dev + - libmongoc-dev + - libbson-dev + - libyaml-dev + when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 10 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17267 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib58a9a91d34c4ebf10171bed8f0b26d9b34892b1 Gerrit-Change-Number: 17267 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:47:21 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:47:21 +0000 Subject: Change in osmo-ci[master]: ansible: fix java for debian 10 In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17268 ) Change subject: ansible: fix java for debian 10 ...................................................................... ansible: fix java for debian 10 Change-Id: I8b81edf420534726cd987f3f90efe79ca921f41a --- M ansible/roles/osmocom-jenkins-slave/tasks/debian.yml 1 file changed, 12 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml b/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml index bac2c16..a8a36a7 100644 --- a/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml +++ b/ansible/roles/osmocom-jenkins-slave/tasks/debian.yml @@ -39,7 +39,7 @@ default_release: jessie-backports when: ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie' -- name: install java for stretch or later +- name: install java for stretch apt: name: "{{ item }}" cache_valid_time: 3600 @@ -47,4 +47,14 @@ install_recommends: no with_items: - openjdk-8-jre-headless - when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 9 + when: ansible_distribution == 'Debian' and ansible_distribution_version == '9' + +- name: install java for buster and later + apt: + name: "{{ item }}" + cache_valid_time: 3600 + update_cache: yes + install_recommends: no + with_items: + - openjdk-11-jre-headless + when: ansible_distribution == 'Debian' and ansible_distribution_version|int >= 10 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17268 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I8b81edf420534726cd987f3f90efe79ca921f41a Gerrit-Change-Number: 17268 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:47:54 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:47:54 +0000 Subject: Change in osmo-ci[master]: osmocom-nightly-packages: Allow non-osmocom git URL in checkout() References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17272 ) Change subject: osmocom-nightly-packages: Allow non-osmocom git URL in checkout() ...................................................................... osmocom-nightly-packages: Allow non-osmocom git URL in checkout() Change-Id: Ib768ff2822df5875820e4f12390004ed18614144 --- M scripts/osmocom-nightly-packages.sh 1 file changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/72/17272/1 diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index 6094db2..49aaaf2 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -63,14 +63,19 @@ ### common checkout() { local name=$1 - local branch=$2 + local url=$2 + local branch=$3 + + if [ -z "$url" ]; then + url="$(osmo_git_clone_url "$name")" + fi cd "$REPO" if [ -n "$branch" ] ; then - osmo_git_clone_date "$(osmo_git_clone_url "$name")" -b "$branch" + osmo_git_clone_date "$url" -b "$branch" else - osmo_git_clone_date "$(osmo_git_clone_url "$name")" + osmo_git_clone_date "$url" fi cd - -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17272 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib768ff2822df5875820e4f12390004ed18614144 Gerrit-Change-Number: 17272 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:47:55 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:47:55 +0000 Subject: Change in osmo-ci[master]: osmocom-latest-packages: Allow non-osmocom git URL in checkout() References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17273 ) Change subject: osmocom-latest-packages: Allow non-osmocom git URL in checkout() ...................................................................... osmocom-latest-packages: Allow non-osmocom git URL in checkout() Change-Id: I33bbc47598cb2c31cdc4209cd2fe3e6f6dd67e7a --- M scripts/osmocom-latest-packages.sh 1 file changed, 9 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/73/17273/1 diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index bcc3067..fc00f30 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -48,19 +48,17 @@ checkout() { project=$1 + url=$2 gitbpargs="" + + if [ -z "$url" ]; then + url="$(osmo_git_clone_url "$project")" + fi + echo echo "====> Checking out $project" cd "$TOP" - if [ "$project" = "limesuite" ]; then - [ -d "$project" ] || git clone "https://github.com/myriadrf/LimeSuite" "$project" - elif [ "$project" = "open5gs" ]; then - if [ ! -d "$project" ]; then - git clone "https://github.com/open5gs/open5gs" "$project" - fi - else - [ -d "$project" ] || osmo_git_clone_date "$(osmo_git_clone_url "$project")" - fi + [ -d "$project" ] || osmo_git_clone_date "$url" "$project" cd "$project" git fetch VER=$(get_last_tag "$project") @@ -144,7 +142,7 @@ prepare # NOTE: when adding a repository that is not in gerrit, adjust osmo_git_clone_url() - checkout limesuite + checkout limesuite https://github.com/myriadrf/LimeSuite checkout osmo-gsm-manuals checkout libosmocore checkout libosmo-sccp @@ -171,7 +169,7 @@ checkout libosmo-dsp checkout osmo-sysmon checkout osmo-remsim - checkout open5gs + checkout open5gs https://github.com/open5gs/open5gs checkout_copy_debian8_jessie "osmo-gsm-manuals" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I33bbc47598cb2c31cdc4209cd2fe3e6f6dd67e7a Gerrit-Change-Number: 17273 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:47:55 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:47:55 +0000 Subject: Change in osmo-ci[master]: osmocom-*-packages: Build neocon package References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17274 ) Change subject: osmocom-*-packages: Build neocon package ...................................................................... osmocom-*-packages: Build neocon package Change-Id: Ie0243bf066d6bc369737b8d659d09e3871cae79d --- M scripts/osmocom-latest-packages.sh M scripts/osmocom-nightly-packages.sh 2 files changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/74/17274/1 diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index fc00f30..5261d57 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -170,6 +170,7 @@ checkout osmo-sysmon checkout osmo-remsim checkout open5gs https://github.com/open5gs/open5gs + checkout neocon https://github.com/laf0rge/neocon checkout_copy_debian8_jessie "osmo-gsm-manuals" @@ -203,6 +204,7 @@ build osmo-sysmon build osmo-remsim build open5gs + build neocon cd "$TOP/$PROJ" osc ci -m "Latest Tagged versions of $DT" diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index 49aaaf2..475db42 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -224,6 +224,7 @@ checkout osmo-sysmon checkout osmo-remsim checkout_open5gs + checkout neocon https://github.com/laf0rge/neocon checkout_copy_debian8_jessie "osmo-gsm-manuals" checkout_copy_debian8_jessie "osmo-trx" @@ -262,6 +263,7 @@ build osmo-sysmon build osmo-remsim build open5gs + build neocon download_bumpversion -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17274 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ie0243bf066d6bc369737b8d659d09e3871cae79d Gerrit-Change-Number: 17274 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:48:24 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:48:24 +0000 Subject: Change in osmo-ci[master]: osmocom-nightly-packages: Allow non-osmocom git URL in checkout() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17272 ) Change subject: osmocom-nightly-packages: Allow non-osmocom git URL in checkout() ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17272 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib768ff2822df5875820e4f12390004ed18614144 Gerrit-Change-Number: 17272 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 13:48:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:48:48 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:48:48 +0000 Subject: Change in osmo-ci[master]: osmocom-latest-packages: Allow non-osmocom git URL in checkout() In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17273 ) Change subject: osmocom-latest-packages: Allow non-osmocom git URL in checkout() ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I33bbc47598cb2c31cdc4209cd2fe3e6f6dd67e7a Gerrit-Change-Number: 17273 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 13:48:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:48:54 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:48:54 +0000 Subject: Change in osmo-ci[master]: osmocom-*-packages: Build neocon package In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17274 ) Change subject: osmocom-*-packages: Build neocon package ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17274 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ie0243bf066d6bc369737b8d659d09e3871cae79d Gerrit-Change-Number: 17274 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 13:48:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:56:57 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:56:57 +0000 Subject: Change in osmo-ci[master]: osmocom-nightly-packages: Allow non-osmocom git URL in checkout() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17272 ) Change subject: osmocom-nightly-packages: Allow non-osmocom git URL in checkout() ...................................................................... osmocom-nightly-packages: Allow non-osmocom git URL in checkout() Change-Id: Ib768ff2822df5875820e4f12390004ed18614144 --- M scripts/osmocom-nightly-packages.sh 1 file changed, 8 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index 6094db2..49aaaf2 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -63,14 +63,19 @@ ### common checkout() { local name=$1 - local branch=$2 + local url=$2 + local branch=$3 + + if [ -z "$url" ]; then + url="$(osmo_git_clone_url "$name")" + fi cd "$REPO" if [ -n "$branch" ] ; then - osmo_git_clone_date "$(osmo_git_clone_url "$name")" -b "$branch" + osmo_git_clone_date "$url" -b "$branch" else - osmo_git_clone_date "$(osmo_git_clone_url "$name")" + osmo_git_clone_date "$url" fi cd - -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17272 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib768ff2822df5875820e4f12390004ed18614144 Gerrit-Change-Number: 17272 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:56:59 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:56:59 +0000 Subject: Change in osmo-ci[master]: osmocom-latest-packages: Allow non-osmocom git URL in checkout() In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17273 ) Change subject: osmocom-latest-packages: Allow non-osmocom git URL in checkout() ...................................................................... osmocom-latest-packages: Allow non-osmocom git URL in checkout() Change-Id: I33bbc47598cb2c31cdc4209cd2fe3e6f6dd67e7a --- M scripts/osmocom-latest-packages.sh 1 file changed, 9 insertions(+), 11 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index bcc3067..fc00f30 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -48,19 +48,17 @@ checkout() { project=$1 + url=$2 gitbpargs="" + + if [ -z "$url" ]; then + url="$(osmo_git_clone_url "$project")" + fi + echo echo "====> Checking out $project" cd "$TOP" - if [ "$project" = "limesuite" ]; then - [ -d "$project" ] || git clone "https://github.com/myriadrf/LimeSuite" "$project" - elif [ "$project" = "open5gs" ]; then - if [ ! -d "$project" ]; then - git clone "https://github.com/open5gs/open5gs" "$project" - fi - else - [ -d "$project" ] || osmo_git_clone_date "$(osmo_git_clone_url "$project")" - fi + [ -d "$project" ] || osmo_git_clone_date "$url" "$project" cd "$project" git fetch VER=$(get_last_tag "$project") @@ -144,7 +142,7 @@ prepare # NOTE: when adding a repository that is not in gerrit, adjust osmo_git_clone_url() - checkout limesuite + checkout limesuite https://github.com/myriadrf/LimeSuite checkout osmo-gsm-manuals checkout libosmocore checkout libosmo-sccp @@ -171,7 +169,7 @@ checkout libosmo-dsp checkout osmo-sysmon checkout osmo-remsim - checkout open5gs + checkout open5gs https://github.com/open5gs/open5gs checkout_copy_debian8_jessie "osmo-gsm-manuals" -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I33bbc47598cb2c31cdc4209cd2fe3e6f6dd67e7a Gerrit-Change-Number: 17273 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:57:00 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:57:00 +0000 Subject: Change in osmo-ci[master]: osmocom-*-packages: Build neocon package In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17274 ) Change subject: osmocom-*-packages: Build neocon package ...................................................................... osmocom-*-packages: Build neocon package Change-Id: Ie0243bf066d6bc369737b8d659d09e3871cae79d --- M scripts/osmocom-latest-packages.sh M scripts/osmocom-nightly-packages.sh 2 files changed, 4 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index fc00f30..5261d57 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -170,6 +170,7 @@ checkout osmo-sysmon checkout osmo-remsim checkout open5gs https://github.com/open5gs/open5gs + checkout neocon https://github.com/laf0rge/neocon checkout_copy_debian8_jessie "osmo-gsm-manuals" @@ -203,6 +204,7 @@ build osmo-sysmon build osmo-remsim build open5gs + build neocon cd "$TOP/$PROJ" osc ci -m "Latest Tagged versions of $DT" diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index 49aaaf2..475db42 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -224,6 +224,7 @@ checkout osmo-sysmon checkout osmo-remsim checkout_open5gs + checkout neocon https://github.com/laf0rge/neocon checkout_copy_debian8_jessie "osmo-gsm-manuals" checkout_copy_debian8_jessie "osmo-trx" @@ -262,6 +263,7 @@ build osmo-sysmon build osmo-remsim build open5gs + build neocon download_bumpversion -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17274 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ie0243bf066d6bc369737b8d659d09e3871cae79d Gerrit-Change-Number: 17274 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:57:10 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:57:10 +0000 Subject: Change in osmo-bts[master]: virtual: Fix VTY commands to specify GSMTAP multicast groups In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17271 ) Change subject: virtual: Fix VTY commands to specify GSMTAP multicast groups ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia96fea891a22e5a3c47ce658eda130ba8d4fc411 Gerrit-Change-Number: 17271 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Wed, 26 Feb 2020 13:57:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 13:57:12 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 13:57:12 +0000 Subject: Change in osmo-bts[master]: virtual: Fix VTY commands to specify GSMTAP multicast groups In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17271 ) Change subject: virtual: Fix VTY commands to specify GSMTAP multicast groups ...................................................................... virtual: Fix VTY commands to specify GSMTAP multicast groups osmo-bts-virtual uses GSMTAP over multicast groups to communicate with one or more virtphy instances. There are some well-known default multicast groups, but those can also be overridden via the VTY. The problem is: If you actually try that, osmo-bts-virtual will abort, as we try to talloc_free() when using osmo_talloc_replace_string() on the constant default string. The proper solution is to talloc_strdup() the constant default string when setting the default value in bts_model_phy_link_set_defaults(). Change-Id: Ia96fea891a22e5a3c47ce658eda130ba8d4fc411 --- M src/osmo-bts-virtual/main.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved; Verified diff --git a/src/osmo-bts-virtual/main.c b/src/osmo-bts-virtual/main.c index c329f3a..02b7ae9 100644 --- a/src/osmo-bts-virtual/main.c +++ b/src/osmo-bts-virtual/main.c @@ -119,9 +119,9 @@ void bts_model_phy_link_set_defaults(struct phy_link *plink) { - plink->u.virt.bts_mcast_group = DEFAULT_BTS_MCAST_GROUP; + plink->u.virt.bts_mcast_group = talloc_strdup(plink, DEFAULT_BTS_MCAST_GROUP); plink->u.virt.bts_mcast_port = DEFAULT_BTS_MCAST_PORT; - plink->u.virt.ms_mcast_group = DEFAULT_MS_MCAST_GROUP; + plink->u.virt.ms_mcast_group = talloc_strdup(plink, DEFAULT_MS_MCAST_GROUP); plink->u.virt.ms_mcast_port = DEFAULT_MS_MCAST_PORT; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17271 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia96fea891a22e5a3c47ce658eda130ba8d4fc411 Gerrit-Change-Number: 17271 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: laforge Gerrit-CC: Jenkins Builder Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 14:33:02 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 26 Feb 2020 14:33:02 +0000 Subject: Change in osmo-ci[master]: update-osmo-ci-slaves: Fail jenkins jobs on script failure References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17275 ) Change subject: update-osmo-ci-slaves: Fail jenkins jobs on script failure ...................................................................... update-osmo-ci-slaves: Fail jenkins jobs on script failure It's been noted that jenkins job update-osmo-ci-on-slaves succeeds even if make script called by some children function fails: """ ../make/Makefile:57: recipe for target 'docker-build' failed make: *** [docker-build] Terminated make: Leaving directory '/home/osmocom-build/osmo-ci/_docker_playground/debian-stretch-jenkins' + exit 1 Finished: SUCCESS """ Change-Id: Iab9bc49eebee0f42657ff3ab5ffaa10315446440 --- M scripts/common.sh M scripts/osmo-ci-docker-rebuild.sh 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/75/17275/1 diff --git a/scripts/common.sh b/scripts/common.sh index 1c2dfe0..af7c354 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -153,6 +153,7 @@ # Subshell: run docker_images_require from jenkins-common.sh, pass all arguments (. ../jenkins-common.sh; docker_images_require "$@") - + ret=$? cd "$oldpwd" + return $ret } diff --git a/scripts/osmo-ci-docker-rebuild.sh b/scripts/osmo-ci-docker-rebuild.sh index 943b5a0..6a1cc27 100755 --- a/scripts/osmo-ci-docker-rebuild.sh +++ b/scripts/osmo-ci-docker-rebuild.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e -x cd "$(dirname "$0")/.." . scripts/common.sh docker_images_require \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Iab9bc49eebee0f42657ff3ab5ffaa10315446440 Gerrit-Change-Number: 17275 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 15:26:35 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 26 Feb 2020 15:26:35 +0000 Subject: Change in docker-playground[master]: debian-stretch-jenkins: Don't attempt libulfius x86_64 pkg install on... References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/17276 ) Change subject: debian-stretch-jenkins: Don't attempt libulfius x86_64 pkg install on different archs ...................................................................... debian-stretch-jenkins: Don't attempt libulfius x86_64 pkg install on different archs I'm actually not sure that libulfius-3.6.4 is required anyway. libulfius 2.5 is available in usual debian feeds (also for ARM). Change-Id: Ie6b07f676f8e06959eaac5e865c163de3f9c939d --- M debian-stretch-jenkins/Dockerfile 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/76/17276/1 diff --git a/debian-stretch-jenkins/Dockerfile b/debian-stretch-jenkins/Dockerfile index 92d5bdd..e977df9 100644 --- a/debian-stretch-jenkins/Dockerfile +++ b/debian-stretch-jenkins/Dockerfile @@ -133,12 +133,13 @@ update-locale LANG=en_US.UTF-8 ENV LANG en_US.UTF-8 -# osmo-remsim needs libulfius (which indirectly depends on systemd, installed above) +# osmo-remsim needs libulfius (which indirectly depends on systemd, installed above). Packages only available for x86_64. ARG LIBULFIUS_VER="2.6.4" ARG LIBULFIUS_PATH="https://github.com/babelouest/ulfius/releases/download/v${LIBULFIUS_VER}" ADD ${LIBULFIUS_PATH}/libulfius-dev_${LIBULFIUS_VER}_debian_${DEBIAN_VERSION}_x86_64.deb /tmp/ulfius/libulfius-dev.deb ADD ${LIBULFIUS_PATH}/ulfius-dev-full_${LIBULFIUS_VER}_debian_${DEBIAN_VERSION}_x86_64.tar.gz /tmp/ulfius/all.tar.gz -RUN cd /tmp/ulfius && \ +RUN test "$(uname -m)" = "x86_64" && + cd /tmp/ulfius && \ tar -xvf all.tar.gz && \ DEBIAN_FRONTEND=noninteractive apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y /tmp/ulfius/*.deb && \ -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ie6b07f676f8e06959eaac5e865c163de3f9c939d Gerrit-Change-Number: 17276 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 15:33:10 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 26 Feb 2020 15:33:10 +0000 Subject: Change in docker-playground[master]: debian-stretch-jenkins: Don't attempt libulfius x86_64 pkg install on... In-Reply-To: References: Message-ID: pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/docker-playground/+/17276 ) Change subject: debian-stretch-jenkins: Don't attempt libulfius x86_64 pkg install on different archs ...................................................................... debian-stretch-jenkins: Don't attempt libulfius x86_64 pkg install on different archs I'm actually not sure that libulfius-3.6.4 is required anyway. libulfius 2.5 is available in usual debian feeds (also for ARM). Change-Id: Ie6b07f676f8e06959eaac5e865c163de3f9c939d --- M debian-stretch-jenkins/Dockerfile 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/76/17276/2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ie6b07f676f8e06959eaac5e865c163de3f9c939d Gerrit-Change-Number: 17276 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 16:55:30 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 26 Feb 2020 16:55:30 +0000 Subject: Change in docker-playground[master]: debian-stretch-jenkins: Don't attempt libulfius x86_64 pkg install on... In-Reply-To: References: Message-ID: pespin has uploaded a new patch set (#3). ( https://gerrit.osmocom.org/c/docker-playground/+/17276 ) Change subject: debian-stretch-jenkins: Don't attempt libulfius x86_64 pkg install on different archs ...................................................................... debian-stretch-jenkins: Don't attempt libulfius x86_64 pkg install on different archs I'm actually not sure that libulfius-3.6.4 is required anyway. libulfius 2.5 is available in usual debian feeds (also for ARM). Change-Id: Ie6b07f676f8e06959eaac5e865c163de3f9c939d --- M debian-stretch-jenkins/Dockerfile 1 file changed, 9 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/76/17276/3 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ie6b07f676f8e06959eaac5e865c163de3f9c939d Gerrit-Change-Number: 17276 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 19:21:02 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 26 Feb 2020 19:21:02 +0000 Subject: Change in pysim[master]: utils: fix dec_msisdn(): properly detect international numbers References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/17277 ) Change subject: utils: fix dec_msisdn(): properly detect international numbers ...................................................................... utils: fix dec_msisdn(): properly detect international numbers We should match the whole value of ToN, not just one LSB bit. Change-Id: Idc51f09b3420d827a75a1161372e4e97c3ddfbc1 --- M pySim/utils.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/77/17277/1 diff --git a/pySim/utils.py b/pySim/utils.py index 8420b23..c098384 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -295,7 +295,7 @@ msisdn = swap_nibbles(b2h(msisdn_lhv[2:][:bcd_len])).rstrip('f') # International number 10.5.118/3GPP TS 24.008 - if (ton & 0x01) == 0x01: + if ton == 0x01: msisdn = '+' + msisdn return (npi, ton, msisdn) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17277 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Idc51f09b3420d827a75a1161372e4e97c3ddfbc1 Gerrit-Change-Number: 17277 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 19:21:03 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 26 Feb 2020 19:21:03 +0000 Subject: Change in pysim[master]: transport/pcsc: cosmetic: reuse the existing code of PcscSimLink References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/17278 ) Change subject: transport/pcsc: cosmetic: reuse the existing code of PcscSimLink ...................................................................... transport/pcsc: cosmetic: reuse the existing code of PcscSimLink Change-Id: I5360df644032b95654e99ccaa5118952e8d55faf --- M pySim/transport/pcsc.py 1 file changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/78/17278/1 diff --git a/pySim/transport/pcsc.py b/pySim/transport/pcsc.py index 47c4185..7fa922f 100644 --- a/pySim/transport/pcsc.py +++ b/pySim/transport/pcsc.py @@ -63,11 +63,8 @@ self._con.disconnect() def reset_card(self): - self._con.disconnect() - try: - self._con.connect() - except NoCardException: - raise NoCardError() + self.disconnect() + self.connect() return 1 def send_apdu_raw(self, pdu): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17278 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5360df644032b95654e99ccaa5118952e8d55faf Gerrit-Change-Number: 17278 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 19:21:04 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 26 Feb 2020 19:21:04 +0000 Subject: Change in pysim[master]: transport/pcsc: explicitly specify T0 protocol References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/17279 ) Change subject: transport/pcsc: explicitly specify T0 protocol ...................................................................... transport/pcsc: explicitly specify T0 protocol >From pyscard user's guide [1]: == Selecting the card communication protocol == By defaults, the connect() method of the CardConnection object will try to connect using either the T=0 or T=1 protocol. To force a connection protocol, you can pass the required protocol to the connect() method. This means that a PC/SC ifd handler may automatically choose T=1 as the highest protocol if the card indicates both in its ATR [2]. Since pySim only supports T=0, let's select it explicitly. [1] https://pyscard.sourceforge.io/user-guide.html [2] https://github.com/acshk/acsccid/issues/16#issuecomment-501101972 Change-Id: Ifed4574aab98a86c3ebbeb191f36a8282103e775 --- M pySim/transport/pcsc.py 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/79/17279/1 diff --git a/pySim/transport/pcsc.py b/pySim/transport/pcsc.py index 7fa922f..380c8fd 100644 --- a/pySim/transport/pcsc.py +++ b/pySim/transport/pcsc.py @@ -22,6 +22,7 @@ # along with this program. If not, see . # +from smartcard.CardConnection import CardConnection from smartcard.CardRequest import CardRequest from smartcard.Exceptions import NoCardException, CardRequestTimeoutException from smartcard.System import readers @@ -52,7 +53,10 @@ def connect(self): try: - self._con.connect() + # Explicitly select T=0 communication protocol + self._con.connect(CardConnection.T0_protocol) + except CardConnectionException: + raise ProtocolError() except NoCardException: raise NoCardError() -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17279 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ifed4574aab98a86c3ebbeb191f36a8282103e775 Gerrit-Change-Number: 17279 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 19:21:04 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 26 Feb 2020 19:21:04 +0000 Subject: Change in pysim[master]: commands: Python 3 fix: properly distinguish str and list References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/17280 ) Change subject: commands: Python 3 fix: properly distinguish str and list ...................................................................... commands: Python 3 fix: properly distinguish str and list Unlike Python 2, in Python 3 strings also have attribute '__iter__'. Because of that, a string could be passed to select_file(), that actually expects a list as the first parameter. P.S. Madness, Python 3 is just a new different language... P.P.S. They should have renamed it not to confuse people. Change-Id: I92af47abb6adff0271c55e7f278e8c5188f2be75 Fixes: OS#4419 --- M pySim/commands.py 1 file changed, 2 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/80/17280/1 diff --git a/pySim/commands.py b/pySim/commands.py index ff64ed2..cc7acc6 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -102,6 +102,8 @@ def select_file(self, dir_list): rv = [] + if type(dir_list) is not list: + dir_list = [dir_list] for i in dir_list: data, sw = self._tp.send_apdu_checksw(self.cla_byte + "a4" + self.sel_ctrl + "02" + i) rv.append(data) @@ -112,8 +114,6 @@ return self._tp.send_apdu_checksw(self.cla_byte + "a4" + "0404" + aidlen + aid) def read_binary(self, ef, length=None, offset=0): - if not hasattr(type(ef), '__iter__'): - ef = [ef] r = self.select_file(ef) if len(r[-1]) == 0: return (None, None) @@ -123,23 +123,17 @@ return self._tp.send_apdu(pdu) def update_binary(self, ef, data, offset=0): - if not hasattr(type(ef), '__iter__'): - ef = [ef] self.select_file(ef) pdu = self.cla_byte + 'd6%04x%02x' % (offset, len(data) // 2) + data return self._tp.send_apdu_checksw(pdu) def read_record(self, ef, rec_no): - if not hasattr(type(ef), '__iter__'): - ef = [ef] r = self.select_file(ef) rec_length = self.__record_len(r) pdu = self.cla_byte + 'b2%02x04%02x' % (rec_no, rec_length) return self._tp.send_apdu(pdu) def update_record(self, ef, rec_no, data, force_len=False): - if not hasattr(type(ef), '__iter__'): - ef = [ef] r = self.select_file(ef) if not force_len: rec_length = self.__record_len(r) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17280 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I92af47abb6adff0271c55e7f278e8c5188f2be75 Gerrit-Change-Number: 17280 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 19:21:04 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 26 Feb 2020 19:21:04 +0000 Subject: Change in pysim[master]: cards: Python 3 fix: use the floor division operator // References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/17281 ) Change subject: cards: Python 3 fix: use the floor division operator // ...................................................................... cards: Python 3 fix: use the floor division operator // Change-Id: I21de34133dbc5d859a5b744adc74f706ba2f0dd8 --- M pySim/cards.py 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/81/17281/1 diff --git a/pySim/cards.py b/pySim/cards.py index 053ea98..ec2724c 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -77,10 +77,10 @@ """ # get size and write EF.HPLMNwAcT data = self._scc.read_binary(EF['HPLMNwAcT'], length=None, offset=0) - size = len(data[0])/2 + size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) content = hplmn + access_tech - data, sw = self._scc.update_binary(EF['HPLMNwAcT'], content + 'ffffff0000' * (size/5-1)) + data, sw = self._scc.update_binary(EF['HPLMNwAcT'], content + 'ffffff0000' * (size // 5 - 1)) return sw def update_oplmn_act(self, mcc, mnc, access_tech='FFFF'): @@ -92,7 +92,7 @@ size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) content = hplmn + access_tech - data, sw = self._scc.update_binary(EF['OPLMNwAcT'], content + 'ffffff0000' * (size/5-1)) + data, sw = self._scc.update_binary(EF['OPLMNwAcT'], content + 'ffffff0000' * (size // 5 - 1)) return sw def update_plmn_act(self, mcc, mnc, access_tech='FFFF'): @@ -104,7 +104,7 @@ size = len(data[0]) // 2 hplmn = enc_plmn(mcc, mnc) content = hplmn + access_tech - data, sw = self._scc.update_binary(EF['PLMNwAcT'], content + 'ffffff0000' * (size/5-1)) + data, sw = self._scc.update_binary(EF['PLMNwAcT'], content + 'ffffff0000' * (size // 5 - 1)) return sw def update_plmnsel(self, mcc, mnc): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I21de34133dbc5d859a5b744adc74f706ba2f0dd8 Gerrit-Change-Number: 17281 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 19:49:16 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 26 Feb 2020 19:49:16 +0000 Subject: Change in osmo-pcu[master]: llc_queue::{dequeue,enqueue}() refactor References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17282 ) Change subject: llc_queue::{dequeue,enqueue}() refactor ...................................................................... llc_queue::{dequeue,enqueue}() refactor As seen in OS#4420, setting the MetaInfo.recv_time outside of llc_queue before calling llc_queue::enqueue() and later on using that value in llc_queue itself at dequeue time is not a good idea, since it can provoke errors if the recv_time was not set correctly. For instance, LlcTest was not setting the value for recv_time on some test, which ended up with a huge millisec value when substracting now() from it: """ llc.cpp:215:29: runtime error: signed integer overflow: 1582738663 * 1000 cannot be represented in type 'long int' """ This issue only appeared when started building on a raspberrypi4. Let's better set/store the MetaInfo.recv_time internally during llc_queue::enqueue(). Then, enqueue() only needs the MetaInfo.expire_time, so let's change its arg list to only receive that to avoid confusions. Take the chance to move the llc_queue APIs to use osmo_gettimeofday, since we need to fake the time now that the API itself sets that time. Also take the chance during this refactor to disallow passing null pointer by default since no user needs that. Finally, update the LlcTest accordingly with all API/behavior changes. Related: OS#4420 Change-Id: Ief6b1464dc779ff22adc2b02da7a006cd772ebce --- M src/llc.cpp M src/llc.h M src/tbf_dl.cpp M tests/llc/LlcTest.cpp 4 files changed, 55 insertions(+), 45 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/82/17282/1 diff --git a/src/llc.cpp b/src/llc.cpp index b155063..4cd0cc4 100644 --- a/src/llc.cpp +++ b/src/llc.cpp @@ -103,18 +103,19 @@ m_avg_queue_delay = 0; } -void gprs_llc_queue::enqueue(struct msgb *llc_msg, const MetaInfo *info) + +void gprs_llc_queue::enqueue(struct msgb *llc_msg, const struct timeval *expire_time) { - static const MetaInfo def_meta = {{0}}; MetaInfo *meta_storage; - osmo_static_assert(sizeof(*info) <= sizeof(llc_msg->cb), info_does_not_fit); + osmo_static_assert(sizeof(*meta_storage) <= sizeof(llc_msg->cb), info_does_not_fit); m_queue_size += 1; m_queue_octets += msgb_length(llc_msg); meta_storage = (MetaInfo *)&llc_msg->cb[0]; - *meta_storage = info ? *info : def_meta; + osmo_gettimeofday(&meta_storage->recv_time, NULL); + meta_storage->expire_time = *expire_time; msgb_enqueue(&m_queue, llc_msg); } @@ -208,7 +209,7 @@ m_queue_octets -= msgb_length(msg); /* take the second time */ - gettimeofday(&tv_now, NULL); + osmo_gettimeofday(&tv_now, NULL); tv = (struct timeval *)&msg->data[sizeof(*tv)]; timersub(&tv_now, &meta_storage->recv_time, &tv_result); @@ -234,7 +235,7 @@ /* calculate timestamp of timeout */ struct timeval now, csec; - gettimeofday(&now, NULL); + osmo_gettimeofday(&now, NULL); csec.tv_usec = (delay_csec % 100) * 10000; csec.tv_sec = delay_csec / 100; diff --git a/src/llc.h b/src/llc.h index 2e7229c..8667e00 100644 --- a/src/llc.h +++ b/src/llc.h @@ -75,7 +75,7 @@ void init(); - void enqueue(struct msgb *llc_msg, const MetaInfo *info = 0); + void enqueue(struct msgb *llc_msg, const struct timeval *expire_time); struct msgb *dequeue(const MetaInfo **info = 0); void clear(BTS *bts); void move_and_merge(gprs_llc_queue *o); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 7113d65..5c0fd9d 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -108,16 +108,17 @@ const uint16_t pdu_delay_csec, const uint8_t *data, const uint16_t len) { + struct timeval expire_time; + LOGPTBFDL(this, LOGL_DEBUG, "appending %u bytes\n", len); - gprs_llc_queue::MetaInfo info; + struct msgb *llc_msg = msgb_alloc(len, "llc_pdu_queue"); if (!llc_msg) return -ENOMEM; - gprs_llc_queue::calc_pdu_lifetime(bts, pdu_delay_csec, &info.expire_time); - gettimeofday(&info.recv_time, NULL); + gprs_llc_queue::calc_pdu_lifetime(bts, pdu_delay_csec, &expire_time); memcpy(msgb_put(llc_msg, len), data, len); - llc_queue()->enqueue(llc_msg, &info); + llc_queue()->enqueue(llc_msg, &expire_time); tbf_update_ms_class(this, ms_class); start_llc_timer(); diff --git a/tests/llc/LlcTest.cpp b/tests/llc/LlcTest.cpp index 8163f34..d3bd871 100644 --- a/tests/llc/LlcTest.cpp +++ b/tests/llc/LlcTest.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include } @@ -43,7 +44,7 @@ bool spoof_mnc_3_digits = false; static void enqueue_data(gprs_llc_queue *queue, const uint8_t *data, size_t len, - gprs_llc_queue::MetaInfo *info = 0) + const struct timeval *expire_time) { struct timeval *tv; uint8_t *msg_data; @@ -54,11 +55,11 @@ memcpy(msg_data, data, len); - queue->enqueue(llc_msg, info); + queue->enqueue(llc_msg, expire_time); } static void dequeue_and_check(gprs_llc_queue *queue, const uint8_t *exp_data, - size_t len, const gprs_llc_queue::MetaInfo *exp_info = 0) + size_t len, const gprs_llc_queue::MetaInfo *exp_info) { struct msgb *llc_msg; const gprs_llc_queue::MetaInfo *info_res; @@ -73,15 +74,16 @@ fprintf(stderr, "check failed!\n"); if (exp_info) - OSMO_ASSERT(memcmp(exp_info, info_res, sizeof(*exp_info)) == 0); + OSMO_ASSERT(memcmp(&exp_info->recv_time, &info_res->recv_time, sizeof(info_res->recv_time)) == 0 && + memcmp(&exp_info->expire_time, &info_res->expire_time, sizeof(info_res->expire_time)) == 0); msgb_free(llc_msg); } static void enqueue_data(gprs_llc_queue *queue, const char *message, - gprs_llc_queue::MetaInfo *info = 0) + const struct timeval *expire_time) { - enqueue_data(queue, (uint8_t *)(message), strlen(message), info); + enqueue_data(queue, (uint8_t *)(message), strlen(message), expire_time); } static void dequeue_and_check(gprs_llc_queue *queue, const char *exp_message, @@ -94,6 +96,7 @@ static void test_llc_queue() { gprs_llc_queue queue; + struct timeval expire_time = {0}; printf("=== start %s ===\n", __func__); @@ -101,11 +104,11 @@ OSMO_ASSERT(queue.size() == 0); OSMO_ASSERT(queue.octets() == 0); - enqueue_data(&queue, "LLC message"); + enqueue_data(&queue, "LLC message", &expire_time); OSMO_ASSERT(queue.size() == 1); OSMO_ASSERT(queue.octets() == 11); - enqueue_data(&queue, "other LLC message"); + enqueue_data(&queue, "other LLC message", &expire_time); OSMO_ASSERT(queue.size() == 2); OSMO_ASSERT(queue.octets() == 28); @@ -117,7 +120,7 @@ OSMO_ASSERT(queue.size() == 0); OSMO_ASSERT(queue.octets() == 0); - enqueue_data(&queue, "LLC"); + enqueue_data(&queue, "LLC", &expire_time); OSMO_ASSERT(queue.size() == 1); OSMO_ASSERT(queue.octets() == 3); @@ -131,18 +134,8 @@ static void test_llc_meta() { gprs_llc_queue queue; - gprs_llc_queue::MetaInfo info1; - gprs_llc_queue::MetaInfo info2; - - info1.recv_time.tv_sec = 123456777; - info1.recv_time.tv_usec = 123456; - info1.expire_time.tv_sec = 123456789; - info1.expire_time.tv_usec = 987654; - - info2.recv_time.tv_sec = 987654321; - info2.recv_time.tv_usec = 547352; - info2.expire_time.tv_sec = 987654327; - info2.expire_time.tv_usec = 867252; + gprs_llc_queue::MetaInfo info1 = {0}; + gprs_llc_queue::MetaInfo info2 = {0}; printf("=== start %s ===\n", __func__); @@ -150,8 +143,19 @@ OSMO_ASSERT(queue.size() == 0); OSMO_ASSERT(queue.octets() == 0); - enqueue_data(&queue, "LLC message 1", &info1); - enqueue_data(&queue, "LLC message 2", &info2); + info1.recv_time.tv_sec = 123456777; + info1.recv_time.tv_usec = 123456; + info1.expire_time.tv_sec = 123456789; + info1.expire_time.tv_usec = 987654; + osmo_gettimeofday_override_time = info1.recv_time; + enqueue_data(&queue, "LLC message 1", &info1.expire_time); + + info2.recv_time.tv_sec = 987654321; + info2.recv_time.tv_usec = 547352; + info2.expire_time.tv_sec = 987654327; + info2.expire_time.tv_usec = 867252; + osmo_gettimeofday_override_time = info2.recv_time; + enqueue_data(&queue, "LLC message 2", &info2.expire_time); dequeue_and_check(&queue, "LLC message 1", &info1); dequeue_and_check(&queue, "LLC message 2", &info2); @@ -167,27 +171,27 @@ { gprs_llc_queue queue1; gprs_llc_queue queue2; - gprs_llc_queue::MetaInfo info = {0}; + struct timeval expire_time = {0}; printf("=== start %s ===\n", __func__); queue1.init(); queue2.init(); - info.recv_time.tv_sec += 1; - enqueue_data(&queue1, "*A*", &info); + osmo_gettimeofday_override_time.tv_sec += 1; + enqueue_data(&queue1, "*A*", &expire_time); - info.recv_time.tv_sec += 1; - enqueue_data(&queue1, "*B*", &info); + osmo_gettimeofday_override_time.tv_sec += 1; + enqueue_data(&queue1, "*B*", &expire_time); - info.recv_time.tv_sec += 1; - enqueue_data(&queue2, "*C*", &info); + osmo_gettimeofday_override_time.tv_sec += 1; + enqueue_data(&queue2, "*C*", &expire_time); - info.recv_time.tv_sec += 1; - enqueue_data(&queue1, "*D*", &info); + osmo_gettimeofday_override_time.tv_sec += 1; + enqueue_data(&queue1, "*D*", &expire_time); - info.recv_time.tv_sec += 1; - enqueue_data(&queue2, "*E*", &info); + osmo_gettimeofday_override_time.tv_sec += 1; + enqueue_data(&queue2, "*E*", &expire_time); OSMO_ASSERT(queue1.size() == 3); OSMO_ASSERT(queue1.octets() == 9); @@ -231,6 +235,10 @@ vty_init(&pcu_vty_info); pcu_vty_init(); + osmo_gettimeofday_override = true; + osmo_gettimeofday_override_time.tv_sec = 123456777; + osmo_gettimeofday_override_time.tv_usec = 123456; + test_llc_queue(); test_llc_meta(); test_llc_merge(); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17282 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ief6b1464dc779ff22adc2b02da7a006cd772ebce Gerrit-Change-Number: 17282 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 19:49:29 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 26 Feb 2020 19:49:29 +0000 Subject: Change in pysim[master]: transport/pcsc: work around Python 3.5 bug: do not call disconnect() References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/17283 ) Change subject: transport/pcsc: work around Python 3.5 bug: do not call disconnect() ...................................................................... transport/pcsc: work around Python 3.5 bug: do not call disconnect() Unfortunately, Debian ships old Python (3.5 vs 3.8) and old pyscard (1.9.4 vs 1.9.9). Calling PCSCCardConnection.disconnect() from a destructor causes warnings about ignored exceptions: AttributeError: 'NoneType' object has no attribute 'disconnect' AttributeError: 'NoneType' object has no attribute 'setChanged' AttributeError: 'NoneType' object has no attribute 'SCardDisconnect' TypeError: 'NoneType' object is not callable All these exceptions happen in pyscard's own destructors. Change-Id: I9c644bc5fe9791b141a30bfc13647d77937a82ee --- M pySim/transport/pcsc.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/83/17283/1 diff --git a/pySim/transport/pcsc.py b/pySim/transport/pcsc.py index 380c8fd..171d339 100644 --- a/pySim/transport/pcsc.py +++ b/pySim/transport/pcsc.py @@ -40,7 +40,7 @@ self._con = self._reader.createConnection() def __del__(self): - self._con.disconnect() + del self._con return def wait_for_card(self, timeout=None, newcardonly=False): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17283 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I9c644bc5fe9791b141a30bfc13647d77937a82ee Gerrit-Change-Number: 17283 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 19:57:57 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 26 Feb 2020 19:57:57 +0000 Subject: Change in osmo-ci[master]: job: Update master and gerrit osmo-pcu jobs to also build on ARM plat... References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/17284 ) Change subject: job: Update master and gerrit osmo-pcu jobs to also build on ARM platform ...................................................................... job: Update master and gerrit osmo-pcu jobs to also build on ARM platform Related: OS#4301 Change-Id: I8109cc9a71e6c14304ed6463f9b073ef3f4f3c2a --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 15 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/84/17284/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 15f8b5a..18df857 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -159,6 +159,7 @@ - osmo-pcap - osmo-pcu: + slave_axis: !!python/tuple [osmocom-master-debian9, rpi4-deb9build-ansible] a1_name: FIRMWARE_VERSION a1: !!python/tuple [master, v2017.01, litecell15, oc2g] a2_name: with_vty @@ -168,12 +169,13 @@ a4_name: WITH_MANUALS a4: !!python/tuple ["1", "0"] combination_filter: > - (with_vty == "True" && with_dsp == "sysmo" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0") || - (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0") || - (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="v2017.01" && WITH_MANUALS == "0") || - (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="litecell15" && WITH_MANUALS == "0") || - (with_vty == "True" && with_dsp == "oc2g" && FIRMWARE_VERSION=="oc2g" && WITH_MANUALS == "0") || - (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "1") + (with_vty == "True" && with_dsp == "sysmo" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="v2017.01" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="litecell15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (with_vty == "True" && with_dsp == "oc2g" && FIRMWARE_VERSION=="oc2g" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || + (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") cmd: | {docker_run} \ -e FIRMWARE_VERSION="$FIRMWARE_VERSION" \ diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index d10ee18..c4226ac 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -253,6 +253,7 @@ - osmo-pcap - osmo-pcu: + slave_axis: !!python/tuple [osmocom-master-debian9, rpi4-deb9build-ansible] a1_name: FIRMWARE_VERSION a1: !!python/tuple [master, v2017.01, origin/nrw/litecell15] a2_name: with_vty @@ -262,11 +263,12 @@ a4_name: WITH_MANUALS a4: !!python/tuple ["1", "0"] combination_filter: > - (with_vty == "True" && with_dsp == "sysmo" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0") || - (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0") || - (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="v2017.01" && WITH_MANUALS == "0") || - (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="origin/nrw/litecell15" && WITH_MANUALS == "0") || - (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "1") + (with_vty == "True" && with_dsp == "sysmo" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="v2017.01" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="origin/nrw/litecell15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || + (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || + (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") cmd: | {docker_run} \ -e FIRMWARE_VERSION="$FIRMWARE_VERSION" \ -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17284 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I8109cc9a71e6c14304ed6463f9b073ef3f4f3c2a Gerrit-Change-Number: 17284 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 19:58:49 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Wed, 26 Feb 2020 19:58:49 +0000 Subject: Change in osmo-ci[master]: job: Update master and gerrit osmo-pcu jobs to also build on ARM plat... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17284 ) Change subject: job: Update master and gerrit osmo-pcu jobs to also build on ARM platform ...................................................................... Patch Set 1: Verified-1 Do not merge yet since osmo-pcu builds currently fail in raspberrypi4 (ARM) due to https://osmocom.org/issues/4420 (WIP). -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17284 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I8109cc9a71e6c14304ed6463f9b073ef3f4f3c2a Gerrit-Change-Number: 17284 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-Comment-Date: Wed, 26 Feb 2020 19:58:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 20:09:49 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Wed, 26 Feb 2020 20:09:49 +0000 Subject: Change in pysim[master]: transport/pcsc: work around Python 3.5 bug: do not call disconnect() In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/17283 to look at the new patch set (#2). Change subject: transport/pcsc: work around Python 3.5 bug: do not call disconnect() ...................................................................... transport/pcsc: work around Python 3.5 bug: do not call disconnect() Unfortunately, Debian ships old Python (3.5 vs 3.8) and old pyscard (1.9.4 vs 1.9.9). Calling PCSCCardConnection.disconnect() from a destructor causes warnings about ignored exceptions: AttributeError: 'NoneType' object has no attribute 'disconnect' AttributeError: 'NoneType' object has no attribute 'setChanged' AttributeError: 'NoneType' object has no attribute 'SCardDisconnect' TypeError: 'NoneType' object is not callable All these exceptions happen in pyscard's own destructors. Change-Id: I9c644bc5fe9791b141a30bfc13647d77937a82ee --- M pySim/transport/pcsc.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/83/17283/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17283 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I9c644bc5fe9791b141a30bfc13647d77937a82ee Gerrit-Change-Number: 17283 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 21:31:16 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 21:31:16 +0000 Subject: Change in pysim[master]: utils: fix dec_msisdn(): properly detect international numbers In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/17277 ) Change subject: utils: fix dec_msisdn(): properly detect international numbers ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17277 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Idc51f09b3420d827a75a1161372e4e97c3ddfbc1 Gerrit-Change-Number: 17277 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 21:31:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 21:31:34 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 21:31:34 +0000 Subject: Change in pysim[master]: transport/pcsc: cosmetic: reuse the existing code of PcscSimLink In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/17278 ) Change subject: transport/pcsc: cosmetic: reuse the existing code of PcscSimLink ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17278 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5360df644032b95654e99ccaa5118952e8d55faf Gerrit-Change-Number: 17278 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 21:31:34 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 21:32:08 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 21:32:08 +0000 Subject: Change in pysim[master]: transport/pcsc: explicitly specify T0 protocol In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/17279 ) Change subject: transport/pcsc: explicitly specify T0 protocol ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17279 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ifed4574aab98a86c3ebbeb191f36a8282103e775 Gerrit-Change-Number: 17279 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 21:32:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 21:32:37 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 21:32:37 +0000 Subject: Change in pysim[master]: commands: Python 3 fix: properly distinguish str and list In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/17280 ) Change subject: commands: Python 3 fix: properly distinguish str and list ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17280 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I92af47abb6adff0271c55e7f278e8c5188f2be75 Gerrit-Change-Number: 17280 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 21:32:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 21:33:37 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 21:33:37 +0000 Subject: Change in pysim[master]: cards: Python 3 fix: use the floor division operator // In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/17281 ) Change subject: cards: Python 3 fix: use the floor division operator // ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/17281 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I21de34133dbc5d859a5b744adc74f706ba2f0dd8 Gerrit-Change-Number: 17281 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 21:33:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 21:35:14 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 21:35:14 +0000 Subject: Change in osmo-pcu[master]: llc_queue::{dequeue,enqueue}() refactor In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17282 ) Change subject: llc_queue::{dequeue,enqueue}() refactor ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17282 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ief6b1464dc779ff22adc2b02da7a006cd772ebce Gerrit-Change-Number: 17282 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 21:35:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 21:59:55 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 21:59:55 +0000 Subject: Change in osmo-ggsn[master]: add Linux network namespace support for TUN device In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/17253 ) Change subject: add Linux network namespace support for TUN device ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-ggsn/+/17253/1/lib/netns.c File lib/netns.c: https://gerrit.osmocom.org/c/osmo-ggsn/+/17253/1/lib/netns.c at 53 PS1, Line 53: sigfillset(&intmask); > I'm adding all the improvements regarding error checking on next patch to separate what I did and wh [?] I later saw your return-code-checking patch, thanks. However, at least the initial version did not address the socket/open return call checking, AFAIR. -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17253 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: Idd0ad8fa9c8e7ba0aeec1b52947598d4d297b620 Gerrit-Change-Number: 17253 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Assignee: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 21:59:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Comment-In-Reply-To: laforge Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Wed Feb 26 22:02:31 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Wed, 26 Feb 2020 22:02:31 +0000 Subject: Change in osmo-ggsn[master]: netns: Improve error checking In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/17254 ) Change subject: netns: Improve error checking ...................................................................... Patch Set 2: (2 comments) https://gerrit.osmocom.org/c/osmo-ggsn/+/17254/2/lib/netns.c File lib/netns.c: https://gerrit.osmocom.org/c/osmo-ggsn/+/17254/2/lib/netns.c at 91 PS2, Line 91: return -errno; you need to close(fd) in this and the below return clause. https://gerrit.osmocom.org/c/osmo-ggsn/+/17254/2/lib/netns.c at 115 PS2, Line 115: return -errno; you need to close(sk) in this and the below return clause. -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/17254 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I9b9c8fd6eeaaa7d190b8e2a34ca82088904c7708 Gerrit-Change-Number: 17254 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge Gerrit-Comment-Date: Wed, 26 Feb 2020 22:02:31 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 10:13:36 2020 From: gerrit-no-reply at lists.osmocom.org (dexter) Date: Thu, 27 Feb 2020 10:13:36 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add RTP payload testing to performance tests References: Message-ID: dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285 ) Change subject: bts: Add RTP payload testing to performance tests ...................................................................... bts: Add RTP payload testing to performance tests Add negotiation of RTP Ports for both directions and integrate RTP emulation to simulate actual traffic. Change-Id: I21a610533d5be2e1647cc6a72423e056b39d1217 Related: OS#4365 --- M bts/BTS_Tests.ttcn M bts/BTS_Tests_perf.ttcn A bts/RTP_CodecPort_CtrlFunct.ttcn A bts/RTP_CodecPort_CtrlFunctDef.cc M bts/gen_links.sh M bts/regen_makefile.sh 6 files changed, 222 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/85/17285/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 46c9647..61232d4 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -63,6 +63,10 @@ import from TELNETasp_PortType all; import from BTS_Tests_LAPDm all; +import from RTP_CodecPort all; +import from RTP_CodecPort_CtrlFunct all; +import from RTP_Emulation all; + friend module BTS_Tests_SMSCB; friend module BTS_Tests_virtphy; friend module BTS_Tests_LAPDm; @@ -157,6 +161,14 @@ var ChannelNrs g_AllChanTypes; } +private function f_rtpem_init(inout RTP_Emulation_CT comp_ref, integer i) +runs on ConnHdlr { + comp_ref := RTP_Emulation_CT.create("RTPEM" & int2str(i)); + map(comp_ref:RTP, system:RTP); + map(comp_ref:RTCP, system:RTCP); + comp_ref.start(RTP_Emulation.f_main()); +} + /* an individual call / channel */ type component ConnHdlr extends RSL_DchanHdlr, lapdm_test_CT { port L1CTL_PT L1CTL; @@ -174,6 +186,10 @@ /* PCU Interface of BTS */ port PCUIF_CODEC_PT PCU; + + /* RTP channels for audio payload testing */ + var RTP_Emulation_CT vc_RTPEM[14]; + port RTPEM_CTRL_PT RTPEM[14]; } function f_init_rsl(charstring id) runs on test_CT { @@ -518,6 +534,13 @@ f_rslem_register(0, pars.chan_nr); + /* Setup RTP emulation so that it is available if needed by the + * the testcase. */ + for (var integer i := 0; i < sizeof(vc_RTPEM); i := i+1) { + f_rtpem_init(vc_RTPEM[i], i); + connect(vc_RTPEM[i]:CTRL, self:RTPEM[i]); + } + /* call the user-supplied test case function */ fn.apply(id); } diff --git a/bts/BTS_Tests_perf.ttcn b/bts/BTS_Tests_perf.ttcn index 1e70bc8..29d0ae1 100644 --- a/bts/BTS_Tests_perf.ttcn +++ b/bts/BTS_Tests_perf.ttcn @@ -32,14 +32,61 @@ import from BTS_Tests all; +import from RTP_CodecPort all; +import from RTP_CodecPort_CtrlFunct all; +import from RTP_Emulation all; + +import from IPL4asp_Types all; +import from IPL4asp_Functions all; + /*********************************************************************** * Performance tests. Expect osmo-bts to be configured with all TRX as TCH/H. ***********************************************************************/ modulepar { float mp_wait_time := 10.0; + charstring mp_rtpem_ip := "127.0.0.2"; } +/* Convert an IP address from its 32-Bit integer representation into a string + * representation */ +function f_uin32t2ip(uint32_t uint32t) return charstring +{ + var integer octet_1; + var integer octet_2; + var integer octet_3; + var integer octet_4; + + octet_1 := uint32t / 16777216; + octet_2 := (uint32t - octet_1 * 16777216) / 65536; + octet_3 := (uint32t - octet_1 * 16777216 - octet_2 * 65536) / 255; + octet_4 := (uint32t - octet_1 * 16777216 - octet_2 * 65536 - octet_3 * 255); + + return int2str(octet_1) & "." & int2str(octet_2) & "." & int2str(octet_3) & "." & int2str(octet_4); +} + +/* Convert an IP address from its string representation into a 32-Bit integer + * representation */ +function f_ip2uint32t(charstring ip) return uint32_t +{ + var integer octet_1; + var integer octet_2; + var integer octet_3; + var integer octet_4; + var ro_integer segAddr := {}; + var uint32_t addr; + + segAddr := f_splitIpAddress(ip); + + octet_1 := segAddr[0]; + octet_2 := segAddr[1]; + octet_3 := segAddr[2]; + octet_4 := segAddr[3]; + + addr := octet_1 * 16777216 + octet_2 * 65536 + octet_3 * 255 + octet_4; + + return addr; +} /* This test requires BTS with 1 TRX to be configured with following timeslots: TS[0]=CCCH+SDCCH4, TS[1..7]: TCH/H * One can simply take the osmo-bsc.cfg in the same dir and change TS1..7, that's all needed. @@ -49,6 +96,11 @@ * on with full load. */ function f_TC_highchanload_tchh(charstring id) runs on ConnHdlr { + var RSL_Message rx; + var uint32_t bts_rtp_ip; + var uint16_t bts_rtp_port; + var uint16_t bts_ipa_conn_id; + var RtpemConfig rtp_cfg := c_RtpemDefaultCfg; var ChannelNrs chan_nr := { /* TS 1..7: TCH/H */ valueof(ts_RslChanNr_Lm(1,0)), valueof(ts_RslChanNr_Lm(1,1)), valueof(ts_RslChanNr_Lm(2,0)), valueof(ts_RslChanNr_Lm(2,1)), @@ -58,25 +110,61 @@ valueof(ts_RslChanNr_Lm(6,0)), valueof(ts_RslChanNr_Lm(6,1)), valueof(ts_RslChanNr_Lm(7,0)), valueof(ts_RslChanNr_Lm(7,1)) }; + var integer channels := sizeof(chan_nr); log("Started"); - for (var integer i := 0; i < sizeof(chan_nr); i := i+1) { + for (var integer i := 0; i < channels; i := i+1) { log("Registering ", chan_nr[i]); f_rslem_register(0, chan_nr[i]); } log("Registered"); - for (var integer i := 0; i < sizeof(chan_nr); i := i+1) { + for (var integer i := 0; i < channels; i := i+1) { + /* Activate channel */ f_rsl_transceive(ts_RSL_CHAN_ACT(chan_nr[i], - ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM3 /* AMR*/)), + ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM1 /* AMR*/)), tr_RSL_CHAN_ACT_ACK(chan_nr[i]), log2str("RSL CHAN ACT [", i, "]")); + + + /* Negotiate RTP RX (BTS) port for activated channel */ + rx := f_rsl_transceive_ret(ts_RSL_IPA_CRCX(chan_nr[i]), + tr_RSL_IPA_CRCX_ACK(chan_nr[i], *, *, *), + log2str("RSL IPA CRCX [", i, "]")); + bts_ipa_conn_id := rx.ies[1].body.ipa_conn_id; + bts_rtp_ip := rx.ies[2].body.ipa_local_ip; + bts_rtp_port := rx.ies[3].body.ipa_local_port; + + + /* Netotiate RTP TX (BTS) port for activated channel */ + f_rsl_transceive(ts_RSL_IPA_MDCX(chan_nr[i], bts_ipa_conn_id, f_ip2uint32t(mp_rtpem_ip), bts_rtp_port, 23), + tr_RSL_IPA_MDCX_ACK(chan_nr[i], *, *, *, *), + log2str("RSL IPA MDCX [", i, "]")); + + + /* Start local RTP emulation (transmit packets to BTS, receive + * packets from BTS) */ + f_rtpem_bind(RTPEM[i], mp_rtpem_ip, bts_rtp_port); + rtp_cfg.tx_payload_type := 23; + f_rtpem_configure(RTPEM[0], rtp_cfg); + f_rtpem_connect(RTPEM[i], f_uin32t2ip(bts_rtp_ip), bts_rtp_port); + f_rtpem_mode(RTPEM[i], RTPEM_MODE_BIDIR); + } log("Activated, now waiting ", mp_wait_time, " seconds"); f_sleep(mp_wait_time); log("sleep done, deactivating"); - for (var integer i := 0; i < sizeof(chan_nr); i := i+1) { + /* Tear down channels and RTP traffic */ + for (var integer i := 0; i < channels; i := i+1) { + + /* Remove RTP traffic and wait some time before removing the + * the channel to make sure all remaining packets reach + * their destination */ + f_rtpem_mode(RTPEM[i], RTPEM_MODE_NONE); + f_sleep(1.0); + + /* Remove channels */ f_rsl_transceive(ts_RSL_RF_CHAN_REL(chan_nr[i]), tr_RSL_RF_CHAN_REL_ACK(chan_nr[i]), log2str("RF CHAN REL [", i, "]"), diff --git a/bts/RTP_CodecPort_CtrlFunct.ttcn b/bts/RTP_CodecPort_CtrlFunct.ttcn new file mode 100644 index 0000000..9f6cad2 --- /dev/null +++ b/bts/RTP_CodecPort_CtrlFunct.ttcn @@ -0,0 +1,44 @@ +module RTP_CodecPort_CtrlFunct { + + import from RTP_CodecPort all; + import from IPL4asp_Types all; + + external function f_IPL4_listen( + inout RTP_CODEC_PT portRef, + in HostName locName, + in PortNumber locPort, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_connect( + inout RTP_CODEC_PT portRef, + in HostName remName, + in PortNumber remPort, + in HostName locName, + in PortNumber locPort, + in ConnectionId connId, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; + + external function f_IPL4_close( + inout RTP_CODEC_PT portRef, + in ConnectionId id, + in ProtoTuple proto := { unspecified := {} } + ) return Result; + + external function f_IPL4_setUserData( + inout RTP_CODEC_PT portRef, + in ConnectionId id, + in UserData userData + ) return Result; + + external function f_IPL4_getUserData( + inout RTP_CODEC_PT portRef, + in ConnectionId id, + out UserData userData + ) return Result; + +} + diff --git a/bts/RTP_CodecPort_CtrlFunctDef.cc b/bts/RTP_CodecPort_CtrlFunctDef.cc new file mode 100644 index 0000000..ce8e176 --- /dev/null +++ b/bts/RTP_CodecPort_CtrlFunctDef.cc @@ -0,0 +1,56 @@ +#include "IPL4asp_PortType.hh" +#include "RTP_CodecPort.hh" +#include "IPL4asp_PT.hh" + +namespace RTP__CodecPort__CtrlFunct { + + IPL4asp__Types::Result f__IPL4__listen( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, options); + } + + IPL4asp__Types::Result f__IPL4__connect( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::HostName& remName, + const IPL4asp__Types::PortNumber& remPort, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__connect(portRef, remName, remPort, + locName, locPort, connId, proto, options); + } + + IPL4asp__Types::Result f__IPL4__close( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::ProtoTuple& proto) + { + return f__IPL4__PROVIDER__close(portRef, connId, proto); + } + + IPL4asp__Types::Result f__IPL4__setUserData( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + const IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__setUserData(portRef, connId, userData); + } + + IPL4asp__Types::Result f__IPL4__getUserData( + RTP__CodecPort::RTP__CODEC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, + IPL4asp__Types::UserData& userData) + { + return f__IPL4__PROVIDER__getUserData(portRef, connId, userData); + } + +} + diff --git a/bts/gen_links.sh b/bts/gen_links.sh index aafe231..0eda78a 100755 --- a/bts/gen_links.sh +++ b/bts/gen_links.sh @@ -28,6 +28,10 @@ FILES="MobileL3_CC_Types.ttcn MobileL3_CommonIE_Types.ttcn MobileL3_GMM_SM_Types.ttcn MobileL3_MM_Types.ttcn MobileL3_RRM_Types.ttcn MobileL3_SMS_Types.ttcn MobileL3_SS_Types.ttcn MobileL3_Types.ttcn" gen_links $DIR $FILES +DIR=$BASEDIR/titan.ProtocolModules.RTP/src +FILES="RTP_EncDec.cc RTP_Types.ttcn" +gen_links $DIR $FILES + DIR=$BASEDIR/titan.TestPorts.TELNETasp/src FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" gen_links $DIR $FILES @@ -42,7 +46,8 @@ FILES+="Native_Functions.ttcn Native_FunctionDefs.cc " FILES+="TRXC_Types.ttcn TRXC_CodecPort.ttcn TRXC_CodecPort_CtrlFunct.ttcn TRXC_CodecPort_CtrlFunctDef.cc " FILES+="PCUIF_Types.ttcn PCUIF_CodecPort.ttcn " -FILES+="IPA_Testing.ttcn" +FILES+="IPA_Testing.ttcn " +FILES+="RTP_CodecPort.ttcn RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_Emulation.ttcn IuUP_EncDec.cc" gen_links $DIR $FILES ignore_pp_results diff --git a/bts/regen_makefile.sh b/bts/regen_makefile.sh index 9f1bf1d..f5b6fbb 100755 --- a/bts/regen_makefile.sh +++ b/bts/regen_makefile.sh @@ -1,6 +1,6 @@ #!/bin/sh -FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc UD_PT.cc RLCMAC_EncDec.cc Native_FunctionDefs.cc TRXC_CodecPort_CtrlFunctDef.cc L1CTL_PortType_CtrlFunctDef.cc TELNETasp_PT.cc" +FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc UD_PT.cc RLCMAC_EncDec.cc Native_FunctionDefs.cc TRXC_CodecPort_CtrlFunctDef.cc L1CTL_PortType_CtrlFunctDef.cc TELNETasp_PT.cc RTP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc " export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL -DIPA_EMULATION_OML -DIPA_EMULATION_CTRL" -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285 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: I21a610533d5be2e1647cc6a72423e056b39d1217 Gerrit-Change-Number: 17285 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 10:38:21 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 10:38:21 +0000 Subject: Change in osmo-ttcn3-hacks[master]: bts: Add RTP payload testing to performance tests In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285 ) Change subject: bts: Add RTP payload testing to performance tests ...................................................................... Patch Set 1: Code-Review-1 (9 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285/1/bts/BTS_Tests_perf.ttcn File bts/BTS_Tests_perf.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285/1/bts/BTS_Tests_perf.ttcn at 53 PS1, Line 53: function f_uin32t2ip(uint32_t uint32t) return charstring These functions look like good candidates to be introduced in a more generic already existing files, such as Misc_helpers.ttcn or similar. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285/1/bts/BTS_Tests_perf.ttcn at 60 PS1, Line 60: octet_1 := uint32t / 16777216; Having a param called uint32t is at least very confusing. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285/1/bts/BTS_Tests_perf.ttcn at 86 PS1, Line 86: addr := octet_1 * 16777216 + octet_2 * 65536 + octet_3 * 255 + octet_4; all the octet_* stuff can be dropped, simply use segAddr[0], etc. directly here. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285/1/bts/BTS_Tests_perf.ttcn at 113 PS1, Line 113: var integer channels := sizeof(chan_nr); channels suggest it's an array of channels. What about num_channels? or num_chans. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285/1/bts/BTS_Tests_perf.ttcn at 124 PS1, Line 124: ts_RSL_ChanMode(RSL_CHRT_TCH_H, RSL_CMOD_SP_GSM1 /* AMR*/)), So I did look at the wrong place when I did this? https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285/1/bts/BTS_Tests_perf.ttcn at 138 PS1, Line 138: /* Netotiate RTP TX (BTS) port for activated channel */ typo: Negotiate Tx https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285/1/bts/BTS_Tests_perf.ttcn at 148 PS1, Line 148: f_rtpem_configure(RTPEM[0], rtp_cfg); should be RTPEM[i] right? https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285/1/bts/BTS_Tests_perf.ttcn at 165 PS1, Line 165: f_sleep(1.0); Can we split the loop into two parts (two loops) so we only f_sleep(1.0) here? I mean: foreach(chan) f_rtpem_mode() f_sleep(1) foreach(chan) f_rsl_transceive() https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285/1/bts/RTP_CodecPort_CtrlFunct.ttcn File bts/RTP_CodecPort_CtrlFunct.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285/1/bts/RTP_CodecPort_CtrlFunct.ttcn at 1 PS1, Line 1: module RTP_CodecPort_CtrlFunct { just wondering: why do we need all this? Didn't we already have an RTP_CodecPort in some other place? Why not reusing it from lib/ ? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17285 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: I21a610533d5be2e1647cc6a72423e056b39d1217 Gerrit-Change-Number: 17285 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 27 Feb 2020 10:38:21 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 10:43:32 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 10:43:32 +0000 Subject: Change in docker-playground[master]: debian-stretch-jenkins: Don't attempt libulfius x86_64 pkg install on... In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/17276 ) Change subject: debian-stretch-jenkins: Don't attempt libulfius x86_64 pkg install on different archs ...................................................................... Patch Set 3: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/17276 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ie6b07f676f8e06959eaac5e865c163de3f9c939d Gerrit-Change-Number: 17276 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 27 Feb 2020 10:43:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 10:44:24 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 10:44:24 +0000 Subject: Change in osmo-ci[master]: poky-sdk: Use first letter in caps (as in python bool) In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17147 ) Change subject: poky-sdk: Use first letter in caps (as in python bool) ...................................................................... Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17147 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ifbfe678e89bef3acd33e562888ad81093fa1230d Gerrit-Change-Number: 17147 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 27 Feb 2020 10:44:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 12:13:01 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 12:13:01 +0000 Subject: Change in osmo-gsm-tester[master]: Add test log to junit output In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17252 ) Change subject: Add test log to junit output ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17252 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ieb5566a41ecf3a9512db579eb37e8d8ed5325057 Gerrit-Change-Number: 17252 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 27 Feb 2020 12:13:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 12:13:08 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 12:13:08 +0000 Subject: Change in osmo-gsm-tester[master]: Add test log to junit output In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17252 ) Change subject: Add test log to junit output ...................................................................... Add test log to junit output Change-Id: Ieb5566a41ecf3a9512db579eb37e8d8ed5325057 --- M src/osmo_gsm_tester/log.py M src/osmo_gsm_tester/report.py M src/osmo_gsm_tester/test.py 3 files changed, 16 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/log.py b/src/osmo_gsm_tester/log.py index 7c4ae44..d60bf0b 100644 --- a/src/osmo_gsm_tester/log.py +++ b/src/osmo_gsm_tester/log.py @@ -574,6 +574,9 @@ self.log_file.flush() self.log_file.close() + def log_file_path(self): + return self.path + def run_logging_exceptions(func, *func_args, return_on_failure=None, **func_kwargs): try: return func(*func_args, **func_kwargs) diff --git a/src/osmo_gsm_tester/report.py b/src/osmo_gsm_tester/report.py index 4919937..6ee3464 100644 --- a/src/osmo_gsm_tester/report.py +++ b/src/osmo_gsm_tester/report.py @@ -20,6 +20,7 @@ import math from datetime import datetime import xml.etree.ElementTree as et +from xml.sax.saxutils import escape from . import test def trial_to_junit_write(trial, junit_path): @@ -63,6 +64,13 @@ elif t.status != test.Test.PASS: error = et.SubElement(testcase, 'error') error.text = 'could not run' + sout = et.SubElement(testcase, 'system-out') + log_file = t.log_file_path() + if log_file is not None: + with open(log_file, 'r') as myfile: + sout.text = escape(myfile.read()) + else: + sout.text = 'test log file not available' return testcase def trial_to_text(trial): diff --git a/src/osmo_gsm_tester/test.py b/src/osmo_gsm_tester/test.py index 4d4353a..66e8656 100644 --- a/src/osmo_gsm_tester/test.py +++ b/src/osmo_gsm_tester/test.py @@ -86,7 +86,6 @@ finally: if self.log_target: self.log_target.remove() - self.log_target = None def name(self): l = log.get_line_for_src(self.path) @@ -119,4 +118,9 @@ self.status = Test.SKIP self.duration = 0 + def log_file_path(self): + if self.log_target is None: + return None + return self.log_target.log_file_path() + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17252 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Ieb5566a41ecf3a9512db579eb37e8d8ed5325057 Gerrit-Change-Number: 17252 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 13:18:19 2020 From: gerrit-no-reply at lists.osmocom.org (osmith) Date: Thu, 27 Feb 2020 13:18:19 +0000 Subject: Change in osmo-ci[master]: update-osmo-ci-slaves: Fail jenkins jobs on script failure In-Reply-To: References: Message-ID: osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/17275 ) Change subject: update-osmo-ci-slaves: Fail jenkins jobs on script failure ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/17275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Iab9bc49eebee0f42657ff3ab5ffaa10315446440 Gerrit-Change-Number: 17275 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: osmith Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 27 Feb 2020 13:18:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 14:07:30 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 14:07:30 +0000 Subject: Change in osmo-gsm-tester[master]: srs_enb: Make num_prb a config parameter References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17286 ) Change subject: srs_enb: Make num_prb a config parameter ...................................................................... srs_enb: Make num_prb a config parameter Change-Id: I336e71f53556596050cf3eb55a7810a009dbf7a8 --- M example/defaults.conf M src/osmo_gsm_tester/srs_enb.py M src/osmo_gsm_tester/templates/srsenb.conf.tmpl 3 files changed, 12 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/86/17286/1 diff --git a/example/defaults.conf b/example/defaults.conf index f32e1f5..0bff86a 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -100,3 +100,4 @@ srsenb: mcc: 901 mnc: 70 + num_prb: 100 diff --git a/src/osmo_gsm_tester/srs_enb.py b/src/osmo_gsm_tester/srs_enb.py index 6fb186f..85180e4 100644 --- a/src/osmo_gsm_tester/srs_enb.py +++ b/src/osmo_gsm_tester/srs_enb.py @@ -57,11 +57,6 @@ self.remote_config_drb_file = None self.remote_log_file = None self.suite_run = suite_run - self.nof_prb=100 - if self.nof_prb == 75: - self.base_srate=15.36e6 - else: - self.base_srate=23.04e6 self.remote_user = conf.get('remote_user', None) if not rf_type_valid(conf.get('rf_dev_type', None)): raise log.Error('Invalid rf_dev_type=%s' % conf.get('rf_dev_type', None)) @@ -125,7 +120,6 @@ '--enb_files.drb_config=' + self.remote_config_drb_file, '--expert.nof_phy_threads=1', '--expert.rrc_inactivity_timer=1500', - '--enb.n_prb=' + str(self.nof_prb), '--log.filename=' + self.remote_log_file) self.process = self.rem_host.RemoteProcessFixIgnoreSIGHUP(srsENB.BINFILE, util.Dir(srsENB.REMOTE_DIR), args, remote_env=remote_env) @@ -151,7 +145,6 @@ '--enb_files.drb_config=' + os.path.abspath(self.config_drb_file), '--expert.nof_phy_threads=1', '--expert.rrc_inactivity_timer=1500', - '--enb.n_prb=' + str(self.nof_prb), '--log.filename=' + self.log_file) self.process = process.Process(self.name(), self.run_dir, args, env=env) @@ -168,7 +161,16 @@ # We need to set some specific variables programatically here to match IP addresses: if self._conf.get('rf_dev_type') == 'zmq': - config.overlay(values, dict(enb=dict(rf_dev_args='fail_on_disconnect=true,tx_port=tcp://'+ self.addr() +':2000,rx_port=tcp://'+ self.ue.addr() +':2001,id=enb,base_srate='+ str(self.base_srate)))) + num_prb = values['enb'].get('num_prb', None) + assert num_prb + if num_prb == 75: + base_srate=15.36e6 + else: + base_srate=23.04e6 + rf_dev_args = 'fail_on_disconnect=true,tx_port=tcp://' + self.addr() \ + + ':2000,rx_port=tcp://'+ self.ue.addr() \ + + ':2001,id=enb,base_srate='+ str(base_srate) + config.overlay(values, dict(enb=dict(rf_dev_args=rf_dev_args))) self.dbg('srsENB ' + filename + ':\n' + pprint.pformat(values)) diff --git a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl index 2006832..f040156 100644 --- a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl +++ b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl @@ -28,7 +28,7 @@ mme_addr = ${enb.mme_addr} gtp_bind_addr = ${enb.addr} s1c_bind_addr = ${enb.addr} -n_prb = 50 +n_prb = ${enb.num_prb} #tm = 4 #nof_ports = 2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I336e71f53556596050cf3eb55a7810a009dbf7a8 Gerrit-Change-Number: 17286 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 14:40:54 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 27 Feb 2020 14:40:54 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: also verify encoding of MS RA Capability In-Reply-To: References: Message-ID: Hello pespin, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/17245 to look at the new patch set (#2). Change subject: tests/rlcmac: also verify encoding of MS RA Capability ...................................................................... tests/rlcmac: also verify encoding of MS RA Capability The main idea of this change is to demonstrate a weakness of the CSN.1 codec that most likely causes a unit test breakage in [1]. The problem seems to be that the transitional structures, where the CSN.1 decoder stores the results, do not contain any details about presence of the optional fields (such as M_UINT_OR_NULL). In other words, it's impossible to know whether some optional field is omitted in the encoded message (NULL), or is it just set to 0. This means that the encoder will always include all optional fields, even if they're not present in the original message. [1] Ibb4cbd3f5865415fd547e95fc24ff31df1aed4c0 Change-Id: Ic46d6e56768f516203d27d8e7a5adb77afdf32b7 --- M src/gsm_rlcmac.cpp M tests/rlcmac/RLCMACTest.cpp M tests/rlcmac/RLCMACTest.err M tests/rlcmac/RLCMACTest.ok 4 files changed, 58 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/45/17245/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic46d6e56768f516203d27d8e7a5adb77afdf32b7 Gerrit-Change-Number: 17245 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 14:44:10 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 14:44:10 +0000 Subject: Change in osmo-pcu[master]: tests/rlcmac: also verify encoding of MS RA Capability In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17245 ) Change subject: tests/rlcmac: also verify encoding of MS RA Capability ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic46d6e56768f516203d27d8e7a5adb77afdf32b7 Gerrit-Change-Number: 17245 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 27 Feb 2020 14:44:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 14:47:42 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 14:47:42 +0000 Subject: Change in osmo-gsm-tester[master]: enb: Add modifiers for num_prb References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17287 ) Change subject: enb: Add modifiers for num_prb ...................................................................... enb: Add modifiers for num_prb Change-Id: I0b8c834f1c67cc4bf4d07d03358ba2012331cbde --- A example/scenarios/mod-enb-nprb100.conf A example/scenarios/mod-enb-nprb15.conf A example/scenarios/mod-enb-nprb25.conf A example/scenarios/mod-enb-nprb50.conf A example/scenarios/mod-enb-nprb6.conf A example/scenarios/mod-enb-nprb75.conf M src/osmo_gsm_tester/resource.py 7 files changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/87/17287/1 diff --git a/example/scenarios/mod-enb-nprb100.conf b/example/scenarios/mod-enb-nprb100.conf new file mode 100644 index 0000000..cb086ec --- /dev/null +++ b/example/scenarios/mod-enb-nprb100.conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: 100 diff --git a/example/scenarios/mod-enb-nprb15.conf b/example/scenarios/mod-enb-nprb15.conf new file mode 100644 index 0000000..3a5006f --- /dev/null +++ b/example/scenarios/mod-enb-nprb15.conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: 15 diff --git a/example/scenarios/mod-enb-nprb25.conf b/example/scenarios/mod-enb-nprb25.conf new file mode 100644 index 0000000..7a65845 --- /dev/null +++ b/example/scenarios/mod-enb-nprb25.conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: 25 diff --git a/example/scenarios/mod-enb-nprb50.conf b/example/scenarios/mod-enb-nprb50.conf new file mode 100644 index 0000000..a28f69f --- /dev/null +++ b/example/scenarios/mod-enb-nprb50.conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: 50 diff --git a/example/scenarios/mod-enb-nprb6.conf b/example/scenarios/mod-enb-nprb6.conf new file mode 100644 index 0000000..504becc --- /dev/null +++ b/example/scenarios/mod-enb-nprb6.conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: 6 diff --git a/example/scenarios/mod-enb-nprb75.conf b/example/scenarios/mod-enb-nprb75.conf new file mode 100644 index 0000000..8d79840 --- /dev/null +++ b/example/scenarios/mod-enb-nprb75.conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: 75 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index e8ca859..31e8463 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -89,6 +89,7 @@ 'enb[].type': schema.STR, 'enb[].remote_user': schema.STR, 'enb[].addr': schema.IPV4, + 'enb[].num_prb': schema.UINT, 'enb[].rf_dev_type': schema.STR, 'enb[].rf_dev_args': schema.STR, 'arfcn[].arfcn': schema.INT, -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17287 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I0b8c834f1c67cc4bf4d07d03358ba2012331cbde Gerrit-Change-Number: 17287 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 14:48:08 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 27 Feb 2020 14:48:08 +0000 Subject: Change in libosmocore[master]: chantype_rsl2gsmtap(): Add entries for CBCH References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17288 ) Change subject: chantype_rsl2gsmtap(): Add entries for CBCH ...................................................................... chantype_rsl2gsmtap(): Add entries for CBCH This adds missing entries for CBCH in the conversion between RSL-style channel numbers and GSMTAP channel types. Without this change, you will see tons of messages like virtphy[19865]: Wed Feb 26 16:16:28 2020 DVIRPHY <0002> gsmtapl1_if.c:267 MS 0000: Ignoring unknown channel type UNKNOWN (0) if running virtphy of osmocom-bb with a BTS that broadcasts CBCH. Change-Id: I19bbd2942adf441f58955ac896ef968bfd8aec5f --- M src/gsmtap_util.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/88/17288/1 diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c index 2fb18a4..a4fe2d9 100644 --- a/src/gsmtap_util.c +++ b/src/gsmtap_util.c @@ -86,6 +86,12 @@ case RSL_CHAN_OSMO_PDCH: ret = GSMTAP_CHANNEL_PDCH; break; + case RSL_CHAN_OSMO_CBCH4: + ret = GSMTAP_CHANNEL_CBCH51; + break; + case RSL_CHAN_OSMO_CBCH8: + ret = GSMTAP_CHANNEL_CBCH52; + break; } if (link_id & 0x40) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I19bbd2942adf441f58955ac896ef968bfd8aec5f Gerrit-Change-Number: 17288 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 14:48:15 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Thu, 27 Feb 2020 14:48:15 +0000 Subject: Change in libosmocore[master]: gsmtap.h: Add definitions for voice inside GSMTAP References: Message-ID: laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17289 ) Change subject: gsmtap.h: Add definitions for voice inside GSMTAP ...................................................................... gsmtap.h: Add definitions for voice inside GSMTAP We so far are only able to transmit signalling data inside GSMTAP, but not actual voice / user plane payload data. we cannot use the existing TCHF/TCHH sub-types, as those are already used [without further discrimination] for FACCH + SACCH Data on those channels. Instead, we will introduce a new GSMTAP_CHANNEL_VOICE sub-type, which then will have the first byte for a sub-sub-type specifying the payload format in detail. Change-Id: If223020933b083fe359a2e8ff5fab1ce64a363d8 Related: OS#2557 --- M include/osmocom/core/gsmtap.h 1 file changed, 26 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/89/17289/1 diff --git a/include/osmocom/core/gsmtap.h b/include/osmocom/core/gsmtap.h index 35ba71e..87c18e3 100644 --- a/include/osmocom/core/gsmtap.h +++ b/include/osmocom/core/gsmtap.h @@ -82,8 +82,8 @@ #define GSMTAP_CHANNEL_SDCCH 0x06 #define GSMTAP_CHANNEL_SDCCH4 0x07 #define GSMTAP_CHANNEL_SDCCH8 0x08 -#define GSMTAP_CHANNEL_TCH_F 0x09 -#define GSMTAP_CHANNEL_TCH_H 0x0a +#define GSMTAP_CHANNEL_TCH_F 0x09 /* Actually, it's FACCH/F (signaling) */ +#define GSMTAP_CHANNEL_TCH_H 0x0a /* Actually, it's FACCH/H (signaling) */ #define GSMTAP_CHANNEL_PACCH 0x0b #define GSMTAP_CHANNEL_CBCH52 0x0c #define GSMTAP_CHANNEL_PDTCH 0x0d @@ -91,6 +91,7 @@ #define GSMTAP_CHANNEL_PDCH GSMTAP_CHANNEL_PDTCH #define GSMTAP_CHANNEL_PTCCH 0x0e #define GSMTAP_CHANNEL_CBCH51 0x0f +#define GSMTAP_CHANNEL_VOICE 0x10 /* voice codec payload (HR/FR/EFR/AMR) */ /* GPRS Coding Scheme CS1..4 */ #define GSMTAP_GPRS_CS_BASE 0x20 @@ -318,3 +319,26 @@ uint32_t line_nr;/*!< line number */ } src_file; } __attribute__((packed)); + +/*! First byte of type==GSMTAP_TYPE_UM sub_type==GSMTAP_CHANNEL_VOICE payload */ +enum gsmtap_um_voice_type { + /*! 1 byte TOC + 112 bits (14 octets) = 15 octets payload; + * Reference is RFC5993 Section 5.2.1 + 3GPP TS 46.030 Annex B */ + GSMTAP_UM_VOICE_HR, + /*! 33 payload bytes; Reference is RFC3551 Section 4.5.8.1 */ + GSMTAP_UM_VOICE_FR, + /*! 31 payload bytes; Reference is RFC3551 Section 4.5.9 + ETSI TS 101 318 */ + GSMTAP_UM_VOICE_EFR, + /*! 1 byte TOC + 5..31 bytes = 6..32 bytes payload; RFC4867 octet-aligned */ + GSMTAP_UM_VOICE_AMR, + /* TODO: Revisit the types below; their usage; ... */ + GSMTAP_UM_VOICE_AMR_SID_BAD, + GSMTAP_UM_VOICE_AMR_ONSET, + GSMTAP_UM_VOICE_AMR_RATSCCH, + GSMTAP_UM_VOICE_AMR_SID_UPDATE_INH, + GSMTAP_UM_VOICE_AMR_SID_FIRST_P1, + GSMTAP_UM_VOICE_AMR_SID_FIRST_P2, + GSMTAP_UM_VOICE_AMR_SID_FIRST_INH, + GSMTAP_UM_VOICE_AMR_RATSCCH_MARKER, + GSMTAP_UM_VOICE_AMR_RATSCCH_DATA, +}; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17289 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If223020933b083fe359a2e8ff5fab1ce64a363d8 Gerrit-Change-Number: 17289 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 14:51:22 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 14:51:22 +0000 Subject: Change in libosmocore[master]: chantype_rsl2gsmtap(): Add entries for CBCH In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17288 ) Change subject: chantype_rsl2gsmtap(): Add entries for CBCH ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I19bbd2942adf441f58955ac896ef968bfd8aec5f Gerrit-Change-Number: 17288 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Thu, 27 Feb 2020 14:51:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 14:52:50 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 14:52:50 +0000 Subject: Change in libosmocore[master]: gsmtap.h: Add definitions for voice inside GSMTAP In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17289 ) Change subject: gsmtap.h: Add definitions for voice inside GSMTAP ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17289 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If223020933b083fe359a2e8ff5fab1ce64a363d8 Gerrit-Change-Number: 17289 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 27 Feb 2020 14:52:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 15:24:35 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 27 Feb 2020 15:24:35 +0000 Subject: Change in libosmocore[master]: chantype_rsl2gsmtap(): Add entries for CBCH In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17288 ) Change subject: chantype_rsl2gsmtap(): Add entries for CBCH ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I19bbd2942adf441f58955ac896ef968bfd8aec5f Gerrit-Change-Number: 17288 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 27 Feb 2020 15:24:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 16:05:24 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 27 Feb 2020 16:05:24 +0000 Subject: Change in osmo-bts[master]: vty: fix left shift by 31 cannot be represented in type 'int' References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17290 ) Change subject: vty: fix left shift by 31 cannot be represented in type 'int' ...................................................................... vty: fix left shift by 31 cannot be represented in type 'int' Change-Id: I3e5940e8f360bf6563f4c1b5ebd09579f9108c81 --- M src/common/vty.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/90/17290/1 diff --git a/src/common/vty.c b/src/common/vty.c index 1be0ac0..8843da5 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -250,7 +250,7 @@ bts->agch_queue.high_level, VTY_NEWLINE); for (i = 0; i < 32; i++) { - if (gsmtap_sapi_mask & (1 << i)) { + if (gsmtap_sapi_mask & (uint32_t) (1 << i)) { sapi_buf = osmo_str_tolower(get_value_string(gsmtap_sapi_names, i)); vty_out(vty, " gsmtap-sapi %s%s", sapi_buf, VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I3e5940e8f360bf6563f4c1b5ebd09579f9108c81 Gerrit-Change-Number: 17290 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 16:09:17 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 16:09:17 +0000 Subject: Change in osmo-gsm-tester[master]: Introduce parametrized scenario files support References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17291 ) Change subject: Introduce parametrized scenario files support ...................................................................... Introduce parametrized scenario files support The idea is to have something similar to systemd template unit files: https://fedoramagazine.org/systemd-template-unit-files/ Specially for modifiers, one finds the situation where same scenario structure has to be created with lots of different values. For instance, let's say we want to test with different eNodeB num_prb values: [6, 15, 25, 50, 75,100] Right now we'd need to create one scenario file for each of them, for instance: mod-enb-nprb6.conf mod-enb-nprb15.conf mod-enb-nprb25.conf mod-enb-nprb50.conf mod-enb-nprb75.conf mod-enb-nprb100.conf And each of them containing something like (changing the num_prb value): """ modifiers: enb: - num_prb: 75 """ Instead, we can now have one unique file mod-enb-nprb at .conf: """ modifiers: enb: - num_prb: ${param1} """ The general syntax is: "scenario-name at param1,param2,param3". So "@" splits between scenario name and parameter list, and "," splits between parameters. For instance, one can now run following suite with scenario: "4g:srsenb-rftype-uhd+srsue-rftype-uhd+mod-enb-nprb at 75" Related: OS#4424 Change-Id: Icfcba15b937225aa4b1f322a8005fcd57db1d1ca --- M src/osmo_gsm_tester/config.py M src/osmo_gsm_tester/template.py 2 files changed, 47 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/91/17291/1 diff --git a/src/osmo_gsm_tester/config.py b/src/osmo_gsm_tester/config.py index 87b3da4..c9b94c5 100644 --- a/src/osmo_gsm_tester/config.py +++ b/src/osmo_gsm_tester/config.py @@ -54,7 +54,7 @@ import os import copy -from . import log, schema, util +from . import log, schema, util, template from .util import is_dict, is_list, Dir, get_tempdir ENV_PREFIX = 'OSMO_GSM_TESTER_' @@ -193,19 +193,53 @@ return defaults.get(for_kind, {}) class Scenario(log.Origin, dict): - def __init__(self, name, path): + def __init__(self, name, path, param_list): super().__init__(log.C_TST, name) self.path = path + self.param_list = param_list + + def read_from_file(self, validation_schema): + with open(self.path, 'r') as f: + config_str = f.read() + if len(self.param_list) != 0: + param_dict = {} + i = 1 + for param in self.param_list: + param_dict['param' + str(i)] = param + i += 1 + self.dbg(param_dict=param_dict) + config_str = template.render_strbuf_inline(config_str, param_dict) + config = yaml.safe_load(config_str) + config = _standardize(config) + if validation_schema: + schema.validate(config, validation_schema) + self.update(config) def get_scenario(name, validation_schema=None): scenarios_dir = get_scenarios_dir() if not name.endswith('.conf'): name = name + '.conf' + is_parametrized_file = '@' in name + param_list = [] path = scenarios_dir.child(name) - if not os.path.isfile(path): - raise RuntimeError('No such scenario file: %r' % path) - sc = Scenario(name, path) - sc.update(read(path, validation_schema=validation_schema)) + if not is_parametrized_file: + if not os.path.isfile(path): + raise RuntimeError('No such scenario file: %r' % path) + else: # parametrized scenario: + # Allow first matching complete matching names (eg: scenario at param1,param2.conf), + # this allows setting specific content in different files for specific values. + if not os.path.isfile(path): + # get "scenario at .conf" from "scenario at param1,param2.conf": + prefix_name = name[:name.index("@")+1] + '.conf' + path = scenarios_dir.child(prefix_name) + if not os.path.isfile(path): + raise RuntimeError('No such scenario file: %r (nor %s)' % (path, name)) + # At this point, we have existing file path. Let's now scrap the parameter(s): + # get param1,param2 str from scenario at param1,param2.conf + param_list_str = name.split('@', 1)[1][:-len('.conf')] + param_list = param_list_str.split(',') + sc = Scenario(name, path, param_list) + sc.read_from_file(validation_schema) return sc def add(dest, src): diff --git a/src/osmo_gsm_tester/template.py b/src/osmo_gsm_tester/template.py index 6ce7ebd..dac89f2 100644 --- a/src/osmo_gsm_tester/template.py +++ b/src/osmo_gsm_tester/template.py @@ -19,7 +19,7 @@ # along with this program. If not, see . import os -from mako.lookup import TemplateLookup +from mako.lookup import TemplateLookup, Template from . import log from .util import dict2obj @@ -53,4 +53,10 @@ return template.render(**dict2obj(values)) +def render_strbuf_inline(strbuf, values): + '''Receive a string containing template syntax, and generate output using + passed values.''' + mytemplate = Template(strbuf) + return mytemplate.render(**dict2obj(values)) + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17291 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Icfcba15b937225aa4b1f322a8005fcd57db1d1ca Gerrit-Change-Number: 17291 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 16:09:18 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 16:09:18 +0000 Subject: Change in osmo-gsm-tester[master]: Use parametrized scenario to set ENB num_prb References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17292 ) Change subject: Use parametrized scenario to set ENB num_prb ...................................................................... Use parametrized scenario to set ENB num_prb Change-Id: Iec7d7e6312aee6f4e4ce6710bc78a144beff2f39 --- D example/scenarios/mod-enb-nprb100.conf D example/scenarios/mod-enb-nprb15.conf D example/scenarios/mod-enb-nprb25.conf D example/scenarios/mod-enb-nprb50.conf D example/scenarios/mod-enb-nprb6.conf D example/scenarios/mod-enb-nprb75.conf A example/scenarios/mod-enb-nprb at .conf 7 files changed, 3 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/92/17292/1 diff --git a/example/scenarios/mod-enb-nprb100.conf b/example/scenarios/mod-enb-nprb100.conf deleted file mode 100644 index cb086ec..0000000 --- a/example/scenarios/mod-enb-nprb100.conf +++ /dev/null @@ -1,3 +0,0 @@ -modifiers: - enb: - - num_prb: 100 diff --git a/example/scenarios/mod-enb-nprb15.conf b/example/scenarios/mod-enb-nprb15.conf deleted file mode 100644 index 3a5006f..0000000 --- a/example/scenarios/mod-enb-nprb15.conf +++ /dev/null @@ -1,3 +0,0 @@ -modifiers: - enb: - - num_prb: 15 diff --git a/example/scenarios/mod-enb-nprb25.conf b/example/scenarios/mod-enb-nprb25.conf deleted file mode 100644 index 7a65845..0000000 --- a/example/scenarios/mod-enb-nprb25.conf +++ /dev/null @@ -1,3 +0,0 @@ -modifiers: - enb: - - num_prb: 25 diff --git a/example/scenarios/mod-enb-nprb50.conf b/example/scenarios/mod-enb-nprb50.conf deleted file mode 100644 index a28f69f..0000000 --- a/example/scenarios/mod-enb-nprb50.conf +++ /dev/null @@ -1,3 +0,0 @@ -modifiers: - enb: - - num_prb: 50 diff --git a/example/scenarios/mod-enb-nprb6.conf b/example/scenarios/mod-enb-nprb6.conf deleted file mode 100644 index 504becc..0000000 --- a/example/scenarios/mod-enb-nprb6.conf +++ /dev/null @@ -1,3 +0,0 @@ -modifiers: - enb: - - num_prb: 6 diff --git a/example/scenarios/mod-enb-nprb75.conf b/example/scenarios/mod-enb-nprb75.conf deleted file mode 100644 index 8d79840..0000000 --- a/example/scenarios/mod-enb-nprb75.conf +++ /dev/null @@ -1,3 +0,0 @@ -modifiers: - enb: - - num_prb: 75 diff --git a/example/scenarios/mod-enb-nprb at .conf b/example/scenarios/mod-enb-nprb at .conf new file mode 100644 index 0000000..f17347c --- /dev/null +++ b/example/scenarios/mod-enb-nprb at .conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: ${param1} -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17292 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iec7d7e6312aee6f4e4ce6710bc78a144beff2f39 Gerrit-Change-Number: 17292 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 16:13:46 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 16:13:46 +0000 Subject: Change in osmo-bts[master]: vty: fix left shift by 31 cannot be represented in type 'int' In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17290 ) Change subject: vty: fix left shift by 31 cannot be represented in type 'int' ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/17290/1/src/common/vty.c File src/common/vty.c: https://gerrit.osmocom.org/c/osmo-bts/+/17290/1/src/common/vty.c at 223 PS1, Line 223: int i; Did you think about simply using a uint32_t here? :) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I3e5940e8f360bf6563f4c1b5ebd09579f9108c81 Gerrit-Change-Number: 17290 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Thu, 27 Feb 2020 16:13:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 16:16:54 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 16:16:54 +0000 Subject: Change in osmo-gsm-tester[master]: Introduce parametrized scenario files support In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17291 to look at the new patch set (#2). Change subject: Introduce parametrized scenario files support ...................................................................... Introduce parametrized scenario files support The idea is to have something similar to systemd template unit files: https://fedoramagazine.org/systemd-template-unit-files/ Specially for modifiers, one finds the situation where same scenario structure has to be created with lots of different values. For instance, let's say we want to test with different eNodeB num_prb values: [6, 15, 25, 50, 75,100] Right now we'd need to create one scenario file for each of them, for instance: mod-enb-nprb6.conf mod-enb-nprb15.conf mod-enb-nprb25.conf mod-enb-nprb50.conf mod-enb-nprb75.conf mod-enb-nprb100.conf And each of them containing something like (changing the num_prb value): """ modifiers: enb: - num_prb: 75 """ Instead, we can now have one unique file mod-enb-nprb at .conf: """ modifiers: enb: - num_prb: ${param1} """ The general syntax is: "scenario-name at param1,param2,param3". So "@" splits between scenario name and parameter list, and "," splits between parameters. For instance, one can now run following suite with scenario: "4g:srsenb-rftype-uhd+srsue-rftype-uhd+mod-enb-nprb at 75" Related: OS#4424 Change-Id: Icfcba15b937225aa4b1f322a8005fcd57db1d1ca --- M src/osmo_gsm_tester/config.py M src/osmo_gsm_tester/template.py 2 files changed, 47 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/91/17291/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17291 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Icfcba15b937225aa4b1f322a8005fcd57db1d1ca Gerrit-Change-Number: 17291 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 16:34:35 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 27 Feb 2020 16:34:35 +0000 Subject: Change in osmo-bts[master]: vty: fix left shift by 31 cannot be represented in type 'int' In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17290 ) Change subject: vty: fix left shift by 31 cannot be represented in type 'int' ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/c/osmo-bts/+/17290/1/src/common/vty.c File src/common/vty.c: https://gerrit.osmocom.org/c/osmo-bts/+/17290/1/src/common/vty.c at 223 PS1, Line 223: int i; > Did you think about simply using a uint32_t here? :) I does not help, I still see a warning from UBSan. We actually need to cast 1, not i. I'll update the change. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I3e5940e8f360bf6563f4c1b5ebd09579f9108c81 Gerrit-Change-Number: 17290 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Thu, 27 Feb 2020 16:34:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 16:35:45 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 27 Feb 2020 16:35:45 +0000 Subject: Change in osmo-bts[master]: vty: fix left shift by 31 cannot be represented in type 'int' In-Reply-To: References: Message-ID: Hello pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/17290 to look at the new patch set (#2). Change subject: vty: fix left shift by 31 cannot be represented in type 'int' ...................................................................... vty: fix left shift by 31 cannot be represented in type 'int' Change-Id: I3e5940e8f360bf6563f4c1b5ebd09579f9108c81 --- M src/common/vty.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/90/17290/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I3e5940e8f360bf6563f4c1b5ebd09579f9108c81 Gerrit-Change-Number: 17290 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: pespin Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 17:18:52 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 17:18:52 +0000 Subject: Change in osmo-gsm-tester[master]: Introduce LTE Transmission Mode and RLC DRB mode params References: Message-ID: pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17293 ) Change subject: Introduce LTE Transmission Mode and RLC DRB mode params ...................................................................... Introduce LTE Transmission Mode and RLC DRB mode params Change-Id: I38f247f266ba736cdbb6f36ba5673b8fd46a8d67 --- M example/defaults.conf A example/scenarios/cfg-epc-rlcmode at .conf A example/scenarios/mod-enb-txmode at .conf M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/srs_epc.py M src/osmo_gsm_tester/templates/srsenb.conf.tmpl M src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl 8 files changed, 42 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/93/17293/1 diff --git a/example/defaults.conf b/example/defaults.conf index 0bff86a..9b92ad0 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -96,8 +96,10 @@ srsepc: mcc: 901 mnc: 70 + rlc_drb_mode: UM srsenb: mcc: 901 mnc: 70 num_prb: 100 + transmission_mode: 1 diff --git a/example/scenarios/cfg-epc-rlcmode at .conf b/example/scenarios/cfg-epc-rlcmode at .conf new file mode 100644 index 0000000..2ddb044 --- /dev/null +++ b/example/scenarios/cfg-epc-rlcmode at .conf @@ -0,0 +1,3 @@ +config: + epc: + rlc_drb_mode: ${param1} diff --git a/example/scenarios/mod-enb-txmode at .conf b/example/scenarios/mod-enb-txmode at .conf new file mode 100644 index 0000000..e0c8d01 --- /dev/null +++ b/example/scenarios/mod-enb-txmode at .conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - transmission_mode: ${param1} diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 31e8463..07d32e2 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -90,6 +90,7 @@ 'enb[].remote_user': schema.STR, 'enb[].addr': schema.IPV4, 'enb[].num_prb': schema.UINT, + 'enb[].transmission_mode': schema.LTE_TRANSMISSION_MODE, 'enb[].rf_dev_type': schema.STR, 'enb[].rf_dev_args': schema.STR, 'arfcn[].arfcn': schema.INT, @@ -115,7 +116,8 @@ CONF_SCHEMA = util.dict_add( { 'defaults.timeout': schema.STR, - 'config.bsc.net.codec_list[]': schema.CODEC }, + 'config.bsc.net.codec_list[]': schema.CODEC, + 'config.epc.rlc_drb_mode': schema.LTE_RLC_DRB_MODE, }, dict([('resources.%s' % key, val) for key, val in WANT_SCHEMA.items()]), dict([('modifiers.%s' % key, val) for key, val in WANT_SCHEMA.items()])) diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index 14fe640..7fe6689 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -125,6 +125,17 @@ return raise ValueError('Unknown OsmoTRX clock reference value: %r' % val) +def lte_transmission_mode(val): + n = int(val) + if n <= 4: + return + raise ValueError('LTE Transmission Mode %d not in expected range' % n) + +def lte_rlc_drb_mode(val): + if val.upper() in ('UM', 'AM'): + return + raise ValueError('Unknown LTE RLC DRB Mode value: %r' % val) + INT = 'int' STR = 'str' UINT = 'uint' @@ -144,6 +155,8 @@ GPRS_MODE = 'gprs_mode' CODEC = 'codec' OSMO_TRX_CLOCK_REF = 'osmo_trx_clock_ref' +LTE_TRANSMISSION_MODE = 'lte_transmission_mode' +LTE_RLC_DRB_MODE = 'lte_rlc_drb_mode' SCHEMA_TYPES = { INT: int, @@ -165,6 +178,8 @@ GPRS_MODE: gprs_mode, CODEC: codec, OSMO_TRX_CLOCK_REF: osmo_trx_clock_ref, + LTE_TRANSMISSION_MODE: lte_transmission_mode, + LTE_RLC_DRB_MODE: lte_rlc_drb_mode, } def validate(config, schema): diff --git a/src/osmo_gsm_tester/srs_epc.py b/src/osmo_gsm_tester/srs_epc.py index 0a0036e..a33a163 100644 --- a/src/osmo_gsm_tester/srs_epc.py +++ b/src/osmo_gsm_tester/srs_epc.py @@ -22,6 +22,13 @@ from . import log, util, config, template, process, remote +def rlc_drb_mode2qci(rlc_drb_mode): + if rlc_drb_mode.upper() == "UM": + return 7; + elif rlc_drb_mode.upper() == "AM": + return 9; + raise log.Error('Unexpected rlc_drb_mode', rlc_drb_mode=rlc_drb_mode) + class srsEPC(log.Origin): REMOTE_DIR = '/osmo-gsm-tester-srsepc' @@ -155,10 +162,16 @@ self.dbg(config_file=self.config_file, db_file=self.db_file) values = dict(epc=config.get_defaults('srsepc')) - config.overlay(values, dict(epc=dict(hss=dict(subscribers=self.subscriber_list)))) config.overlay(values, self.suite_run.config()) config.overlay(values, dict(epc={'run_addr': self.addr()})) + # Set qci for each subscriber: + rlc_drb_mode = values['epc'].get('rlc_drb_mode', None) + assert rlc_drb_mode is not None + for i in range(len(self.subscriber_list)): + self.subscriber_list[i]['qci'] = rlc_drb_mode2qci(rlc_drb_mode) + config.overlay(values, dict(epc=dict(hss=dict(subscribers=self.subscriber_list)))) + self.dbg('SRSEPC CONFIG:\n' + pprint.pformat(values)) with open(self.config_file, 'w') as f: diff --git a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl index f040156..12b3e18 100644 --- a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl +++ b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl @@ -29,7 +29,7 @@ gtp_bind_addr = ${enb.addr} s1c_bind_addr = ${enb.addr} n_prb = ${enb.num_prb} -#tm = 4 +tm = ${enb.transmission_mode} #nof_ports = 2 ##################################################################### diff --git a/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl b/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl index 32df58d..c213e53 100644 --- a/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl +++ b/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl @@ -20,5 +20,5 @@ #ue2,mil,001010123456780,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,7,dynamic #ue1,xor,001010123456789,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,9001,000000001255,7,dynamic %for sub in epc.hss.subscribers: -ogt${sub.id},${sub.auth_algo},${sub.imsi},${sub.ki},opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,7,dynamic +ogt${sub.id},${sub.auth_algo},${sub.imsi},${sub.ki},opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,${sub.qci},dynamic %endfor -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I38f247f266ba736cdbb6f36ba5673b8fd46a8d67 Gerrit-Change-Number: 17293 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 18:20:55 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 27 Feb 2020 18:20:55 +0000 Subject: Change in osmo-bts[master]: vty: fix left shift by 31 cannot be represented in type 'int' In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17290 ) Change subject: vty: fix left shift by 31 cannot be represented in type 'int' ...................................................................... Patch Set 2: > Build took 56 min on host2-deb8build-ansible Amazing. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I3e5940e8f360bf6563f4c1b5ebd09579f9108c81 Gerrit-Change-Number: 17290 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 27 Feb 2020 18:20:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 19:18:25 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Thu, 27 Feb 2020 19:18:25 +0000 Subject: Change in osmocom-bb[master]: virt_phy/build: add configure option to build with ASan/USBan References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17294 ) Change subject: virt_phy/build: add configure option to build with ASan/USBan ...................................................................... virt_phy/build: add configure option to build with ASan/USBan Change-Id: I23fc4e38632c02269b3895115ba4e3171cc212d1 --- M src/host/virt_phy/configure.ac 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/94/17294/1 diff --git a/src/host/virt_phy/configure.ac b/src/host/virt_phy/configure.ac index c8012c9..a2c2bf6 100644 --- a/src/host/virt_phy/configure.ac +++ b/src/host/virt_phy/configure.ac @@ -20,6 +20,17 @@ dnl Checks for typedefs, structures and compiler characteristics +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + AC_CONFIG_FILES([ Makefile include/Makefile -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17294 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I23fc4e38632c02269b3895115ba4e3171cc212d1 Gerrit-Change-Number: 17294 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Thu Feb 27 20:28:53 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Thu, 27 Feb 2020 20:28:53 +0000 Subject: Change in osmocom-bb[master]: virt_phy/build: add configure option to build with ASan/USBan In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17294 ) Change subject: virt_phy/build: add configure option to build with ASan/USBan ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17294 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I23fc4e38632c02269b3895115ba4e3171cc212d1 Gerrit-Change-Number: 17294 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 27 Feb 2020 20:28:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 03:52:28 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 28 Feb 2020 03:52:28 +0000 Subject: Change in osmocom-bb[master]: virt_phy/build: add configure option to build with ASan/USBan In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17294 ) Change subject: virt_phy/build: add configure option to build with ASan/USBan ...................................................................... virt_phy/build: add configure option to build with ASan/USBan Change-Id: I23fc4e38632c02269b3895115ba4e3171cc212d1 --- M src/host/virt_phy/configure.ac 1 file changed, 11 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/host/virt_phy/configure.ac b/src/host/virt_phy/configure.ac index c8012c9..a2c2bf6 100644 --- a/src/host/virt_phy/configure.ac +++ b/src/host/virt_phy/configure.ac @@ -20,6 +20,17 @@ dnl Checks for typedefs, structures and compiler characteristics +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING( + [--enable-sanitize], + [Compile with address sanitizer enabled], + )], [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + AC_CONFIG_FILES([ Makefile include/Makefile -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17294 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I23fc4e38632c02269b3895115ba4e3171cc212d1 Gerrit-Change-Number: 17294 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 10:46:42 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 28 Feb 2020 10:46:42 +0000 Subject: Change in libosmocore[master]: chantype_rsl2gsmtap(): Add entries for CBCH In-Reply-To: References: Message-ID: laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17288 ) Change subject: chantype_rsl2gsmtap(): Add entries for CBCH ...................................................................... chantype_rsl2gsmtap(): Add entries for CBCH This adds missing entries for CBCH in the conversion between RSL-style channel numbers and GSMTAP channel types. Without this change, you will see tons of messages like virtphy[19865]: Wed Feb 26 16:16:28 2020 DVIRPHY <0002> gsmtapl1_if.c:267 MS 0000: Ignoring unknown channel type UNKNOWN (0) if running virtphy of osmocom-bb with a BTS that broadcasts CBCH. Change-Id: I19bbd2942adf441f58955ac896ef968bfd8aec5f --- M src/gsmtap_util.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Vadim Yanitskiy: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c index 2fb18a4..a4fe2d9 100644 --- a/src/gsmtap_util.c +++ b/src/gsmtap_util.c @@ -86,6 +86,12 @@ case RSL_CHAN_OSMO_PDCH: ret = GSMTAP_CHANNEL_PDCH; break; + case RSL_CHAN_OSMO_CBCH4: + ret = GSMTAP_CHANNEL_CBCH51; + break; + case RSL_CHAN_OSMO_CBCH8: + ret = GSMTAP_CHANNEL_CBCH52; + break; } if (link_id & 0x40) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17288 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I19bbd2942adf441f58955ac896ef968bfd8aec5f Gerrit-Change-Number: 17288 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 10:48:10 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 28 Feb 2020 10:48:10 +0000 Subject: Change in osmo-gsm-tester[master]: enb: Add modifiers for num_prb In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17287 ) Change subject: enb: Add modifiers for num_prb ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17287 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I0b8c834f1c67cc4bf4d07d03358ba2012331cbde Gerrit-Change-Number: 17287 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 28 Feb 2020 10:48:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 10:48:29 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 28 Feb 2020 10:48:29 +0000 Subject: Change in osmo-gsm-tester[master]: srs_enb: Make num_prb a config parameter In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17286 ) Change subject: srs_enb: Make num_prb a config parameter ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I336e71f53556596050cf3eb55a7810a009dbf7a8 Gerrit-Change-Number: 17286 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 28 Feb 2020 10:48:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 10:48:48 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 28 Feb 2020 10:48:48 +0000 Subject: Change in osmo-gsm-tester[master]: Introduce parametrized scenario files support In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17291 ) Change subject: Introduce parametrized scenario files support ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17291 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Icfcba15b937225aa4b1f322a8005fcd57db1d1ca Gerrit-Change-Number: 17291 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 28 Feb 2020 10:48:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 10:49:00 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 28 Feb 2020 10:49:00 +0000 Subject: Change in osmo-gsm-tester[master]: Use parametrized scenario to set ENB num_prb In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17292 ) Change subject: Use parametrized scenario to set ENB num_prb ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17292 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iec7d7e6312aee6f4e4ce6710bc78a144beff2f39 Gerrit-Change-Number: 17292 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 28 Feb 2020 10:49:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 10:49:19 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 28 Feb 2020 10:49:19 +0000 Subject: Change in osmo-gsm-tester[master]: Introduce LTE Transmission Mode and RLC DRB mode params In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17293 ) Change subject: Introduce LTE Transmission Mode and RLC DRB mode params ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I38f247f266ba736cdbb6f36ba5673b8fd46a8d67 Gerrit-Change-Number: 17293 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 28 Feb 2020 10:49:19 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 10:49:50 2020 From: gerrit-no-reply at lists.osmocom.org (laforge) Date: Fri, 28 Feb 2020 10:49:50 +0000 Subject: Change in osmo-bts[master]: vty: fix left shift by 31 cannot be represented in type 'int' In-Reply-To: References: Message-ID: laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17290 ) Change subject: vty: fix left shift by 31 cannot be represented in type 'int' ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I3e5940e8f360bf6563f4c1b5ebd09579f9108c81 Gerrit-Change-Number: 17290 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 28 Feb 2020 10:49:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 13:29:14 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 28 Feb 2020 13:29:14 +0000 Subject: Change in osmocom-bb[master]: layer23/l1ctl: fix NULL-pointer dereference reported by ASan References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17295 ) Change subject: layer23/l1ctl: fix NULL-pointer dereference reported by ASan ...................................................................... layer23/l1ctl: fix NULL-pointer dereference reported by ASan Some applications (e.g. ccch_scan) may not initialize ms->cellsel.si, some (e.g. mobile) may need some time to initialize it. Let's assume that 'bs_ag_blks_res' is 0 if no System Information is available. Change-Id: Ie695d9700c01ee1e6778950a2f3c8610b69d2143 --- M src/host/layer23/src/common/l1ctl.c 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/17295/1 diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c index de66972..84463a5 100644 --- a/src/host/layer23/src/common/l1ctl.c +++ b/src/host/layer23/src/common/l1ctl.c @@ -218,6 +218,7 @@ struct rx_meas_stat *meas = &ms->meas; uint8_t chan_type, chan_ts, chan_ss; uint8_t gsmtap_chan_type; + uint8_t bs_ag_blks_res; struct gsm_time tm; if (msgb_l1len(msg) < sizeof(*dl)) { @@ -302,7 +303,13 @@ return 0; } - gsmtap_chan_type = chantype_rsl2gsmtap_ext(chan_type, dl->link_id, tm.fn, ms->cellsel.si->bs_ag_blks_res); + /* May not be initialized in some applications (e.g. ccch_scan) */ + if (ms->cellsel.si != NULL) + bs_ag_blks_res = ms->cellsel.si->bs_ag_blks_res; + else + bs_ag_blks_res = 0; + + gsmtap_chan_type = chantype_rsl2gsmtap_ext(chan_type, dl->link_id, tm.fn, bs_ag_blks_res); /* don't log fill frames via GSMTAP; they serve no purpose other than * to clog up your logs */ if (!is_fill_frame(gsmtap_chan_type, ccch->data)) { -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17295 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie695d9700c01ee1e6778950a2f3c8610b69d2143 Gerrit-Change-Number: 17295 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 21:05:17 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 28 Feb 2020 21:05:17 +0000 Subject: Change in osmo-bts[master]: vty: fix left shift by 31 cannot be represented in type 'int' In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17290 ) Change subject: vty: fix left shift by 31 cannot be represented in type 'int' ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I3e5940e8f360bf6563f4c1b5ebd09579f9108c81 Gerrit-Change-Number: 17290 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 28 Feb 2020 21:05:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 21:06:29 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 28 Feb 2020 21:06:29 +0000 Subject: Change in osmocom-bb[master]: layer23/l1ctl: fix NULL-pointer dereference reported by ASan In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17295 ) Change subject: layer23/l1ctl: fix NULL-pointer dereference reported by ASan ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17295 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie695d9700c01ee1e6778950a2f3c8610b69d2143 Gerrit-Change-Number: 17295 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 28 Feb 2020 21:06:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 21:07:35 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 28 Feb 2020 21:07:35 +0000 Subject: Change in osmo-gsm-tester[master]: Introduce parametrized scenario files support In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17291 ) Change subject: Introduce parametrized scenario files support ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17291 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Icfcba15b937225aa4b1f322a8005fcd57db1d1ca Gerrit-Change-Number: 17291 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 28 Feb 2020 21:07:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 21:07:42 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 28 Feb 2020 21:07:42 +0000 Subject: Change in osmo-gsm-tester[master]: Introduce LTE Transmission Mode and RLC DRB mode params In-Reply-To: References: Message-ID: pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17293 ) Change subject: Introduce LTE Transmission Mode and RLC DRB mode params ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I38f247f266ba736cdbb6f36ba5673b8fd46a8d67 Gerrit-Change-Number: 17293 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 28 Feb 2020 21:07:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 21:07:46 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 28 Feb 2020 21:07:46 +0000 Subject: Change in osmo-gsm-tester[master]: srs_enb: Make num_prb a config parameter In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17286 ) Change subject: srs_enb: Make num_prb a config parameter ...................................................................... srs_enb: Make num_prb a config parameter Change-Id: I336e71f53556596050cf3eb55a7810a009dbf7a8 --- M example/defaults.conf M src/osmo_gsm_tester/srs_enb.py M src/osmo_gsm_tester/templates/srsenb.conf.tmpl 3 files changed, 12 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/example/defaults.conf b/example/defaults.conf index f32e1f5..0bff86a 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -100,3 +100,4 @@ srsenb: mcc: 901 mnc: 70 + num_prb: 100 diff --git a/src/osmo_gsm_tester/srs_enb.py b/src/osmo_gsm_tester/srs_enb.py index 6fb186f..85180e4 100644 --- a/src/osmo_gsm_tester/srs_enb.py +++ b/src/osmo_gsm_tester/srs_enb.py @@ -57,11 +57,6 @@ self.remote_config_drb_file = None self.remote_log_file = None self.suite_run = suite_run - self.nof_prb=100 - if self.nof_prb == 75: - self.base_srate=15.36e6 - else: - self.base_srate=23.04e6 self.remote_user = conf.get('remote_user', None) if not rf_type_valid(conf.get('rf_dev_type', None)): raise log.Error('Invalid rf_dev_type=%s' % conf.get('rf_dev_type', None)) @@ -125,7 +120,6 @@ '--enb_files.drb_config=' + self.remote_config_drb_file, '--expert.nof_phy_threads=1', '--expert.rrc_inactivity_timer=1500', - '--enb.n_prb=' + str(self.nof_prb), '--log.filename=' + self.remote_log_file) self.process = self.rem_host.RemoteProcessFixIgnoreSIGHUP(srsENB.BINFILE, util.Dir(srsENB.REMOTE_DIR), args, remote_env=remote_env) @@ -151,7 +145,6 @@ '--enb_files.drb_config=' + os.path.abspath(self.config_drb_file), '--expert.nof_phy_threads=1', '--expert.rrc_inactivity_timer=1500', - '--enb.n_prb=' + str(self.nof_prb), '--log.filename=' + self.log_file) self.process = process.Process(self.name(), self.run_dir, args, env=env) @@ -168,7 +161,16 @@ # We need to set some specific variables programatically here to match IP addresses: if self._conf.get('rf_dev_type') == 'zmq': - config.overlay(values, dict(enb=dict(rf_dev_args='fail_on_disconnect=true,tx_port=tcp://'+ self.addr() +':2000,rx_port=tcp://'+ self.ue.addr() +':2001,id=enb,base_srate='+ str(self.base_srate)))) + num_prb = values['enb'].get('num_prb', None) + assert num_prb + if num_prb == 75: + base_srate=15.36e6 + else: + base_srate=23.04e6 + rf_dev_args = 'fail_on_disconnect=true,tx_port=tcp://' + self.addr() \ + + ':2000,rx_port=tcp://'+ self.ue.addr() \ + + ':2001,id=enb,base_srate='+ str(base_srate) + config.overlay(values, dict(enb=dict(rf_dev_args=rf_dev_args))) self.dbg('srsENB ' + filename + ':\n' + pprint.pformat(values)) diff --git a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl index 2006832..f040156 100644 --- a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl +++ b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl @@ -28,7 +28,7 @@ mme_addr = ${enb.mme_addr} gtp_bind_addr = ${enb.addr} s1c_bind_addr = ${enb.addr} -n_prb = 50 +n_prb = ${enb.num_prb} #tm = 4 #nof_ports = 2 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I336e71f53556596050cf3eb55a7810a009dbf7a8 Gerrit-Change-Number: 17286 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 21:07:47 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 28 Feb 2020 21:07:47 +0000 Subject: Change in osmo-gsm-tester[master]: enb: Add modifiers for num_prb In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17287 ) Change subject: enb: Add modifiers for num_prb ...................................................................... enb: Add modifiers for num_prb Change-Id: I0b8c834f1c67cc4bf4d07d03358ba2012331cbde --- A example/scenarios/mod-enb-nprb100.conf A example/scenarios/mod-enb-nprb15.conf A example/scenarios/mod-enb-nprb25.conf A example/scenarios/mod-enb-nprb50.conf A example/scenarios/mod-enb-nprb6.conf A example/scenarios/mod-enb-nprb75.conf M src/osmo_gsm_tester/resource.py 7 files changed, 19 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/example/scenarios/mod-enb-nprb100.conf b/example/scenarios/mod-enb-nprb100.conf new file mode 100644 index 0000000..cb086ec --- /dev/null +++ b/example/scenarios/mod-enb-nprb100.conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: 100 diff --git a/example/scenarios/mod-enb-nprb15.conf b/example/scenarios/mod-enb-nprb15.conf new file mode 100644 index 0000000..3a5006f --- /dev/null +++ b/example/scenarios/mod-enb-nprb15.conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: 15 diff --git a/example/scenarios/mod-enb-nprb25.conf b/example/scenarios/mod-enb-nprb25.conf new file mode 100644 index 0000000..7a65845 --- /dev/null +++ b/example/scenarios/mod-enb-nprb25.conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: 25 diff --git a/example/scenarios/mod-enb-nprb50.conf b/example/scenarios/mod-enb-nprb50.conf new file mode 100644 index 0000000..a28f69f --- /dev/null +++ b/example/scenarios/mod-enb-nprb50.conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: 50 diff --git a/example/scenarios/mod-enb-nprb6.conf b/example/scenarios/mod-enb-nprb6.conf new file mode 100644 index 0000000..504becc --- /dev/null +++ b/example/scenarios/mod-enb-nprb6.conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: 6 diff --git a/example/scenarios/mod-enb-nprb75.conf b/example/scenarios/mod-enb-nprb75.conf new file mode 100644 index 0000000..8d79840 --- /dev/null +++ b/example/scenarios/mod-enb-nprb75.conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: 75 diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index e8ca859..31e8463 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -89,6 +89,7 @@ 'enb[].type': schema.STR, 'enb[].remote_user': schema.STR, 'enb[].addr': schema.IPV4, + 'enb[].num_prb': schema.UINT, 'enb[].rf_dev_type': schema.STR, 'enb[].rf_dev_args': schema.STR, 'arfcn[].arfcn': schema.INT, -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17287 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I0b8c834f1c67cc4bf4d07d03358ba2012331cbde Gerrit-Change-Number: 17287 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 21:07:47 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 28 Feb 2020 21:07:47 +0000 Subject: Change in osmo-gsm-tester[master]: Introduce parametrized scenario files support In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17291 ) Change subject: Introduce parametrized scenario files support ...................................................................... Introduce parametrized scenario files support The idea is to have something similar to systemd template unit files: https://fedoramagazine.org/systemd-template-unit-files/ Specially for modifiers, one finds the situation where same scenario structure has to be created with lots of different values. For instance, let's say we want to test with different eNodeB num_prb values: [6, 15, 25, 50, 75,100] Right now we'd need to create one scenario file for each of them, for instance: mod-enb-nprb6.conf mod-enb-nprb15.conf mod-enb-nprb25.conf mod-enb-nprb50.conf mod-enb-nprb75.conf mod-enb-nprb100.conf And each of them containing something like (changing the num_prb value): """ modifiers: enb: - num_prb: 75 """ Instead, we can now have one unique file mod-enb-nprb at .conf: """ modifiers: enb: - num_prb: ${param1} """ The general syntax is: "scenario-name at param1,param2,param3". So "@" splits between scenario name and parameter list, and "," splits between parameters. For instance, one can now run following suite with scenario: "4g:srsenb-rftype-uhd+srsue-rftype-uhd+mod-enb-nprb at 75" Related: OS#4424 Change-Id: Icfcba15b937225aa4b1f322a8005fcd57db1d1ca --- M src/osmo_gsm_tester/config.py M src/osmo_gsm_tester/template.py 2 files changed, 47 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/osmo_gsm_tester/config.py b/src/osmo_gsm_tester/config.py index 87b3da4..71e0009 100644 --- a/src/osmo_gsm_tester/config.py +++ b/src/osmo_gsm_tester/config.py @@ -54,7 +54,7 @@ import os import copy -from . import log, schema, util +from . import log, schema, util, template from .util import is_dict, is_list, Dir, get_tempdir ENV_PREFIX = 'OSMO_GSM_TESTER_' @@ -193,19 +193,53 @@ return defaults.get(for_kind, {}) class Scenario(log.Origin, dict): - def __init__(self, name, path): + def __init__(self, name, path, param_list=[]): super().__init__(log.C_TST, name) self.path = path + self.param_list = param_list + + def read_from_file(self, validation_schema): + with open(self.path, 'r') as f: + config_str = f.read() + if len(self.param_list) != 0: + param_dict = {} + i = 1 + for param in self.param_list: + param_dict['param' + str(i)] = param + i += 1 + self.dbg(param_dict=param_dict) + config_str = template.render_strbuf_inline(config_str, param_dict) + config = yaml.safe_load(config_str) + config = _standardize(config) + if validation_schema: + schema.validate(config, validation_schema) + self.update(config) def get_scenario(name, validation_schema=None): scenarios_dir = get_scenarios_dir() if not name.endswith('.conf'): name = name + '.conf' + is_parametrized_file = '@' in name + param_list = [] path = scenarios_dir.child(name) - if not os.path.isfile(path): - raise RuntimeError('No such scenario file: %r' % path) - sc = Scenario(name, path) - sc.update(read(path, validation_schema=validation_schema)) + if not is_parametrized_file: + if not os.path.isfile(path): + raise RuntimeError('No such scenario file: %r' % path) + else: # parametrized scenario: + # Allow first matching complete matching names (eg: scenario at param1,param2.conf), + # this allows setting specific content in different files for specific values. + if not os.path.isfile(path): + # get "scenario at .conf" from "scenario at param1,param2.conf": + prefix_name = name[:name.index("@")+1] + '.conf' + path = scenarios_dir.child(prefix_name) + if not os.path.isfile(path): + raise RuntimeError('No such scenario file: %r (nor %s)' % (path, name)) + # At this point, we have existing file path. Let's now scrap the parameter(s): + # get param1,param2 str from scenario at param1,param2.conf + param_list_str = name.split('@', 1)[1][:-len('.conf')] + param_list = param_list_str.split(',') + sc = Scenario(name, path, param_list) + sc.read_from_file(validation_schema) return sc def add(dest, src): diff --git a/src/osmo_gsm_tester/template.py b/src/osmo_gsm_tester/template.py index 6ce7ebd..dac89f2 100644 --- a/src/osmo_gsm_tester/template.py +++ b/src/osmo_gsm_tester/template.py @@ -19,7 +19,7 @@ # along with this program. If not, see . import os -from mako.lookup import TemplateLookup +from mako.lookup import TemplateLookup, Template from . import log from .util import dict2obj @@ -53,4 +53,10 @@ return template.render(**dict2obj(values)) +def render_strbuf_inline(strbuf, values): + '''Receive a string containing template syntax, and generate output using + passed values.''' + mytemplate = Template(strbuf) + return mytemplate.render(**dict2obj(values)) + # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17291 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Icfcba15b937225aa4b1f322a8005fcd57db1d1ca Gerrit-Change-Number: 17291 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 21:07:48 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 28 Feb 2020 21:07:48 +0000 Subject: Change in osmo-gsm-tester[master]: Use parametrized scenario to set ENB num_prb In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17292 ) Change subject: Use parametrized scenario to set ENB num_prb ...................................................................... Use parametrized scenario to set ENB num_prb Change-Id: Iec7d7e6312aee6f4e4ce6710bc78a144beff2f39 --- D example/scenarios/mod-enb-nprb100.conf D example/scenarios/mod-enb-nprb15.conf D example/scenarios/mod-enb-nprb25.conf D example/scenarios/mod-enb-nprb50.conf D example/scenarios/mod-enb-nprb6.conf D example/scenarios/mod-enb-nprb75.conf A example/scenarios/mod-enb-nprb at .conf 7 files changed, 3 insertions(+), 18 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/example/scenarios/mod-enb-nprb100.conf b/example/scenarios/mod-enb-nprb100.conf deleted file mode 100644 index cb086ec..0000000 --- a/example/scenarios/mod-enb-nprb100.conf +++ /dev/null @@ -1,3 +0,0 @@ -modifiers: - enb: - - num_prb: 100 diff --git a/example/scenarios/mod-enb-nprb15.conf b/example/scenarios/mod-enb-nprb15.conf deleted file mode 100644 index 3a5006f..0000000 --- a/example/scenarios/mod-enb-nprb15.conf +++ /dev/null @@ -1,3 +0,0 @@ -modifiers: - enb: - - num_prb: 15 diff --git a/example/scenarios/mod-enb-nprb25.conf b/example/scenarios/mod-enb-nprb25.conf deleted file mode 100644 index 7a65845..0000000 --- a/example/scenarios/mod-enb-nprb25.conf +++ /dev/null @@ -1,3 +0,0 @@ -modifiers: - enb: - - num_prb: 25 diff --git a/example/scenarios/mod-enb-nprb50.conf b/example/scenarios/mod-enb-nprb50.conf deleted file mode 100644 index a28f69f..0000000 --- a/example/scenarios/mod-enb-nprb50.conf +++ /dev/null @@ -1,3 +0,0 @@ -modifiers: - enb: - - num_prb: 50 diff --git a/example/scenarios/mod-enb-nprb6.conf b/example/scenarios/mod-enb-nprb6.conf deleted file mode 100644 index 504becc..0000000 --- a/example/scenarios/mod-enb-nprb6.conf +++ /dev/null @@ -1,3 +0,0 @@ -modifiers: - enb: - - num_prb: 6 diff --git a/example/scenarios/mod-enb-nprb75.conf b/example/scenarios/mod-enb-nprb75.conf deleted file mode 100644 index 8d79840..0000000 --- a/example/scenarios/mod-enb-nprb75.conf +++ /dev/null @@ -1,3 +0,0 @@ -modifiers: - enb: - - num_prb: 75 diff --git a/example/scenarios/mod-enb-nprb at .conf b/example/scenarios/mod-enb-nprb at .conf new file mode 100644 index 0000000..f17347c --- /dev/null +++ b/example/scenarios/mod-enb-nprb at .conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - num_prb: ${param1} -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17292 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: Iec7d7e6312aee6f4e4ce6710bc78a144beff2f39 Gerrit-Change-Number: 17292 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri Feb 28 21:07:50 2020 From: gerrit-no-reply at lists.osmocom.org (pespin) Date: Fri, 28 Feb 2020 21:07:50 +0000 Subject: Change in osmo-gsm-tester[master]: Introduce LTE Transmission Mode and RLC DRB mode params In-Reply-To: References: Message-ID: pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17293 ) Change subject: Introduce LTE Transmission Mode and RLC DRB mode params ...................................................................... Introduce LTE Transmission Mode and RLC DRB mode params Change-Id: I38f247f266ba736cdbb6f36ba5673b8fd46a8d67 --- M example/defaults.conf A example/scenarios/cfg-epc-rlcmode at .conf A example/scenarios/mod-enb-txmode at .conf M src/osmo_gsm_tester/resource.py M src/osmo_gsm_tester/schema.py M src/osmo_gsm_tester/srs_epc.py M src/osmo_gsm_tester/templates/srsenb.conf.tmpl M src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl 8 files changed, 42 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/example/defaults.conf b/example/defaults.conf index 0bff86a..9b92ad0 100644 --- a/example/defaults.conf +++ b/example/defaults.conf @@ -96,8 +96,10 @@ srsepc: mcc: 901 mnc: 70 + rlc_drb_mode: UM srsenb: mcc: 901 mnc: 70 num_prb: 100 + transmission_mode: 1 diff --git a/example/scenarios/cfg-epc-rlcmode at .conf b/example/scenarios/cfg-epc-rlcmode at .conf new file mode 100644 index 0000000..2ddb044 --- /dev/null +++ b/example/scenarios/cfg-epc-rlcmode at .conf @@ -0,0 +1,3 @@ +config: + epc: + rlc_drb_mode: ${param1} diff --git a/example/scenarios/mod-enb-txmode at .conf b/example/scenarios/mod-enb-txmode at .conf new file mode 100644 index 0000000..e0c8d01 --- /dev/null +++ b/example/scenarios/mod-enb-txmode at .conf @@ -0,0 +1,3 @@ +modifiers: + enb: + - transmission_mode: ${param1} diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py index 31e8463..07d32e2 100644 --- a/src/osmo_gsm_tester/resource.py +++ b/src/osmo_gsm_tester/resource.py @@ -90,6 +90,7 @@ 'enb[].remote_user': schema.STR, 'enb[].addr': schema.IPV4, 'enb[].num_prb': schema.UINT, + 'enb[].transmission_mode': schema.LTE_TRANSMISSION_MODE, 'enb[].rf_dev_type': schema.STR, 'enb[].rf_dev_args': schema.STR, 'arfcn[].arfcn': schema.INT, @@ -115,7 +116,8 @@ CONF_SCHEMA = util.dict_add( { 'defaults.timeout': schema.STR, - 'config.bsc.net.codec_list[]': schema.CODEC }, + 'config.bsc.net.codec_list[]': schema.CODEC, + 'config.epc.rlc_drb_mode': schema.LTE_RLC_DRB_MODE, }, dict([('resources.%s' % key, val) for key, val in WANT_SCHEMA.items()]), dict([('modifiers.%s' % key, val) for key, val in WANT_SCHEMA.items()])) diff --git a/src/osmo_gsm_tester/schema.py b/src/osmo_gsm_tester/schema.py index 14fe640..7fe6689 100644 --- a/src/osmo_gsm_tester/schema.py +++ b/src/osmo_gsm_tester/schema.py @@ -125,6 +125,17 @@ return raise ValueError('Unknown OsmoTRX clock reference value: %r' % val) +def lte_transmission_mode(val): + n = int(val) + if n <= 4: + return + raise ValueError('LTE Transmission Mode %d not in expected range' % n) + +def lte_rlc_drb_mode(val): + if val.upper() in ('UM', 'AM'): + return + raise ValueError('Unknown LTE RLC DRB Mode value: %r' % val) + INT = 'int' STR = 'str' UINT = 'uint' @@ -144,6 +155,8 @@ GPRS_MODE = 'gprs_mode' CODEC = 'codec' OSMO_TRX_CLOCK_REF = 'osmo_trx_clock_ref' +LTE_TRANSMISSION_MODE = 'lte_transmission_mode' +LTE_RLC_DRB_MODE = 'lte_rlc_drb_mode' SCHEMA_TYPES = { INT: int, @@ -165,6 +178,8 @@ GPRS_MODE: gprs_mode, CODEC: codec, OSMO_TRX_CLOCK_REF: osmo_trx_clock_ref, + LTE_TRANSMISSION_MODE: lte_transmission_mode, + LTE_RLC_DRB_MODE: lte_rlc_drb_mode, } def validate(config, schema): diff --git a/src/osmo_gsm_tester/srs_epc.py b/src/osmo_gsm_tester/srs_epc.py index 0a0036e..a33a163 100644 --- a/src/osmo_gsm_tester/srs_epc.py +++ b/src/osmo_gsm_tester/srs_epc.py @@ -22,6 +22,13 @@ from . import log, util, config, template, process, remote +def rlc_drb_mode2qci(rlc_drb_mode): + if rlc_drb_mode.upper() == "UM": + return 7; + elif rlc_drb_mode.upper() == "AM": + return 9; + raise log.Error('Unexpected rlc_drb_mode', rlc_drb_mode=rlc_drb_mode) + class srsEPC(log.Origin): REMOTE_DIR = '/osmo-gsm-tester-srsepc' @@ -155,10 +162,16 @@ self.dbg(config_file=self.config_file, db_file=self.db_file) values = dict(epc=config.get_defaults('srsepc')) - config.overlay(values, dict(epc=dict(hss=dict(subscribers=self.subscriber_list)))) config.overlay(values, self.suite_run.config()) config.overlay(values, dict(epc={'run_addr': self.addr()})) + # Set qci for each subscriber: + rlc_drb_mode = values['epc'].get('rlc_drb_mode', None) + assert rlc_drb_mode is not None + for i in range(len(self.subscriber_list)): + self.subscriber_list[i]['qci'] = rlc_drb_mode2qci(rlc_drb_mode) + config.overlay(values, dict(epc=dict(hss=dict(subscribers=self.subscriber_list)))) + self.dbg('SRSEPC CONFIG:\n' + pprint.pformat(values)) with open(self.config_file, 'w') as f: diff --git a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl index f040156..12b3e18 100644 --- a/src/osmo_gsm_tester/templates/srsenb.conf.tmpl +++ b/src/osmo_gsm_tester/templates/srsenb.conf.tmpl @@ -29,7 +29,7 @@ gtp_bind_addr = ${enb.addr} s1c_bind_addr = ${enb.addr} n_prb = ${enb.num_prb} -#tm = 4 +tm = ${enb.transmission_mode} #nof_ports = 2 ##################################################################### diff --git a/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl b/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl index 32df58d..c213e53 100644 --- a/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl +++ b/src/osmo_gsm_tester/templates/srsepc_user_db.csv.tmpl @@ -20,5 +20,5 @@ #ue2,mil,001010123456780,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,7,dynamic #ue1,xor,001010123456789,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,9001,000000001255,7,dynamic %for sub in epc.hss.subscribers: -ogt${sub.id},${sub.auth_algo},${sub.imsi},${sub.ki},opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,7,dynamic +ogt${sub.id},${sub.auth_algo},${sub.imsi},${sub.ki},opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,${sub.qci},dynamic %endfor -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Change-Id: I38f247f266ba736cdbb6f36ba5673b8fd46a8d67 Gerrit-Change-Number: 17293 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 29 00:57:11 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 29 Feb 2020 00:57:11 +0000 Subject: Change in osmo-bts[master]: vty: fix left shift by 31 cannot be represented in type 'int' In-Reply-To: References: Message-ID: Vadim Yanitskiy has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/17290 ) Change subject: vty: fix left shift by 31 cannot be represented in type 'int' ...................................................................... vty: fix left shift by 31 cannot be represented in type 'int' Change-Id: I3e5940e8f360bf6563f4c1b5ebd09579f9108c81 --- M src/common/vty.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/common/vty.c b/src/common/vty.c index 1be0ac0..c03f0d4 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -250,7 +250,7 @@ bts->agch_queue.high_level, VTY_NEWLINE); for (i = 0; i < 32; i++) { - if (gsmtap_sapi_mask & (1 << i)) { + if (gsmtap_sapi_mask & ((uint32_t) 1 << i)) { sapi_buf = osmo_str_tolower(get_value_string(gsmtap_sapi_names, i)); vty_out(vty, " gsmtap-sapi %s%s", sapi_buf, VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17290 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I3e5940e8f360bf6563f4c1b5ebd09579f9108c81 Gerrit-Change-Number: 17290 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 29 07:16:23 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 29 Feb 2020 07:16:23 +0000 Subject: Change in osmocom-bb[master]: layer23/l1ctl: fix NULL-pointer dereference reported by ASan In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/17295 to look at the new patch set (#2). Change subject: layer23/l1ctl: fix NULL-pointer dereference reported by ASan ...................................................................... layer23/l1ctl: fix NULL-pointer dereference reported by ASan Some applications (e.g. ccch_scan) may not initialize ms->cellsel.si, some (e.g. mobile) may need some time to initialize it. Let's assume that 'bs_ag_blks_res' is 0 if no System Information is available. Change-Id: Ie695d9700c01ee1e6778950a2f3c8610b69d2143 --- M src/host/layer23/src/common/l1ctl.c 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/17295/2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17295 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie695d9700c01ee1e6778950a2f3c8610b69d2143 Gerrit-Change-Number: 17295 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 29 07:17:36 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 29 Feb 2020 07:17:36 +0000 Subject: Change in osmocom-bb[master]: layer23/l1ctl: fix NULL-pointer dereference reported by ASan In-Reply-To: References: Message-ID: Hello pespin, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/17295 to look at the new patch set (#3). Change subject: layer23/l1ctl: fix NULL-pointer dereference reported by ASan ...................................................................... layer23/l1ctl: fix NULL-pointer dereference reported by ASan Some applications (e.g. ccch_scan) may not initialize ms->cellsel.si, some (e.g. mobile) may need some time to initialize it. Let's assume that 'bs_ag_blks_res' is 1 if System Information is not available. Change-Id: Ie695d9700c01ee1e6778950a2f3c8610b69d2143 --- M src/host/layer23/src/common/l1ctl.c 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/95/17295/3 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17295 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie695d9700c01ee1e6778950a2f3c8610b69d2143 Gerrit-Change-Number: 17295 Gerrit-PatchSet: 3 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 29 07:39:04 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 29 Feb 2020 07:39:04 +0000 Subject: Change in osmo-bts[master]: common/sysinfo: reduce criticality of a logging message References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17296 ) Change subject: common/sysinfo: reduce criticality of a logging message ...................................................................... common/sysinfo: reduce criticality of a logging message During the process of bootstrapping, it may happen that System Information Type 3 is not yet received from the BSC, while the BTS already needs to transmit a block on AGCH or PCH. Since the RSL link is established later than the OML link, it's kind of expected, so we should not log it as error. Change-Id: I41aa3dbe375cf42c39032bafa80dba94d6219d35 --- M src/common/sysinfo.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/96/17296/1 diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index c41f9d6..f5bc3c8 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -156,7 +156,7 @@ si3 = GSM_BTS_SI(b, SYSINFO_TYPE_3); return si3->control_channel_desc.bs_ag_blks_res; } - LOGP(DL1P, LOGL_ERROR, "%s: Unable to determine actual BS_AG_BLKS_RES " + LOGP(DL1P, LOGL_NOTICE, "%s: Unable to determine actual BS_AG_BLKS_RES " "value as SI3 is not available yet, fallback to 1\n", arg); return 1; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17296 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I41aa3dbe375cf42c39032bafa80dba94d6219d35 Gerrit-Change-Number: 17296 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 29 11:10:58 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 29 Feb 2020 11:10:58 +0000 Subject: Change in osmo-bts[master]: osmo-bts-virtual: fix wrong endianness in gsmtap_hdr_stringify() References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17297 ) Change subject: osmo-bts-virtual: fix wrong endianness in gsmtap_hdr_stringify() ...................................................................... osmo-bts-virtual: fix wrong endianness in gsmtap_hdr_stringify() Change-Id: Ic9e84dc4adc44df735cba102bdace2fb1993ac8e --- M src/osmo-bts-virtual/scheduler_virtbts.c 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/97/17297/1 diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c b/src/osmo-bts-virtual/scheduler_virtbts.c index 0621eaa..fef367b 100644 --- a/src/osmo-bts-virtual/scheduler_virtbts.c +++ b/src/osmo-bts-virtual/scheduler_virtbts.c @@ -50,7 +50,9 @@ { static char buf[256]; snprintf(buf, sizeof(buf), "(ARFCN=%u, ts=%u, ss=%u, type=%u/%u)", - gh->arfcn & GSMTAP_ARFCN_MASK, gh->timeslot, gh->sub_slot, gh->type, gh->sub_type); + ntohs(gh->arfcn & GSMTAP_ARFCN_MASK), + gh->timeslot, gh->sub_slot, + gh->type, gh->sub_type); return buf; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17297 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ic9e84dc4adc44df735cba102bdace2fb1993ac8e Gerrit-Change-Number: 17297 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 29 11:47:44 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 29 Feb 2020 11:47:44 +0000 Subject: Change in osmo-bts[master]: scheduler: enrich the output of LOGL1S macro with ARFCN References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17298 ) Change subject: scheduler: enrich the output of LOGL1S macro with ARFCN ...................................................................... scheduler: enrich the output of LOGL1S macro with ARFCN Change-Id: Id347c3fddc57b0df0039c3a029b973f731274f35 --- M include/osmo-bts/scheduler_backend.h 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/98/17298/1 diff --git a/include/osmo-bts/scheduler_backend.h b/include/osmo-bts/scheduler_backend.h index aa2d6e9..e440594 100644 --- a/include/osmo-bts/scheduler_backend.h +++ b/include/osmo-bts/scheduler_backend.h @@ -1,9 +1,10 @@ #pragma once #define LOGL1S(subsys, level, l1t, tn, chan, fn, fmt, args ...) \ - LOGP(subsys, level, "%s %s %s: " fmt, \ + LOGP(subsys, level, "%s %s ARFCN=%u %s: " fmt, \ gsm_fn_as_gsmtime_str(fn), \ gsm_ts_name(&(l1t)->trx->ts[tn]), \ + l1t->trx->arfcn, \ chan >=0 ? trx_chan_desc[chan].name : "", ## args) typedef int trx_sched_rts_func(struct l1sched_trx *l1t, uint8_t tn, -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17298 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Id347c3fddc57b0df0039c3a029b973f731274f35 Gerrit-Change-Number: 17298 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 29 11:47:44 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 29 Feb 2020 11:47:44 +0000 Subject: Change in osmo-bts[master]: osmo-bts-virtual: do not print redundant info in tx_to_virt_um() References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17299 ) Change subject: osmo-bts-virtual: do not print redundant info in tx_to_virt_um() ...................................................................... osmo-bts-virtual: do not print redundant info in tx_to_virt_um() LOGL1S() already prints quite a lot, including the ARFCN. Change-Id: I29adf9360b96544b7f58766d5cd26d97117884d9 --- M src/osmo-bts-virtual/scheduler_virtbts.c 1 file changed, 2 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/99/17299/1 diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c b/src/osmo-bts-virtual/scheduler_virtbts.c index fef367b..a0d9b23 100644 --- a/src/osmo-bts-virtual/scheduler_virtbts.c +++ b/src/osmo-bts-virtual/scheduler_virtbts.c @@ -46,16 +46,6 @@ #define MODULO_HYPERFRAME 0 -static const char *gsmtap_hdr_stringify(const struct gsmtap_hdr *gh) -{ - static char buf[256]; - snprintf(buf, sizeof(buf), "(ARFCN=%u, ts=%u, ss=%u, type=%u/%u)", - ntohs(gh->arfcn & GSMTAP_ARFCN_MASK), - gh->timeslot, gh->sub_slot, - gh->type, gh->sub_type); - return buf; -} - /** * Send a message over the virtual um interface. * This will at first wrap the msg with a GSMTAP header and then write it to the declared multicast socket. @@ -102,12 +92,12 @@ rc = virt_um_write_msg(pinst->phy_link->u.virt.virt_um, outmsg); if (rc < 0) LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, - "%s GSMTAP msg could not send to virtual Um\n", gsmtap_hdr_stringify(gh)); + "GSMTAP msg could not send to virtual Um\n"); else if (rc == 0) bts_shutdown(l1t->trx->bts, "VirtPHY write socket died\n"); else LOGL1S(DL1P, LOGL_DEBUG, l1t, tn, chan, fn, - "%s Sending GSMTAP message to virtual Um\n", gsmtap_hdr_stringify(gh)); + "Sending GSMTAP message to virtual Um\n"); } else LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, "GSMTAP msg could not be created!\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17299 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I29adf9360b96544b7f58766d5cd26d97117884d9 Gerrit-Change-Number: 17299 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 29 11:49:41 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 29 Feb 2020 11:49:41 +0000 Subject: Change in osmo-bts[master]: osmo-bts-virtual: do not print redundant info in tx_to_virt_um() In-Reply-To: References: Message-ID: Vadim Yanitskiy has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-bts/+/17299 ) Change subject: osmo-bts-virtual: do not print redundant info in tx_to_virt_um() ...................................................................... osmo-bts-virtual: do not print redundant info in tx_to_virt_um() LOGL1S() already prints quite a lot, including the ARFCN. Change-Id: I29adf9360b96544b7f58766d5cd26d97117884d9 --- M src/osmo-bts-virtual/scheduler_virtbts.c 1 file changed, 2 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/99/17299/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17299 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I29adf9360b96544b7f58766d5cd26d97117884d9 Gerrit-Change-Number: 17299 Gerrit-PatchSet: 2 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newpatchset -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 29 12:22:19 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 29 Feb 2020 12:22:19 +0000 Subject: Change in osmo-bts[master]: osmo-bts-virtual: do not log GSMTAP message sending failure twice References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/17300 ) Change subject: osmo-bts-virtual: do not log GSMTAP message sending failure twice ...................................................................... osmo-bts-virtual: do not log GSMTAP message sending failure twice Change-Id: I39e9edf35240ef31e3432412b459c2b8fb0de054 --- M src/osmo-bts-virtual/scheduler_virtbts.c M src/osmo-bts-virtual/virtual_um.c 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/00/17300/1 diff --git a/src/osmo-bts-virtual/scheduler_virtbts.c b/src/osmo-bts-virtual/scheduler_virtbts.c index 91d9153..dd8f9a9 100644 --- a/src/osmo-bts-virtual/scheduler_virtbts.c +++ b/src/osmo-bts-virtual/scheduler_virtbts.c @@ -21,6 +21,7 @@ */ #include #include +#include #include #include #include @@ -91,7 +92,8 @@ rc = virt_um_write_msg(pinst->phy_link->u.virt.virt_um, outmsg); if (rc < 0) LOGL1S(DL1P, LOGL_ERROR, l1t, tn, chan, fn, - "GSMTAP msg could not send to virtual Um\n"); + "GSMTAP msg could not send to virtual Um: %s\n", + strerror(errno)); else if (rc == 0) bts_shutdown(l1t->trx->bts, "VirtPHY write socket died\n"); else diff --git a/src/osmo-bts-virtual/virtual_um.c b/src/osmo-bts-virtual/virtual_um.c index fd0940f..cbf5838 100644 --- a/src/osmo-bts-virtual/virtual_um.c +++ b/src/osmo-bts-virtual/virtual_um.c @@ -92,8 +92,6 @@ rc = mcast_bidir_sock_tx(vui->mcast_sock, msgb_data(msg), msgb_length(msg)); - if (rc < 0) - perror("Writing to multicast socket"); msgb_free(msg); return rc; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/17300 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I39e9edf35240ef31e3432412b459c2b8fb0de054 Gerrit-Change-Number: 17300 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 29 19:22:18 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 29 Feb 2020 19:22:18 +0000 Subject: Change in osmocom-bb[master]: trxcon/scheduler: print completeness of the Rx burst buffers References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17301 ) Change subject: trxcon/scheduler: print completeness of the Rx burst buffers ...................................................................... trxcon/scheduler: print completeness of the Rx burst buffers Change-Id: Ife9f5eabc23aa2eea08b190361e10a98e890d608 Related: OS#3554 --- M src/host/trxcon/sched_lchan_common.c M src/host/trxcon/sched_lchan_pdtch.c M src/host/trxcon/sched_lchan_tchf.c M src/host/trxcon/sched_lchan_tchh.c M src/host/trxcon/sched_lchan_xcch.c M src/host/trxcon/sched_trx.h 6 files changed, 33 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/01/17301/1 diff --git a/src/host/trxcon/sched_lchan_common.c b/src/host/trxcon/sched_lchan_common.c index d8d9ee1..813f315 100644 --- a/src/host/trxcon/sched_lchan_common.c +++ b/src/host/trxcon/sched_lchan_common.c @@ -2,7 +2,7 @@ * OsmocomBB <-> SDR connection bridge * TDMA scheduler: common routines for lchan handlers * - * (C) 2017-2019 by Vadim Yanitskiy + * (C) 2017-2020 by Vadim Yanitskiy * * All Rights Reserved * @@ -84,6 +84,25 @@ }, }; +/* Get a string representation of the burst buffer's completeness. + * Examples: " ****.." (incomplete, 4/6 bursts) + * " ****" (complete, all 4 bursts) + * "**.***.." (incomplete, 5/8 bursts) */ +const char *burst_mask2str(const uint8_t *mask, int bits) +{ + /* TODO: CSD is interleaved over 22 bursts, so the mask needs to be extended */ + static char buf[8 + 1]; + char *ptr = buf; + + OSMO_ASSERT(bits <= 8 && bits > 0); + + while (--bits >= 0) + *(ptr++) = (*mask & (1 << bits)) ? '*' : '.'; + *ptr = '\0'; + + return buf; +} + int sched_gsmtap_send(enum trx_lchan_type lchan_type, uint32_t fn, uint8_t tn, uint16_t band_arfcn, int8_t signal_dbm, uint8_t snr, const uint8_t *data, size_t data_len) diff --git a/src/host/trxcon/sched_lchan_pdtch.c b/src/host/trxcon/sched_lchan_pdtch.c index 733e574..83a6f53 100644 --- a/src/host/trxcon/sched_lchan_pdtch.c +++ b/src/host/trxcon/sched_lchan_pdtch.c @@ -88,8 +88,9 @@ /* Check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGP(DSCHD, LOGL_ERROR, "Received incomplete data frame at " - "fn=%u (%u/%u) for %s\n", *first_fn, + LOGP(DSCHD, LOGL_ERROR, "Received incomplete (%s) data frame at " + "fn=%u (%u/%u) for %s\n", + burst_mask2str(mask, 4), *first_fn, (*first_fn) % ts->mf_layout->period, ts->mf_layout->period, lchan_desc->name); diff --git a/src/host/trxcon/sched_lchan_tchf.c b/src/host/trxcon/sched_lchan_tchf.c index f2ecdcc..0109280 100644 --- a/src/host/trxcon/sched_lchan_tchf.c +++ b/src/host/trxcon/sched_lchan_tchf.c @@ -90,8 +90,9 @@ /* Check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGP(DSCHD, LOGL_ERROR, "Received incomplete traffic frame at " - "fn=%u (%u/%u) for %s\n", *first_fn, + LOGP(DSCHD, LOGL_ERROR, "Received incomplete (%s) traffic frame at " + "fn=%u (%u/%u) for %s\n", + burst_mask2str(mask, 8), *first_fn, (*first_fn) % ts->mf_layout->period, ts->mf_layout->period, lchan_desc->name); diff --git a/src/host/trxcon/sched_lchan_tchh.c b/src/host/trxcon/sched_lchan_tchh.c index 0201ee3..8288670 100644 --- a/src/host/trxcon/sched_lchan_tchh.c +++ b/src/host/trxcon/sched_lchan_tchh.c @@ -299,8 +299,9 @@ /* Check decoding result */ if (rc < 4) { - LOGP(DSCHD, LOGL_ERROR, "Received bad TCH frame ending at " - "fn=%u on %s (rc=%d)\n", fn, lchan_desc->name, rc); + LOGP(DSCHD, LOGL_ERROR, "Received bad TCH frame (%s) ending at " + "fn=%u on %s (rc=%d)\n", burst_mask2str(mask, 6), + fn, lchan_desc->name, rc); /* Send BFI */ goto bfi; diff --git a/src/host/trxcon/sched_lchan_xcch.c b/src/host/trxcon/sched_lchan_xcch.c index d341646..34fe5ce 100644 --- a/src/host/trxcon/sched_lchan_xcch.c +++ b/src/host/trxcon/sched_lchan_xcch.c @@ -87,8 +87,9 @@ /* Check for complete set of bursts */ if ((*mask & 0xf) != 0xf) { - LOGP(DSCHD, LOGL_ERROR, "Received incomplete data frame at " - "fn=%u (%u/%u) for %s\n", *first_fn, + LOGP(DSCHD, LOGL_ERROR, "Received incomplete (%s) data frame at " + "fn=%u (%u/%u) for %s\n", + burst_mask2str(mask, 4), *first_fn, (*first_fn) % ts->mf_layout->period, ts->mf_layout->period, lchan_desc->name); diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h index 8718ed6..13fc678 100644 --- a/src/host/trxcon/sched_trx.h +++ b/src/host/trxcon/sched_trx.h @@ -355,6 +355,7 @@ /* Shared declarations for lchan handlers */ extern const uint8_t sched_nb_training_bits[8][26]; +const char *burst_mask2str(const uint8_t *mask, int bits); size_t sched_bad_frame_ind(uint8_t *l2, struct trx_lchan_state *lchan); int sched_send_dt_ind(struct trx_instance *trx, struct trx_ts *ts, struct trx_lchan_state *lchan, uint8_t *l2, size_t l2_len, -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17301 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ife9f5eabc23aa2eea08b190361e10a98e890d608 Gerrit-Change-Number: 17301 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 29 19:22:18 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 29 Feb 2020 19:22:18 +0000 Subject: Change in osmocom-bb[master]: mobile/gsm322: fix use-after-free of cs->si reported by ASan References: Message-ID: Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17302 ) Change subject: mobile/gsm322: fix use-after-free of cs->si reported by ASan ...................................................................... mobile/gsm322: fix use-after-free of cs->si reported by ASan This pointer cs->si stores an address to the System Information of a currently selected cell. When we release System Information, ensure that it does not point to free()d memory. Change-Id: Ife2ddf7274a48447a9ded9035f9dd01befaf2e6c --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/02/17302/1 diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index ddb3a77..cc4f0cd 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -2635,6 +2635,8 @@ if (cs->list[cs->arfci].sysinfo) { LOGP(DCS, LOGL_DEBUG, "free sysinfo arfcn=%s\n", gsm_print_arfcn(cs->arfcn)); + if (cs->si == cs->list[cs->arfci].sysinfo) + cs->si = NULL; talloc_free(cs->list[cs->arfci].sysinfo); cs->list[cs->arfci].sysinfo = NULL; } @@ -2752,6 +2754,8 @@ if (cs->list[cs->arfci].sysinfo) { LOGP(DCS, LOGL_DEBUG, "free sysinfo arfcn=%s\n", gsm_print_arfcn(cs->arfcn)); + if (cs->si == cs->list[cs->arfci].sysinfo) + cs->si = NULL; talloc_free(cs->list[cs->arfci].sysinfo); cs->list[cs->arfci].sysinfo = NULL; } @@ -2919,6 +2923,8 @@ cs->list[i].flags &= ~GSM322_CS_FLAG_SYSINFO; LOGP(DCS, LOGL_DEBUG, "free sysinfo ARFCN=%s\n", gsm_print_arfcn(index2arfcn(i))); + if (cs->si == cs->list[i].sysinfo) + cs->si = NULL; talloc_free(cs->list[i].sysinfo); cs->list[i].sysinfo = NULL; } @@ -5145,6 +5151,7 @@ gsm_print_arfcn(index2arfcn(i))); talloc_free(cs->list[i].sysinfo); cs->list[i].sysinfo = NULL; + cs->si = NULL; } cs->list[i].flags = 0; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17302 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ife2ddf7274a48447a9ded9035f9dd01befaf2e6c Gerrit-Change-Number: 17302 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Sat Feb 29 19:22:45 2020 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Sat, 29 Feb 2020 19:22:45 +0000 Subject: Change in osmocom-bb[master]: layer23/l1ctl: fix NULL-pointer dereference reported by ASan In-Reply-To: References: Message-ID: Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17295 ) Change subject: layer23/l1ctl: fix NULL-pointer dereference reported by ASan ...................................................................... Patch Set 4: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17295 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie695d9700c01ee1e6778950a2f3c8610b69d2143 Gerrit-Change-Number: 17295 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 29 Feb 2020 19:22:45 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment -------------- next part -------------- An HTML attachment was scrubbed... URL: