[UTC][rpc-port][Non-ACR][Unset private sharing] 51/245151/1
authorHwankyu Jhun <h.jhun@samsung.com>
Sun, 4 Oct 2020 23:29:05 +0000 (08:29 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Sun, 4 Oct 2020 23:29:05 +0000 (08:29 +0900)
Before calling unlink() to remove files, the shared files should be unshared.

Change-Id: I2219a42a607b76c41a4f11a25785a1f5c43b548e
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/utc/rpc-port/utc-rpc-port.c

index e8f570d554af20b6685abb8caf51cdc1161b0e1c..797a79c8227c8db196a2e2476eb736a6e34a7744 100755 (executable)
@@ -342,9 +342,8 @@ void utc_rpc_port_proxy_cleanup(void)
 {
        char path[PATH_MAX];
 
-       if (proxy_handle) {
+       if (proxy_handle)
                rpc_port_proxy_destroy(proxy_handle);
-       }
 
        __get_file_path("file_name1.txt", path, sizeof(path));
        __delete_file(path);
@@ -1333,11 +1332,13 @@ static void __message_connected_event_cb(const char *endpoint, const char *port_
                files[0] = file1;
                files[1] = file2;
                return_value_for_rpc_port_set_private_sharing_array_p = rpc_port_set_private_sharing_array(port, files, 2);
+               rpc_port_unset_private_sharing(port);
        } else  if (!strcmp(test_case, "utc_rpc_port_set_private_sharing_p")) {
                __get_file_path("file_name.txt", file1, sizeof(file1));
                __create_file(file1, "test3");
 
                return_value_for_rpc_port_set_private_sharing_p = rpc_port_set_private_sharing(port, file1);
+               rpc_port_unset_private_sharing(port);
        } else if (!strcmp(test_case, "utc_rpc_port_unset_private_sharing_p")) {
                return_value_for_rpc_port_unset_private_sharing_p = rpc_port_unset_private_sharing(port);
        }