1 fb1a36c0 2022-01-09 op include "lib.9ps"
3 a0ec53a2 2022-01-09 op testing "if version works" {
4 fb1a36c0 2022-01-09 op send(Tversion, notag, msize, np2000)
6 fb1a36c0 2022-01-09 op assert m.type == Rversion
9 6be59daa 2022-05-22 op testing "that fails with an msize too small" {
10 6be59daa 2022-05-22 op send(Tversion, notag, 64:u32, np2000)
12 6be59daa 2022-05-22 op assert m.type == Rversion
14 6be59daa 2022-05-22 op # we can't check if the replied version is "unknown" because
15 6be59daa 2022-05-22 op # of a limitation of 9pscript... instead, we'll try to attach
16 6be59daa 2022-05-22 op # and expect a failure.
17 6be59daa 2022-05-22 op attach(0, nofid, "op", "/")
18 6be59daa 2022-05-22 op should-fail recv() : "the connection should have been closed"
21 a0ec53a2 2022-01-09 op testing "fails when sending a R-message" {
22 fb1a36c0 2022-01-09 op send(Rversion, notag, msize, np2000)
23 fb1a36c0 2022-01-09 op should-fail recv() : "the connection should have been closed"
26 a0ec53a2 2022-01-09 op testing "multiple attach" {
27 fb1a36c0 2022-01-09 op version(msize, np2000)
31 fb1a36c0 2022-01-09 op m.type == Rversion
32 fb1a36c0 2022-01-09 op m.tag == notag
33 fb1a36c0 2022-01-09 op m.msize <= msize
39 fb1a36c0 2022-01-09 op # attach the first fid
40 fb1a36c0 2022-01-09 op attach(fid1, nofid, "op", "/")
43 fb1a36c0 2022-01-09 op m.type == Rattach
44 fb1a36c0 2022-01-09 op m.qid.type == QTDIR
47 fb1a36c0 2022-01-09 op # attach the second fid
48 fb1a36c0 2022-01-09 op attach(fid2, nofid, "op", "/")
51 fb1a36c0 2022-01-09 op m.type == Rattach
52 fb1a36c0 2022-01-09 op m.qid.type == QTDIR
56 a0ec53a2 2022-01-09 op testing "don't close used qids" {
59 fb1a36c0 2022-01-09 op walk(0, 2, "dir")
63 fb1a36c0 2022-01-09 op expect(Rclunk)
65 fb1a36c0 2022-01-09 op walk(2, 3, "a-file")
69 fb1a36c0 2022-01-09 op expect(Rclunk)
71 fb1a36c0 2022-01-09 op open(3, OREAD)