commit fbf5d101da23a9b8dddf3dfb34445cedd857dd22 from: Omar Polo date: Tue Dec 21 22:24:59 2021 UTC add a failing test spotted by cage, thanks! commit - a6036d0f379802f758a29f876bfade2bd53a3c40 commit + fbf5d101da23a9b8dddf3dfb34445cedd857dd22 blob - 3f0ab88efea020d89b51d482691cf307a99c9cd3 blob + fbd739c737535b61fafced6aab05e281b4d09b55 --- regress/lib.9ps +++ regress/lib.9ps @@ -51,6 +51,11 @@ proc walk-ok() { assert m.type == Rwalk } +proc expect(t) { + m = recv() + assert m.type == t +} + proc expect-error() { m = recv() assert m.type == Rerror blob - 6ae5aae937d3c9de45dbf38b6b8ce20c659438a1 blob + 08f401c4930cd4e4cf94ab0ca4ece3cff6e04a93 --- regress/misc-suite.9ps +++ regress/misc-suite.9ps @@ -40,3 +40,22 @@ testing "multiple attach" dir "./root" { m.qid.type == QTDIR ) } + +testing "don't close used qids" dir "./root" { + mount(0, "/") + + walk(0, 2, "dir") + expect(Rwalk) + + clunk(0) + expect(Rclunk) + + walk(2, 3, "a-file") + expect(Rwalk) + + clunk(2) + expect(Rclunk) + + open(3, OREAD) + expect(Ropen) +}