- Modified linkage constant in makefile to test for dynamic only
- CLIXON_STATIC_PLUGIN to support statically linked plugins - Added -H option to clixon_netconf: Do not require hello before request
This commit is contained in:
parent
b70e22096e
commit
c00162aec1
16 changed files with 121 additions and 61 deletions
|
|
@ -13,6 +13,7 @@ Build and install a clixon system (in particular the backend, the CLI will be re
|
|||
## Build
|
||||
|
||||
Build clixon cli statically with the afl-clang compiler:
|
||||
|
||||
```
|
||||
CC=/usr/bin/afl-clang-fast LINKAGE=static ./configure # Dont care about restconf
|
||||
make clean
|
||||
|
|
@ -21,6 +22,30 @@ Build clixon cli statically with the afl-clang compiler:
|
|||
sudo make install
|
||||
```
|
||||
|
||||
To link an example plugin properly it gets a little more complex::
|
||||
|
||||
- First, you need to identify which example plugins you want to link. Add these to `EXTRAS` variable
|
||||
- Configure and compile those plugins, where the `clixon_plugin_init()` function is removed.
|
||||
- Configure and compile the cli WITH the `EXTRAS` variable set.
|
||||
|
||||
Below is an example of how to do this for the main example. You can replace the main example plugins with another application:
|
||||
```
|
||||
CC=/usr/bin/afl-clang-fast CFLAGS="-O2 -Wall -DCLIXON_STATIC_PLUGINS" LINKAGE=static ./configure
|
||||
make clean
|
||||
cd example/main # Compile and install application plugins (here main example)
|
||||
make clean
|
||||
make
|
||||
sudo make install
|
||||
cd ../..
|
||||
cd lib # Compile and install clixon lib
|
||||
make
|
||||
sudo make install
|
||||
cd ..
|
||||
cd apps/cli # Compile and install clixon_cli with pre-compiled plugins
|
||||
EXTRAS="../../example/main/example_cli.o ../../example/main/test_cli.o" make clixon_cli
|
||||
sudo make install
|
||||
```
|
||||
|
||||
## Run tests
|
||||
|
||||
Run the script `runfuzz.sh` to run one test with a cli spec and an input string, eg:
|
||||
|
|
@ -29,4 +54,3 @@ Run the script `runfuzz.sh` to run one test with a cli spec and an input string,
|
|||
```
|
||||
|
||||
After (or during) the test, investigate results in the output dir.
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
set table parameter a value 42
|
||||
set table parameter a value 42
|
||||
table
|
||||
example 42
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue