test env bash; freebsd config

This commit is contained in:
Olof hagsand 2019-09-17 22:44:01 +02:00
parent 0129fe285e
commit fe1aeda4f2
67 changed files with 79 additions and 69 deletions

8
configure vendored
View file

@ -4216,10 +4216,14 @@ fi
if test "$LEX" = ":"; then
as_fn_error $? "CLIXON does not find lex or flex." "$LINENO" 5
fi
if test "$YACC" != "bison -y"; then
as_fn_error $? "CLIXON does not find bison. There are several problems with yacc and byacc. Please install bison." "$LINENO" 5
# Get "bison" from bison -y or other string
bisonstr=$(expr substr "$YACC" 1 5)
if test "$bisonstr" != "bison"; then
as_fn_error $? "CLIXON does not find bison. There are several problems with yacc and byacc. Please install bison. YACC=\"$YACC\"" "$LINENO" 5
fi
if test "$prefix" = "NONE"; then
prefix=${ac_default_prefix}
fi

View file

@ -125,10 +125,14 @@ AC_PROG_LEX
if test "$LEX" = ":"; then
AC_MSG_ERROR(CLIXON does not find lex or flex.)
fi
if test "$YACC" != "bison -y"; then
AC_MSG_ERROR(CLIXON does not find bison. There are several problems with yacc and byacc. Please install bison.)
# Get "bison" from bison -y or other string
bisonstr=$(expr substr "$YACC" 1 5)
if test "$bisonstr" != "bison"; then
AC_MSG_ERROR(CLIXON does not find bison. There are several problems with yacc and byacc. Please install bison. YACC="$YACC")
fi
if test "$prefix" = "NONE"; then
prefix=${ac_default_prefix}
fi

View file

