Compare commits
No commits in common. "c9-beta" and "c9s" have entirely different histories.
|
@ -1 +1,8 @@
|
||||||
SOURCES/spausedd-20210719.tar.gz
|
/spausedd-20190320.tar.gz
|
||||||
|
/spausedd-20190807.tar.gz
|
||||||
|
/spausedd-20200323.tar.gz
|
||||||
|
/spausedd-20201110.tar.gz
|
||||||
|
/spausedd-20201112.tar.gz
|
||||||
|
/spausedd-20210326.tar.gz
|
||||||
|
/spausedd-20210520.tar.gz
|
||||||
|
/spausedd-20210719.tar.gz
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
daad8303589c6d2314d0bf5e1a18752758a66ec1 SOURCES/spausedd-20210719.tar.gz
|
daad8303589c6d2314d0bf5e1a18752758a66ec1 spausedd-20210719.tar.gz
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- fedora-*
|
||||||
|
decision_context: bodhi_update_push_testing
|
||||||
|
subject_type: koji_build
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||||
|
|
||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- fedora-*
|
||||||
|
decision_context: bodhi_update_push_stable
|
||||||
|
subject_type: koji_build
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
|
@ -0,0 +1 @@
|
||||||
|
SHA512 (spausedd-20210719.tar.gz) = e2a05fd0d9ff4620848fe51d2d06e9c81b9f1553bb092a5e5ac229dc96d3bbd73b9aa2e1c6832e1625cfa8e033844701cdf3c3b7c053213fea167d33bd2bfc90
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Empty %postun
|
||||||
|
addFilter(r'W: empty-%postun')
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Ignore tests runs/artefacts.
|
||||||
|
artifacts/**
|
||||||
|
**/*.retry
|
|
@ -0,0 +1,133 @@
|
||||||
|
#!/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
|
||||||
|
|
||||||
|
# Variables changing test behavior
|
||||||
|
MAX_REPEATS=60
|
||||||
|
SLEEP=5
|
||||||
|
|
||||||
|
# Start of the test (for journalctl)
|
||||||
|
JOURNAL_DATE_SINCE=$(date +"%F %T")
|
||||||
|
|
||||||
|
####################
|
||||||
|
# Helper functions #
|
||||||
|
####################
|
||||||
|
|
||||||
|
# service_start service
|
||||||
|
service_start() {
|
||||||
|
# service service must be inactive
|
||||||
|
systemctl is-active "$1" && exit 1 || true
|
||||||
|
|
||||||
|
systemctl start "$1"
|
||||||
|
|
||||||
|
systemctl is-active "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
# service_stop service
|
||||||
|
service_stop() {
|
||||||
|
systemctl is-active "$1" || exit 1
|
||||||
|
|
||||||
|
systemctl stop "$1"
|
||||||
|
|
||||||
|
systemctl is-active "$1" && exit 1 || true
|
||||||
|
}
|
||||||
|
|
||||||
|
# wait_for_log_msg message
|
||||||
|
wait_for_log_msg() {
|
||||||
|
local cont=true
|
||||||
|
local repeats=0
|
||||||
|
|
||||||
|
journalctl --since "$JOURNAL_DATE_SINCE" | cat
|
||||||
|
|
||||||
|
while $cont;do
|
||||||
|
if journalctl -t "spausedd" -o cat --since "$JOURNAL_DATE_SINCE" | grep "$1";then
|
||||||
|
cont=false
|
||||||
|
else
|
||||||
|
sleep 1
|
||||||
|
repeats=$((repeats+1))
|
||||||
|
[ "$repeats" -le "$MAX_REPEATS" ] || return 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
##################
|
||||||
|
# Test functions #
|
||||||
|
##################
|
||||||
|
|
||||||
|
test_spausedd_h() {
|
||||||
|
# Check that spausedd binary exists and -h returns help text
|
||||||
|
res=`spausedd -h || true`
|
||||||
|
[ "$res" != "${res/usage/}" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
test_spausedd_start() {
|
||||||
|
service_start "spausedd"
|
||||||
|
|
||||||
|
wait_for_log_msg 'Running main poll loop with maximum timeout .* and steal threshold .*%'
|
||||||
|
}
|
||||||
|
|
||||||
|
test_spausedd_stop() {
|
||||||
|
service_stop "spausedd"
|
||||||
|
|
||||||
|
wait_for_log_msg 'During .*s runtime spausedd was .*x not scheduled on time'
|
||||||
|
}
|
||||||
|
|
||||||
|
test_sig_stop() {
|
||||||
|
local cont=true
|
||||||
|
local repeats=0
|
||||||
|
|
||||||
|
spausedd_pid=$(systemctl show spausedd -p "MainPID")
|
||||||
|
spausedd_pid=${spausedd_pid##*=}
|
||||||
|
|
||||||
|
while $cont;do
|
||||||
|
# Wait a while for full start
|
||||||
|
sleep $SLEEP
|
||||||
|
|
||||||
|
kill -STOP "$spausedd_pid"
|
||||||
|
sleep $SLEEP
|
||||||
|
kill -CONT "$spausedd_pid"
|
||||||
|
|
||||||
|
if wait_for_log_msg 'Not scheduled for .*s (threshold is .*s), steal time is ';then
|
||||||
|
cont=false
|
||||||
|
else
|
||||||
|
repeats=$((repeats+1))
|
||||||
|
[ "$repeats" -le "$MAX_REPEATS" ]
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
test_man_page() {
|
||||||
|
man -w "spausedd"
|
||||||
|
}
|
||||||
|
|
||||||
|
########
|
||||||
|
# main #
|
||||||
|
########
|
||||||
|
test_spausedd_h
|
||||||
|
test_man_page
|
||||||
|
|
||||||
|
test_spausedd_start
|
||||||
|
|
||||||
|
test_sig_stop
|
||||||
|
|
||||||
|
test_spausedd_stop
|
|
@ -0,0 +1,9 @@
|
||||||
|
- hosts: localhost
|
||||||
|
roles:
|
||||||
|
- role: standard-test-basic
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
tests:
|
||||||
|
- smoke
|
||||||
|
required_packages:
|
||||||
|
- spausedd
|
Loading…
Reference in New Issue