diff --git a/Regression/bz810217-lftp-hangs-using-a-ascii-mode/PURPOSE b/Regression/bz810217-lftp-hangs-using-a-ascii-mode/PURPOSE new file mode 100644 index 0000000..55d29a7 --- /dev/null +++ b/Regression/bz810217-lftp-hangs-using-a-ascii-mode/PURPOSE @@ -0,0 +1,7 @@ +PURPOSE of /CoreOS/lftp/Regression/bz810217-lftp-hangs-using-a-ascii-mode +Description: Test for BZ#810217 (lftp hangs using -a ascii mode) +Author: David Kutalek +Bug summary: lftp hangs using -a ascii mode +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=810217 + +Tries to upload a text file using ascii mode to local sftp server. Should not hang. diff --git a/Regression/bz810217-lftp-hangs-using-a-ascii-mode/main.fmf b/Regression/bz810217-lftp-hangs-using-a-ascii-mode/main.fmf new file mode 100644 index 0000000..923437c --- /dev/null +++ b/Regression/bz810217-lftp-hangs-using-a-ascii-mode/main.fmf @@ -0,0 +1,28 @@ +summary: Test for BZ#810217 (lftp hangs using -a ascii mode) +description: | + Bug summary: lftp hangs using -a ascii mode + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=810217 + + Tries to upload a text file using ascii mode to local sftp server. Should not hang. +component: +- lftp +test: ./runtest.sh +framework: beakerlib +recommend: +- lftp +- net-tools +- openssh-server +duration: 15m +enabled: true +tag: +- TIP_fedora_pass +- TIPfail_infra +- TIPfail_samba +- TIPfail_systemd +- TIPpass +- TIPpass_Apps +- Tier3 +tier: '3' +extra-nitrate: TC#0184573 +extra-summary: /CoreOS/lftp/Regression/bz810217-lftp-hangs-using-a-ascii-mode +extra-task: /CoreOS/lftp/Regression/bz810217-lftp-hangs-using-a-ascii-mode diff --git a/Regression/bz810217-lftp-hangs-using-a-ascii-mode/runtest.sh b/Regression/bz810217-lftp-hangs-using-a-ascii-mode/runtest.sh new file mode 100755 index 0000000..7d294c6 --- /dev/null +++ b/Regression/bz810217-lftp-hangs-using-a-ascii-mode/runtest.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/lftp/Regression/bz810217-lftp-hangs-using-a-ascii-mode +# Description: Test for BZ#810217 (lftp hangs using -a ascii mode) +# Author: David Kutalek +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2012 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# 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, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh + +PACKAGE="lftp" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlRun "echo 'Ascii lftp upload test file' > ./test.txt" + rlRun "grep '^Subsystem[[:space:]]*sftp[[:space:]]*/usr/libexec/openssh/sftp-server\$' /etc/ssh/sshd_config" + rlRun "useradd -m lftptester" + rlRun "echo testerpwd | passwd --stdin lftptester" + rlRun "netstat -lnp | grep sshd | grep ':22'" + rlPhaseEnd + + rlPhaseStartTest + if [ -e ~/.ssh/known_hosts ]; then + rlRun "rlFileBackup ~/.ssh/known_hosts" 0 "Back up ~/.ssh/known_hosts" + RESTORE=1 + fi + rlRun "ssh-keyscan 127.0.0.1 >> ~/.ssh/known_hosts" 0 "Add ssh fingerprint for localhost to known_hosts" + rlRun "rlWatchdog \"lftp -d -u lftptester,testerpwd sftp://127.0.0.1:22 -e 'put -a test.txt; exit'\" 30" + rlRun "ls -l /home/lftptester/test.txt" + rlRun "cat /home/lftptester/test.txt" + rlPhaseEnd + + rlPhaseStartCleanup + if [ $RESTORE -eq 1 ]; then + rlRun "rlFileRestore" 0 "Restore ~/.ssh/known_hosts" + fi + rlRun "userdel -f -r lftptester" + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd