-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
- Loading branch information
Showing
28 changed files
with
2,224 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.