commit a47c234bedbcc16108a0e4f03b6f333ef72729c8 from: Omar Polo date: Tue Dec 14 22:08:35 2021 UTC add a test that calls attach multiple times commit - 32b8add4cfa7e7c66ac6be38b2cc956880dde08c commit + a47c234bedbcc16108a0e4f03b6f333ef72729c8 blob - a721eafb3fdc33f6e8139e95953de7457354ef17 blob + 6ae5aae937d3c9de45dbf38b6b8ce20c659438a1 --- regress/misc-suite.9ps +++ regress/misc-suite.9ps @@ -10,3 +10,33 @@ testing "fails when sending a R-message" dir "./root" send(Rversion, notag, msize, np2000) should-fail recv() : "the connection should have been closed" } + +testing "multiple attach" dir "./root" { + version(msize, np2000) + + m = recv() + assert ( + m.type == Rversion + m.tag == notag + m.msize == msize + ) + + fid1 = 0 + fid2 = 1 + + # attach the first fid + attach(fid1, nofid, "op", "/") + m = recv() + assert ( + m.type == Rattach + m.qid.type == QTDIR + ) + + # attach the second fid + attach(fid2, nofid, "op", "/") + m = recv() + assert ( + m.type == Rattach + m.qid.type == QTDIR + ) +}