[MPTCP] Add LCOV_EXCL comments 61/191161/1
authorCheoleun Moon <chleun.moon@samsung.com>
Fri, 12 Oct 2018 03:51:13 +0000 (12:51 +0900)
committerCheoleun Moon <chleun.moon@samsung.com>
Fri, 12 Oct 2018 03:51:20 +0000 (12:51 +0900)
Change-Id: Ib6cff6394688726f11c2390ff4b96ed142de5fa8
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
src/connection_mptcp.c
src/libnetwork_mptcp.c

index e101e41..ee24e2d 100755 (executable)
@@ -38,8 +38,8 @@ EXPORT_API int connection_mptcp_enable(connection_h connection, connection_mptcp
 {
        // check MPTCP support
        if (_connection_libnet_mptcp_supported() == FALSE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
-               return CONNECTION_ERROR_NOT_SUPPORTED;
+               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");     //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_NOT_SUPPORTED;  //LCOV_EXCL_LINE
        }
 
        if (!(_connection_check_handle_validity(connection))) {
@@ -49,8 +49,8 @@ EXPORT_API int connection_mptcp_enable(connection_h connection, connection_mptcp
 
        if (enable <= CONNECTION_MPTCP_DISABLE
                        || enable > CONNECTION_MPTCP_ENABLE_SOCKOPT) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Use connection_mptcp_disable()");
-               return CONNECTION_ERROR_INVALID_PARAMETER;
+               CONNECTION_LOG(CONNECTION_ERROR, "Use connection_mptcp_disable()");     //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_INVALID_PARAMETER;      //LCOV_EXCL_LINE
        }
 
        return _connection_libnet_mptcp_enable(enable);
@@ -60,8 +60,8 @@ EXPORT_API int connection_mptcp_disable(connection_h connection)
 {
        // check MPTCP support
        if (_connection_libnet_mptcp_supported() == FALSE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
-               return CONNECTION_ERROR_NOT_SUPPORTED;
+               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");     //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_NOT_SUPPORTED;  //LCOV_EXCL_LINE
        }
 
        if (!(_connection_check_handle_validity(connection))) {
@@ -76,8 +76,8 @@ EXPORT_API int connection_mptcp_get_enabled(connection_h connection, connection_
 {
        // check MPTCP support
        if (_connection_libnet_mptcp_supported() == FALSE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
-               return CONNECTION_ERROR_NOT_SUPPORTED;
+               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");     //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_NOT_SUPPORTED;  //LCOV_EXCL_LINE
        }
 
        if (!(_connection_check_handle_validity(connection))) {
@@ -86,8 +86,8 @@ EXPORT_API int connection_mptcp_get_enabled(connection_h connection, connection_
        }
 
        if (enable == NULL) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Invalid parameter");
-               return CONNECTION_ERROR_INVALID_PARAMETER;
+               CONNECTION_LOG(CONNECTION_ERROR, "Invalid parameter");  //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_INVALID_PARAMETER;      //LCOV_EXCL_LINE
        }
 
        return _connection_libnet_mptcp_get_enabled(enable);
@@ -98,8 +98,8 @@ EXPORT_API int connection_mptcp_set_path_manager(connection_h connection, connec
 {
        // check MPTCP support
        if (_connection_libnet_mptcp_supported() == FALSE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
-               return CONNECTION_ERROR_NOT_SUPPORTED;
+               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");     //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_NOT_SUPPORTED;  //LCOV_EXCL_LINE
        }
 
        if (!(_connection_check_handle_validity(connection))) {
@@ -114,8 +114,8 @@ EXPORT_API int connection_mptcp_get_path_manager(connection_h connection, connec
 {
        // check MPTCP support
        if (_connection_libnet_mptcp_supported() == FALSE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
-               return CONNECTION_ERROR_NOT_SUPPORTED;
+               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");     //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_NOT_SUPPORTED;  //LCOV_EXCL_LINE
        }
 
        if (!(_connection_check_handle_validity(connection))) {
@@ -136,8 +136,8 @@ EXPORT_API int connection_mptcp_set_scheduler(connection_h connection, connectio
 {
        // check MPTCP support
        if (_connection_libnet_mptcp_supported() == FALSE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
-               return CONNECTION_ERROR_NOT_SUPPORTED;
+               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");     //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_NOT_SUPPORTED;  //LCOV_EXCL_LINE
        }
 
        if (!(_connection_check_handle_validity(connection))) {
@@ -152,8 +152,8 @@ EXPORT_API int connection_mptcp_get_scheduler(connection_h connection, connectio
 {
        // check MPTCP support
        if (_connection_libnet_mptcp_supported() == FALSE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");
-               return CONNECTION_ERROR_NOT_SUPPORTED;
+               CONNECTION_LOG(CONNECTION_ERROR, "MPTCP is not supported");     //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_NOT_SUPPORTED;  //LCOV_EXCL_LINE
        }
 
        if (!(_connection_check_handle_validity(connection))) {
index 41648d5..dcf1255 100755 (executable)
@@ -40,7 +40,7 @@ static connection_mptcp_path_manager_e __convert_mptcp_path_manager_str_to_enum(
                return CONNECTION_MPTCP_PM_DEFAULT;
        if (g_strcmp0(pm, "fullmesh") == 0)
                return CONNECTION_MPTCP_PM_FULLMESH;
-       return CONNECTION_MPTCP_PM_UNKNOWN;
+       return CONNECTION_MPTCP_PM_UNKNOWN;     //LCOV_EXCL_LINE
 }
 
 static const char* __convert_mptcp_scheduler_enum_to_str(connection_mptcp_scheduler_e scheduler)
@@ -62,7 +62,7 @@ static connection_mptcp_scheduler_e __convert_mptcp_scheduler_str_to_enum(char *
                return CONNECTION_MPTCP_SCHEDULER_DEFAULT;
        if (g_strcmp0(scheduler, "roundrobin") == 0)
                return CONNECTION_MPTCP_SCHEDULER_ROUNDROBIN;
-       return CONNECTION_MPTCP_SCHEDULER_UNKNOWN;
+       return CONNECTION_MPTCP_SCHEDULER_UNKNOWN;      //LCOV_EXCL_LINE
 }
 
 gboolean _connection_libnet_mptcp_supported()
@@ -72,10 +72,10 @@ gboolean _connection_libnet_mptcp_supported()
 
        rv = net_mptcp_supported(&support);
        if (rv == NET_ERR_ACCESS_DENIED) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");
+               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");      //LCOV_EXCL_LINE
                return false;
        } else if (rv != NET_ERR_NONE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Failed to enable MPTCP [%d]", rv);
+               CONNECTION_LOG(CONNECTION_ERROR, "Failed to enable MPTCP [%d]", rv);    //LCOV_EXCL_LINE
                return false;
        }
 
@@ -88,11 +88,11 @@ int _connection_libnet_mptcp_enable(connection_mptcp_enable_e enable)
 
        rv = net_mptcp_set_enabled((int)enable);
        if (rv == NET_ERR_ACCESS_DENIED) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");
-               return CONNECTION_ERROR_PERMISSION_DENIED;
+               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");      //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_PERMISSION_DENIED;      //LCOV_EXCL_LINE
        } else if (rv != NET_ERR_NONE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Failed to enable MPTCP [%d]", rv);
-               return CONNECTION_ERROR_OPERATION_FAILED;
+               CONNECTION_LOG(CONNECTION_ERROR, "Failed to enable MPTCP [%d]", rv);    //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_OPERATION_FAILED;       //LCOV_EXCL_LINE
        }
 
        return CONNECTION_ERROR_NONE;
@@ -105,11 +105,11 @@ int _connection_libnet_mptcp_get_enabled(connection_mptcp_enable_e* enable)
 
        rv = net_mptcp_get_enabled(&result);
        if (rv == NET_ERR_ACCESS_DENIED) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");
-               return CONNECTION_ERROR_PERMISSION_DENIED;
+               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");      //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_PERMISSION_DENIED;      //LCOV_EXCL_LINE
        } else if (rv != NET_ERR_NONE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Failed to get MPTCP enabled state [%d]", rv);
-               return CONNECTION_ERROR_OPERATION_FAILED;
+               CONNECTION_LOG(CONNECTION_ERROR, "Failed to get MPTCP enabled state [%d]", rv); //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_OPERATION_FAILED;       //LCOV_EXCL_LINE
        }
 
        *enable = (connection_mptcp_enable_e)result;
@@ -130,11 +130,11 @@ int _connection_libnet_mptcp_set_path_manager(connection_mptcp_path_manager_e pm
 
        rv = net_mptcp_set_path_manager(str);
        if (rv == NET_ERR_ACCESS_DENIED) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");
-               return CONNECTION_ERROR_PERMISSION_DENIED;
+               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");      //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_PERMISSION_DENIED;      //LCOV_EXCL_LINE
        } else if (rv != NET_ERR_NONE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Failed to set MPTCP path manager [%d]", rv);
-               return CONNECTION_ERROR_OPERATION_FAILED;
+               CONNECTION_LOG(CONNECTION_ERROR, "Failed to set MPTCP path manager [%d]", rv);  //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_OPERATION_FAILED;       //LCOV_EXCL_LINE
        }
 
        return CONNECTION_ERROR_NONE;
@@ -147,11 +147,11 @@ int _connection_libnet_mptcp_get_path_manager(connection_mptcp_path_manager_e* p
 
        rv = net_mptcp_get_path_manager(&result);
        if (rv == NET_ERR_ACCESS_DENIED) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");
-               return CONNECTION_ERROR_PERMISSION_DENIED;
+               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");      //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_PERMISSION_DENIED;      //LCOV_EXCL_LINE
        } else if (rv != NET_ERR_NONE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Failed to get MPTCP path manager [%d]", rv);
-               return CONNECTION_ERROR_OPERATION_FAILED;
+               CONNECTION_LOG(CONNECTION_ERROR, "Failed to get MPTCP path manager [%d]", rv);  //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_OPERATION_FAILED;       //LCOV_EXCL_LINE
        }
 
        CONNECTION_LOG(CONNECTION_ERROR, "get path manager %s", result);
@@ -174,11 +174,11 @@ int _connection_libnet_mptcp_set_scheduler(connection_mptcp_scheduler_e schedule
 
        rv = net_mptcp_set_scheduler(str);
        if (rv == NET_ERR_ACCESS_DENIED) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");
-               return CONNECTION_ERROR_PERMISSION_DENIED;
+               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");      //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_PERMISSION_DENIED;      //LCOV_EXCL_LINE
        } else if (rv != NET_ERR_NONE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Failed to set MPTCP scheduler [%d]", rv);
-               return CONNECTION_ERROR_OPERATION_FAILED;
+               CONNECTION_LOG(CONNECTION_ERROR, "Failed to set MPTCP scheduler [%d]", rv);     //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_OPERATION_FAILED;       //LCOV_EXCL_LINE
        }
 
        return CONNECTION_ERROR_NONE;
@@ -191,11 +191,11 @@ int _connection_libnet_mptcp_get_scheduler(connection_mptcp_scheduler_e* schedul
 
        rv = net_mptcp_get_scheduler(&result);
        if (rv == NET_ERR_ACCESS_DENIED) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");
-               return CONNECTION_ERROR_PERMISSION_DENIED;
+               CONNECTION_LOG(CONNECTION_ERROR, "Access denied");      //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_PERMISSION_DENIED;      //LCOV_EXCL_LINE
        } else if (rv != NET_ERR_NONE) {
-               CONNECTION_LOG(CONNECTION_ERROR, "Failed to get MPTCP scheduler [%d]", rv);
-               return CONNECTION_ERROR_OPERATION_FAILED;
+               CONNECTION_LOG(CONNECTION_ERROR, "Failed to get MPTCP scheduler [%d]", rv);     //LCOV_EXCL_LINE
+               return CONNECTION_ERROR_OPERATION_FAILED;       //LCOV_EXCL_LINE
        }
 
        CONNECTION_LOG(CONNECTION_ERROR, "get scheduler %s", result);