- For feedback, please email [email protected].
- If you like the tool, please star it to attract more people's interests.
** Now you can test bare metal with simple configuration, see commit 87697211e3a96aaec946baa57e9b18f6d31401f8 **
** Done: recently I started to move the code to python so it is easier to support more complicated use workflow. cxl-tool.py is the new main file.**
1. Updated DCD test workflow; 2. Add mctp setup; 3. Add ras related test support; 4. ...
NOTE:
- the tool needs python3 and some other packages. Before starting to use it.
- Make sure you have git, ssh, python3, python-is-python3, gdb, gcc installed.
- Also, before creating the qemu image, generate ssh key first with ssh-keygen on the host if not already exist.
- The created image uses the public key to enable passwordless access.
- download cxl-test-tool from github;
- Install packages needed (python3, python-is-python3, ssh);
- Generate ssh key if not already (for keyless access to the VM);
- cp run_vars.example .vars.config;
- Configure .vars.config as needed;
- setup QEMU: ./cxl-tool.py --setup-qemu (If ninja not found, check the right location is pointed for ninja)
- Create Qemu image for VM: ./cxl-tool.py --create-image
- setup Kernel: ./cxl-tool.py --setup-kernel
- Start a VM with basic CXL topology: ./cxl-tool.py --run
- login to the VM by: ./cxl-tool.py --login
- Enjoy and explore more with the tool ...
All the run configuration options are defined in .vars.config. This options will control where the directory of qemu, kernel, and which qemu image we want to use. Also, all the URLs related to git clone operation is defined there. The easiest way to generate the file is to copy run_vars.example and make the change as needed.
- qemu launch command string is stored: /tmp/cmd
- qemu topology used: /tmp/topo
- qemu run output: /tmp/qemu.log
bash cxl-tool.sh --create-image --image /tmp/qemu.img
This will generate qcow2 image under /tmp/ that can be used by the following steps.
bash cxl-tool.sh --setup-qemu
bash cxl-tool.sh --build-qemu
bash cxl-tool.sh --setup-kernel
bash cxl-tool.sh --deploy-kernel
bash cxl-tool.sh --run -A kvm -T m2
bash cxl-tool.sh --run -A kvm --create-topo
bash cxl-tool.sh --install-ndctl
bash cxl-tool.sh --cxl
bash cxl-tool.sh --qdb
bash cxl-tool.sh --kdb
bash cxl-tool.sh --ndb "cxl list"
bash cxl-tool.sh --C "commands to execute in vm"
bash cxl-tool.sh --reset/run/poweroff/shutdown
bash cxl-tool.sh --create-dcR
bash cxl-tool.sh --issue-qmp qmp_file
This command can be used for poison injection, dc extent add/release
bash cxl-tool.sh --help
- Apply the patch test-workflows/0001-qapi-cxl.json-Add-QMP-interfaces-to-print-out-accept.patch on top of qemu source code which have DCD emulation support;
- Create a cxl topology that has DCD support (only single dcd device tested) in .cxl-topology.xml;
- run test
bash test-workflows/dcd-test.sh or bash test-workflows/dcd-test.sh -r (Generate add/release dc extent sequence randomly)