From 6b1f8aab398450d87c5103fab580936b3afb9682 Mon Sep 17 00:00:00 2001 From: Qingsong Chen Date: Fri, 16 May 2025 02:53:39 +0000 Subject: [PATCH] Add LTP syscall test to docker image --- tools/docker/Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index a195d95a6..73ad68333 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -291,6 +291,32 @@ WORKDIR /root/syscall_test RUN export BUILD_DIR=build && \ make ${BUILD_DIR}/syscall_test_bins +#= Build syscall test of Linux Test Project==================================== + +FROM build-base AS build-ltp + +WORKDIR /root +RUN apt update && apt-get install -y --no-install-recommends \ + autoconf \ + automake \ + pkg-config +RUN git clone --single-branch -b v20250130 https://github.com/asterinas/ltp.git +WORKDIR /root/ltp +RUN make autotools \ + && ./configure --prefix=/opt/ltp \ + && make -C testcases/kernel/syscalls \ + && make -C testcases/lib \ + && make -C runtest \ + && make -C pan \ + && make -C testcases/kernel/syscalls install \ + && make -C testcases/lib install \ + && make -C runtest install \ + && make -C pan install \ + && install -m 00755 ./runltp /opt/ltp/runltp \ + && install -m 00444 ./VERSION /opt/ltp/Version \ + && install -m 00755 ./ver_linux /opt/ltp/ver_linux \ + && install -m 00755 ./IDcheck.sh /opt/ltp/IDcheck.sh + #= Build busybox ============================================================== FROM build-base AS build-busybox @@ -341,6 +367,7 @@ RUN apt update && apt-get install -y --no-install-recommends \ RUN apt clean && rm -rf /var/lib/apt/lists/* # Prepare the system call test suite +COPY --from=build-ltp /opt/ltp /opt/ltp COPY --from=syscall_test /root/syscall_test/build/syscall_test_bins /root/syscall_test_bins ENV ASTER_PREBUILT_SYSCALL_TEST=/root/syscall_test_bins