summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaichi Hirono2016-11-14 18:31:21 -0600
committerDaichi Hirono2016-11-16 18:10:53 -0600
commit30e68088951f17ad54c1d15576835ff4eb622c4c (patch)
tree2798f1f86672712a3e16d35ca3e3bbf0c3046d09 /libappfuse/tests
parent335502453d9b37c9c853dd3ac904d945b04e01ee (diff)
downloadplatform-system-core-30e68088951f17ad54c1d15576835ff4eb622c4c.tar.gz
platform-system-core-30e68088951f17ad54c1d15576835ff4eb622c4c.tar.xz
platform-system-core-30e68088951f17ad54c1d15576835ff4eb622c4c.zip
Stops the loop when all files are closed.
The CL changes FuseBridgeLoop so that it exits when all files opened on the AppFuse mount point are closed. Note that the client code will unmount the FUSE mount point after the loop exits. Bug: 32260320 Test: libappfuse_test Change-Id: I4965fbb48de8a280c6306e70757a07376b1956a7
Diffstat (limited to 'libappfuse/tests')
-rw-r--r--libappfuse/tests/FuseBridgeLoopTest.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/libappfuse/tests/FuseBridgeLoopTest.cc b/libappfuse/tests/FuseBridgeLoopTest.cc
index bd503ebfb..e74d9e700 100644
--- a/libappfuse/tests/FuseBridgeLoopTest.cc
+++ b/libappfuse/tests/FuseBridgeLoopTest.cc
@@ -200,11 +200,16 @@ TEST_F(FuseBridgeLoopTest, FuseNotImpl) {
200TEST_F(FuseBridgeLoopTest, Proxy) { 200TEST_F(FuseBridgeLoopTest, Proxy) {
201 CheckProxy(FUSE_LOOKUP); 201 CheckProxy(FUSE_LOOKUP);
202 CheckProxy(FUSE_GETATTR); 202 CheckProxy(FUSE_GETATTR);
203 CheckProxy(FUSE_OPEN);
204 CheckProxy(FUSE_READ); 203 CheckProxy(FUSE_READ);
205 CheckProxy(FUSE_WRITE); 204 CheckProxy(FUSE_WRITE);
206 CheckProxy(FUSE_RELEASE);
207 CheckProxy(FUSE_FSYNC); 205 CheckProxy(FUSE_FSYNC);
206
207 // Invoke FUSE_OPEN and FUSE_RELEASE at last as the loop will exit when all files are closed.
208 CheckProxy(FUSE_OPEN);
209 CheckProxy(FUSE_RELEASE);
210
211 // Ensure the loop exits.
212 Close();
208} 213}
209 214
210} // namespace fuse 215} // namespace fuse