@ -98,7 +98,9 @@ typedef int (*clicon_upgrade_cb)(
* Backend see config_plugin.c
*/
/* Called when application started (eg after daemon call).
/* Called when application is "started", (almost) all initialization is complete
* Backend: daemon is in the background. If daemon privileges are dropped
* this callback is called *before* privileges are dropped.
*/
typedef int (plgstart_t)(clicon_handle); /* Plugin start */

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Run, eg as:
# ./all.sh 2>&1 | tee test.log # break on first test

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Jukebox example from rfc 8040 Appendix A.1
# Assumes fjukebox is set to name of yang file
# An extra leaf-list is added (clixon)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Define test functions.
# Create working dir as variable "dir"
# The functions are somewhat wildgrown, a little too many:

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Long-time test with restconf and get/sets
# for callgrind:
# Run add 100 4 times

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Run valgrind leak test for cli, restconf, netconf or background.
# Stop on first error

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Authentication and authorization and IETF NACM
# Library variable and functions

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Performance of large lists. See large-lists.md
# The parameters are shown below (under Default values)
# Examples

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Run, eg as:
# ./sum.sh # to run all tests and print

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Choice type and mandatory
# Example from RFC7950 Sec 7.9.6
# Also test mandatory behaviour as in 7.6.5

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Backend and cli basic functionality
# Start backend server
# Add an ethernet interface and an address

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Basic CLI history test
# Magic line must be first in script (see README.md)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# CLI test for multi-key lists
# Had bugs in duplicate detection

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# RFC 6241:
# 7.3 - Even if it advertises the :writable-running capability, a device
# MAY choose not to support the <running/> configuration datastore

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Magic line must be first in script (see README.md)
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Yang features. if-feature.
# The test has a example module with FEATURES A and B, where A is enabled and
# B is disabled.

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Identity and identityref tests
# Example from RFC7950 Sec 7.18 and 9.10

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# XML Insert elements and test if they are sorted according to yang
# First a list with 0-5 base elements, insert in different places
# Second varying yangs: container, leaf, list, leaf-list, choice, user-order list

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Install system test
# Magic line must be first in script (see README.md)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Test: JSON parser tests. See RFC7951
# - Multi-line + pretty-print
# - Empty values

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Yang leafref test
# Magic line must be first in script (see README.md)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Yang list / leaf-list min/max-element tests.
# Magic line must be first in script (see README.md)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Authentication and authorization and IETF NACM
# See RFC 8341 A.2
# But replaced ietf-netconf-monitoring with *

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Basic NACM default rule without any groups
# Start from startup db

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Authentication and authorization and IETF NACM
# External NACM file
# See RFC 8341 A.2

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Authentication and authorization and IETF NACM
# NACM module rules
# A module rule has the "module-name" leaf set but no nodes from the

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Authentication and authorization and IETF NACM
# NACM module rules
# A module rule has the "module-name" leaf set but no nodes from the

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Authentication and authorization and IETF NACM
# NACM protocol operation rules
# @see RFC 8341 A.1 and A.3 (and permit-all from A.2)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Basic Netconf functionality
# Magic line must be first in script (see README.md)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Parse yang openconfig yangs from https://github.com/openconfig/public
# Notes:
# - openconfig test suites are patched to counter Clixon issues as follows:

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Order test. test ordered-by user and ordered-by system.
# For each leaf and leaf-lists, there are two lists,
# one ordered-by user and one ordered by system.

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Regexps appear in Yang string patterns, see RFC7950 Sec 9.4.5
# in turn defined in http://www.w3.org/TR/2004/REC-xmlschema-2-20041028
# Current implementation uses posix regex(3) which is not correct so

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Scaling/ performance tests
# CLI/Netconf/Restconf
# Lists (and leaf-lists)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Startup performance tests for different formats and startup modes.
# Magic line must be first in script (see README.md)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Scaling/ performance tests
# Config + state data, only get
# Restconf/Netconf/CLI

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Start clixon backend as root and unprivileged user (clicon)
# Drop privileges from root to clicon
# Test could do more:

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Restconf basic functionality
# also uri encoding using eth/0/0
# Assume http server setup, such as nginx described in apps/restconf/README.md

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Restconf basic functionality
# Assume http server setup, such as nginx described in apps/restconf/README.md

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Restconf error-code functionality
# See RFC8040
# Testcases:

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Restconf RFC8040 Appendix A and B "jukebox" example
# Not supported: B.2.2 if-unmodified
# Magic line must be first in script (see README.md)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Testcases for Restconf list and leaf-list keys, check matching keys for RFC8040 4.5:
# the key values must match in URL and data

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Restconf RFC8040 plain patch Sec 4.6 / 4.6.1
# Use nacm module in example/main/example_restconf.c hardcoded to
# andy:bar and wilma:bar

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Test restconf :startup
# RFC 8040 Sec 1.4 says:
# the NETCONF server supports :startup, the RESTCONF server MUST

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# RPC tests
# Validate parameters in restconf and netconf, check namespaces, etc
# See rfc8040 3.6

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Startup test: Start clicon daemon in the (four) different startup modes
# (init, none, running, or startup)
# The dbs and files are setup as follows:

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Tests for event streams using notifications
# Assumptions:
# 1. http server setup, such as nginx described in apps/restconf/README.md

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Yang test of submodules
# Test included submodules and imported extra modules.
# Structure is:

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Transaction functionality
# The test uses two backend plugins (main and nacm) that logs to a file and a
# netconf client to push operation. The tests then look at the log.

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Advanced union types and generated code
# and enum w values
# The test is run twice, first with dbcache turned on, then turned off.

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Range type tests.
# Mainly error messages and multiple ranges
# Tests all int types including decimal64 and string length ranges

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Advanced union types and generated code
# and enum w values

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Yang list unique tests
# Use example in RFC7890 7.8.3.1, modify fields and also test a variant with
# a single unique identifier (rfc example has two)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Starting clixon with outdated (or not) modules
# This relieas on storing RFC7895 YANG Module Library modules-state info
# in the datastore (or XML files?)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Auto-upgrade using draft-wang-netmod-module-revision-management
# Ways of changes (operation-type) are:
# create, delete, move, modify

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Upgrade a module by registering a manually programmed callback
# The usecase is insipred by the ietf-interfaces upgrade from
# 2014-05-08 to 2018-02-20.

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Load startup with non-compatible and invalid module A with rev 0814-01-28
# Go into fail-safe with invalid startup
# Repair by copying startup into candidate, editing and commit it

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Yang when and must conditional xpath specification
# Testing of validation phase.

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Netconf with default capability See RFC 6243
# Test what clixon has
# These are the modes defined in RFC 6243:

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Test: XML parser tests and JSON translation
# @see https://www.w3.org/TR/2008/REC-xml-20081126
# https://www.w3.org/TR/2009/REC-xml-names-20091208

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Test: XPATH tests
#PROG="valgrind --leak-check=full --show-leak-kinds=all ../util/clixon_util_xpath"

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Yang test: multi-keys and empty type
# Magic line must be first in script (see README.md)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Yang extensions and unknown statements.
# 1) First test syntax
# Assuming the following extension definition:

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Load yang files. Test the different options
# CLICON_YANG_MODULE_DIR vs CLICON_YANG_MAIN_FILE vs CLICON_YANG_MAIN_DIR
# as well as revisions

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Parse yangmodels from https://github.com/YangModels/yang
# Notes:
# - Env variable YANGMODELS should point to checkout place. (define it in site.sh for example)

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Test two modules example1 and example2 with overlapping statements x.
# x is leaf in example1 and list on example2.
# Test netconf and restconf