Compare commits
No commits in common. "c8" and "c8s" have entirely different histories.
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
SOURCES/omping-0.0.4.tar.gz
|
SOURCES/omping-0.0.4.tar.gz
|
||||||
|
/omping-0.0.4.tar.gz
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
043fccc87f185e2a801039064b619f7fa370ea72 SOURCES/omping-0.0.4.tar.gz
|
|
||||||
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-8
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||||
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
|||||||
|
SHA512 (omping-0.0.4.tar.gz) = 358362b41c8a502f95f4a7ac044122159cc73b2b124849c957d4041c14dc38057febeb725066ceb7c595ed059a60c7dffd14c986fa90119a8d27055e665bd023
|
||||||
76
tests/smoke/runtest.sh
Normal file
76
tests/smoke/runtest.sh
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright (c) 2019, Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
# purpose with or without fee is hereby granted, provided that the above
|
||||||
|
# copyright notice and this permission notice appear in all copies.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS" AND RED HAT, INC. DISCLAIMS ALL WARRANTIES
|
||||||
|
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||||
|
# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL RED HAT, INC. BE LIABLE
|
||||||
|
# FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||||
|
# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||||
|
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
#
|
||||||
|
# Author: Jan Friesse <jfriesse@redhat.com>
|
||||||
|
|
||||||
|
# Home https://github.com/jfriesse/csts/tree/master/smoke
|
||||||
|
|
||||||
|
# -e is really important
|
||||||
|
set -xe
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
####################
|
||||||
|
# Helper functions #
|
||||||
|
####################
|
||||||
|
get_ip() {
|
||||||
|
ip_res=$(ip route get 8.8.8.8)
|
||||||
|
# Format is "8.8.8.8 via ROUTE_IPADDR dev DEV src IPADDR uid NUMBER"
|
||||||
|
# Remove everything up to "src " and then everything after " "
|
||||||
|
addr=${ip_res##*src }
|
||||||
|
addr=${addr%% *}
|
||||||
|
|
||||||
|
echo "$addr"
|
||||||
|
}
|
||||||
|
|
||||||
|
##################
|
||||||
|
# Test functions #
|
||||||
|
##################
|
||||||
|
|
||||||
|
test_omping_v() {
|
||||||
|
# Check that omping -V prints version
|
||||||
|
ver_res=`omping -V`
|
||||||
|
[ "$ver_res" != "${ver_res/[0-9]*\.[0-9]*\.[0-9]/}" ]
|
||||||
|
|
||||||
|
# Check that omping exists and prints usage
|
||||||
|
res=`omping || true`
|
||||||
|
[ "$res" != "${res/usage/}" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
test_man_page() {
|
||||||
|
man -w "omping"
|
||||||
|
}
|
||||||
|
|
||||||
|
test_local_ping() {
|
||||||
|
omping_res_file=`mktemp`
|
||||||
|
local_ip=$(get_ip)
|
||||||
|
|
||||||
|
omping -c 5 "$local_ip" | tee "$omping_res_file"
|
||||||
|
|
||||||
|
grep "$local_ip.*joined (S,G)" "$omping_res_file"
|
||||||
|
grep "$local_ip.*given amount of query messages was sent" "$omping_res_file"
|
||||||
|
grep "$local_ip.*unicast, xmt/rcv/%loss =.*min/avg/max/std-dev" "$omping_res_file"
|
||||||
|
grep "$local_ip.*multicast, xmt/rcv/%loss =.*min/avg/max/std-dev" "$omping_res_file"
|
||||||
|
|
||||||
|
rm -f "$omping_res_file"
|
||||||
|
}
|
||||||
|
|
||||||
|
########
|
||||||
|
# main #
|
||||||
|
########
|
||||||
|
test_omping_v
|
||||||
|
test_man_page
|
||||||
|
|
||||||
|
test_local_ping
|
||||||
10
tests/tests.yml
Normal file
10
tests/tests.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
- hosts: localhost
|
||||||
|
roles:
|
||||||
|
- role: standard-test-basic
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
tests:
|
||||||
|
- smoke
|
||||||
|
required_packages:
|
||||||
|
- iproute
|
||||||
|
- omping
|
||||||
Loading…
Reference in New Issue
Block a user