netopeer2 package update
v4 cover netopeer2 package update
This series contains the netopeer2 package update with the corresponding
dependencies: libyang, libnetconf2, sysrepo.
This series must be applied together due to API breaking changes.
Also minimal tests for sysrepo and netopeer2 are included in the series.
Heiko Thiery (9):
package/libyang: add patch to solve issue with older cmake version package/libyang: bump to version 3.4.2 package/libnetconf2: bump to version 3.5.1 package/sysrepo: fix shellcheck warnings of init script package/sysrepo: bump to version 2.11.7 package/netopeer2: fix shellcheck warnings package/netopeer2: bump to version 2.2.31 support/testing/tests/package/test_sysrepo.py: add new test support/testing/tests/package/test_netopeer2.py: add new test
.checkpackageignore | 2 -
DEVELOPERS | 2 +
package/libnetconf2/Config.in | 1 +
package/libnetconf2/libnetconf2.hash | 2 +-
package/libnetconf2/libnetconf2.mk | 22 ++++------
...UseCompat.cmake-fix-list-REMOVE_ITEM.patch | 34 ++++++++++++++++
package/libyang/libyang.hash | 4 +-
package/libyang/libyang.mk | 2 +-
package/netopeer2/Config.in | 17 +++++++-
.../{S52netopeer2 => S52netopeer2-server} | 2 +-
package/netopeer2/netopeer2.hash | 2 +-
package/netopeer2/netopeer2.mk | 13 ++++--
package/sysrepo/Config.in | 18 +++++++++
package/sysrepo/S51sysrepo-plugind | 3 +-
package/sysrepo/sysrepo.hash | 2 +-
package/sysrepo/sysrepo.mk | 5 ++-
.../testing/tests/package/test_netopeer2.py | 40 +++++++++++++++++++
support/testing/tests/package/test_sysrepo.py | 25 ++++++++++++
18 files changed, 165 insertions(+), 31 deletions(-)
create mode 100644 package/libyang/0001-CMCMakeModules-UseCompat.cmake-fix-list-REMOVE_ITEM.patch
rename package/netopeer2/{S52netopeer2 => S52netopeer2-server} (92%)
create mode 100644 support/testing/tests/package/test_netopeer2.py
create mode 100644 support/testing/tests/package/test_sysrepo.pySignature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 1/9 package/libyang: add patch to solve issue with older cmake version
The cmake list operation behaves different on older cmake version (<=3.19) and show the following error:
CMake Error at CMakeModules/UseCompat.cmake:48 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
As workaround we can simply add an empty item to remove list macro. The patch is provided to the upstream project [1].
[1] https://github.com/CESNET/libyang/pull/2332
---
v4:
- this commit is new in this series and fixes a build error occured during build via base buildroot docker container
...UseCompat.cmake-fix-list-REMOVE_ITEM.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 package/libyang/0001-CMCMakeModules-UseCompat.cmake-fix-list-REMOVE_ITEM.patch
package/libyang/0001-CMCMakeModules-UseCompat.cmake-fix-list-REMOVE_ITEM.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 01f8440a8e6e5fb8811f6ca311d980223cb7e29e Mon Sep 17 00:00:00 2001 +From: Heiko Thiery <[email protected]> +Date: Sun, 5 Jan 2025 11:35:46 +0100 +Subject: [PATCH] CMCMakeModules/UseCompat.cmake: fix list(REMOVE_ITEM ...) + +When using a cmake version <= 3.19 the compat check fails with: + +CMake Error at CMakeModules/UseCompat.cmake:48 (list): + list sub-command REMOVE_ITEM requires two or more arguments. + +To solve the issue we simply add an empty element "". + +Upstream: https://github.com/CESNET/libyang/commit/a1633fc0b72b403bb6925cdc432d6824a2dfe994 +Signed-off-by: Heiko Thiery <[email protected]> +--- + CMakeModules/UseCompat.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeModules/UseCompat.cmake b/CMakeModules/UseCompat.cmake +index 8fe9f2c40..2c4348690 100644 +--- a/CMakeModules/UseCompat.cmake ++++ b/CMakeModules/UseCompat.cmake +@@ -45,7 +45,7 @@ macro(USE_COMPAT) + find_package(Threads) + list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) + check_function_exists(pthread_mutex_timedlock HAVE_PTHREAD_MUTEX_TIMEDLOCK) +- list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) ++ list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} "") # cmake <= 3.19 needs at least one item + + test_big_endian(IS_BIG_ENDIAN) + +-- +2.39.2 +
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 2/9 package/libyang: bump to version 3.4.2
In reply to Heiko ThieryThe LICENSE hash has to be updated due to copyright year change.
--- package/libyang/libyang.hash | 4 ++-- package/libyang/libyang.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
package/libyang/libyang.hash +2 -2
@@ -1,3 +1,3 @@ # Locally calculated -sha256 77a0aaaeb3df720aeb70d6896e32e2c2be099d48df73e3cfb52567051af3e44b libyang-2.1.148.tar.gz -sha256 0b7ec43747d211a1e49c53588b0822062947bab6bdcc95238578beab34cba5bb LICENSE +sha256 2767902aeffc55c55767f4ecfe5371c422174794edd8aa2b02028d5fe3f8b82c libyang-3.4.2.tar.gz +sha256 f4fbaa09c8b2faa6a873a38181ff860e2ff90808320f71deb369f03ddfb920da LICENSE
package/libyang/libyang.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -LIBYANG_VERSION = 2.1.148 +LIBYANG_VERSION = 3.4.2 LIBYANG_SITE = $(call github,CESNET,libyang,v$(LIBYANG_VERSION)) LIBYANG_LICENSE = BSD-3-Clause LIBYANG_LICENSE_FILES = LICENSE
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 3/9 package/libnetconf2: bump to version 3.5.1
In reply to Heiko ThierySince version 3.x the cmake configuration options for ENABLE_TLS and ENABLE_SSH are refactored. Therefore the options are replaced by ENABLE_SSH_TLS. In addition, the dependency on openssl is now necessary.
---
v4:
- revert changes that are related to libcrypt dependency check as mentioned by Thomas Petazzoni
v3:
- no changes
v2: (after review comments from Thomas Petazzoni)
- reworded the commit message
- added selection of openssol package in Config.in
- fixed inconsistency in dependency to openssl
package/libnetconf2/Config.in | 1 + package/libnetconf2/libnetconf2.hash | 2 +- package/libnetconf2/libnetconf2.mk | 22 +++++++--------------- 3 files changed, 9 insertions(+), 16 deletions(-)
package/libnetconf2/Config.in +1 -0
@@ -6,6 +6,7 @@ config BR2_PACKAGE_LIBNETCONF2 depends on BR2_USE_MMU select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC select BR2_PACKAGE_LIBYANG + select BR2_PACKAGE_OPENSSL help libnetconf2 is a NETCONF library in C intended for building NETCONF clients and servers.
package/libnetconf2/libnetconf2.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 72e9a6461fadbd22f0cf0d23ba68d62b297c8f564f7f2bee069748fb67fc3a24 libnetconf2-2.1.28.tar.gz +sha256 0d49e796798015e35a08bfbd53a3dd4004cb9a26d4b1dd1f90940a427d483bbb libnetconf2-3.5.1.tar.gz sha256 bd962ab457c8a8cb8faaaa36c11484680f3c9a47dbc336507817ae8935384064 LICENSE
package/libnetconf2/libnetconf2.mk +7 -15
@@ -4,30 +4,23 @@ # ################################################################################ -LIBNETCONF2_VERSION = 2.1.28 +LIBNETCONF2_VERSION = 3.5.1 LIBNETCONF2_SITE = $(call github,CESNET,libnetconf2,v$(LIBNETCONF2_VERSION)) LIBNETCONF2_INSTALL_STAGING = YES LIBNETCONF2_LICENSE = BSD-3-Clause LIBNETCONF2_LICENSE_FILES = LICENSE -LIBNETCONF2_DEPENDENCIES = libyang +LIBNETCONF2_DEPENDENCIES = libyang openssl HOST_LIBNETCONF2_DEPENDENCIES = host-libyang LIBNETCONF2_CONF_OPTS = \ -DENABLE_TESTS=OFF \ -DENABLE_VALGRIND_TESTS=OFF -ifeq ($(BR2_PACKAGE_LIBSSH_SERVER), y) -LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=ON -LIBNETCONF2_DEPENDENCIES += libssh +ifeq ($(BR2_PACKAGE_LIBSSH_SERVER)$(BR2_PACKAGE_LIBCURL),yy) +LIBNETCONF2_CONF_OPTS += -DENABLE_SSH_TLS=ON +LIBNETCONF2_DEPENDENCIES += libssh libcurl else -LIBNETCONF2_CONF_OPTS += -DENABLE_SSH=OFF -endif - -ifeq ($(BR2_PACKAGE_LIBOPENSSL), y) -LIBNETCONF2_CONF_OPTS += -DENABLE_TLS=ON -LIBNETCONF2_DEPENDENCIES += openssl -else -LIBNETCONF2_CONF_OPTS += -DENABLE_TLS=OFF +LIBNETCONF2_CONF_OPTS += -DENABLE_SSH_TLS=OFF endif ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
@@ -37,8 +30,7 @@ endif HOST_LIBNETCONF2_CONF_OPTS = \ -DENABLE_TESTS=OFF \ -DENABLE_VALGRIND_TESTS=OFF \ - -DENABLE_SSH=OFF \ - -DENABLE_TLS=OFF + -DENABLE_TLS_SSH=OFF $(eval $(cmake-package)) $(eval $(host-cmake-package))
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 4/9 package/sysrepo: fix shellcheck warnings of init script
In reply to Heiko ThieryRemove entry from .checkpackageignore
---
v4:
- new commit that only contains sysv init shellcheck warning fixes
.checkpackageignore | 1 - package/sysrepo/S51sysrepo-plugind | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-)
.checkpackageignore +0 -1
@@ -1213,7 +1213,6 @@ package/suricata/0001-configure.ac-allow-the-user-to-override-RUST_TARGET.patch package/suricata/S99suricata Shellcheck package/swupdate/swupdate.sh Shellcheck package/sylpheed/0001-harden-link-checker-before-accepting-click.patch lib_patch.Upstream -package/sysrepo/S51sysrepo-plugind Shellcheck lib_sysv.Indent package/sysvinit/0001-Makefile-disable-stack-protector-strong.patch lib_patch.Upstream package/tar/0001-lib-getrandom.c-fix-build-with-uclibc-1.0.35.patch lib_patch.Upstream package/targetcli-fb/S50target Shellcheck lib_sysv.Variables
package/sysrepo/S51sysrepo-plugind +2 -1
@@ -10,6 +10,7 @@ SYSREPO_PLUGIND_ARGS="" start() { printf 'Starting %s: ' "$DAEMON" + # shellcheck disable=SC2086 # we need the word splitting start-stop-daemon -S -q -x "$EXECUTABLE" \ -- $SYSREPO_PLUGIND_ARGS status=$?
@@ -45,7 +46,7 @@ reload() { } case "$1" in - start|stop|restart|reload) + start|stop|restart|reload) "$1";; *) echo "Usage: $0 {start|stop|restart|reload}"
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 5/9 package/sysrepo: bump to version 2.11.7
In reply to Heiko ThieryAdd new config options to enable/disable binary tools/daemon. By default this options are enabled to be backward compatible to older package version.
---
v4:
- removed redundant config help information
package/sysrepo/Config.in | 18 ++++++++++++++++++ package/sysrepo/sysrepo.hash | 2 +- package/sysrepo/sysrepo.mk | 5 ++++- 3 files changed, 23 insertions(+), 2 deletions(-)
package/sysrepo/Config.in +18 -0
@@ -16,6 +16,24 @@ config BR2_PACKAGE_SYSREPO if BR2_PACKAGE_SYSREPO +config BR2_PACKAGE_SYSREPO_SYSREPOCFG + bool "enable sysrepocfg" + default y + help + Build binary tool sysrepocfg + +config BR2_PACKAGE_SYSREPO_SYSREPOCTL + bool "enable sysrepoctl" + default y + help + Build binary tool sysrepoctl + +config BR2_PACKAGE_SYSREPO_PLUGIND + bool "enable sysrepo-plugind" + default y + help + Build binary daemon sysrepo-plugind + config BR2_PACKAGE_SYSREPO_EXAMPLES bool "enable examples" help
package/sysrepo/sysrepo.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 467efed8d0f62c26a0d200602b911096eb2d67858e620937ab68f96b316fa9b7 sysrepo-2.2.150.tar.gz +sha256 45a98a71827dd1428e2c6b7dedea47558cdfbc491042bbdbc0c52e607ab8266e sysrepo-2.11.7.tar.gz sha256 88f1b7e5c64d2c113e07105aa9c0fb80639b40287565be1c2afd0949df83d826 LICENSE
package/sysrepo/sysrepo.mk +4 -1
@@ -4,7 +4,7 @@ # ################################################################################ -SYSREPO_VERSION = 2.2.150 +SYSREPO_VERSION = 2.11.7 SYSREPO_SITE = $(call github,sysrepo,sysrepo,v$(SYSREPO_VERSION)) SYSREPO_INSTALL_STAGING = YES SYSREPO_LICENSE = BSD-3-Clause
@@ -18,6 +18,9 @@ endif SYSREPO_CONF_OPTS = \ -DBUILD_EXAMPLES=$(if $(BR2_PACKAGE_SYSREPO_EXAMPLES),ON,OFF) \ + -DENABLE_SYSREPOCFG=$(if $(BR2_PACKAGE_SYSREPO_SYSREPOCFG),ON,OFF) \ + -DENABLE_SYSREPOCTL=$(if $(BR2_PACKAGE_SYSREPO_SYSREPOCTL),ON,OFF) \ + -DENABLE_SYSREPO_PLUGIND=$(if $(BR2_PACKAGE_SYSREPO_PLUGIND),ON,OFF) \ -DENABLE_TESTS=OFF \ -DENABLE_VALGRIND_TESTS=OFF \ -DREPO_PATH=/etc/sysrepo
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 6/9 package/netopeer2: fix shellcheck warnings
In reply to Heiko ThieryThe init script S52netopeer2 has to be renamed to S52netopeer2-server to match the daemon name. The step to install the init script now uses the NETOPEER2_PKGDIR variable to reference the directory instead of explicitly using the "package/netopeer2/" path.
The init script now is removed from the .checkpackageignore file.
---
v4:
- new commit that only contains sysv init shellcheck warning fixes
.checkpackageignore | 1 -
package/netopeer2/{S52netopeer2 => S52netopeer2-server} | 2 +-
package/netopeer2/netopeer2.mk | 4 ++--
3 files changed, 3 insertions(+), 4 deletions(-)
rename package/netopeer2/{S52netopeer2 => S52netopeer2-server} (92%).checkpackageignore +0 -1
@@ -896,7 +896,6 @@ package/neard/S53neard Shellcheck lib_sysv.Indent lib_sysv.Variables package/neardal/0001-lib-neardal.h-fix-build-with-gcc-10.patch lib_patch.Upstream package/netatalk/S50netatalk lib_sysv.EmptyLastLine lib_sysv.Indent lib_sysv.Variables package/netcat/0001-signed-bit-counting.patch lib_patch.Sob lib_patch.Upstream -package/netopeer2/S52netopeer2 Shellcheck lib_sysv.Variables package/netperf/0001-src-nettest_omni.c-fix-compilation-with-GCC10.patch lib_patch.Upstream package/netplug/0001-makefile-flags.patch lib_patch.Sob lib_patch.Upstream package/netplug/0002-add-missing-time-include.patch lib_patch.Upstream
package/netopeer2/S52netopeer2-server renamed from package/netopeer2/S52netopeer2 +1 -1
@@ -7,7 +7,7 @@ NETOPEER2_SERVER_ARGS="" start() { printf 'Starting %s: ' "$DAEMON" - + # shellcheck disable=SC2086 # we need the word splitting start-stop-daemon -S -q -p $PIDFILE -x "/usr/sbin/$DAEMON" \ -- $NETOPEER2_SERVER_ARGS status=$?
package/netopeer2/netopeer2.mk +2 -2
@@ -29,8 +29,8 @@ NETOPEER2_MAKE_ENV = \ SYSREPO_SHM_PREFIX=$(NETOPEER2_SYSREPO_SHM_PREFIX) define NETOPEER2_INSTALL_INIT_SYSV - $(INSTALL) -m 755 -D package/netopeer2/S52netopeer2 \ - $(TARGET_DIR)/etc/init.d/S52netopeer2 + $(INSTALL) -m 755 -D $(NETOPEER2_PKGDIR)/S52netopeer2-server \ + $(TARGET_DIR)/etc/init.d/S52netopeer2-server endef # The host sysrepo used to install the netopeer2 modules will leave
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 7/9 package/netopeer2: bump to version 2.2.31
In reply to Heiko ThieryAdd select for BR2_PACKAGE_LIBCURL since this is a requirement for libnetconf2 to add TLS_SSH support. New options to set the ssh authorized keys format and to enable/disable calling the syrepo setup script are added.
---
v3: (after review comments from Thomas Pettazoni)
- remove 'select BR2_PACKAGE_OPENSSL' since it is now required by libnetconf2 unconditionally
- fix typo in help text for BR2_PACKAGE_NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT
- change SSH_AUTHORIZED_KEYS_FORMAT setting
package/netopeer2/Config.in | 17 +++++++++++++++-- package/netopeer2/netopeer2.hash | 2 +- package/netopeer2/netopeer2.mk | 9 ++++++++- 3 files changed, 24 insertions(+), 4 deletions(-)
package/netopeer2/Config.in +15 -2
@@ -14,9 +14,9 @@ config BR2_PACKAGE_NETOPEER2 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # sysrepo select BR2_PACKAGE_LIBNETCONF2 select BR2_PACKAGE_LIBSSH - select BR2_PACKAGE_LIBSSH_SERVER # For libnetconf2 to have SSH + select BR2_PACKAGE_LIBSSH_SERVER # For libnetconf2 to have SSH/TLS support + select BR2_PACKAGE_LIBCURL # For libnetconf2 to have SSH/TLS support select BR2_PACKAGE_LIBYANG - select BR2_PACKAGE_OPENSSL # For libnetconf2 to have TLS select BR2_PACKAGE_SYSREPO help Netopeer2 is a set of tools implementing network configuration
@@ -33,4 +33,17 @@ config BR2_PACKAGE_NETOPEER2_CLI help Enable netopeer2 CLI. +config BR2_PACKAGE_NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT + string "ssh authorized keys format" + help + sshd-like pattern (with '%h', '%u', '%U') for determining + path to users SSH authorized_keys file + +config BR2_PACKAGE_NETOPEER2_SYSREPO_SETUP + bool "sysrepo modules setup" + default y + help + Install required sysrepo modules with their default + configuration into sysrepo using a script + endif
package/netopeer2/netopeer2.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 2b1daac037f18c303e0c0dc3318ba30196459472e4c59f2f8547ee74d4cdf31d netopeer2-2.1.49.tar.gz +sha256 99c4827626852f9d4028330a79efa0b291580aceb0bfd8ae9aaf4ecea66ccc3b netopeer2-2.2.31.tar.gz sha256 b46f161fbdcf127d3ef22602e15958c3092fe3294f71a2dc8cdf8f6689cba95b LICENSE
package/netopeer2/netopeer2.mk +8 -1
@@ -4,7 +4,7 @@ # ################################################################################ -NETOPEER2_VERSION = 2.1.49 +NETOPEER2_VERSION = 2.2.31 NETOPEER2_SITE = $(call github,CESNET,Netopeer2,v$(NETOPEER2_VERSION)) NETOPEER2_DL_SUBDIR = netopeer2 NETOPEER2_LICENSE = BSD-3-Clause
@@ -17,8 +17,15 @@ endif NETOPEER2_CONF_OPTS = \ -DBUILD_CLI=$(if $(BR2_PACKAGE_NETOPEER2_CLI),ON,OFF) \ + -DSYSREPO_SETUP=$(if $(BR2_PACKAGE_NETOPEER2_SYSREPO_SETUP),ON,OFF) \ -DENABLE_TESTS=OFF +NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT = $(call qstrip,$(BR2_PACKAGE_NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT)) +ifneq ($(NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT),) +NETOPEER2_CONF_OPTS += \ + -DSSH_AUTHORIZED_KEYS_FORMAT="$(NETOPEER2_SSH_AUTHORIZED_KEYS_FORMAT)" +endif + # Set a build specific SYSREPO_SHM_PREFIX to ensure we can safely delete the # files. This also ensures that concurrent parallel builds will not be # affected mutualy.
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 8/9 support/testing/tests/package/test_sysrepo.py: add new test
In reply to Heiko Thiery--- DEVELOPERS | 1 + support/testing/tests/package/test_sysrepo.py | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 support/testing/tests/package/test_sysrepo.py
DEVELOPERS +1 -0
@@ -1389,6 +1389,7 @@ F: package/rauc/ F: package/sysrepo/ F: support/testing/tests/package/sample_python_yamllint.py F: support/testing/tests/package/test_python_yamllint.py +F: support/testing/tests/package/test_sysrepo.py N: Hervé Codina <[email protected]> F: package/alchemy/
support/testing/tests/package/test_sysrepo.py new file +25 -0
@@ -0,0 +1,25 @@ +import os + +import infra.basetest + + +class TestSysrepo(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_CPIO=y + BR2_PACKAGE_SYSREPO=y + """ + + def test_run(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + self.assertRunOk("sysrepoctl -h") + self.assertRunOk("sysrepoctl -l") + + self.assertRunOk("sysrepocfg -h") + self.assertRunOk('sysrepocfg -X -d operational -x "/sysrepo-monitoring:sysrepo-state"') + self.assertRunOk('sysrepocfg -X -d operational -x "/sysrepo-monitoring:sysrepo-state" -f json')
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 9/9 support/testing/tests/package/test_netopeer2.py: add new test
In reply to Heiko Thiery--- DEVELOPERS | 1 + .../testing/tests/package/test_netopeer2.py | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 support/testing/tests/package/test_netopeer2.py
DEVELOPERS +1 -0
@@ -1389,6 +1389,7 @@ F: package/rauc/ F: package/sysrepo/ F: support/testing/tests/package/sample_python_yamllint.py F: support/testing/tests/package/test_python_yamllint.py +F: support/testing/tests/package/test_netopeer2.py F: support/testing/tests/package/test_sysrepo.py N: Hervé Codina <[email protected]>
support/testing/tests/package/test_netopeer2.py new file +40 -0
@@ -0,0 +1,40 @@ +import os +import time + +import infra.basetest + + +class TestNetopeer2(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_CPIO=y + BR2_PACKAGE_NETOPEER2=y + BR2_PACKAGE_NETOPEER2_CLI=y + """ + + def run_netopeer_cli_cmd(self, cmds): + cmd = "netopeer2-cli <<EOF\n" + cmd += "\n".join(cmds) + cmd += "\nEOF" + self.assertRunOk(cmd) + + def test_run(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + # The daemon takes some time to startup + time.sleep(2) + + # Check if the Daemon is running + self.assertRunOk("ls /var/run/netopeer2-server.pid") + self.assertRunOk("ps aux | grep [n]etopeer2-server") + + # Run CLI + help_command = [ + "help", + "quit", + ] + self.run_netopeer_cli_cmd(help_command)
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot