| 1 |
CPUSET Tests |
| 2 |
============ |
| 3 |
|
| 4 |
* trigger-all.sh |
| 5 |
- a shell script designed to trigger most code paths in cpuset |
| 6 |
- as a side effect it can be used to check if something broke after a code |
| 7 |
change |
| 8 |
- procedure (as root): |
| 9 |
1) run trigger-all.sh with known-good version of cset utility, store output |
| 10 |
into a file |
| 11 |
2) re-run the same test with your changed version - use both Python 2 and 3 |
| 12 |
- storing script output into files |
| 13 |
3) compare these three files side by side (e.g. in vimdiff) looking for |
| 14 |
irregularities |
| 15 |
Hints: Use PYTHONIOENCODING=utf-8 to get correct output of test_util.py when |
| 16 |
redirected into pipe. Consider filtering out numbers from script output as |
| 17 |
they change (primarily PIDs) and typically form just noise. See |
| 18 |
run-trigger-all.sh for an example. |
| 19 |
|
| 20 |
* test_cset.py (run from trigger-all.sh) |
| 21 |
- the test assumes 4 CPUs |
| 22 |
- run test as root |
| 23 |
- set up a shield before running the test: |
| 24 |
cset shield -s -c 2-3 -k on |