add test to fedora
This commit is contained in:
parent
a757eea91e
commit
6ae264c5e8
2 changed files with 138 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
summary: Test for BZ#2123815 (rsync error protocol incompatibility when using)
|
||||
description: |
|
||||
Bug summary: rsync error: protocol incompatibility when using rsync-3.1.2-11.el7_9
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2123815
|
||||
enabled: true
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2123815
|
||||
tag:
|
||||
- NoRHEL4
|
||||
- NoRHEL5
|
||||
- NoRHEL6
|
||||
- Tier1
|
||||
tier: '1'
|
||||
adjust:
|
||||
- enabled: false
|
||||
when: distro == rhel-4, rhel-5, rhel-6
|
||||
continue: false
|
||||
component:
|
||||
- rsync
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- rsync
|
||||
duration: 5m
|
||||
extra-nitrate: TC#0614398
|
||||
extra-summary: /CoreOS/rsync/Regression/bz2123815-rsync-error-protocol-incompatibility-when-using
|
||||
extra-task: /CoreOS/rsync/Regression/bz2123815-rsync-error-protocol-incompatibility-when-using
|
||||
id: 1e1e2f1e-3ebc-4df5-aed8-10f785d42ee4
|
||||
110
Regression/bz2123815-rsync-error-protocol-incompatibility-when-using/runtest.sh
Executable file
110
Regression/bz2123815-rsync-error-protocol-incompatibility-when-using/runtest.sh
Executable file
|
|
@ -0,0 +1,110 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/rsync/Regression/bz2123815-rsync-error-protocol-incompatibility-when-using
|
||||
# Description: Test for BZ#2123815 (rsync error protocol incompatibility when using)
|
||||
# Author: Ondrej Mejzlik <omejzlik@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2022 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE=${PACKAGE:-rsync}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE || rlDie "Package $PACKAGE not installed"
|
||||
rlLog "Arch: $(arch), PC name: $(hostname), $(hostname -A) User: $(whoami)"
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir" 0 "Going into tmp directory $TmpDir"
|
||||
rlPhaseEnd
|
||||
|
||||
rlGetTestState && {
|
||||
rlPhaseStartTest 'Reproducer 1'
|
||||
rlRun "mkdir foo bar" 0 "Prepare test dirs"
|
||||
rlRun "rsync --filter='protect *' -av foo bar &> out" 0 "Run rsync"
|
||||
cat out
|
||||
rlAssertNotGrep 'ERROR' out
|
||||
rlAssertNotGrep 'protocol incompatibility' out
|
||||
rlAssertGrep 'received' out
|
||||
ls -laR
|
||||
rlRun "rm -rf foo bar" 0 "Remove test dirs"
|
||||
rlRun "rm -f out" 0 "Remove error file"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest 'Reproducer 2'
|
||||
rlRun "mkdir foo bar" 0 "Prepare test dirs"
|
||||
rlRun "echo 'test' > ./foo/test" 0 "Create test file"
|
||||
rlRun "rsync -a --delete-after '--filter=P foo/*' foo bar &> out" 0 "Run rsync"
|
||||
cat out
|
||||
rlAssertNotGrep 'ERROR' out
|
||||
rlAssertNotGrep 'protocol incompatibility' out
|
||||
ls -laR
|
||||
rlRun "rm -rf foo bar" 0 "Remove test dirs"
|
||||
rlRun "rm -f out" 0 "Remove error file"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest 'Reproducer 3'
|
||||
rlRun "mkdir foo bar" 0 "Prepare test dirs"
|
||||
rlRun "echo 'test' > ./foo/test" 0 "Create test file"
|
||||
rlRun "rsync --old-args -a --delete-after '--filter=P foo/*' foo bar &> out" 0 "Run rsync"
|
||||
cat out
|
||||
rlAssertNotGrep 'ERROR' out
|
||||
rlAssertNotGrep 'protocol incompatibility' out
|
||||
ls -laR
|
||||
rlRun "rm -rf foo bar" 0 "Remove test dirs"
|
||||
rlRun "rm -f out" 0 "Remove error file"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest 'Reproducer 4'
|
||||
rlRun "mkdir foo bar" 0 "Prepare test dirs"
|
||||
rlRun "echo 'test' > ./foo/test" 0 "Create test file"
|
||||
rlRun "rsync -a --relative -v --include-from=./foo --exclude=* / ./bar/test/ &> out" 0 "Run rsync"
|
||||
cat out
|
||||
rlAssertNotGrep 'ERROR' out
|
||||
rlAssertNotGrep 'protocol incompatibility' out
|
||||
rlAssertGrep 'received' out
|
||||
ls -laR
|
||||
rlRun "rm -rf foo bar" 0 "Remove test dirs"
|
||||
rlRun "rm -f out" 0 "Remove error file"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest 'Reproducer 5'
|
||||
rlRun "mkdir foo bar" 0 "Prepare test dirs"
|
||||
rlRun "echo 'test' > ./foo/.snapshot" 0 "Create test file"
|
||||
rlRun "rsync -rtvp -n --delete --exclude='.snapshot' --filter='protect *' foo bar &> out" 0 "Run rsync"
|
||||
cat out
|
||||
rlAssertNotGrep 'ERROR' out
|
||||
rlAssertNotGrep 'protocol incompatibility' out
|
||||
rlAssertGrep 'received' out
|
||||
ls -laR
|
||||
rlRun "rm -rf foo bar" 0 "Remove test dirs"
|
||||
rlRun "rm -f out" 0 "Remove error file"
|
||||
rlPhaseEnd
|
||||
}
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue