commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_8-159-g0aeea0c


From: Simon Josefsson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_8-159-g0aeea0c
Date: Sat, 19 Nov 2011 10:41:23 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  0aeea0cb612ca487908380ce37dcb96b0a0afd59 (commit)
       via  efbf4c7d7f41b452aedcca15368fec1bb25cf750 (commit)
      from  7a61b85b3d9388eed3f25f486ddb14f36c7b296a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=0aeea0cb612ca487908380ce37dcb96b0a0afd59


commit 0aeea0cb612ca487908380ce37dcb96b0a0afd59
Author: Simon Josefsson <address@hidden>
Date:   Sat Nov 19 11:39:41 2011 +0100

    tests: Added self-tests of ftp and ftpd (using inetd).
    
    * tests/Makefile.am (dist_check_SCRIPTS): Add ftp-localhost.sh.
    * tests/ftp-localhost.sh: New file.

diff --git a/ChangeLog b/ChangeLog
index c8060f6..32f4da6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-11-19  Simon Josefsson  <address@hidden>
 
+       * tests/Makefile.am (dist_check_SCRIPTS): Add ftp-localhost.sh.
+       * tests/ftp-localhost.sh: New file.
+
+2011-11-19  Simon Josefsson  <address@hidden>
+
        * ftp/cmds.c [HAVE_READLINE_HISTORY_H]: Include
        readline/history.h.
        * ftp/main.c: Likewise.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 00cdd62..e952218 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -46,6 +46,14 @@ dist_check_SCRIPTS += syslogd.sh
 endif
 endif
 
+if ENABLE_inetd
+if ENABLE_ftp
+if ENABLE_ftpd
+dist_check_SCRIPTS += ftp-localhost.sh
+endif
+endif
+endif
+
 TESTS = $(check_PROGRAMS) $(dist_check_SCRIPTS)
 
 TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT)
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
new file mode 100755
index 0000000..0a589dd
--- /dev/null
+++ b/tests/ftp-localhost.sh
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Inetutils.
+#
+# GNU Inetutils 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 3 of the License, or (at
+# your option) any later version.
+#
+# GNU Inetutils 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/'.
+
+# Written by Simon Josefsson
+
+set -e
+
+FTP=${FTP:-../ftp/ftp$EXEEXT}
+FTPD=${FTPD:-../ftpd/ftpd$EXEEXT}
+INETD=${INETD:-../src/inetd$EXEEXT}
+TARGET=${TARGET:-127.0.0.1}
+
+if [ $VERBOSE ]; then
+    set -x
+    $FTP --version | head -1
+    $FTPD --version | head -1
+    $INETD --version | head -1
+fi
+
+if [ `id -u` != 0 ]; then
+    echo "ftpd needs to run as root"
+    exit 77
+fi
+
+if ! id -u ftp > /dev/null; then
+    echo "anonymous ftpd needs a 'ftp' user"
+    exit 77
+fi
+
+# Note that inetd changes directory to / when --debug is not given so
+# all paths must be absolute for things to work.
+
+TMPDIR=`mktemp --tmpdir=$PWD -d`
+trap 'rm -rf "$TMPDIR"' 0 1 2 3 15
+
+echo "4711 stream tcp nowait root $PWD/$FTPD ftpd -A -l" > $TMPDIR/inetd.conf
+echo "machine 127.0.0.1 login ftp password foobar" > $TMPDIR/.netrc
+chmod 600 $TMPDIR/.netrc
+
+$INETD --pidfile=$TMPDIR/inetd.pid $TMPDIR/inetd.conf
+
+# Wait for inetd to write pid and open socket
+sleep 2
+
+echo "rstatus\ndir\n" \
+    | HOME=$TMPDIR $FTP $TARGET 4711 -v -p -t | tee $TMPDIR/ftp.stdout
+errno=$?
+if [ $errno != 0 ]; then
+    echo running ftp failed? errno $errno
+    exit 77
+fi
+
+if [ $errno != 0 ]; then
+    echo running ftp failed? errno $errno
+    exit 77
+fi
+
+if ! grep 'FTP server status' $TMPDIR/ftp.stdout; then
+    echo cannot find expected output from ftp client?
+    exit 1
+fi
+
+inetd_pid=`cat $TMPDIR/inetd.pid`
+kill -9 $inetd_pid
+
+exit 0

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=efbf4c7d7f41b452aedcca15368fec1bb25cf750


commit efbf4c7d7f41b452aedcca15368fec1bb25cf750
Author: Simon Josefsson <address@hidden>
Date:   Sat Nov 19 11:37:52 2011 +0100

    ftp: Avoid build warnings about missing add_history prototype.
    
    * ftp/cmds.c [HAVE_READLINE_HISTORY_H]: Include readline/history.h.
    * ftp/main.c: Likewise.

diff --git a/ChangeLog b/ChangeLog
index 50a6993..c8060f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-11-19  Simon Josefsson  <address@hidden>
+
+       * ftp/cmds.c [HAVE_READLINE_HISTORY_H]: Include
+       readline/history.h.
+       * ftp/main.c: Likewise.
+
 2011-11-18  Simon Josefsson  <address@hidden>
 
        * ftp/cmds.c: Replace complex readline #includes with simple
diff --git a/ftp/cmds.c b/ftp/cmds.c
index 697cf70..1d14cd0 100644
--- a/ftp/cmds.c
+++ b/ftp/cmds.c
@@ -78,6 +78,9 @@
 #include <glob.h>
 
 #include "readline.h"
+#ifdef HAVE_READLINE_HISTORY_H
+# include <readline/history.h>
+#endif
 
 #include "ftp_var.h"
 #include "unused-parameter.h"
diff --git a/ftp/main.c b/ftp/main.c
index 914a4fb..7668c03 100644
--- a/ftp/main.c
+++ b/ftp/main.c
@@ -78,6 +78,9 @@
 #include "unused-parameter.h"
 
 #include "readline.h"
+#ifdef HAVE_READLINE_HISTORY_H
+# include <readline/history.h>
+#endif
 
 
 #define DEFAULT_PROMPT "ftp> "

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |   11 ++++++
 ftp/cmds.c             |    3 ++
 ftp/main.c             |    3 ++
 tests/Makefile.am      |    8 +++++
 tests/ftp-localhost.sh |   82 ++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 107 insertions(+), 0 deletions(-)
 create mode 100755 tests/ftp-localhost.sh


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]