History

eric loves regressions. w

npe committed 16 years ago

Commit b4c67d62 parents 358e671 ce289164 files · +51 −10Browse files

Unified · Split

4 files
  1. sys/src/cmd/uem/execfs.c +0 −3
  2. sys/src/cmd/uem/gangfs.c +0 −1
  3. sys/src/cmd/uem/mpipefs.c +4 −6
  4. sys/src/cmd/uem/tests/mpipefs.rc +47 −0
sys/src/cmd/uem/execfs.c+0−3
@@ -127,7 +127,6 @@ kickit(void) · 126 unmodified lines
127 DPRINT(DERR, "*ERROR*: Problem with cloneproc\n");127 DPRINT(DERR, "*ERROR*: Problem with cloneproc\n");
128 }128 }
129 129
130 chanclose(pidc);
131 chanfree(pidc);130 chanfree(pidc);
132 131
133 return pid;132 return pid;
@@ -328,9 +327,7 @@ fsclunk(Fid *f) · 194 unmodified lines
328static void327static void
329cleanup(Srv *)328cleanup(Srv *)
330{329{
331 chanclose(iochan);
332 chanfree(iochan);330 chanfree(iochan);
333 chanclose(clunkchan);
334 chanfree(clunkchan);331 chanfree(clunkchan);
335 free(srvctl);332 free(srvctl);
336 threadexitsall("done");333 threadexitsall("done");
sys/src/cmd/uem/gangfs.c+0−1
@@ -775,7 +775,6 @@ releasesessions(Gang *g) · 774 unmodified lines
775 775
776 for(count = 0; count < g->size; count++) {776 for(count = 0; count < g->size; count++) {
777 free(g->sess[count].path);777 free(g->sess[count].path);
778 chanclose(g->sess[count].chan);
779 chanfree(g->sess[count].chan);778 chanfree(g->sess[count].chan);
780 close(g->sess[count].fd);779 close(g->sess[count].fd);
781 }780 }
sys/src/cmd/uem/mpipefs.c+4−6
@@ -221,7 +221,6 @@ usage(void) · 220 unmodified lines
221static void221static void
222killall(Srv*)222killall(Srv*)
223{223{
224 chanclose(iochan);
225 chanfree(iochan);224 chanfree(iochan);
226 threadexitsall("killall");225 threadexitsall("killall");
227}226}
@@ -356,11 +355,9 @@ closebcasts(Mpipe *mp) · 128 unmodified lines
356{355{
357 Fidaux *c;356 Fidaux *c;
358 357
359 qlock(&mp->l);
360 for(c=mp->bcastr; c != nil; c=c->next) {358 for(c=mp->bcastr; c != nil; c=c->next) {
361 chanclose(c->chan);359 chanclose(c->chan);
362 }360 }
363 qunlock(&mp->l);
364}361}
365 362
366/* process mount options */363/* process mount options */
@@ -503,8 +500,10 @@ fsclunk(Fid *fid) · 136 unmodified lines
503 /* writer accounting and cleanup */ 500 /* writer accounting and cleanup */
504 if((fid->omode&OMASK) == OWRITE) {501 if((fid->omode&OMASK) == OWRITE) {
505 /* TODO: what do we do with outstanding requests? */502 /* TODO: what do we do with outstanding requests? */
503 DPRINT(DWRT, "---- fid %d writers now %d\n", fid->fid, mp->writers-1);
504 qlock(&mp->l);
506 mp->writers--;505 mp->writers--;
507 DPRINT(DWRT, "---- fid %d writers now %d\n", fid->fid, mp->writers);506
508 if((aux->state != FID_CTLONLY) && (mp->writers == 0)) {507 if((aux->state != FID_CTLONLY) && (mp->writers == 0)) {
509 for(count=0;count < mp->slots; count++)508 for(count=0;count < mp->slots; count++)
510 if(mp->rrchan[count]) {509 if(mp->rrchan[count]) {
@@ -514,6 +513,7 @@ fsclunk(Fid *fid) · 3 unmodified lines
514 if(mp->mode == MPTbcast)513 if(mp->mode == MPTbcast)
515 closebcasts(mp);514 closebcasts(mp);
516 }515 }
516 qunlock(&mp->l);
517 517
518 free(aux);518 free(aux);
519 fid->aux = nil;519 fid->aux = nil;
@@ -902,7 +902,6 @@ fsbcast(Req *r, Mpipe *mp) · 382 unmodified lines
902 if(!err)902 if(!err)
903 r->ofcall.count = r->ifcall.count;903 r->ofcall.count = r->ifcall.count;
904 904
905 chanclose(reterr);
906 chanfree(reterr);905 chanfree(reterr);
907 906
908 return err;907 return err;
@@ -1056,7 +1055,6 @@ parseheader(Req *r, Mpipe *mp, Fidaux *aux) · 147 unmodified lines
1056 else1055 else
1057 proccreate(splicefrom, sa, STACK);1056 proccreate(splicefrom, sa, STACK);
1058 err = recvp(sa->chan); /* sync */1057 err = recvp(sa->chan); /* sync */
1059 chanclose(sa->chan);
1060 chanfree(sa->chan);1058 chanfree(sa->chan);
1061 return err;1059 return err;
1062 break;1060 break;
sys/src/cmd/uem/tests/mpipefs.rc+47−0
@@ -290,6 +290,52 @@ fn spliceto { · 289 unmodified lines
290 rm -rf $TESTDIR/*290 rm -rf $TESTDIR/*
291}291}
292 292
293#
294# splice to chain to tests problem
295# experienced using multinode gangfs
296#
297
298fn splicetochain {
299 echo -n Testing spliceto chains...
300
301 # initialize test files
302 echo Hello Squidboy > $TESTDIR/test
303 echo > $TESTDIR/test1
304
305 # accomplish the test
306 # stage0 and stage1 feeds stage2 which feeds stage3
307 mount /srv/mpipe /n/stage0 s0
308 mount /srv/mpipe /n/stage1 s1
309 mount /srv/mpipe /n/stage2 s2
310 mount /srv/mpipe /n/stage3 s3
311 mp-writer -o /n/stage2/s2 /n/stage0/s0
312 mp-writer -o /n/stage2/s2 /n/stage1/s1
313 mp-writer -o /n/stage3/s3 /n/stage2/s2
314 mp-writer -o $TESTDIR/test1 /n/stage3/s3
315 echo one > /n/stage0/s0 &
316 echo two > /n/stage1/s1 &
317
318 sleep 1
319
320 unmount /n/stage0
321 unmount /n/stage1
322 unmount /n/stage2
323 unmount /n/stage3
324
325 # verify results
326 echo one > $TESTDIR/test2
327 echo two >> $TESTDIR/test2
328 if(! cmp -s $TESTDIR/test2 $TESTDIR/test1) {
329 echo FAILED: test1 not equal to test2
330 exit 'splicetochain: failed'
331 }
332
333 echo Success!
334
335 # cleanup
336 rm -rf $TESTDIR/*
337}
338
293#339#
294# Broadcast spliceto test340# Broadcast spliceto test
295#341#
@@ -342,6 +388,7 @@ splicefrom · 46 unmodified lines
342spliceto388spliceto
343splicetobcast389splicetobcast
344splicefrombcast390splicefrombcast
391splicetochain
345 392
346# Cleanup393# Cleanup
347rm -f $TESTDIR394rm -f $TESTDIR

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t