Skip to content

Commit

Permalink
gh action
Browse files Browse the repository at this point in the history
Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
  • Loading branch information
thehajime committed Jan 16, 2025
1 parent e4ca7c9 commit 1c3c424
Show file tree
Hide file tree
Showing 28 changed files with 2,218 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM alpine:3.20.3

ARG MODE=
ADD vmlinux /root/.
ADD inittab /etc/inittab
RUN mkdir /etc/init.d
ADD rcS /etc/init.d/.
RUN sed "s/\'/\"/g" /etc/profile > /.profile

ADD bench.sh /
ADD iperf3.sh /root/
ADD netperf-bench.sh /root/
ADD iperf3.static /root/
ADD do_getpid /root/.
ADD clone /root/.
ADD futex /root/.
ADD nullptr /root/.
ADD ctest /root/.
ADD stackp /root/.
ADD init_array /root/.
ADD entropy /root/.
ADD locale /root/.
ADD vdso_test /root/.
ADD pthread /root/.
ADD test-signal-restore /root/.
ADD Makefile /root/.
ADD lmbench2/ /lmbench2
ADD lmbench_run.sh /lmbench2/bin/x86_64-linux-gnulibc1/
ADD netperf /root/.


RUN apk update && apk add utmps-libs libtirpc curl make iperf3

RUN if [[ ${MODE} == "um-nommu" ]]; then mkdir -p setup && cd setup && curl -L -o output.zip \
'https://gitlab.alpinelinux.org/thehajime/aports/-/jobs/1641821/artifacts/download?file_type=archive' \
&& unzip output.zip ; fi
RUN if [[ ${MODE} == "um-nommu" ]]; then apk add --allow-untrusted \
setup/packages/main/x86_64/busybox-nommu-1.36.1-r29.apk \
setup/packages/main/x86_64/musl-nommu-1.2.5-r0.apk && rm -rf setup; fi

ENTRYPOINT ["/root/vmlinux", "vec0:transport=tap,ifname=tap100,depth=128,gro=1", "root=/dev/root", "rootflags=/", "rootfstype=hostfs", "rw", "mem=1024m", "loglevel=0", "init=/sbin/init"]
30 changes: 30 additions & 0 deletions .github/workflows/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
SRCS := clone.c futex.c nullptr.c ctest.c stackp.c do_getpid.c init_array.c entropy.c locale.c vdso_test.c pthread.c test-signal-restore.c
BKUP := exit.c noop.c
TARGETS := $(SRCS:.c=)

CFLAGS_exit = -nostdlib -pie -fPIE -fomit-frame-pointer
CFLAGS += -g -O0
all: ${TARGETS}

tests: ${TARGETS}
set +x
./clone host
./futex
./nullptr 1 0 || RET=$$? ; echo "code="$$RET && if [ "$$RET" -ne "139" ] ; then false ; fi
./nullptr 1 1 || RET=$$? ; echo "code="$$RET && if [ "$$RET" -ne "11" -a "$$RET" -ne "139" ] ; then false ; fi
./nullptr 0 0 || RET=$$? ; echo "code="$$RET && if [ "$$RET" -ne "139" ] ; then false ; fi
./nullptr 0 1 || RET=$$? ; echo "code="$$RET && if [ "$$RET" -ne "11" -a "$$RET" -ne "139" ] ; then false ; fi
./nullptr
echo "test" | ./ctest
./stackp
./entropy 10000
./locale
./vdso_test -c 10000
./test-signal-restore
./pthread
./pthread 100
./pthread 100 1
set -x

clean:
rm -f ${TARGETS}
16 changes: 16 additions & 0 deletions .github/workflows/bench.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

mount proc /proc -t proc
export PATH=/home:/sbin:/usr/sbin:/bin:/usr/bin


cd /lmbench2/bin/x86_64-linux-gnulibc1
sh lmbench_run.sh

/root/do_getpid -c 10000

make -C /root tests
RET=$?
echo $RET
echo $RET > /proc/exitcode
halt -f
Loading

0 comments on commit 1c3c424

Please sign in to comment.