-
Notifications
You must be signed in to change notification settings - Fork 50
Testing
-
Build Quark
-
Create a Docker image:
-
Dockerfile:
FROM ubuntu:18.04 RUN apt update && apt install -y build-essential \ apt-utils \ bash \ vim \ libcap-dev \ libnuma1 \ libnuma-dev \ autoconf \ git \ pkg-config \ gdb WORKDIR /home/ RUN git clone https://github.com/linux-test-project/ltp.git WORKDIR ltp/ RUN make autotools && ./configure \ && make -C testcases/lib ENV PATH="${PATH}:/home/ltp/testcases/lib/" # #Uncomment and addapt for own test-script # #COPY qtest /home/ #RUN chmod +x /home/qtest #CMD ["/bin/bash", "/home/qtest"] # #Comment this out if you use the above # CMD ["/bin/bash"]
-
build:
docker build -t qltp:latest .
-
-
Run tests
-
Interactive:
-
Start container:
docker run --rm -it --runtime=quark qltp
-
Follow guide for signel tests: link.
-
-
Automated:
-
Create a script, e.g.:
#!/bin/bash ROOTDIR=/home/ltp/testcases KERNEL=${ROOTDIR}/kernel MEM=${KERNEL}/mem MEMTEST=(mem shmt vma vmtests) for dir in ${MEMTEST[@]};do testdir=${MEM}/${dir} make -C ${testdir} > /dev/null 2>&1 PATH=$PATH:${testdir} for file in ${testdir}/*;do if [[ -x ${file} ]];then ${file} fi done done
-
Adjust Dockerfile (see comments).
-
-
-
Building and running all the tests takes a long time - better to avoid it.
-
A test may cause the container to crush
-
Build Quark with debug symbols
-
Set log level to Debug for more information.
-
-
p: pass
-
f: fail
-
b: broken
-
xyz_n: TestName_subpart
-
Testcases:
-
kernel:
-
mem:
-
mem:
-
(p): mem02
-
(f):
-
-
shmt:
-
(p): shmt02, shmt03, shmt06_1, shmt06_3, shmt07, shmt08_1, shmt08_4, shmt08_1
-
(f): shmt04, shmt05, shmt06_02, shmt08_2, shmt08_3, shmt09_2
-
-
vma:
-
(p): vma04_1, vma04_4, vma04_5, vma05.sh_1
-
(f): vma01_1, vma04_2, vma04_3,
-
(b): vma02_1, vma02_2, vma05.sh_1
-
-
vmtest:
-
(p): data_space, stack_space
-
(f):
-
(b):
-
-
page:
-
(p): page01, page02
-
(f):
-
(b):
-
-
-
-