better mk test
This commit is contained in:
parent
2b6c15d87f
commit
d67cd5c33c
5 changed files with 16 additions and 13 deletions
|
|
@ -1,9 +1,6 @@
|
||||||
#include "stdinc.h"
|
#include "stdinc.h"
|
||||||
#include "dat.h"
|
#include "dat.h"
|
||||||
#include "fns.h"
|
#include "fns.h"
|
||||||
#ifndef ODIRECT
|
|
||||||
#define ODIRECT 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
void
|
||||||
usage(void)
|
usage(void)
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,10 @@ ainstall:V: ${TARG:%=%.ainstall}
|
||||||
test:VQ: ${TARG:%=o.%}
|
test:VQ: ${TARG:%=o.%}
|
||||||
slay o.venti|rc
|
slay o.venti|rc
|
||||||
vtmp=/home/tmp
|
vtmp=/home/tmp
|
||||||
|
test -f $vtmp/arena || dd bs=1048576 count=100 if=/dev/zero of=$vtmp/arena
|
||||||
|
test -f $vtmp/bloom || dd bs=1048576 count=10 if=/dev/zero of=$vtmp/bloom
|
||||||
|
test -f $vtmp/isect || dd bs=1048576 count=10 if=/dev/zero of=$vtmp/isect
|
||||||
|
test -f $vtmp/check || dd bs=1048576 count=10 if=/dev/zero of=$vtmp/check
|
||||||
echo '**********' FMTARENAS
|
echo '**********' FMTARENAS
|
||||||
./o.fmtarenas -a 40M -b 8k arenas $vtmp/arena
|
./o.fmtarenas -a 40M -b 8k arenas $vtmp/arena
|
||||||
echo '**********' FMTBLOOM
|
echo '**********' FMTBLOOM
|
||||||
|
|
@ -101,20 +105,21 @@ test:VQ: ${TARG:%=o.%}
|
||||||
echo isect $vtmp/isect
|
echo isect $vtmp/isect
|
||||||
echo arenas $vtmp/arena
|
echo arenas $vtmp/arena
|
||||||
echo bloom $vtmp/bloom
|
echo bloom $vtmp/bloom
|
||||||
echo webroot $HOME/src/venti/www
|
echo webroot $PLAN9/src/cmd/venti/srv/www
|
||||||
echo mem 64M
|
echo mem 64M
|
||||||
echo icmem 64M
|
echo icmem 64M
|
||||||
echo bcmem 64M
|
echo bcmem 64M
|
||||||
|
echo queuewrites
|
||||||
|
echo addr 'tcp!*!17034'
|
||||||
|
echo httpaddr 'tcp!*!8001'
|
||||||
) >vtmp.conf
|
) >vtmp.conf
|
||||||
echo '**********' FMTINDEX
|
echo '**********' FMTINDEX
|
||||||
./o.fmtindex vtmp.conf
|
./o.fmtindex vtmp.conf
|
||||||
echo '**********' VENTI
|
echo '**********' VENTI
|
||||||
# ./o.venti -c vtmp.conf -B 64M -I 64M -C 64M -a 'tcp!*!17034' -h 'tcp!*!8001' >a 2>&1 &
|
./o.venti -c vtmp.conf >a 2>&1
|
||||||
./o.venti -c vtmp.conf -a 'tcp!*!17034' -h 'tcp!*!8001' >a 2>&1 &
|
|
||||||
sleep 5
|
|
||||||
echo '**********' VAC
|
echo '**********' VAC
|
||||||
venti='tcp!127.0.0.1!17034' export venti
|
venti='tcp!127.0.0.1!17034' export venti
|
||||||
9 time vac /usr/local/plan9 >a.vac
|
9 time vac /usr/local/plan9/src >a.vac
|
||||||
case ${websync:-no} in
|
case ${websync:-no} in
|
||||||
yes)
|
yes)
|
||||||
echo '**********' SYNC VIA WEB
|
echo '**********' SYNC VIA WEB
|
||||||
|
|
@ -132,7 +137,7 @@ test:VQ: ${TARG:%=o.%}
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo '**********' CHECKINDEX
|
echo '**********' CHECKINDEX
|
||||||
./o.checkindex -B64M vtmp.conf /home/tmp/check >check.out
|
./o.checkindex -B64M vtmp.conf $vtmp/check >check.out
|
||||||
wc check.out
|
wc check.out
|
||||||
|
|
||||||
luadisk.o: luadisk.c
|
luadisk.o: luadisk.c
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ initiebucks(Part *part, int bits, u32int size)
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
ib->xbuf = MKN(u8int, size * ((1 << bits)+1));
|
ib->xbuf = MKN(u8int, size * ((1 << bits)+1));
|
||||||
ib->buf = (u8int*)(((ulong)ib->xbuf+size-1)&~(ulong)(size-1));
|
ib->buf = (u8int*)(((uintptr)ib->xbuf+size-1)&~(uintptr)(size-1));
|
||||||
if(ib->buf == nil){
|
if(ib->buf == nil){
|
||||||
seterr(EOk, "out of memory allocating sorting buckets' buffers");
|
seterr(EOk, "out of memory allocating sorting buckets' buffers");
|
||||||
freeiebucks(ib);
|
freeiebucks(ib);
|
||||||
|
|
@ -292,7 +292,7 @@ sortiebuck(IEBucks *ib, int b)
|
||||||
if(n == TWID32)
|
if(n == TWID32)
|
||||||
return TWID32;
|
return TWID32;
|
||||||
qsort(ib->buf, n, IEntrySize, ientrycmp);
|
qsort(ib->buf, n, IEntrySize, ientrycmp);
|
||||||
if(writepart(ib->part, ib->off, ib->buf, n * IEntrySize) < 0){
|
if(writepart(ib->part, ib->off, ib->buf, n*IEntrySize) < 0){
|
||||||
seterr(EOk, "can't write sorted bucket: %r");
|
seterr(EOk, "can't write sorted bucket: %r");
|
||||||
return TWID32;
|
return TWID32;
|
||||||
}
|
}
|
||||||
|
|
@ -361,7 +361,7 @@ readiebuck(IEBucks *ib, int b)
|
||||||
// if(ib->bucks[b].total)
|
// if(ib->bucks[b].total)
|
||||||
// fprint(2, "\tbucket %d: %d entries\n", b, ib->bucks[b].total/IEntrySize);
|
// fprint(2, "\tbucket %d: %d entries\n", b, ib->bucks[b].total/IEntrySize);
|
||||||
while(head != TWID32){
|
while(head != TWID32){
|
||||||
if(readpart(ib->part, (u64int)head * ib->size, &ib->buf[n], m + U32Size) < 0){
|
if(readpart(ib->part, (u64int)head * ib->size, &ib->buf[n], m+U32Size) < 0){
|
||||||
seterr(EOk, "can't read index sort bucket: %r");
|
seterr(EOk, "can't read index sort bucket: %r");
|
||||||
return TWID32;
|
return TWID32;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ threadmain(int argc, char *argv[])
|
||||||
if(argc != 1)
|
if(argc != 1)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
|
ventifmtinstall();
|
||||||
if(initventi(argv[0], &conf) < 0)
|
if(initventi(argv[0], &conf) < 0)
|
||||||
sysfatal("can't init venti: %r");
|
sysfatal("can't init venti: %r");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ fmtzbinit(Fmt *f, ZBlock *b)
|
||||||
f->nfmt = 0;
|
f->nfmt = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ROUNDUP(p, n) ((void*)(((ulong)(p)+(n)-1)&~(ulong)((n)-1)))
|
#define ROUNDUP(p, n) ((void*)(((uintptr)(p)+(n)-1)&~(uintptr)((n)-1)))
|
||||||
|
|
||||||
static char zmagic[] = "1234567890abcdefghijkl";
|
static char zmagic[] = "1234567890abcdefghijkl";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue