cgroups-resource-control automated

medium

Image Types:
basesdk-amd64 / hmi-armhf / hmi-amd64 / sdk-amd64
Image Deployment:
APT, OSTree
Type:
functional

Description

Run cgroup resource control tests


Pre Conditions

  1. Clone the tests repository from another computer (Note that the branch being tested may change depending on the release, please make sure to clone the correct branch for the release in question):
  2. $ git clone --branch apertis/v2024dev3 https://gitlab.apertis.org/tests/cgroups-resource-control.git
  3. Copy the test directory cgroups-resource-control to the target device:
  4. $ DUT_IP=<device-ip>
    $ scp -r cgroups-resource-control user@$DUT_IP:
  5. Log into the target device:
  6. $ ssh user@$DUT_IP
  7. If running inside VirtualBox, disable the host I/O cache under "storage" in the image settings. Not doing so can cause the test_blkio_* tests to fail.

Execution Steps

  1. Enter test directory:
  2. $ cd cgroups-resource-control
  3. Execute the following commands:
  4. $ common/run-test-in-systemd --name=cpu-shares --timeout=900 env DEBUG=2 ./cgroups-resource-control.sh test_cpu_shares
    $ common/run-test-in-systemd --name=memory-limits --timeout=900 env DEBUG=2 ./cgroups-resource-control.sh test_memory_limits
    $ common/run-test-in-systemd --name=memory-threshold-notification --timeout=900 env DEBUG=2 ./cgroups-resource-control.sh test_memory_threshold_notification
    $ common/run-test-in-systemd --name=blkio-weights-random-read --timeout=900 env DEBUG=2 ./cgroups-resource-control.sh test_blkio_weights_random_read
    $ common/run-test-in-systemd --name=blkio-weights-seq-read --timeout=900 env DEBUG=2 ./cgroups-resource-control.sh test_blkio_weights_sequential_read
    $ common/run-test-in-systemd --name=network-cgroup-prio-class --timeout=900 env DEBUG=2 ./cgroups-resource-control.sh test_network_cgroup_priority_classification

Expected

The output should be similar to that:

>>> Test setup successfully!

>>> Running test 'test_cpu_shares' ... PASS

>>> Running test 'test_memory_limits' ... PASS

>>> Running test 'test_memory_threshold_notification' ... PASS

>>> Running test 'test_blkio_weights_random_read' ... PASS

>>> Running test 'test_blkio_weights_sequential_read' ... PASS

>>> Running test 'test_network_cgroup_priority_classification' ... PASS

>>> All tests PASSED successfully!

If any test failed, they will be listed instead of the success message:

>>> The following tests FAILED:

[list of tests]