summaryrefslogtreecommitdiffstats
path: root/coverage
diff options
context:
space:
mode:
Diffstat (limited to 'coverage')
l---------coverage/apis/auto/saha1
l---------coverage/apis/auto/x-hello1
l---------coverage/apis/auto/x-salut1
-rw-r--r--coverage/bin/bug.c6
-rw-r--r--coverage/ldpath/weak/noise10
-rw-r--r--coverage/ldpath/weak/noise20
l---------coverage/ldpath/weak/noise31
l---------coverage/ldpath/weak/noise41
-rw-r--r--coverage/ldpath/weak/sub/noise10
-rw-r--r--coverage/ldpath/weak/sub/noise2/noise0
l---------coverage/ldpath/weak/sub/noise31
l---------coverage/ldpath/weak/sub/noise41
-rwxr-xr-xcoverage/scripts/00-trace.sh4
-rwxr-xr-xcoverage/scripts/01-http.sh17
-rwxr-xr-xcoverage/scripts/02-hello.sh53
-rwxr-xr-xcoverage/scripts/03-x-hello.sh35
-rwxr-xr-xcoverage/scripts/04-monitor.sh10
-rwxr-xr-xcoverage/scripts/run-parts.sh26
-rwxr-xr-xcoverage/scripts/run-test.sh53
-rw-r--r--coverage/www/index.html4
-rw-r--r--coverage/www/marrus-orthocanna.jpgbin0 -> 67473 bytes
-rw-r--r--coverage/www/test.js0
22 files changed, 215 insertions, 0 deletions
diff --git a/coverage/apis/auto/saha b/coverage/apis/auto/saha
new file mode 120000
index 00000000..403904c6
--- /dev/null
+++ b/coverage/apis/auto/saha
@@ -0,0 +1 @@
+../../bin/saha.so \ No newline at end of file
diff --git a/coverage/apis/auto/x-hello b/coverage/apis/auto/x-hello
new file mode 120000
index 00000000..77b3cf6c
--- /dev/null
+++ b/coverage/apis/auto/x-hello
@@ -0,0 +1 @@
+../ws/hello \ No newline at end of file
diff --git a/coverage/apis/auto/x-salut b/coverage/apis/auto/x-salut
new file mode 120000
index 00000000..0e28e432
--- /dev/null
+++ b/coverage/apis/auto/x-salut
@@ -0,0 +1 @@
+../ws/salut \ No newline at end of file
diff --git a/coverage/bin/bug.c b/coverage/bin/bug.c
new file mode 100644
index 00000000..ddebdef7
--- /dev/null
+++ b/coverage/bin/bug.c
@@ -0,0 +1,6 @@
+#define AFB_BINDING_VERSION 3
+#include <afb/afb-binding.h>
+int afbBindingEntry(afb_api_t api)
+{
+ return ((int(*)())(intptr_t)0)();
+}
diff --git a/coverage/ldpath/weak/noise1 b/coverage/ldpath/weak/noise1
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/coverage/ldpath/weak/noise1
diff --git a/coverage/ldpath/weak/noise2 b/coverage/ldpath/weak/noise2
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/coverage/ldpath/weak/noise2
diff --git a/coverage/ldpath/weak/noise3 b/coverage/ldpath/weak/noise3
new file mode 120000
index 00000000..33027900
--- /dev/null
+++ b/coverage/ldpath/weak/noise3
@@ -0,0 +1 @@
+noise5 \ No newline at end of file
diff --git a/coverage/ldpath/weak/noise4 b/coverage/ldpath/weak/noise4
new file mode 120000
index 00000000..b276fe15
--- /dev/null
+++ b/coverage/ldpath/weak/noise4
@@ -0,0 +1 @@
+noise1 \ No newline at end of file
diff --git a/coverage/ldpath/weak/sub/noise1 b/coverage/ldpath/weak/sub/noise1
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/coverage/ldpath/weak/sub/noise1
diff --git a/coverage/ldpath/weak/sub/noise2/noise b/coverage/ldpath/weak/sub/noise2/noise
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/coverage/ldpath/weak/sub/noise2/noise
diff --git a/coverage/ldpath/weak/sub/noise3 b/coverage/ldpath/weak/sub/noise3
new file mode 120000
index 00000000..33027900
--- /dev/null
+++ b/coverage/ldpath/weak/sub/noise3
@@ -0,0 +1 @@
+noise5 \ No newline at end of file
diff --git a/coverage/ldpath/weak/sub/noise4 b/coverage/ldpath/weak/sub/noise4
new file mode 120000
index 00000000..b276fe15
--- /dev/null
+++ b/coverage/ldpath/weak/sub/noise4
@@ -0,0 +1 @@
+noise1 \ No newline at end of file
diff --git a/coverage/scripts/00-trace.sh b/coverage/scripts/00-trace.sh
new file mode 100755
index 00000000..34a19bb0
--- /dev/null
+++ b/coverage/scripts/00-trace.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+$R/bin/afb-client -k $WSURL monitor trace '{"add":{"api":"*","request":"*","event":"*","session":"*","global":"*"}}' &
+
diff --git a/coverage/scripts/01-http.sh b/coverage/scripts/01-http.sh
new file mode 100755
index 00000000..191318c0
--- /dev/null
+++ b/coverage/scripts/01-http.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+
+curl $URL/index.html
+curl $URL/marrus-orthocanna.jpg
+curl $URL/test.js
+curl $URL/icons/marrus-orthocanna.jpg
+
+curl $URL/fake-file.html
+
+curl "$URL/api/salut/ping?arg1=null&arg1=%22a+string%22"
+curl "$URL/api/hello/ping" \
+ -F image=@$R/www/marrus-orthocanna.jpg \
+ -F name=test
+curl -X POST "$URL/api/hello/ping" \
+ --header 'content-type: application/json' \
+ --data-binary '[null,3,{"hello":false,"salut":4.5},true]'
diff --git a/coverage/scripts/02-hello.sh b/coverage/scripts/02-hello.sh
new file mode 100755
index 00000000..fbbb307d
--- /dev/null
+++ b/coverage/scripts/02-hello.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+$R/bin/afb-client -s -e $WSURL <<EOC
+hello ping true
+HELLO PING false
+hello pIngNull true
+hello PingBug true
+hello PiNgJsOn {"well":"formed","json":[1,2,3,4.5,true,false,null,"oups"]}
+hello subcall {"api":"hello","verb":"pingjson","args":[{"key1":"value1"}]}
+hello subcall {"api":"hello","verb":"subcall","args":{"api":"hello","verb":"pingjson","args":[{"key1":"value1"}]}}
+hello subcallsync {"api":"hello","verb":"pingjson","args":[{"key1":"value1"}]}
+hello subcallsync {"api":"hello","verb":"subcall","args":{"api":"hello","verb":"pingjson","args":[{"key1":"value1"}]}}
+hello subcall {"api":"hello","verb":"subcallsync","args":{"api":"hello","verb":"pingjson","args":[{"key1":"value1"}]}}
+hello subcallsync {"api":"hello","verb":"subcallsync","args":{"api":"hello","verb":"pingjson","args":[{"key1":"value1"}]}}
+hello eventadd {"tag":"ev1","name":"event-A"}
+hello eventadd {"tag":"ev2","name":"event-B"}
+hello eventpush {"tag":"ev1","data":[1,2,"hello"]}
+hello eventpush {"tag":"ev2","data":{"item":0}}
+hello eventsub {"tag":"ev2"}
+hello eventpush {"tag":"ev1","data":[1,2,"hello"]}
+hello eventpush {"tag":"ev2","data":{"item":0}}
+hello eventsub {"tag":"ev1"}
+hello subcall {"api":"hello","verb":"eventpush","args":{"tag":"ev1","data":[1,2,"hello"]}}
+hello subcall {"api":"hello","verb":"eventpush","args":{"tag":"ev2","data":{"item":0}}}
+hello subcallsync {"api":"hello","verb":"eventpush","args":{"tag":"ev1","data":[1,2,"hello"]}}
+hello subcallsync {"api":"hello","verb":"eventpush","args":{"tag":"ev2","data":{"item":0}}}
+hello eventunsub {"tag":"ev2"}
+hello eventpush {"tag":"ev1","data":[1,2,"hello"]}
+hello eventpush {"tag":"ev2","data":{"item":0}}
+hello eventdel {"tag":"ev1"}
+hello eventpush {"tag":"ev1","data":[1,2,"hello"]}
+hello eventpush {"tag":"ev2","data":{"item":0}}
+hello broadcast {"name":"xev","data":"true"}
+hello broadcast {"tag":"ev2","data":"true"}
+hello eventdel {"tag":"ev2"}
+hello hasperm {"perm":"some-permissison"}
+hello appid true
+hello uid true
+hello set-loa 1
+hello set-loa 3
+hello close true
+hello setctx "some-text-0"
+hello setctxif "some-text-1"
+hello getctx
+hello setctx "some-text-2"
+hello getctx
+#------------------------
+# TODO bug to be fixed!
+#hello info
+#hello verbose {"level":2,"message":"hello"}
+#------------------------
+EOC
+
diff --git a/coverage/scripts/03-x-hello.sh b/coverage/scripts/03-x-hello.sh
new file mode 100755
index 00000000..9d3726e4
--- /dev/null
+++ b/coverage/scripts/03-x-hello.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+$R/bin/afb-client -s -e $WSURL <<EOC
+x-hello ping true
+x-HELLO PING false
+x-hello pIngNull true
+x-hello PingBug true
+x-hello PiNgJsOn {"well":"formed","json":[1,2,3,4.5,true,false,null,"oups"]}
+x-hello subcall {"api":"x-hello","verb":"pingjson","args":[{"key1":"value1"}]}
+x-hello subcall {"api":"x-hello","verb":"subcall","args":{"api":"x-hello","verb":"pingjson","args":[{"key1":"value1"}]}}
+x-hello subcallsync {"api":"x-hello","verb":"pingjson","args":[{"key1":"value1"}]}
+x-hello subcallsync {"api":"x-hello","verb":"subcall","args":{"api":"x-hello","verb":"pingjson","args":[{"key1":"value1"}]}}
+x-hello subcall {"api":"x-hello","verb":"subcallsync","args":{"api":"x-hello","verb":"pingjson","args":[{"key1":"value1"}]}}
+x-hello subcallsync {"api":"x-hello","verb":"subcallsync","args":{"api":"x-hello","verb":"pingjson","args":[{"key1":"value1"}]}}
+x-hello eventadd {"tag":"ev1","name":"event-A"}
+x-hello eventadd {"tag":"ev2","name":"event-B"}
+x-hello eventpush {"tag":"ev1","data":[1,2,"x-hello"]}
+x-hello eventpush {"tag":"ev2","data":{"item":0}}
+x-hello eventsub {"tag":"ev2"}
+x-hello eventpush {"tag":"ev1","data":[1,2,"x-hello"]}
+x-hello eventpush {"tag":"ev2","data":{"item":0}}
+x-hello eventsub {"tag":"ev1"}
+x-hello subcall {"api":"x-hello","verb":"eventpush","args":{"tag":"ev1","data":[1,2,"x-hello"]}}
+x-hello subcall {"api":"x-hello","verb":"eventpush","args":{"tag":"ev2","data":{"item":0}}}
+x-hello subcallsync {"api":"x-hello","verb":"eventpush","args":{"tag":"ev1","data":[1,2,"x-hello"]}}
+x-hello subcallsync {"api":"x-hello","verb":"eventpush","args":{"tag":"ev2","data":{"item":0}}}
+x-hello eventunsub {"tag":"ev2"}
+x-hello eventpush {"tag":"ev1","data":[1,2,"x-hello"]}
+x-hello eventpush {"tag":"ev2","data":{"item":0}}
+x-hello eventdel {"tag":"ev1"}
+x-hello eventpush {"tag":"ev1","data":[1,2,"x-hello"]}
+x-hello eventpush {"tag":"ev2","data":{"item":0}}
+x-hello eventdel {"tag":"ev2"}
+EOC
+
diff --git a/coverage/scripts/04-monitor.sh b/coverage/scripts/04-monitor.sh
new file mode 100755
index 00000000..cc9453f5
--- /dev/null
+++ b/coverage/scripts/04-monitor.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+$R/bin/afb-client -s -e $WSURL <<EOC
+monitor get {"verbosity":true}
+monitor get {"apis":true}
+monitor set {"verbosity":"debug"}
+monitor session {"refresh-token":false}
+monitor session {"refresh-token":true}
+EOC
+
diff --git a/coverage/scripts/run-parts.sh b/coverage/scripts/run-parts.sh
new file mode 100755
index 00000000..a34bf8dd
--- /dev/null
+++ b/coverage/scripts/run-parts.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+export PORT=$1
+export TOKEN=$2
+export URL=localhost:$PORT
+export WSURL="$URL/api?token=$TOKEN"
+export R=$(realpath $(dirname $0)/..)
+
+ls $R/scripts/[0-9][0-9]-*.sh |
+sort -n |
+while read x
+do
+ echo
+ echo
+ echo
+ echo
+ echo
+ echo
+ echo ===========================================================================
+ echo ===========================================================================
+ echo ==
+ echo == $(basename $x)
+ echo ==
+ echo ===========================================================================
+ $x
+done
diff --git a/coverage/scripts/run-test.sh b/coverage/scripts/run-test.sh
new file mode 100755
index 00000000..ef280b64
--- /dev/null
+++ b/coverage/scripts/run-test.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+export R=$(realpath $(dirname $0)/..)
+export PATH="$R/bin:$R/scripts:$PATH"
+
+$R/bin/afb-daemon-cov --help > /dev/null
+
+$R/bin/afb-daemon-cov --version > /dev/null
+
+$R/bin/afb-daemon-cov --fake-option > /dev/null
+
+$R/bin/afb-daemon-cov \
+ --verbose \
+ --verbose \
+ --verbose \
+ --verbose \
+ --quiet \
+ --quiet \
+ --quiet \
+ --quiet \
+ --quiet \
+ --quiet \
+ --log error,warning,notice,info,debug,critical,alert-error,warning,notice,info,debug,critical,alert+error,warning,notice,info,debug,critical,alert \
+ --foreground \
+ --name binder-cov \
+ --roothttp $R/www \
+ --rootbase /opx \
+ --rootapi /api \
+ --alias /icons:$R/www \
+ --apitimeout 90 \
+ --cntxtimeout 3600 \
+ --cache-eol 200 \
+ --workdir . \
+ --uploaddir . \
+ --rootdir . \
+ --ldpaths $R/ldpath/strong \
+ --binding $R/bin/demat.so \
+ --weak-ldpaths $R/ldpath/weak \
+ --auto-api $R/apis/auto \
+ --token HELLO \
+ --random-token \
+ --session-max 1000 \
+ --tracereq all \
+ --traceapi all \
+ --traceses all \
+ --traceevt all \
+ --call demat/ping:true \
+ --ws-server unix:$R/apis/ws/hello \
+ --ws-server unix:$R/apis/ws/salut \
+ --exec $R/scripts/run-parts.sh @p @t
+
+exit 0
+
diff --git a/coverage/www/index.html b/coverage/www/index.html
new file mode 100644
index 00000000..60722feb
--- /dev/null
+++ b/coverage/www/index.html
@@ -0,0 +1,4 @@
+<html>
+<body>
+<img src="marrus-orthocanna.jpg">test</img>
+<script src="test.js"></script>
diff --git a/coverage/www/marrus-orthocanna.jpg b/coverage/www/marrus-orthocanna.jpg
new file mode 100644
index 00000000..82fb038c
--- /dev/null
+++ b/coverage/www/marrus-orthocanna.jpg
Binary files differ
diff --git a/coverage/www/test.js b/coverage/www/test.js
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/coverage/www/test.js