Skip to content

Work In Progress Mender Integration Tests

Dan Walkes edited this page Nov 23, 2020 · 1 revision

Mender Standalone Install

These tests are only supported after https://github.com/BoulderAI/meta-mender-community/pull/1 (not yet merged)

For more information about standalone mode, see the Mender Documentation You can speed up testing and deployment for local installs using a http server on your build system. For instance:

python -m SimpleHTTPServer 8080

in the build directory of the Yocto build tree. Then to use with mender install:

MACHINE=jetson-tx2 mender -install http://<your-build-system-ip:8080/tmp/deploy/images/${MACHINE}/demo-image-base-${MACHINE}.mender
  1. Tegraflash the initial image.
  2. View logs with journalctl -u mender-client-commit
  • Ensure sure no warning or error messages are printed.
  1. Make a note of the current root partition mountpoint using df | grep mmcblk0p
  • The initial partition should be 1 after tegraflash
  1. For all platforms other than nano, examine the current boot slot using nvbootctrl get-current-slot
  • The initial slot should be 0 after tegraflash.
  1. Install the mender update file from the command line using mender -install
  2. Reboot
  3. View logs with journalctl -u mender-client-commit
  • Verify messages include "Committing update"
  • Verify no error or warning messages were included.
  1. Examine the current root partition mountpoint using df | grep mmcblk0p
  1. For all platforms other than nano, examine the current boot slot using nvbootctrl get-current-slot
  • The slot should be 1 after the first successful update.
  1. Reboot without updating
  2. View logs with journalctl -u mender-client-commit
  • Verify messages do not include "Committing update"
  • Verify no error or warning messages are printed
  1. Examine the current root partition mountpoint using df | grep mmcblk0p
  • The rootfs partition should not have changed, should match the APP_b partition as found above.
  1. For all platforms other than nano, examine the current boot slot using nvbootctrl get-current-slot
  • The slot should be 1 after the first successful update.
  1. Start a mender update using mender -install
  2. While update is in progress, power down the system.
  3. Reconnect power and boot the system.
  4. View logs with journalctl -u mender-client-commit
  • Verify messages do not include "Committing update"
  • Verify no error or warning messages are printed
  1. Examine the current root partition mountpoint using df | grep mmcblk0p
  • The root partition should not have changed.
  1. Install the mender update file from the command line using mender -install
  2. Reboot
  3. View logs with journalctl -u mender-client-commit
  • Verify messages include "Committing update"
  • Verify no error or warning messages were included.

Additional tests for TX2 u-boot platform

See logic in https://github.com/BoulderAI/meta-mender-community/pull/1 - this additional logic specific to TX2 and u-boot slot alignment is verified with this test case.

  1. After completing the tests above, force the system into the wrong boot slot with nvbootctrl set-active-boot-slot X where X is the opposite boot slot as the one returned by nvbootctrl get-current-slot
  2. Reboot the system
  3. View logs with journalctl -u mender-client-commit
  • Verify messages include a warning about partition mismatch and a request to reboot the device.
  1. Attempt to use mender -install to perform an update
  • Verify the update fails with message stating a partition mismatch was detected.
  1. Attempt to deploy an update via the mender server.
  • Verify the device is not available (mender client has stopped).
  1. Reboot
  2. View logs with journalctl -u mender-client-commit
  • Verify messages show successful validation of root filesystem partition and boot slots.
  • Verify no warning or error messages are printed.
  1. Perform an update with mender -install
  • Update succeeds

Uboot Tests

When changing uboot related software (for Nano and TX2), these tests help verify things are still working in u-boot land. This is a subset of the integration checklist found in the Mender manual. These tests require a serial port UART connection to debug U-boot.

  1. Set an environment variable from Linux using fw_printenv
fw_setenv test_from_linux 1
  1. Reboot and interrupt u-boot.
  2. Print the environment variable value
printenv test_from_linux
  • You should see a value of 1 printed for the variable from uboot.
  1. Create and save a u-boot variable
setenv test_from_uboot 1
saveenv
  1. Boot the system
run bootcmd
  1. From the linux terminal print the uboot value
fw_printenv test_from_uboot
  • You should see a value of 1 printed from Linux.