From fe1aeda4f2442b8cf01519301e6cc9d36bf6287e Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Tue, 17 Sep 2019 22:44:01 +0200 Subject: [PATCH] test env bash; freebsd config --- configure | 8 ++++++-- configure.ac | 8 ++++++-- lib/clixon/clixon_plugin.h | 4 +++- test/all.sh | 2 +- test/jukebox.sh | 2 +- test/lib.sh | 2 +- test/long.sh | 2 +- test/mem.sh | 2 +- test/nacm.sh | 2 +- test/plot_perf.sh | 2 +- test/sum.sh | 2 +- test/test_choice.sh | 2 +- test/test_cli.sh | 2 +- test/test_cli_history.sh | 2 +- test/test_cli_multikey.sh | 2 +- test/test_copy_config.sh | 2 +- test/test_datastore.sh | 2 +- test/test_feature.sh | 2 +- test/test_identity.sh | 2 +- test/test_insert.sh | 2 +- test/test_install.sh | 2 +- test/test_json.sh | 2 +- test/test_leafref.sh | 2 +- test/test_minmax.sh | 2 +- test/test_nacm.sh | 2 +- test/test_nacm_default.sh | 2 +- test/test_nacm_ext.sh | 2 +- test/test_nacm_module_read.sh | 2 +- test/test_nacm_module_write.sh | 2 +- test/test_nacm_protocol.sh | 2 +- test/test_netconf.sh | 2 +- test/test_openconfig.sh | 2 +- test/test_order.sh | 2 +- test/test_pattern.sh | 2 +- test/test_perf.sh | 2 +- test/test_perf_startup.sh | 2 +- test/test_perf_state.sh | 2 +- test/test_privileges.sh | 2 +- test/test_restconf.sh | 2 +- test/test_restconf2.sh | 2 +- test/test_restconf_err.sh | 2 +- test/test_restconf_jukebox.sh | 2 +- test/test_restconf_listkey.sh | 2 +- test/test_restconf_patch.sh | 2 +- test/test_restconf_startup.sh | 2 +- test/test_rpc.sh | 2 +- test/test_startup.sh | 2 +- test/test_stream.sh | 2 +- test/test_submodule.sh | 2 +- test/test_transaction.sh | 2 +- test/test_type.sh | 2 +- test/test_type_range.sh | 2 +- test/test_union.sh | 2 +- test/test_unique.sh | 2 +- test/test_upgrade.sh | 2 +- test/test_upgrade_auto.sh | 2 +- test/test_upgrade_interfaces.sh | 2 +- test/test_upgrade_repair.sh | 2 +- test/test_when_must.sh | 2 +- test/test_with_default.sh | 2 +- test/test_xml.sh | 2 +- test/test_xpath.sh | 2 +- test/test_yang.sh | 2 +- test/test_yang_extension.sh | 2 +- test/test_yang_load.sh | 2 +- test/test_yang_models.sh | 2 +- test/test_yang_namespace.sh | 2 +- 67 files changed, 79 insertions(+), 69 deletions(-) diff --git a/configure b/configure index f615f883..3a9fbad8 100755 --- a/configure +++ b/configure @@ -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 diff --git a/configure.ac b/configure.ac index 2ebac3e7..7b4146b1 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/lib/clixon/clixon_plugin.h b/lib/clixon/clixon_plugin.h index 2c91e0b9..f51a5b4f 100644 --- a/lib/clixon/clixon_plugin.h +++ b/lib/clixon/clixon_plugin.h @@ -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 */ diff --git a/test/all.sh b/test/all.sh index 18ebde01..97fdc7be 100755 --- a/test/all.sh +++ b/test/all.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Run, eg as: # ./all.sh 2>&1 | tee test.log # break on first test diff --git a/test/jukebox.sh b/test/jukebox.sh index 566a1de2..1320123f 100755 --- a/test/jukebox.sh +++ b/test/jukebox.sh @@ -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) diff --git a/test/lib.sh b/test/lib.sh index c7dafc01..eb9ab0c9 100755 --- a/test/lib.sh +++ b/test/lib.sh @@ -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: diff --git a/test/long.sh b/test/long.sh index ca3d6b79..d28ed2ec 100755 --- a/test/long.sh +++ b/test/long.sh @@ -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 diff --git a/test/mem.sh b/test/mem.sh index f40f52cd..6e143cea 100755 --- a/test/mem.sh +++ b/test/mem.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Run valgrind leak test for cli, restconf, netconf or background. # Stop on first error diff --git a/test/nacm.sh b/test/nacm.sh index 01e7ad05..1f7f943f 100755 --- a/test/nacm.sh +++ b/test/nacm.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Authentication and authorization and IETF NACM # Library variable and functions diff --git a/test/plot_perf.sh b/test/plot_perf.sh index 9d394746..8dee007f 100755 --- a/test/plot_perf.sh +++ b/test/plot_perf.sh @@ -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 diff --git a/test/sum.sh b/test/sum.sh index 6ce3b18b..c3a556b7 100755 --- a/test/sum.sh +++ b/test/sum.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Run, eg as: # ./sum.sh # to run all tests and print diff --git a/test/test_choice.sh b/test/test_choice.sh index 94fd2ae5..58a68b1b 100755 --- a/test/test_choice.sh +++ b/test/test_choice.sh @@ -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 diff --git a/test/test_cli.sh b/test/test_cli.sh index 43799944..8fd3dc35 100755 --- a/test/test_cli.sh +++ b/test/test_cli.sh @@ -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 diff --git a/test/test_cli_history.sh b/test/test_cli_history.sh index 562a1ad0..24ab0160 100755 --- a/test/test_cli_history.sh +++ b/test/test_cli_history.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Basic CLI history test # Magic line must be first in script (see README.md) diff --git a/test/test_cli_multikey.sh b/test/test_cli_multikey.sh index c1a54b23..5d57d08b 100755 --- a/test/test_cli_multikey.sh +++ b/test/test_cli_multikey.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # CLI test for multi-key lists # Had bugs in duplicate detection diff --git a/test/test_copy_config.sh b/test/test_copy_config.sh index eb2b9bca..49944fde 100755 --- a/test/test_copy_config.sh +++ b/test/test_copy_config.sh @@ -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 configuration datastore diff --git a/test/test_datastore.sh b/test/test_datastore.sh index cd054751..02c636f5 100755 --- a/test/test_datastore.sh +++ b/test/test_datastore.sh @@ -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 diff --git a/test/test_feature.sh b/test/test_feature.sh index 306b202e..5a9253c9 100755 --- a/test/test_feature.sh +++ b/test/test_feature.sh @@ -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. diff --git a/test/test_identity.sh b/test/test_identity.sh index 9023aaca..a5e54ef0 100755 --- a/test/test_identity.sh +++ b/test/test_identity.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Identity and identityref tests # Example from RFC7950 Sec 7.18 and 9.10 diff --git a/test/test_insert.sh b/test/test_insert.sh index 97a53327..0e6f7ba8 100755 --- a/test/test_insert.sh +++ b/test/test_insert.sh @@ -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 diff --git a/test/test_install.sh b/test/test_install.sh index f92bc9bc..5322ebed 100755 --- a/test/test_install.sh +++ b/test/test_install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Install system test # Magic line must be first in script (see README.md) diff --git a/test/test_json.sh b/test/test_json.sh index e3994483..7779ebc5 100755 --- a/test/test_json.sh +++ b/test/test_json.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Test: JSON parser tests. See RFC7951 # - Multi-line + pretty-print # - Empty values diff --git a/test/test_leafref.sh b/test/test_leafref.sh index f599fce4..8cc16293 100755 --- a/test/test_leafref.sh +++ b/test/test_leafref.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Yang leafref test # Magic line must be first in script (see README.md) diff --git a/test/test_minmax.sh b/test/test_minmax.sh index 13a84fc7..6599ed10 100755 --- a/test/test_minmax.sh +++ b/test/test_minmax.sh @@ -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) diff --git a/test/test_nacm.sh b/test/test_nacm.sh index 892360c7..7e5a0e41 100755 --- a/test/test_nacm.sh +++ b/test/test_nacm.sh @@ -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 * diff --git a/test/test_nacm_default.sh b/test/test_nacm_default.sh index 08d5c096..f76e9ad6 100755 --- a/test/test_nacm_default.sh +++ b/test/test_nacm_default.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Basic NACM default rule without any groups # Start from startup db diff --git a/test/test_nacm_ext.sh b/test/test_nacm_ext.sh index b56a740f..bc506b5b 100755 --- a/test/test_nacm_ext.sh +++ b/test/test_nacm_ext.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Authentication and authorization and IETF NACM # External NACM file # See RFC 8341 A.2 diff --git a/test/test_nacm_module_read.sh b/test/test_nacm_module_read.sh index 9e1e32ed..636f43f3 100755 --- a/test/test_nacm_module_read.sh +++ b/test/test_nacm_module_read.sh @@ -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 diff --git a/test/test_nacm_module_write.sh b/test/test_nacm_module_write.sh index 4661ee73..d940343c 100755 --- a/test/test_nacm_module_write.sh +++ b/test/test_nacm_module_write.sh @@ -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 diff --git a/test/test_nacm_protocol.sh b/test/test_nacm_protocol.sh index c51aeaea..3c70bdd6 100755 --- a/test/test_nacm_protocol.sh +++ b/test/test_nacm_protocol.sh @@ -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) diff --git a/test/test_netconf.sh b/test/test_netconf.sh index 4d091e90..3604fa9c 100755 --- a/test/test_netconf.sh +++ b/test/test_netconf.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Basic Netconf functionality # Magic line must be first in script (see README.md) diff --git a/test/test_openconfig.sh b/test/test_openconfig.sh index e72d48a7..b11db787 100755 --- a/test/test_openconfig.sh +++ b/test/test_openconfig.sh @@ -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: diff --git a/test/test_order.sh b/test/test_order.sh index 29d72bf8..39f7c3ac 100755 --- a/test/test_order.sh +++ b/test/test_order.sh @@ -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. diff --git a/test/test_pattern.sh b/test/test_pattern.sh index d8ef0fee..003ffa5d 100755 --- a/test/test_pattern.sh +++ b/test/test_pattern.sh @@ -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 diff --git a/test/test_perf.sh b/test/test_perf.sh index f9337909..33c1c70d 100755 --- a/test/test_perf.sh +++ b/test/test_perf.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Scaling/ performance tests # CLI/Netconf/Restconf # Lists (and leaf-lists) diff --git a/test/test_perf_startup.sh b/test/test_perf_startup.sh index c6fbe95c..19351488 100755 --- a/test/test_perf_startup.sh +++ b/test/test_perf_startup.sh @@ -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) diff --git a/test/test_perf_state.sh b/test/test_perf_state.sh index c017da1c..f6905f6b 100755 --- a/test/test_perf_state.sh +++ b/test/test_perf_state.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Scaling/ performance tests # Config + state data, only get # Restconf/Netconf/CLI diff --git a/test/test_privileges.sh b/test/test_privileges.sh index 42ddd332..d22a2732 100755 --- a/test/test_privileges.sh +++ b/test/test_privileges.sh @@ -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: diff --git a/test/test_restconf.sh b/test/test_restconf.sh index 3e3dee4f..80f3c62e 100755 --- a/test/test_restconf.sh +++ b/test/test_restconf.sh @@ -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 diff --git a/test/test_restconf2.sh b/test/test_restconf2.sh index 88ab5fa5..8191c666 100755 --- a/test/test_restconf2.sh +++ b/test/test_restconf2.sh @@ -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 diff --git a/test/test_restconf_err.sh b/test/test_restconf_err.sh index 53a64db2..70e0d8e3 100755 --- a/test/test_restconf_err.sh +++ b/test/test_restconf_err.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Restconf error-code functionality # See RFC8040 # Testcases: diff --git a/test/test_restconf_jukebox.sh b/test/test_restconf_jukebox.sh index dbf5d274..82f2a919 100755 --- a/test/test_restconf_jukebox.sh +++ b/test/test_restconf_jukebox.sh @@ -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) diff --git a/test/test_restconf_listkey.sh b/test/test_restconf_listkey.sh index 7afd61ea..3e3a7db6 100755 --- a/test/test_restconf_listkey.sh +++ b/test/test_restconf_listkey.sh @@ -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 diff --git a/test/test_restconf_patch.sh b/test/test_restconf_patch.sh index 5d7ae5cd..728ba7f3 100755 --- a/test/test_restconf_patch.sh +++ b/test/test_restconf_patch.sh @@ -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 diff --git a/test/test_restconf_startup.sh b/test/test_restconf_startup.sh index 2c3c94bc..7b8f3e3b 100755 --- a/test/test_restconf_startup.sh +++ b/test/test_restconf_startup.sh @@ -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 diff --git a/test/test_rpc.sh b/test/test_rpc.sh index 91d22e21..a598350b 100755 --- a/test/test_rpc.sh +++ b/test/test_rpc.sh @@ -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 diff --git a/test/test_startup.sh b/test/test_startup.sh index 301086ff..876e6ace 100755 --- a/test/test_startup.sh +++ b/test/test_startup.sh @@ -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: diff --git a/test/test_stream.sh b/test/test_stream.sh index fce98856..b54895fb 100755 --- a/test/test_stream.sh +++ b/test/test_stream.sh @@ -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 diff --git a/test/test_submodule.sh b/test/test_submodule.sh index 76fd86b1..9a3c0502 100755 --- a/test/test_submodule.sh +++ b/test/test_submodule.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Yang test of submodules # Test included submodules and imported extra modules. # Structure is: diff --git a/test/test_transaction.sh b/test/test_transaction.sh index 828fd7d7..4d7e7723 100755 --- a/test/test_transaction.sh +++ b/test/test_transaction.sh @@ -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. diff --git a/test/test_type.sh b/test/test_type.sh index 075e90fa..1538fbbd 100755 --- a/test/test_type.sh +++ b/test/test_type.sh @@ -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. diff --git a/test/test_type_range.sh b/test/test_type_range.sh index 1886c1fc..78341120 100755 --- a/test/test_type_range.sh +++ b/test/test_type_range.sh @@ -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 diff --git a/test/test_union.sh b/test/test_union.sh index 5fa4530d..0e1c6cce 100755 --- a/test/test_union.sh +++ b/test/test_union.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Advanced union types and generated code # and enum w values diff --git a/test/test_unique.sh b/test/test_unique.sh index c0c74339..6b68bd0c 100755 --- a/test/test_unique.sh +++ b/test/test_unique.sh @@ -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) diff --git a/test/test_upgrade.sh b/test/test_upgrade.sh index bf5804b9..22159654 100755 --- a/test/test_upgrade.sh +++ b/test/test_upgrade.sh @@ -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?) diff --git a/test/test_upgrade_auto.sh b/test/test_upgrade_auto.sh index d088391f..9fe2b970 100755 --- a/test/test_upgrade_auto.sh +++ b/test/test_upgrade_auto.sh @@ -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 diff --git a/test/test_upgrade_interfaces.sh b/test/test_upgrade_interfaces.sh index 023894c8..cca868cb 100755 --- a/test/test_upgrade_interfaces.sh +++ b/test/test_upgrade_interfaces.sh @@ -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. diff --git a/test/test_upgrade_repair.sh b/test/test_upgrade_repair.sh index 0ed324e1..ce8871d5 100755 --- a/test/test_upgrade_repair.sh +++ b/test/test_upgrade_repair.sh @@ -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 diff --git a/test/test_when_must.sh b/test/test_when_must.sh index 740095b8..fecd986b 100755 --- a/test/test_when_must.sh +++ b/test/test_when_must.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Yang when and must conditional xpath specification # Testing of validation phase. diff --git a/test/test_with_default.sh b/test/test_with_default.sh index c5419cae..eaea16b7 100755 --- a/test/test_with_default.sh +++ b/test/test_with_default.sh @@ -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: diff --git a/test/test_xml.sh b/test/test_xml.sh index fa1b2939..4ab44287 100755 --- a/test/test_xml.sh +++ b/test/test_xml.sh @@ -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 diff --git a/test/test_xpath.sh b/test/test_xpath.sh index 4a1f3a3d..39cf3353 100755 --- a/test/test_xpath.sh +++ b/test/test_xpath.sh @@ -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" diff --git a/test/test_yang.sh b/test/test_yang.sh index fe8cb73c..dac1bedb 100755 --- a/test/test_yang.sh +++ b/test/test_yang.sh @@ -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) diff --git a/test/test_yang_extension.sh b/test/test_yang_extension.sh index f15c60b7..cb359851 100755 --- a/test/test_yang_extension.sh +++ b/test/test_yang_extension.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Yang extensions and unknown statements. # 1) First test syntax # Assuming the following extension definition: diff --git a/test/test_yang_load.sh b/test/test_yang_load.sh index eac1112a..7951a145 100755 --- a/test/test_yang_load.sh +++ b/test/test_yang_load.sh @@ -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 diff --git a/test/test_yang_models.sh b/test/test_yang_models.sh index 6e4dccbe..0da1e5fd 100755 --- a/test/test_yang_models.sh +++ b/test/test_yang_models.sh @@ -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) diff --git a/test/test_yang_namespace.sh b/test/test_yang_namespace.sh index 189ec505..935920cd 100755 --- a/test/test_yang_namespace.sh +++ b/test/test_yang_namespace.sh @@ -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