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
- 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):
- Copy the test directory cgroups-resource-control to the target device:
- Log into the target device:
- 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.
$ git clone --branch apertis/v2023dev1 https://gitlab.apertis.org/tests/cgroups-resource-control.git
$ DUT_IP=<device-ip>
$ scp -r cgroups-resource-control user@$DUT_IP:
$ ssh user@$DUT_IP
Execution Steps
- Enter test directory:
- Execute the following commands:
$ cd cgroups-resource-control
$ 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]