diff options
author | Kyungwook Tak <k.tak@samsung.com> | 2016-07-05 13:58:19 +0900 |
---|---|---|
committer | Kyungwook Tak <k.tak@samsung.com> | 2016-07-05 14:28:17 +0900 |
commit | 759e0ddc95f143c0166c050989ff200e8c477a92 (patch) | |
tree | f3f5185f74ae7de246f5ad45325a18a4882211de /test | |
parent | d82e4542803159badd94982198f397b28ae417e4 (diff) | |
download | csr-framework-759e0ddc95f143c0166c050989ff200e8c477a92.tar.gz csr-framework-759e0ddc95f143c0166c050989ff200e8c477a92.tar.bz2 csr-framework-759e0ddc95f143c0166c050989ff200e8c477a92.zip |
Ignore permission related exception on async scan
Change-Id: Ia2d1cbab672bf8d40b352a523bd902d4372a28ce
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/test-api-content-screening-async.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/test-api-content-screening-async.cpp b/test/test-api-content-screening-async.cpp index 888efb1..5e9b99c 100644 --- a/test/test-api-content-screening-async.cpp +++ b/test/test-api-content-screening-async.cpp @@ -1173,4 +1173,33 @@ BOOST_AUTO_TEST_CASE(scan_async_multiple) EXCEPTION_GUARD_END } +BOOST_AUTO_TEST_CASE(scan_async_no_perm_dirs) +{ + EXCEPTION_GUARD_START + + std::string tmp_no_perm_media = std::string() + TEST_DIR_MEDIA() + "/tak"; + BOOST_MESSAGE("This TC needs special directory(" << tmp_no_perm_media << ") " + "which should be created manualy with special smack label to occur " + "smack-deny to open."); + + auto c = Test::Context<csr_cs_context_h>(); + auto context = c.get(); + + const char *dirs[3] = { + "/tmp", + tmp_no_perm_media.c_str(), + TEST_DIR_APPS() + }; + + set_default_callback(context); + + AsyncTestContext testCtx; + + ASSERT_SUCCESS(csr_cs_scan_dirs_async(context, dirs, 3, &testCtx)); + + ASSERT_CALLBACK(testCtx, -1, -1, 1, 0, 0); + + EXCEPTION_GUARD_END +} + BOOST_AUTO_TEST_SUITE_END() |