Return-Path: From: Wang Mingyu Date: Wed, 26 Sep 2018 00:54:31 -0700 Message-ID: <1537948476-25112-2-git-send-email-wangmy@cn.fujitsu.com> In-Reply-To: <1537948476-25112-1-git-send-email-wangmy@cn.fujitsu.com> References: <1537948476-25112-1-git-send-email-wangmy@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Fuego] [PATCH] demo: Add test cases for command acpid, atd, auditd. List-Id: Mailing list for the Fuego test framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fuego@lists.linuxfoundation.org Signed-off-by: Wang Mingyu --- .../tests/Functional.demo/data/change_dhcpd.conf | 5 + .../tests/Functional.demo/data/change_dhcpd6.conf | 6 + engine/tests/Functional.demo/data/host-target.key | 22 + engine/tests/Functional.demo/data/ip6tables | 8 + engine/tests/Functional.demo/data/iptables | 8 + .../Functional.demo/data/openwbem/openwbem.conf | 689 +++++++++++++++++++++ .../Functional.demo/data/openwbem/servercert.pem | 16 + .../Functional.demo/data/openwbem/serverkey.pem | 16 + .../tests/Functional.demo/data/openwbem/ssleay.cnf | 34 + engine/tests/Functional.demo/data/ospf6d.conf | 55 ++ engine/tests/Functional.demo/data/ospfd.conf | 23 + engine/tests/Functional.demo/data/ripd.conf | 13 + engine/tests/Functional.demo/data/ripngd.conf | 24 + engine/tests/Functional.demo/data/testsrv.conf | 16 + .../tests/Functional.demo/data/wpa_supplicant.conf | 16 + .../Functional.demo/data/wpa_supplicant.sysconfig | 10 + engine/tests/Functional.demo/data/zebra.conf | 26 + engine/tests/Functional.demo/demo_test.sh | 4 + engine/tests/Functional.demo/fuego_test.sh | 118 ++++ engine/tests/Functional.demo/parser.py | 22 + engine/tests/Functional.demo/spec.json | 7 + engine/tests/Functional.demo/tests/demo_acpid.sh | 41 ++ engine/tests/Functional.demo/tests/demo_atd.sh | 41 ++ engine/tests/Functional.demo/tests/demo_auditd.sh | 32 + 24 files changed, 1252 insertions(+) create mode 100644 engine/tests/Functional.demo/data/change_dhcpd.conf create mode 100644 engine/tests/Functional.demo/data/change_dhcpd6.conf create mode 100644 engine/tests/Functional.demo/data/host-target.key create mode 100644 engine/tests/Functional.demo/data/ip6tables create mode 100644 engine/tests/Functional.demo/data/iptables create mode 100644 engine/tests/Functional.demo/data/openwbem/openwbem.conf create mode 100644 engine/tests/Functional.demo/data/openwbem/servercert.pem create mode 100644 engine/tests/Functional.demo/data/openwbem/serverkey.pem create mode 100644 engine/tests/Functional.demo/data/openwbem/ssleay.cnf create mode 100644 engine/tests/Functional.demo/data/ospf6d.conf create mode 100644 engine/tests/Functional.demo/data/ospfd.conf create mode 100644 engine/tests/Functional.demo/data/ripd.conf create mode 100644 engine/tests/Functional.demo/data/ripngd.conf create mode 100644 engine/tests/Functional.demo/data/testsrv.conf create mode 100644 engine/tests/Functional.demo/data/wpa_supplicant.conf create mode 100644 engine/tests/Functional.demo/data/wpa_supplicant.sysconfig create mode 100644 engine/tests/Functional.demo/data/zebra.conf create mode 100755 engine/tests/Functional.demo/demo_test.sh create mode 100644 engine/tests/Functional.demo/fuego_test.sh create mode 100644 engine/tests/Functional.demo/parser.py create mode 100644 engine/tests/Functional.demo/spec.json create mode 100644 engine/tests/Functional.demo/tests/demo_acpid.sh create mode 100644 engine/tests/Functional.demo/tests/demo_atd.sh create mode 100644 engine/tests/Functional.demo/tests/demo_auditd.sh diff --git a/engine/tests/Functional.demo/data/change_dhcpd.conf b/engine/tests/Functional.demo/data/change_dhcpd.conf new file mode 100644 index 0000000..8e79207 --- /dev/null +++ b/engine/tests/Functional.demo/data/change_dhcpd.conf @@ -0,0 +1,5 @@ +#! /bin/sh + +echo " subnet 192.168.246.0 netmask 255.255.255.0 {" >> /etc/dhcp/dhcpd.conf +echo " range 192.168.246.200 192.168.246.210;" >> /etc/dhcp/dhcpd.conf +echo " } " >> /etc/dhcp/dhcpd.conf diff --git a/engine/tests/Functional.demo/data/change_dhcpd6.conf b/engine/tests/Functional.demo/data/change_dhcpd6.conf new file mode 100644 index 0000000..4c31884 --- /dev/null +++ b/engine/tests/Functional.demo/data/change_dhcpd6.conf @@ -0,0 +1,6 @@ +#! /bin/sh + +echo "subnet6 2001:db8:0:1::/64" >> /etc/dhcp/dhcpd.conf +echo "{ #Range for clients" >> /etc/dhcp/dhcpd.conf +echo " range6 2001:db8:0:1::129 2001:db8:0:1::254;" >> /etc/dhcp/dhcpd.conf +echo "}" >> /etc/dhcp/dhcpd.conf diff --git a/engine/tests/Functional.demo/data/host-target.key b/engine/tests/Functional.demo/data/host-target.key new file mode 100644 index 0000000..99743bf --- /dev/null +++ b/engine/tests/Functional.demo/data/host-target.key @@ -0,0 +1,22 @@ +# +# 2048 bit OpenVPN static key +# +-----BEGIN OpenVPN Static key V1----- +debe9557c7eb224c5cf4f3369d5211ff +fb9c375a4784759edf6b0f6eb8f5da31 +bb280394d40382cc8e02d6cbb3e47492 +3509eac6b48965078e3d317b0791dea2 +dbcf0eddcab0fb20780fcf0908ce94cd +7cb65a913fea73ac6bfe0ab34f085aa3 +a6c8b89a97d189e5145c3199955c4b34 +6d51f864f2b49f3252d1548c3b3510ec +0ecd4b9f17f2039439a79f41a46f6a54 +c0385b962b2b94fcbe73e0108b224a5b +2efae27d872f0efef67b244c7eb6f525 +581e4c2b4e6aa193fb1d37798bdb46ff +7c6727f08e9601c10ac7478d73d731e6 +f4b652252f3e5309cd1d6d30c7a433cc +134bd6dd50fa6a6fc7a843fdc058d38d +fb8679b48eb09745badf004fbf4a434c +-----END OpenVPN Static key V1----- + diff --git a/engine/tests/Functional.demo/data/ip6tables b/engine/tests/Functional.demo/data/ip6tables new file mode 100644 index 0000000..9ddb2dd --- /dev/null +++ b/engine/tests/Functional.demo/data/ip6tables @@ -0,0 +1,8 @@ +# Generated by ip6tables-save v1.4.19.1 on Thu Nov 28 09:44:31 2013 +*filter +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -s fe80::/64 -p tcp -m tcp --dport 22 -j ACCEPT +COMMIT +# Completed on Thu Nov 28 09:44:31 2013 diff --git a/engine/tests/Functional.demo/data/iptables b/engine/tests/Functional.demo/data/iptables new file mode 100644 index 0000000..6a17894 --- /dev/null +++ b/engine/tests/Functional.demo/data/iptables @@ -0,0 +1,8 @@ +# Generated by iptables-save v1.4.19.1 on Thu Nov 28 09:22:53 2013 +*filter +:INPUT ACCEPT [35:2712] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [25:2896] +-A INPUT -s 192.168.246.3/32 -p tcp -m tcp --dport 22 -j ACCEPT +COMMIT +# Completed on Thu Nov 28 09:22:53 2013 diff --git a/engine/tests/Functional.demo/data/openwbem/openwbem.conf b/engine/tests/Functional.demo/data/openwbem/openwbem.conf new file mode 100644 index 0000000..4ebc5fd --- /dev/null +++ b/engine/tests/Functional.demo/data/openwbem/openwbem.conf @@ -0,0 +1,689 @@ +############################################################################### +# owcimomd configuration file +# Note: +# All lines that start with a '#' or a ';' character are ignored. +# +# All of the options in this file are read by owcimomd at start up. The file +# will only be re-read on restart when a SIGHUP is received. +# The options that are prefixed with "owcimomd." are meant specifically for +# owcimomd. +# Other options are prefixed with an identifier of the component that is +# specifically interested in the options. For example the +# "cppprovifc.prov_location" option is meant specifically for the C++ provider +# interface. This option is read from the config file by owcimomd and +# made available to the C++ provider interface upon request. +# Config options may be specified more than once. If the value is singular, +# The last read option will take effect. If the value is plural, all values +# together will be in effect. +############################################################################### + +################################################################################ +# For each directory specified, all the files contained in the directory will +# be loaded and processed as additional config files. +# This is a multi-valued option. ':' (windows) or ';' (POSIX) is the separator. +# This option will be evaluated after the main config file is parsed, and so +# additional directories specified in additional config files will not be +# examined. +# The default is "/etc/openwbem/openwbem.conf.d" +owcimomd.additional_config_files_dirs = /etc/openwbem/openwbem.conf.d + +################################################################################ +# If owcimomd.allow_anonymous is set to true, anonymous logins are allowed by +# owcimomd, authentication is disabled, and no user name or password is required. +# The default is false +owcimomd.allow_anonymous = false + +################################################################################ +# log.main.type specifies the type of the main log used by owcimomd. If this +# option is set to: +# "syslog" - owcimomd will log all messages through the syslog interface +# (Recommended). +# "null" - logging will be disabled completely. +# "file" - log messages will be written to the file identified by the +# log.main.location config item. +# The default is "syslog" +log.main.type = syslog + +################################################################################ +# log.main.location specifies the location of the log file +# (if the type == "file".) +;log.main.location = + +################################################################################ +# An unsigned integer. The log file's maximum size in KB. 0 means unlimited. +# The default is "0" +;log.main.max_file_size = 0 + +################################################################################ +# An unsigned integer. Determines how many backup files are kept before the +# oldest is erased. If set to 0, no backup files will be made and the log file +# will be truncated when it reaches max_file_size. +# Default is "1" +;log.main.max_backup_index = 1 + +################################################################################ +# Determines whether each log messages is flushed to the log when it happens. +# Set this option to false if you wish to increase logging performance. +# This optional is only applicable to logs of type "file". +# Default is "true" +;log.main.flush = true + +################################################################################ +# A space delimited list of the components the log will output. +# Components used in owcimomd: +# owcimomd +# +# Providers may use their own components. +# "*" means all components. +# The default is "*" +log.main.components = * + +################################################################################ +# A space delimited list of the categories the log will output. +# Categories used in owcimomd: +# FATAL +# ERROR +# INFO +# DEBUG +# +# "*" means all categories. +# If specified in this item, the predefined categores are not treated as +# levels, but as independent categories. No default is available, and if not +# set, no categories will be logged, and the level config item will be used. +;log.main.categories = * + +################################################################################ +# The log.main.level option specifies the level of logging. This can be +# any one of the following: +# "FATAL" - Only fatal error messages are logged. +# "ERROR" - All error and fatal error messages are logged. This is the default. +# "INFO" - All info, error and fatal error messages are logged +# "DEBUG" - All debug, info, error and fatal error messages are logged +# If set, the log will output all predefined categories at and above the +# specified level. +# The default is "ERROR" +log.main.level = ERROR + +################################################################################ +# Specifies the format of the log messages. Text mixed with printf() style +# conversion specifiers. +# Available conversion specifiers: +# %c - The component (e.g. owcimomd) +# %d - The date. May be followed by a date format specifier enclosed between +# braces. For example, %d{%H:%M:%S} or %d{%d %b %Y %H:%M:%S}. If no date +# format specifier is given then ISO8601 format is assumed. +# For more information of the date format specifiers, lookup the +# documentation for the strftime() function found in the header. +# The only addition is %Q, which is the number of milliseconds. +# %F - The file name +# %l - The filename and line number. e.g. file.cpp(100) +# %L - The line number +# %M - The method name where the logging request was issued (only works on +# C++ compilers which support __PRETTY_FUNCTION__ or C99's __func__) +# %m - The message +# %e - The message as XML CDATA. This includes the "" +# %n - The platform dependent line separator character (\n) or characters (\r\n) +# %p - category, aka level, aka priority +# %r - The number of milliseconds elapsed since the start of the application +# until the creation of the logging event +# %t - Thread id +# %% - % +# \n - newline +# \t - tab +# \r - linefeed +# \\ - \ +# \x - The character represented in hexadecimal. +# +# It is possible to change the minimum field width, the maximum field width +# and justification. The optional format modifier is placed between the +# percent sign and the conversion character. +# The first optional format modifier is the left justification flag which is +# the minus (-) character. The optional minimum field width modifier follows. +# It is an integer that represents the minimum number of characters to +# output. If the data item requires fewer characters, it is padded with +# spaces on either the left or the right, according to the justification +# flag. If the data item is larger than the minimum field width, the field +# is expanded to accommodate the data. +# The maximum field width modifier is designated by a period followed by a +# decimal constant. If the data item is longer than the maximum field, then +# the extra characters are removed from the beginning of the data item +# (by default), or from the end if the left justification flag was specified. +# +# Examples: +# Log4j TTCC layout: +# "%r [%t] %-5p %c - %m" +# +# Similar to TTCC, but with some fixed size fields: +# "%-6r [%15.15t] %-5p %30.30c - %m" +# +# XML output conforming to log4j.dtd 1.2 which can be processed by Chainsaw. +# If used, this has to be on one line, it's split up here for readability. +# " +# %e +# +# " +# +# The default is "[%t]%m" +log.main.format = [%t]%m + + +################################################################################ +# If owcimomd is run in debug mode, then the debug log will be active. +log.debug.type = stderr +log.debug.components = * +log.debug.categories = * +;log.debug.level = * +log.debug.format = [%t] %m +# Color version using ascii escape codes +;log.debug.format = \x1b[1;37;40m[\x1b[1;31;40m%-.6t\x1b[1;37;40m]\x1b[1;32;40m %m\x1b[0;37;40m + +# More ascii colors: +# red: \x1b[1;31;40m +# darkRed \x1b[0;31;40m +# green \x1b[1;32;40m +# darkGreen \x1b[0;32;40m +# yellow \x1b[1;33;40m +# darkYellow \x1b[0;33;40m +# blue \x1b[1;34;40m +# darkBlue \x1b[0;34;40m +# purple \x1b[1;35;40m +# darkPurple \x1b[0;35;40m +# cyan \x1b[1;36;40m +# darkCyan \x1b[0;36;40m +# white \x1b[1;37;40m +# darkWhite \x1b[0;37;40m +# gray \x1b[0;37;40m +# resetColor \x1b[0;37;40m + + +################################################################################ +# A space separated list of names for each additional log to configure. For +# each log name, the following config items will apply: +# log..components +# log..categories +# log..level +# log..format +# log..location +# log..max_file_size +# log..max_backup_index +# log..flush +# +# This is a multi-valued option. Whitespace is the separator. +# +;owcimomd.additional_logs = + +################################################################################ +# owcimomd.wql_lib specifies the location where the wql processor library +# will be loaded from. +# To disable WQL, either set this option to empty or comment it out. +# The default is "/usr/lib/libowwql.@LIB_EXT@" +owcimomd.wql_lib = /usr/lib/libowwql.so + +################################################################################ +# The owcimomd.dump_socket_io defines the directory where owcimomd will +# dump all socket i/o to log files. This is usefull for debugging HTTP +# operations and XML. The files will be called /owSockDumpIn and +# /owSockDumpOut. If this option is not set, or has an empty value, +# dump files will not be used. Warning: if this option is defined, +# CIM operattions could take twice as long! +;owcimomd.dump_socket_io = /tmp + +################################################################################ +# The owcimomd.debugflag specifies whether or not owcimomd will run in +# debug mode. If this option is true, owcimomd will not detache from the +# terminal and will send all logging to the terminal. While in this mode +# owcimomd can be properly terminated by simply hitting Ctrl-C or sending it +# a SIGTERM signal (SIGTERM also works if owcimomd.debugflag is false) +# Also using the command line parameter -d turns on debug mode. +;owcimomd.debugflag = false + +################################################################################ +# The authentication module to be used by owcimomd. This should be a +# an absolute path to the shared library containing the authentication module. +owcimomd.authentication_module = /usr/lib/openwbem/authentication/libpamauthentication.so + +################################################################################ +# The maximum number of classes that will be cached by the cimom. +# The default is 128 +owcimomd.max_class_cache_size = 128 + +################################################################################ +# A space delimited list of system users who are allowed to acces the CIMOM +# The special value * to allow all users to authenticate (for instance, if +# you choose to control access with ACLs instead). +# This option is enforced for all authentication methods. If +# owcimomd.allow_anonymous = true, it is not enforced. +# This is a multi-valued option. Whitespace is the separator. +# The default is * +owcimomd.allowed_users = root + +################################################################################ +# If the simple authentication module is used, this needs to be the path to +# the password file +simple_auth.password_file = /etc/openwbem/simple_auth.passwd + +################################################################################ +# When this variable is set to true, the cimom will not attempt to +# deliver indications. +# The default is false +owcimomd.disable_indications = false + +################################################################################ +# A space-separated list of namespaces where providers won't be registerd +# for classes if no namespace was specified during provider self-registration. +# If providers use self-registration, and don't specify a namespace (only +# a class name), they are registered for all namespaces in which the class +# is present by default. This option allows the specified namespaces to be +# excluded from this behavior. +# This is a multi-valued option. Whitespace is the separator. +# Example: owcimomd.explicit_registration_namespaces = root/private root/cache +;owcimomd.explicit_registration_namespaces = + +################################################################################ +# owcimomd.ACL_superuser specifies the user name of the user that has access to +# all CIM data in all namespaces maintained by the CIMOM. This user can be used +# to administer the /root/security namespace which is where all ACL user rights +# are stored. ACL processing is not enabled until the OpenWBEM_Acl1.0.mof file +# has been imported. +owcimomd.ACL_superuser = root + +################################################################################ +# owcimomd.request_handler_TTL specifies how many minutes the request +# handlers will stay loaded after they are accessed. If the value of this +# option is -1, the request handlers will never be unloaded. +# The default is 5 +owcimomd.request_handler_TTL = 5 + +################################################################################ +# owcimomd.check_referential_integrity specifies whether the CIM Repository +# will perform extra checks to help ensure referential integrity between +# associations and propagated keys. Since these checks can add overhead, +# it is recommended to enable this option during development and debugging +# and disable it in production if the overhead is too expensive. +# The default is false +owcimomd.check_referential_integrity = false + +################################################################################ +# owcimomd.polling_manager_max_threads specifies the maximum number of +# concurrent threads that will be allowed to run by the polling manager. +# This should only be a concern if the cimom has a lot of polled providers. +# The default is 256 +owcimomd.polling_manager_max_threads = 256 + +################################################################################ +# owcimomd.max_indication_export_threads specifies the maximum number of +# concurrent threads to export indications that will be allowed to run by the +# indication server. +# This may need to be increased if a lot of indications are being exported. +# The default is 30 +owcimomd.max_indication_export_threads = 30 + +################################################################################ +# owcimomd.restart_on_error controls the use of the fatal signal handler. +# If this option is set to true, if owcimomd receives a fatal signal +# (SIGSEGV, SIGBUS, SIGILL, SIGFPE or SIGABRT) which may be caused by faulty +# code, then it will restart itself. Note that this feature is disabled if +# the cimom is built in debug mode (OW_DEBUG is defined). +# This feature helps to keep the cimom running in the case a buggy provider +# (or the cimom itself) causes a fatal signal. +# The default is true +owcimomd.restart_on_error = true + +################################################################################ +# owcimomd.authorization_lib specifies the location the authorization +# library will be loaded from. +# There are 2 authorization interfaces, either one can work. +# If this option is empty or commented out, no authorization module will be +# used. +;owcimomd.authorization_lib = /usr/lib/openwbem/libowsimpleauthorizer.so + +################################################################################ +# owcimomd.authorization2_lib specifies the location the authorization +# library will be loaded from. +# There are 2 authorization interfaces, either one can work. +# If this option is empty or commented out, no authorization module will be +# used. +;owcimomd.authorization2_lib = /usr/lib/openwbem/libowsimpleauthorizer2.so + +################################################################################ +# owcimomd.interop_schema_namespace specifies the namespace which contains the +# CIM Interop schema. +# The default is root +owcimomd.interop_schema_namespace = Interop + +################################################################################ +# If owcimomd.drop_root_privileges != "false", then owcimomd will run as the +# user "owcimomd" instead of root. +# The default is false +owcimomd.drop_root_privileges = false + +################################################################################ +# cppprovifc.prov_TTL specifies how many minutes the C++ provider manager +# will keep a provider in memory. If a provider has not been accessed for +# longer than this value, it will be unloaded and the memory associated with +# it will be freed. If the value of this option is -1, the providers will +# never be unloaded. +# The default is 5 +cppprovifc.prov_TTL = 5 + +################################################################################ +# The remote provider interface uses a connection pool to re-use remote +# connections. remoteprovifc.max_connections_per_url specifies the maximum +# number of connections per url that will be pooled. The value must be a +# non-negative integer. +# The default is 5 +remoteprovifc.max_connections_per_url = 5 + +################################################################################ +# If OpenWBEM is built with zlib, it can use deflate compression in the HTTP +# responses. This option controls whether it will actually use it or not. +# Performance tests on a 100Mbit lan have shown that enabling deflate is slower +# than if it is disabled. +# The default is true +http_server.enable_deflate = false + +################################################################################ +# http_server.listen_addresses option specifies the local addresses to listen +# on. The option is a space delimited list. Each item is either a hostname +# or an IP address. The value 0.0.0.0 means to listen on all local addresses. +# This is a multi-valued option. Whitespace is the separator. +# The default is 0.0.0.0 +http_server.listen_addresses = 0.0.0.0 + +################################################################################ +# http_server.http_port option specifies the port number owcimomd will listen +# on for all HTTP communications. +# Set this to -1 if you do not want to support HTTP connections (for +# instance, you only want to support HTTPS connections). If a value of 0 +# is given, a port will be dynamically assigned at run-time. +# This is a multi-valued option. Whitespace is the separator. +# The default is 5988 +http_server.http_port = -1 + +################################################################################ +# http_server.https_port specifies the port number owcimomd will listen on +# for all HTTPS communications. +# Set this to -1 if you do not want to support HTTPS connections. +# If a value of 0 is given, a port will be dynamically assigned at run-time. +# This is a multi-valued option. Whitespace is the separator. +# The default is 5989 +http_server.https_port = 5989 + +################################################################################ +# http_server.max_connections specifies the maximum number of concurrent +# connections owcimomd will handle. +# The default is 30 +http_server.max_connections = 30 + +################################################################################ +# http_server.SSL_cert specifies the location of the file that contains the +# host's certificate that will be used by Open SSL for HTTPS communications. +http_server.SSL_cert = /etc/openwbem/servercert.pem + +################################################################################ +# http_server.SSL_key specifies the location of the file that contains the +# host's private key that will be used by Open SSL for HTTPS communications. +# The default is the value of the http_server.SSL_cert option (meaning that +# both the private key and the certificate are in the same file). +http_server.SSL_key = /etc/openwbem/serverkey.pem + +################################################################################ +# Tell the http server to use Digest authentication +# Digest will bypass the Basic authentication mechanism. +# You must set up the digest password file using owdigestgenpass to use digest. +# Digest doesn't use the authentication module specified by the +# owcimomd.authentication_module config item. +# If this option is true, then Basic will not be used. +# If this option is false, then Basic will be used. +# The default is true +http_server.use_digest = false + +################################################################################ +# If the Digest authentication option is enabled, this needs to be the path to +# the password file. +http_server.digest_password_file = /etc/openwbem/digest_auth.passwd + +################################################################################ +# Tell the http server to allow local authentication +# local authentication allows a local system user to authenticate without +# supplying a password, instead relying on filesystem permissions. This can +# be enabled in conjunction with either http Basic or Digest. +# The default is false +http_server.allow_local_authentication = true + +################################################################################ +# Determines if the server should attempt to authenticate clients +# with SSL Client Certificate verification. +# disabled: no client certificate checking will take place. +# optional: A trusted cert is authenticated (no HTTP auth necessary) +# An untrusted cert still passes the SSL handshake, but the client +# will have to pass HTTP authentication. +# autoupdate: Same as optional, but previously unknown client certificates +# which pass HTTP authentication are added to the trust store, so that +# subsequent client connections with the same certificate won't +# require HTTP authentication. +# required: A trusted cert is required for the the SSL handshake to +# succeed. +# The default is disabled +http_server.ssl_client_verification = disabled + +################################################################################ +# Specify the directory containing the OpenSSL trust store. +# The default is "/etc/openwbem/truststore" +http_server.ssl_trust_store = /etc/openwbem/truststore + +################################################################################ +# http_server.single_thread specifies whether or not owcimomd process connection +# in a separate thread or in the same thread as the server. This option is +# really only for debug purposes and should not be of any use to the +# typical user. +# The default is false +http_server.single_thread = false + +################################################################################ +# http_server.use_UDS specifies whether the http server will listen on a +# Unix Domain Socket. +# The default is true +http_server.use_UDS = true + +################################################################################ +# http_server.reuse_addr specifies whether the http server will set the +# SO_REUSEADDR flag when it listens on a socket. This is provided because some +# Unix kernels have security problems when this option is set. +# If this option is not turned on, you may not be able to immediately restart +# the daemon because it can't listen on the port until the kernel releases it. +# It's OK to use on current linux versions. Definitely not on +# OLD (kernel < 1.3.60) ones. +# See http://monkey.org/openbsd/archive/misc/9601/msg00031.html +# or just google for "bind() Security Problems" +# If you specify interfaces to listen on other than 0.0.0.0 using the +# http_server.listen_addresses option, then there is no security problem with +# enabling this option. +# The default is true +http_server.reuse_addr = true + +################################################################################ +# http_server.timeout specifies the number of seconds that the server will use +# as a timeout when communicting with clients. The value must be > 0. +# The default is 300 (5 minutes). +http_server.timeout = 300 + +################################################################################ +# http.default_content_language specified the default content-laguage that +# will be returned to an HTTP client when the accept-language header was used +# on the request and a provider has not explicity set the content-language. +# The default is en +http_server.default_content_language = en + +################################################################################ +# slp.enable_advertisement controls whether the slp provider advertises with SLP +# The default is true +slp.enable_advertisement = true + +################################################################################ +# The following options will probably not need to be modified. +################################################################################ + + +################################################################################ +# owcimomd.services_path Specifies the directory containing the services +# shared libraries to be loaded by the CIMOM. +# This is a multi-valued option. ':' (windows) or ';' (POSIX) is the separator. +# You probably don't need to modify this option. +# The default is "/usr/lib/openwbem/services" +owcimomd.services_path = /usr/lib/openwbem/services + +################################################################################ +# owcimomd.request_handler_path Specifies the directory containing the +# request handler shared libraries to be loaded by the CIMOM. +# This is a multi-valued option. ':' (windows) or ';' (POSIX) is the separator. +# You probably don't need to modify this option. +# The default is "/usr/lib/openwbem/requesthandlers" +owcimomd.request_handler_path = /usr/lib/openwbem/requesthandlers + +################################################################################ +# owcimomd.libexecdir specifies the locaction of the libexec directory. +# Binaries that owcimomd relies on are expected to be in this directory. +# You probably don't need to modify this option. +# The default is "@libexecdir@/openwbem" +owcimomd.libexecdir = @libexecdir@/openwbem + +################################################################################ +# owcimomd.owlibdir specifies the locaction of the lib directory. +# Dynamically loaded libraries that owcimomd relies on are expected to be in +# this directory. +# You probably don't need to modify this option. +# The default is "/usr/lib/openwbem" +owcimomd.owlibdir = /usr/lib/openwbem + +################################################################################ +# owcimomd.datadir specifies the directory where owcimomd will place its data +# file (repositories). +# You probably don't need to modify this option. +# The default is "@localstatedir@/openwbem" +owcimomd.datadir = /var/openwbem + +################################################################################ +# owcimomd.provider_ifc_libs specifies the locations where all the provider +# interfaces will be loaded from. owcimomd assumes all shared libraries in +# these directories are provider interfaces. If a shared library in this directory +# does not support the provider interface api, it will be rejected. +# This is a multi-valued option. ':' (windows) or ';' (POSIX) is the separator. +# You probably don't need to modify this option. +# The default is "/usr/lib/openwbem/provifcs" +owcimomd.provider_ifc_libs = /usr/lib/openwbem/provifcs + +################################################################################ +# One of the provider interfaces provided with owcimomd is the C++ provider +# interface. The cppprovifc.prov_location option specifies where the C++ +# provider interface will load it's providers from. +# This is a multi-valued option. ':' (windows) or ';' (POSIX) is the separator. +# You probably don't need to modify this option. +# The default is "/usr/lib/openwbem/c++providers" +cppprovifc.prov_location = /usr/lib/openwbem/c++providers + +################################################################################ +# One of the provider interfaces provided with owcimomd is the OWBI1 provider +# interface. The owbi1provifc.prov_location option specifies where the OWBI1 +# provider interface will load it's providers from. +# This is a multi-valued option. ':' (windows) or ';' (POSIX) is the separator. +# You probably don't need to modify this option. +# The default is "/usr/lib/openwbem/owbi1providers" +owbi1provifc.prov_location = /usr/lib/openwbem/owbi1providers + +################################################################################ +# owbi1provifc.prov_TTL specifies how many minutes the OWBI1 provider manager +# will keep a provider in memory. If a provider has not been accessed for +# longer than this value, it will be unloaded and the memory associated with +# it will be freed. If the value of this option is -1, the providers will +# never be unloaded. +# The default is 5 +owbi1provifc.prov_TTL = 5 + +################################################################################ +# http_server.uds_filename specifies the name of the unix domain socket the +# http server will listen on. +# You probably don't need to modify this option. +# The default is /tmp/OW@LCL@APIIPC_72859_Xq47Bf_P9r761-5_J-7_Q@PACKAGE_PREFIX@ +http_server.uds_filename = /tmp/OW@LCL@APIIPC_72859_Xq47Bf_P9r761-5_J-7_Q@PACKAGE_PREFIX@ + +################################################################################ +# One of the provider interfaces provided with owcimomd is the NPI provider +# interface. The npiprovifc.prov_location option specifies where the NPI +# provider interface will load it's providers from. +# This is a multi-valued option. ':' (windows) or ';' (POSIX) is the separator. +# The default is "/usr/lib/openwbem/npiproviders" +npiprovifc.prov_location = /usr/lib/openwbem/npiproviders + +################################################################################ +# One of the provider interfaces provided with owcimomd is the CMPI provider +# interface. The cmpiprovifc.prov_location option specifies where the CMPI +# provider interface will load it's providers from. +# This is a multi-valued option. ':' (windows) or ';' (POSIX) is the separator. +# The default is "/usr/lib/openwbem/cmpiproviders" +cmpiprovifc.prov_location = /usr/lib/openwbem/cmpiproviders + +################################################################################ +# cmpiprovifc.prov_TTL specifies how many minutes the CMPI provider manager +# will keep a provider in memory. If a provider has not been accessed for +# longer than this value, it will be unloaded and the memory associated with +# it will be freed. If the value of this option is -1, the providers will +# never be unloaded. +# The default is -1 +cmpiprovifc.prov_TTL = -1 + +################################################################################ +# One of the provider interfaces provided with owcimomd is the perl provider +# interface. The perlprovifc.prov_location option specifies where the perl +# provider interface will load it's providers from. +# This is a multi-valued option. ':' (windows) or ';' (POSIX) is the separator. +# The default is "/usr/lib/openwbem/perlproviders" +perlprovifc.prov_location = /usr/lib/openwbem/perlproviders + +################################################################################ +# The default built in provider interface is loaded and initialized by default. +# Set this option to true to disable it. +# The default is "false" +owcimomd.disable_cpp_provider_interface = false + +################################################################################ +# Specify the location of the owcimomd pidfile +# The default is "@PIDFILE_DIR@/@PACKAGE_PREFIX@owcimomd.pid" +owcimomd.pidfile = /var/run/owcimomd.pid +################################################################################ +# The following options are deprecated +################################################################################ + + +################################################################################ +# This option is DEPRECATED. Use owcimomd.allowed_users instead. +# A space delimited list of system users who are allowed to access the CIMOM. +# This option is only enforced by the pam authentication module, and has no +# effect if you are not using http Basic authentication together with the +# pam authentication module. +# Set this value to * to allow all users to authenticate (for instance, if +# you choose to control access with ACLs instead). +pam.allowed_users = * + +################################################################################ +# THIS OPTION IS DEPRECATED - Use log.main.type and log.main.location instead. +# owcimomd.log_location specifies the location of the log file that is +# generated by owcimomd. If this option is set to syslog, owcimomd will log +# all messages through the syslog interface (Recommended). If this option +# is set to null, logging will be disabled completely. If this option +# is set to anything else, it is assumed it is an absolute path to a file +# that owcimomd will write its log messages to. +# The default is syslog +;owcimomd.log_location = syslog + +################################################################################ +# THIS OPTION IS DEPRECATED - Use log.main.level or log.main.categories +# The owcimomd.log_level option specifies the level of logging. This can be +# any one of the following: +# "debug" - All debug, info, error and fatalerror messages are logged +# "info" - All info, error and fatalerror messages are logged +# "error" - All error and fatalerror messages are logged. This is the default. +# "fatalerror" - Only fatalerror messages are logged. +;owcimomd.log_level = error + + diff --git a/engine/tests/Functional.demo/data/openwbem/servercert.pem b/engine/tests/Functional.demo/data/openwbem/servercert.pem new file mode 100644 index 0000000..b5f72ff --- /dev/null +++ b/engine/tests/Functional.demo/data/openwbem/servercert.pem @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICgzCCAewCCQDxA5LeAK94DzANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMC +Q04xCzAJBgNVBAgMAkpTMQswCQYDVQQHDAJOSjEQMA4GA1UECgwHZnVqaXRzdTEQ +MA4GA1UECwwHZnVqaXRzdTEOMAwGA1UEAwwFbG9jYWwxKDAmBgkqhkiG9w0BCQEW +GWxpeGluLmZuc3RAY24uZnVqaXRzdS5jb20wHhcNMTUwMjEzMDk1MTA2WhcNMTYw +MjEzMDk1MTA2WjCBhTELMAkGA1UEBhMCQ04xCzAJBgNVBAgMAkpTMQswCQYDVQQH +DAJOSjEQMA4GA1UECgwHZnVqaXRzdTEQMA4GA1UECwwHZnVqaXRzdTEOMAwGA1UE +AwwFbG9jYWwxKDAmBgkqhkiG9w0BCQEWGWxpeGluLmZuc3RAY24uZnVqaXRzdS5j +b20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAK+YOGizyeZVZWGxCuX4rnb3 +l7qW2D3U/11HqbhwEgc6xKk2OAs4r3PMT7d47NEIBlcQIBOQd5xEDDspTzENOb3w +LI4+x14JB4S7CrQajo0WMezC9sBiBgT5/zOtNu+Pl1ZPplvuaXbJA67FRCa8XWeh +phZStX/2C8B/DBgm2EARAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAEgizYxaN6mgQ +8FqePblZ1+e5giVzQzyFKIVf3RiBuceG3SS/4syfXJ+lEUXzYv3vXZTEXj5NSuVc +lp+0jPEntctgxekJRbyTm/UWiOuljp6mqtO403mTFej4+8uAz9EZ/CmsA4aV/9+r +R+lk+edjnGidy5t83pryxtzdfGVjj8Q= +-----END CERTIFICATE----- diff --git a/engine/tests/Functional.demo/data/openwbem/serverkey.pem b/engine/tests/Functional.demo/data/openwbem/serverkey.pem new file mode 100644 index 0000000..7c22c4b --- /dev/null +++ b/engine/tests/Functional.demo/data/openwbem/serverkey.pem @@ -0,0 +1,16 @@ +-----BEGIN PRIVATE KEY----- +MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAK+YOGizyeZVZWGx +CuX4rnb3l7qW2D3U/11HqbhwEgc6xKk2OAs4r3PMT7d47NEIBlcQIBOQd5xEDDsp +TzENOb3wLI4+x14JB4S7CrQajo0WMezC9sBiBgT5/zOtNu+Pl1ZPplvuaXbJA67F +RCa8XWehphZStX/2C8B/DBgm2EARAgMBAAECgYA0EIZpRSXQTfHJjZ0Voy7Xx4IN +qTxk2Qr+tYj1TwWJbztwkMr9SMl9JE9er1RIhoCawAVCx8svYl3eDNmWSb2cviaJ +qGcP0nCSlJFYde8rjxYFP6Rf1Az+Q0RsX9tZhqrHUNlIgqnvB08osDfU3lc7Gjpt +pJBoTwBoemJit/CiAQJBANTV3ggjrfwlioTDoGTf10GO5torZbtKPyeEXy1MoE+g +MD3a0nL6XeYF0gSqg9MMpNTMMdhbiaVqLJnZ8pfLCFkCQQDTNNwSKfSkONxRatgs +CznOStt3ea5u6r9jyBaGWQ8/6KGK4ki4ALpwIxDuH4YpwxfwS7gD6klfYHObsvmv +Qf55AkEAh7jaHdai3GgULRWS8sDLQ8Mc84M5HHX8T/bZuslicWR1Xvxrt2Zw+n47 +rz4NUkh91DVik9XLsPBEANg7GxEeAQJAJWVyofSz0HAQ8omMhR/nuFMg0OLGs/T0 +tmIzOs6CGLrD/6dZYNsgJ8LNuJv0UWit0GpXxrmxDCYz0hm6hAGXYQJAJqQfYxzi +an3TXlCG/s57sQ+VWo4+Uh4bN8/7bEMb4qy0rgQ7leIoPrj6qIkyztFZpjDLAZv7 +iD2bulncJ1k6BQ== +-----END PRIVATE KEY----- diff --git a/engine/tests/Functional.demo/data/openwbem/ssleay.cnf b/engine/tests/Functional.demo/data/openwbem/ssleay.cnf new file mode 100644 index 0000000..4b0db5f --- /dev/null +++ b/engine/tests/Functional.demo/data/openwbem/ssleay.cnf @@ -0,0 +1,34 @@ +# +# SSLeay example configuration file. +# + +RANDFILE = $ENV::HOME/.rnd + +[ req ] +default_bits = 1024 +default_keyfile = privkey.pem +distinguished_name = req_distinguished_name + +[ req_distinguished_name ] +countryName = Country Name (2 letter code) +countryName_default = GB +countryName_min = 2 +countryName_max = 2 + +stateOrProvinceName = State or Province Name (full name) +stateOrProvinceName_default = Some-State + +localityName = Locality Name (eg, city) + +organizationName = Organization Name (eg, company; recommended) +organizationName_max = 64 + +organizationalUnitName = Organizational Unit Name (eg, section) +organizationalUnitName_max = 64 + +commonName = server name (eg. ssl.domain.tld; required!!!) +commonName_max = 80 + +emailAddress = Email Address +emailAddress_max = 85 + diff --git a/engine/tests/Functional.demo/data/ospf6d.conf b/engine/tests/Functional.demo/data/ospf6d.conf new file mode 100644 index 0000000..7a292ce --- /dev/null +++ b/engine/tests/Functional.demo/data/ospf6d.conf @@ -0,0 +1,55 @@ +! +! Zebra configuration saved from vty +! 2003/11/28 00:49:49 +! +hostname ospf6d@plant +password zebra + +log file /var/log/quagga/ospf6d.log +log syslog informational +!log stdout +service advanced-vty +! +debug ospf6 neighbor state +! +interface fxp0 + ipv6 ospf6 cost 1 + ipv6 ospf6 hello-interval 10 + ipv6 ospf6 dead-interval 40 + ipv6 ospf6 retransmit-interval 5 + ipv6 ospf6 priority 0 + ipv6 ospf6 transmit-delay 1 + ipv6 ospf6 instance-id 0 +! +interface lo0 + ipv6 ospf6 cost 1 + ipv6 ospf6 hello-interval 10 + ipv6 ospf6 dead-interval 40 + ipv6 ospf6 retransmit-interval 5 + ipv6 ospf6 priority 1 + ipv6 ospf6 transmit-delay 1 + ipv6 ospf6 instance-id 0 +! +router ospf6 + router-id 255.1.1.1 + redistribute static route-map static-ospf6 + interface fxp0 area 0.0.0.0 +! +access-list access4 permit 127.0.0.1/32 +! +ipv6 access-list access6 permit 3ffe:501::/32 +ipv6 access-list access6 permit 2001:200::/48 +ipv6 access-list access6 permit ::1/128 +! +ipv6 prefix-list test-prefix seq 1000 deny any +! +route-map static-ospf6 permit 10 + match ipv6 address prefix-list test-prefix + set metric-type type-2 + set metric 2000 +! +line vty + access-class access4 + ipv6 access-class access6 + exec-timeout 0 0 +! diff --git a/engine/tests/Functional.demo/data/ospfd.conf b/engine/tests/Functional.demo/data/ospfd.conf new file mode 100644 index 0000000..ea0f155 --- /dev/null +++ b/engine/tests/Functional.demo/data/ospfd.conf @@ -0,0 +1,23 @@ +! +! Zebra configuration saved from vty +! 2000/01/01 02:22:47 +! +hostname ospfd +password zebra +log file /var/log/quagga/ospfd.log +log syslog informational +! +! +! +interface bmap +! +interface eth0 +! +interface eth1 +! +interface eth2 +! +interface lo +! +line vty +! diff --git a/engine/tests/Functional.demo/data/ripd.conf b/engine/tests/Functional.demo/data/ripd.conf new file mode 100644 index 0000000..ca0b51f --- /dev/null +++ b/engine/tests/Functional.demo/data/ripd.conf @@ -0,0 +1,13 @@ +! +! Zebra configuration saved from vty +! 2000/01/01 02:15:35 +! +hostname ripd +password zebra +log file /var/log/quagga/ripd.log +log syslog informational +! +router rip +! +line vty +! diff --git a/engine/tests/Functional.demo/data/ripngd.conf b/engine/tests/Functional.demo/data/ripngd.conf new file mode 100644 index 0000000..3082d4c --- /dev/null +++ b/engine/tests/Functional.demo/data/ripngd.conf @@ -0,0 +1,24 @@ +! -*- rip -*- +! +! RIPngd sample configuration file +! +! $Id: ripngd.conf.sample,v 1.1.1.1 2002/12/13 20:15:30 paul Exp $ +! +hostname ripngd +password zebra +log file /var/log/quagga/ripngd.log +log syslog informational +! +! debug ripng events +! debug ripng packet +! +! +router ripng +! network sit1 +! route 3ffe:506::0/32 +! distribute-list local-only out sit1 +! +!ipv6 access-list local-only permit 3ffe:506::0/32 +!ipv6 access-list local-only deny any +! +!log stdout diff --git a/engine/tests/Functional.demo/data/testsrv.conf b/engine/tests/Functional.demo/data/testsrv.conf new file mode 100644 index 0000000..0c18a40 --- /dev/null +++ b/engine/tests/Functional.demo/data/testsrv.conf @@ -0,0 +1,16 @@ +# +proto udp +port 5000 + +dev tap + +secret /etc/openvpn/host-target.key +#link-mtu 1200 + +ping 10 +ping-restart 60 +ping-timer-rem +persist-key +persist-tun +verb 3 + diff --git a/engine/tests/Functional.demo/data/wpa_supplicant.conf b/engine/tests/Functional.demo/data/wpa_supplicant.conf new file mode 100644 index 0000000..cfa2849 --- /dev/null +++ b/engine/tests/Functional.demo/data/wpa_supplicant.conf @@ -0,0 +1,16 @@ +# test configuration +# cec)matsumoto +# +ctrl_interface=/var/run/wpa_supplicant +ctrl_interface_group=wheel +update_config=1 + +network={ + #proto=WPA2 + #key_mgmt=WPA-PSK + ssid="testwifi" + psk="fnst1234" + #wpa_passphrase testwifi fnst1234 + #psk=1c6c26faf4b3967876c10adf510675538c915e5ae583dd42bca52f0b80bb52a4 +} + diff --git a/engine/tests/Functional.demo/data/wpa_supplicant.sysconfig b/engine/tests/Functional.demo/data/wpa_supplicant.sysconfig new file mode 100644 index 0000000..c72e61d --- /dev/null +++ b/engine/tests/Functional.demo/data/wpa_supplicant.sysconfig @@ -0,0 +1,10 @@ +# wlan0 and wifi0 +# INTERFACES="-iwlan0 -iwifi0" +# INTERFACES="-iwlan0" +# ndiswrapper and prism +#DRIVERS="-Dndiswrapper -Dprism" +#DRIVERS="-Dndiswrapper" +# +INTERFACES="-iwlan0" +DRIVERS="-Dwext" + diff --git a/engine/tests/Functional.demo/data/zebra.conf b/engine/tests/Functional.demo/data/zebra.conf new file mode 100644 index 0000000..1a5542b --- /dev/null +++ b/engine/tests/Functional.demo/data/zebra.conf @@ -0,0 +1,26 @@ +! +! Zebra configuration saved from vty +! 2000/01/01 01:54:01 +! +hostname Router +password zebra +enable password zebra +log file /var/log/quagga/zebra.log +log syslog informational +! +!interface bmap +! +interface eth0 +! +!interface eth1 +! +!interface eth2 +! +interface lo +! +ip route 192.168.246.0/24 eth0 reject +! +!ipv6 forwarding +! +line vty +! diff --git a/engine/tests/Functional.demo/demo_test.sh b/engine/tests/Functional.demo/demo_test.sh new file mode 100755 index 0000000..dd5ce37 --- /dev/null +++ b/engine/tests/Functional.demo/demo_test.sh @@ -0,0 +1,4 @@ +#!/bin/sh +for i in tests/*.sh; do + sh $i +done diff --git a/engine/tests/Functional.demo/fuego_test.sh b/engine/tests/Functional.demo/fuego_test.sh new file mode 100644 index 0000000..ffa72a6 --- /dev/null +++ b/engine/tests/Functional.demo/fuego_test.sh @@ -0,0 +1,118 @@ +function test_pre_check { + is_on_target_path acpid PROGRAM_ACPID + assert_define PROGRAM_ACPID "Missing 'acpid' program on target board" + is_on_target_path atd PROGRAM_ATD + assert_define PROGRAM_ATD "Missing 'atd' program on target board" + is_on_target_path auditd PROGRAM_AUDITD + assert_define PROGRAM_AUDITD "Missing 'auditd' program on target board" + is_on_target_path bgpd PROGRAM_BGPD + assert_define PROGRAM_BGPD "Missing 'bgpd' program on target board" + is_on_target_path named PROGRAM_NAMED + assert_define PROGRAM_NAMED "Missing 'named' program on target board" + is_on_target_path crond PROGRAM_CROND + assert_define PROGRAM_CROND "Missing 'crond' program on target board" + is_on_target_path dbus-daemon PROGRAM_DBUS + assert_define PROGRAM_DBUS "Missing 'dbus-daemon' program on target board" + is_on_target_path dhcpd PROGRAM_DHCPD + assert_define PROGRAM_DHCPD "Missing 'dhcpd' program on target board" + is_on_target_path dhcrelay PROGRAM_DHCRELAY + assert_define PROGRAM_DHCRELAY "Missing 'dhcrelay' program on target board" + is_on_target_path dovecot PROGRAM_DOVECOT + assert_define PROGRAM_DOVECOT "Missing 'dovecot' program on target board" + is_on_target_path ip6tables PROGRAM_IP6TABLES + assert_define PROGRAM_IP6TABLES "Missing 'ip6tables' program on target board" + is_on_target_path lighttpd PROGRAM_LIGHTTPD + assert_define PROGRAM_LIGHTTPD "Missing 'lighttpd' program on target board" + is_on_target_path lldpad PROGRAM_LLDPAD + assert_define PROGRAM_LLDPAD "Missing 'lldpad' program on target board" + is_on_target_path sensors-detect PROGRAM_SENSORS + assert_define PROGRAM_SENSORS "Missing 'sensors-detect' program on target board" + is_on_target_path mdadm PROGRAM_MDADM + assert_define PROGRAM_MDADM "Missing 'mdadm' program on target board" + is_on_target_path multipathd PROGRAM_MULTIPATHD + assert_define PROGRAM_MULTIPATHD "Missing 'multipathd' program on target board" + is_on_target_path rpc.statd PROGRAM_RPCSTATD + assert_define PROGRAM_RPCSTATD "Missing 'rpc.statd' program on target board" + is_on_target_path nscd PROGRAM_NSCD + assert_define PROGRAM_NSCD "Missing 'nscd' program on target board" + is_on_target_path ntpdate PROGRAM_NTPDATE + assert_define PROGRAM_NTPDATE "Missing 'ntpdate' program on target board" + is_on_target_path ntpd PROGRAM_NTPD + assert_define PROGRAM_NTPD "Missing 'ntpd' program on target board" + is_on_target_path openhpid PROGRAM_OPENHPID + assert_define PROGRAM_OPENHPID "Missing 'openhpid' program on target board" + is_on_target_path iscsid PROGRAM_ISCSID + assert_define PROGRAM_ISCSID "Missing 'iscsid' program on target board" + is_on_target_path slapd PROGRAM_SLAPD + assert_define PROGRAM_SLAPD "Missing 'slapd' program on target board" + is_on_target_path openvpn PROGRAM_OPENVPN + assert_define PROGRAM_OPENVPN "Missing 'openvpn' program on target board" + is_on_target_path openwsmand PROGRAM_OPENWSMAND + assert_define PROGRAM_OPENWSMAND "Missing 'openwsmand' program on target board" + is_on_target_path ospf6d PROGRAM_OSPF6D + assert_define PROGRAM_OSPF6D "Missing 'ospf6d' program on target board" + is_on_target_path ospfd PROGRAM_OSPFD + assert_define PROGRAM_OSPFD "Missing 'ospfd' program on target board" + is_on_target_path pcscd PROGRAM_PCSCD + assert_define PROGRAM_PCSCD "Missing 'pcscd' program on target board" + is_on_target_path plmcd PROGRAM_PLMCD + assert_define PROGRAM_PLMCD "Missing 'plmcd' program on target board" + is_on_target_path postfix PROGRAM_POSTFIX + assert_define PROGRAM_POSTFIX "Missing 'postfix' program on target board" + is_on_target_path pppoe-server PROGRAM_PPPOESERVER + assert_define PROGRAM_PPPOESERVER "Missing 'pppoe-server' program on target board" + is_on_target_path ptpd2 PROGRAM_PTPD2 + assert_define PROGRAM_PTPD2 "Missing 'ptpd2' program on target board" + is_on_target_path zebra PROGRAM_ZEBRA + assert_define PROGRAM_ZEBRA "Missing 'zebra' program on target board" + is_on_target_path radvd PROGRAM_RADVD + assert_define PROGRAM_RADVD "Missing 'radvd' program on target board" + is_on_target_path rarpd PROGRAM_RARPD + assert_define PROGRAM_RARPD "Missing 'rarpd' program on target board" + is_on_target_path ripd PROGRAM_RIPD + assert_define PROGRAM_RIPD "Missing 'ripd' program on target board" + is_on_target_path ripngd PROGRAM_RIPNGD + assert_define PROGRAM_RIPNGD "Missing 'ripngd' program on target board" + is_on_target_path rpcbind PROGRAM_RPCBIND + assert_define PROGRAM_RPCBIND "Missing 'rpcbind' program on target board" + is_on_target_path saslauthd PROGRAM_SASLAUTHD + assert_define PROGRAM_SASLAUTHD "Missing 'saslauthd' program on target board" + is_on_target_path sensord PROGRAM_SENSORD + assert_define PROGRAM_SENSORD "Missing 'sensord' program on target board" + is_on_target_path smartd PROGRAM_SMARTD + assert_define PROGRAM_SMARTD "Missing 'smartd' program on target board" + is_on_target_path snmpd PROGRAM_SNMPD + assert_define PROGRAM_SNMPD "Missing 'snmpd' program on target board" + is_on_target_path snmptrapd PROGRAM_SNMPTRAPD + assert_define PROGRAM_SNMPTRAPD "Missing 'snmptrapd' program on target board" + is_on_target_path sshd PROGRAM_SSHD + assert_define PROGRAM_SSHD "Missing 'sshd' program on target board" + is_on_target_path syslog-ng PROGRAM_SYSLOGNG + assert_define PROGRAM_SYSLOGNG "Missing 'syslog-ng' program on target board" + is_on_target_path uuidd PROGRAM_UUIDD + assert_define PROGRAM_UUIDD "Missing 'uuidd' program on target board" + is_on_target_path vsftpd PROGRAM_VSFTPD + assert_define PROGRAM_VSFTPD "Missing 'vsftpd' program on target board" + is_on_target_path wpa_supplicant PROGRAM_WPA_SUPPLICANT + assert_define PROGRAM_WPA_SUPPLICANT "Missing 'wpa_supplicant' program on target board" + is_on_target_path xinetd PROGRAM_XINETD + assert_define PROGRAM_XINETD "Missing 'xinetd' program on target board" + is_on_target_path zabbix_agentd PROGRAM_ZABBIX_AGENTD + assert_define PROGRAM_ZABBIX_AGENTD "Missing 'zabbix_agentd' program on target board" +} + +function test_deploy { + put $TEST_HOME/demo_test.sh $BOARD_TESTDIR/fuego.$TESTDIR/ + put $FUEGO_CORE/engine/scripts/fuego_board_function_lib.sh $BOARD_TESTDIR/fuego.$TESTDIR + put -r $TEST_HOME/tests $BOARD_TESTDIR/fuego.$TESTDIR/ + put -r $TEST_HOME/data $BOARD_TESTDIR/fuego.$TESTDIR/ +} + +function test_run { + report "cd $BOARD_TESTDIR/fuego.$TESTDIR;\ + ./demo_test.sh" +} + +function test_processing { + log_compare "$TESTDIR" "0" "TEST-FAIL" "n" +} diff --git a/engine/tests/Functional.demo/parser.py b/engine/tests/Functional.demo/parser.py new file mode 100644 index 0000000..d85abd7 --- /dev/null +++ b/engine/tests/Functional.demo/parser.py @@ -0,0 +1,22 @@ +#!/usr/bin/python +# See common.py for description of command-line arguments + +import os, sys, collections + +sys.path.insert(0, os.environ['FUEGO_CORE'] + '/engine/scripts/parser') +import common as plib + +measurements = {} +measurements = collections.OrderedDict() + +regex_string = '^ -> (.*): TEST-(.*)$' +matches = plib.parse_log(regex_string) + +if matches: + for m in matches: + measurements['default.' + m[0]] = 'PASS' if m[1] == 'PASS' else 'FAIL' + +# split the output for each testcase +plib.split_output_per_testcase(regex_string, measurements) + +sys.exit(plib.process(measurements)) diff --git a/engine/tests/Functional.demo/spec.json b/engine/tests/Functional.demo/spec.json new file mode 100644 index 0000000..afb0576 --- /dev/null +++ b/engine/tests/Functional.demo/spec.json @@ -0,0 +1,7 @@ +{ + "testName": "Functional.demo", + "specs": { + "default": {} + } +} + diff --git a/engine/tests/Functional.demo/tests/demo_acpid.sh b/engine/tests/Functional.demo/tests/demo_acpid.sh new file mode 100644 index 0000000..1b8e5d3 --- /dev/null +++ b/engine/tests/Functional.demo/tests/demo_acpid.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +# In the target start acpid, and confirm the process condition by command ps. + +test="acpid" + +. ./fuego_board_function_lib.sh + +set_init_manager + +exec_service_on_target acpid stop + +if exec_service_on_target acpid start +then + echo " -> start of acpid succeeded." +else + echo " -> start of acpid failed." + echo " -> $test: TEST-FAIL" + exit +fi + +sleep 5 + +if ps aux | grep "[/]usr/sbin/acpid" +then + echo " -> get the process of acpid." +else + echo " -> can't get the process of acpid." + echo " -> $test: TEST-FAIL" + exec_service_on_target acpid stop + exit +fi + +exec_service_on_target acpid stop + +if ps aux | grep "[/]usr/sbin/acpid" +then + echo " -> $test: TEST-FAIL" +else + echo " -> $test: TEST-PASS" +fi diff --git a/engine/tests/Functional.demo/tests/demo_atd.sh b/engine/tests/Functional.demo/tests/demo_atd.sh new file mode 100644 index 0000000..1b0c7ae --- /dev/null +++ b/engine/tests/Functional.demo/tests/demo_atd.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +# In the target start atd, and confirm the process condition by command ps. + +test="atd" + +. ./fuego_board_function_lib.sh + +set_init_manager + +exec_service_on_target atd stop + +if exec_service_on_target atd start +then + echo " -> start of atd succeeded." +else + echo " -> start of atd failed." + echo " -> $test: TEST-FAIL" + exit +fi + +sleep 5 + +if ps aux | grep "[/]usr/sbin/atd" +then + echo " -> get the process of atd." +else + echo " -> can't get the process of atd." + echo " -> $test: TEST-FAIL" + exec_service_on_target atd stop + exit +fi + +exec_service_on_target atd stop + +if ps aux | grep "[/]usr/sbin/atd" +then + echo " -> $test: TEST-FAIL" +else + echo " -> $test: TEST-PASS" +fi diff --git a/engine/tests/Functional.demo/tests/demo_auditd.sh b/engine/tests/Functional.demo/tests/demo_auditd.sh new file mode 100644 index 0000000..802be4b --- /dev/null +++ b/engine/tests/Functional.demo/tests/demo_auditd.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# In the target start auditd, and confirm the process condition by command ps. + +test="auditd" + +. ./fuego_board_function_lib.sh + +set_init_manager + +exec_service_on_target auditd stop + +if exec_service_on_target auditd start +then + echo " -> start of auditd succeeded." +else + echo " -> start of auditd failed." + echo " -> $test: TEST-FAIL" + exit +fi + +sleep 5 + +if ps aux | grep "[/]sbin/auditd" +then + echo " -> get the process of auditd." +else + echo " -> can't get the process of auditd." + echo " -> $test: TEST-FAIL" + exec_service_on_target auditd stop + exit +fi -- 1.8.3.1