Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ mkdir -p /tmp/xenvm.d
./xenvm.native host-create /dev/djstest host1 --configdir /tmp/xenvm.d $MOCK_ARG
./xenvm.native host-connect /dev/djstest host1 --configdir /tmp/xenvm.d $MOCK_ARG
cat test.local_allocator.conf.in | sed -r "s|@BIGDISK@|$LOOP|g" | sed -r "s|@HOST@|host1|g" > test.local_allocator.host1.conf
./local_allocator.native --daemon --config ./test.local_allocator.host1.conf $MOCK_ARG
./local_allocator.native --config ./test.local_allocator.host1.conf $MOCK_ARG > local_allocator.host2.log &

sleep 30 # the local allocator daemonizes too soon

Expand All @@ -62,7 +62,7 @@ sleep 30 # the local allocator daemonizes too soon
./xenvm.native host-create /dev/djstest host2 --configdir /tmp/xenvm.d $MOCK_ARG
./xenvm.native host-connect /dev/djstest host2 --configdir /tmp/xenvm.d $MOCK_ARG
cat test.local_allocator.conf.in | sed -r "s|@BIGDISK@|$LOOP|g" | sed -r "s|@HOST@|host2|g" > test.local_allocator.host2.conf
./local_allocator.native --config ./test.local_allocator.host2.conf $MOCK_ARG > /dev/null &
./local_allocator.native --config ./test.local_allocator.host2.conf $MOCK_ARG > local_allocator.host2.log &

sleep 30
./xenvm.native host-list /dev/djstest --configdir /tmp/xenvm.d $MOCK_ARG
Expand Down
2 changes: 1 addition & 1 deletion test.local_allocator.conf.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(
(socket /tmp/@HOST@-socket)
(allocation_quantum 16)
(localJournal /tmp/@HOST@-localJournal)
(localJournal @HOST@-localJournal)
(devices (@BIGDISK@))
(toLVM @HOST@-toLVM)
(fromLVM @HOST@-fromLVM)
Expand Down
23 changes: 15 additions & 8 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ cat test.xenvmd.conf.in | sed -r "s|@BIGDISK@|$LOOP|g" > test.xenvmd.conf
mkdir -p /etc/xenvm.d
BISECT_FILE=_build/xenvm.coverage ./xenvm.native format $LOOP --vg djstest $MOCK_ARG
BISECT_FILE=_build/xenvmd.coverage ./xenvmd.native --config ./test.xenvmd.conf --daemon

export BISECT_FILE=_build/xenvm.coverage

./xenvm.native set-vg-info --pvpath $LOOP -S /tmp/xenvmd djstest --local-allocator-path /tmp/xenvm-local-allocator --uri file://local/services/xenvmd/djstest $MOCK_ARG
Expand Down Expand Up @@ -88,20 +87,28 @@ sleep 30

./xenvm.native host-list /dev/djstest $MOCK_ARG

xenvmdpid=`pidof xenvmd.native`
#shutdown
./xenvm.native lvchange -an /dev/djstest/live $MOCK_ARG
./xenvm.native shutdown /dev/djstest $MOCK_ARG


wait $(pidof xenvmd.native)
while [ -d /proc/$xenvmdpid ];
do
sleep 1;
done

echo Generating bisect report-- this fails on travis
(cd _build; bisect-report xenvm*.out -summary-only -html /vagrant/report/ || echo Ignoring bisect-report failure)
echo Sending to coveralls-- this only works on travis
`opam config var bin`/ocveralls --prefix _build _build/xenvm*.out --send || echo "Failed to upload to coveralls"

dmsetup remove_all
dd if=/dev/zero of=$LOOP bs=1M count=128
losetup -d $LOOP
dd if=/dev/zero of=$CHENGZLOOP bs=1M count=128
losetup -d $CHENGZLOOP
rm -f localJournal bigdisk *.out chengzDisk
if [ "$USE_MOCK" -eq "0" ]; then
dmsetup remove_all
dd if=/dev/zero of=$LOOP bs=1M count=128
losetup -d $LOOP
dd if=/dev/zero of=$CHENGZLOOP bs=1M count=128
losetup -d $CHENGZLOOP
fi

rm -f localJournal bigdisk *.out chengzDisk
2 changes: 1 addition & 1 deletion test/common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ let tib = Int64.(gib * kib)
module Client = Xenvm_client.Client

let with_temp_file fn =
let filename = "/tmp/vg" in
let filename = Filename.concat (Unix.getcwd ()) "vg" in
let f = Unix.openfile filename [Unix.O_CREAT; Unix.O_RDWR; Unix.O_TRUNC] 0o644 in
(* approximately 10000 4MiB extents for volumes, 100MiB for metadata and
overhead *)
Expand Down