1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2026-03-02 04:09:18 +00:00

chore(webfuse) Increase test coverage (#34)

* removes unnecessary code

* adds test of wf_status

* adds tests of wf_message

* adds tests of wf_message_queue

* changed branch of coverage badge to display correct results

* moves core tests into separate subdirectory

* increases coverage of timer test

* moves adapter specific tests into separate directory

* moves provider specific tests into separate directory

* adds tests of jsonrpc utilities

* adds tests of jsonrpc request

* adds test of jsonrpc response

* adds tests of jsonrpc server

* adds tests of jsonrpc proxy

* adds integration test (found some issues)

* disables problematic tests

* fixes resource leak: pending timer after cleanup proxy

* fixes order of cleanup to prevent processing pending requests after filesystem shut down

* fixes some memcheck and helgrind errors: initialization of lws_log; setup of client and server

* disabled a test

* fixes error in msleep utility

* fixes deadlock at IntegrationTest using valgrind

* removes unit test code from coverage report

* adds some integration tests

* makes badge show coverage of master

* fixes some coding style issues

* fixes eary trigger of is_connected (provider)

* fixes read error in 32 bit environments\n\ninode is always 64 bit, but variadic wf_impl_jsonrpc_proxy_invoke expects int
This commit is contained in:
Falk Werner
2019-05-19 14:33:42 +02:00
committed by GitHub
parent 9180ad3bb7
commit 07e32757f8
49 changed files with 1650 additions and 54 deletions

View File

@@ -0,0 +1,18 @@
#include "webfuse/core/lws_log.h"
#include <stdbool.h>
#include <libwebsockets.h>
#define WF_LWSLOG_DISABLE 0
static bool wf_lwslog_is_diabled = false;
void wf_lwslog_disable(void)
{
if (!wf_lwslog_is_diabled)
{
lws_set_log_level(WF_LWSLOG_DISABLE, NULL);
wf_lwslog_is_diabled = true;
}
}

View File

@@ -0,0 +1,15 @@
#ifndef WF_LWS_LOG_H
#define WF_LWS_LOG_H
#ifdef __cplusplus
extern "C"
{
#endif
extern void wf_lwslog_disable(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -27,11 +27,6 @@ void wf_slist_append(
item->next = NULL;
list->last->next = item;
list->last = item;
if (NULL == list->head.next)
{
list->head.next = item;
}
}
struct wf_slist_item * wf_slist_remove_first(

View File

@@ -23,7 +23,7 @@ char const * wf_status_tostring(wf_status status)
{
case WF_GOOD: return "Good";
case WF_BAD: return "Bad";
case WF_BAD_NOTIMPLEMENTED: return "Bad (not implelemted)";
case WF_BAD_NOTIMPLEMENTED: return "Bad (not implemented)";
case WF_BAD_TIMEOUT: return "Bad (timeout)";
case WF_BAD_BUSY: return "Bad (busy)";
case WF_BAD_FORMAT: return "Bad (format)";