aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2016-07-13 22:50:15 +0200
committerAlex Auvolat <alex@adnab.me>2016-07-13 22:50:15 +0200
commit62a023ba570bac31a952d574f834249dee6c3d11 (patch)
treea0959d5e59659940524132707dadf490cb22abd4 /src/tests
parent360da84db0d7165c84d160b518f39cd16006c758 (diff)
downloadkogata-62a023ba570bac31a952d574f834249dee6c3d11.tar.gz
kogata-62a023ba570bac31a952d574f834249dee6c3d11.zip
Fix tests
Diffstat (limited to 'src/tests')
-rwxr-xr-xsrc/tests/ktests/run_qemu_test.sh2
-rw-r--r--src/tests/utests/fs2/test.c2
-rwxr-xr-xsrc/tests/utests/run_qemu_test.sh5
-rw-r--r--src/tests/utests/subfs/test.c2
4 files changed, 5 insertions, 6 deletions
diff --git a/src/tests/ktests/run_qemu_test.sh b/src/tests/ktests/run_qemu_test.sh
index 92cf10a..4249a96 100755
--- a/src/tests/ktests/run_qemu_test.sh
+++ b/src/tests/ktests/run_qemu_test.sh
@@ -7,7 +7,7 @@ MAPFILE=$3
RESULTFILE=`mktemp`
PIDFILE=`mktemp`
-(timeout 10s qemu-system-i386 -kernel $BINFILE -initrd $MAPFILE -serial stdio -m 16 -display none 2>/dev/null \
+(timeout 3s qemu-system-i386 -kernel $BINFILE -initrd $MAPFILE -serial stdio -m 16 -display none 2>/dev/null \
& echo $! >$PIDFILE) \
| tee >(grep -m 1 "TEST-" >$RESULTFILE; kill -INT `cat $PIDFILE`) > $LOGFILE
diff --git a/src/tests/utests/fs2/test.c b/src/tests/utests/fs2/test.c
index 7cc5fb6..0acf11d 100644
--- a/src/tests/utests/fs2/test.c
+++ b/src/tests/utests/fs2/test.c
@@ -17,7 +17,7 @@ int main(int argc, char **argv) {
while (ent_no < 2) {
ASSERT (readdir(f, ent_no++, &x));
- ASSERT((!strcmp(x.name, "init.bin")) || (!strcmp(x.name, "kernel.map")));
+ ASSERT((!strcmp(x.name, "utest_fs2.bin")) || (!strcmp(x.name, "kernel.map")));
ASSERT(x.st.type == FT_REGULAR);
}
diff --git a/src/tests/utests/run_qemu_test.sh b/src/tests/utests/run_qemu_test.sh
index eb535ac..e806501 100755
--- a/src/tests/utests/run_qemu_test.sh
+++ b/src/tests/utests/run_qemu_test.sh
@@ -2,13 +2,12 @@
BINFILE=$1
LOGFILE=$2
-MAPFILE=$3
RESULTFILE=`mktemp`
PIDFILE=`mktemp`
-(timeout 10s qemu-system-i386 -kernel build/kernel.bin -append "init=io:/mod/`basename $BINFILE`" \
- -initrd "$BINFILE,$MAPFILE" -serial stdio -m 16 -display none 2>/dev/null \
+(timeout 3s qemu-system-i386 -kernel build/kernel.bin -append "init=io:/mod/`basename $BINFILE`" \
+ -initrd "$BINFILE,build/kernel.map" -serial stdio -m 16 -display none 2>/dev/null \
& echo $! >$PIDFILE) \
| tee >(grep -m 1 "TEST-" >$RESULTFILE; kill -INT `cat $PIDFILE`) >$LOGFILE
diff --git a/src/tests/utests/subfs/test.c b/src/tests/utests/subfs/test.c
index 5233ffe..52c1025 100644
--- a/src/tests/utests/subfs/test.c
+++ b/src/tests/utests/subfs/test.c
@@ -19,7 +19,7 @@ int main(int argc, char **argv) {
while (ent_no < 2) {
ASSERT (readdir(f, ent_no++, &x));
- ASSERT((!strcmp(x.name, "init.bin")) || (!strcmp(x.name, "kernel.map")));
+ ASSERT((!strcmp(x.name, "utest_subfs.bin")) || (!strcmp(x.name, "kernel.map")));
ASSERT(x.st.type == FT_REGULAR);
}