2010-08-16 20:35:54 +00:00
|
|
|
#!/bin/sh -x
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
#
|
|
|
|
# verify that a snap update on a parent realm will induce
|
|
|
|
# snap cap writeback for inodes child realms
|
|
|
|
#
|
|
|
|
|
|
|
|
mkdir a
|
|
|
|
mkdir a/b
|
|
|
|
mkdir a/.snap/a1
|
|
|
|
mkdir a/b/.snap/b1
|
|
|
|
echo asdf > a/b/foo
|
|
|
|
mkdir a/.snap/a2
|
|
|
|
# client _should_ have just queued a capsnap for writeback
|
|
|
|
ln a/b/foo a/b/bar # make the server cow the inode
|
|
|
|
|
|
|
|
echo "this should not hang..."
|
|
|
|
cat a/b/.snap/_a2_*/foo
|
|
|
|
echo "good, it did not hang."
|
|
|
|
|
2010-08-17 21:22:56 +00:00
|
|
|
rmdir a/b/.snap/b1
|
|
|
|
rmdir a/.snap/a1
|
|
|
|
rmdir a/.snap/a2
|
|
|
|
rm -r a
|
|
|
|
|
2010-09-17 15:09:19 +00:00
|
|
|
echo "OK"
|