blob: afa2c0a2f79073503de5fce5c67590788cee70c0 [file] [log] [blame]
# This is p's 'ambiguity' example
#
# mountMT("/s1/a", "/s2/b")
# mountMT("/s2/b", "/s3/c")
# mount("/s3/c", "/s4")
#
# Bogdan points out that: 'we will actually have d == "" in the echo example
# below (since Serve only mounts endpoints without suffixes)'
#
# I'm not using any local names because its easier to not get confused
# this way.
#
# resolve("/s1/a") can now have 4 possible objects, the mount point in server1,
# the mount point in server2, the mount point in server3, and the object d in
# server4. When we make a call, like SetACL, how do we tell which one to
# modify? If we glob("/s1/a") we get:
#
# "s1/a", ["/s2/b"(mountpoint)]
# "s1/a", ["/s3/c"(mountpoint)]
# "s1/a", ["/s4"(mountpoint)]
set localaddr="--veyron.tcp.address=127.0.0.1:0"
root -- $localaddr
set r=$_
read $r
eval $r
set s1=$MT_NAME
root -- $localaddr
set r=$_
read $r
eval $r
set s2=$MT_NAME
root -- $localaddr
set r=$_
read $r
eval $r
set s3=$MT_NAME
mount $s1/a $s2/b 1h
wait $_
mount $s2/b $s3/c 1h
wait $_
echoServer -- $localaddr "Echo" $s3/c
set es_h=$_
# Returns the root and three mounts at s1/a.
ls $s1/...
set l=$_
eval $l
assert $RN 5
wait $l
# Returns the mount at s1/a.
ls $s1/a
set l=$_
eval $l
assert $RN 1
eval $l
assert $R0 $s1/a
wait $l
stop $es_h