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-51-ge02ec46


From: Alfred M. Szmidt
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_8-51-ge02ec46
Date: Tue, 19 Oct 2010 17:10:16 +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  e02ec46ff5b92f5c996665f52fceda29e3bb2f19 (commit)
       via  2354c306dc5a2513ef631e5eab26118857db7640 (commit)
      from  0d8a14c857d85fa806587f5cb9391a7521f22bec (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=e02ec46ff5b92f5c996665f52fceda29e3bb2f19


commit e02ec46ff5b92f5c996665f52fceda29e3bb2f19
Author: Alfred M. Szmidt <address@hidden>
Date:   Tue Oct 19 19:08:21 2010 +0200

    Add `tftpd' and `tftp' test.

diff --git a/ChangeLog b/ChangeLog
index 18c06f9..931d59f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-10-19  Ludovic Courtès  <address@hidden>
+
+       Add `tftpd' and `tftp' test.
+
+       * tests/Makefile.am (dist_check_SCRIPTS) [ENABLE_inetd &&
+       ENABLE_tftpd && ENABLE_tftp]: Add `tftp.sh'.
+       * tests/tftp.sh: New file.
+
 2010-10-19  Alfred M. Szmidt  <address@hidden>
 
        Silence sc_program_name errors.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f64a066..cce19ee 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -28,6 +28,13 @@ endif
 if ENABLE_traceroute
 dist_check_SCRIPTS += traceroute-localhost.sh
 endif
+if ENABLE_inetd
+if ENABLE_tftpd
+if ENABLE_tftp
+dist_check_SCRIPTS += tftp.sh
+endif
+endif
+endif
 TESTS = $(check_PROGRAMS) $(dist_check_SCRIPTS)
 
 TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT)
diff --git a/tests/tftp.sh b/tests/tftp.sh
new file mode 100755
index 0000000..6b2dc80
--- /dev/null
+++ b/tests/tftp.sh
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+# Copyright (C) 2010 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/'.
+
+# Run `inetd' with `tftpd' and try to fetch a file from there using `tftp'.
+
+TFTP="${TFTP:-../src/tftp$EXEEXT}"
+TFTPD="${TFTPD:-$PWD/../src/tftpd$EXEEXT}"
+INETD="${INETD:-../src/inetd$EXEEXT}"
+IFCONFIG="${IFCONFIG:-../ifconfig/ifconfig$EXEEXT}"
+
+PORT=7777
+INETD_CONF="$PWD/inetd.conf.tmp"
+
+ADDRESSES="`$IFCONFIG | grep 'inet addr:' | \
+  sed -e's/inet addr:\([^ ]\+\)[[:blank:]].*$/\1/g'`"
+
+if [ "$VERBOSE" ]; then
+    set -x
+    "$TFTP" --version
+    "$TFTPD" --version
+    "$INETD" --version
+fi
+
+# Create `inetd.conf'.  Note: We want $TFTPD to be an absolute file
+# name because `inetd' chdirs to `/' in daemon mode; ditto for
+# $INETD_CONF.
+cat > "$INETD_CONF" <<EOF
+$PORT dgram udp wait $USER $TFTPD   tftpd -l `pwd`/tftp-test
+EOF
+
+# Launch `inetd', assuming it's reachable at all $ADDRESSES.
+$INETD "${VERBOSE:+-d}" "$INETD_CONF" &
+inetd_pid="$!"
+
+if [ -f /dev/urandom ]; then
+    input="/dev/urandom"
+else
+    input="/dev/zero"
+fi
+
+rm -fr tftp-test tftp-test-file
+mkdir tftp-test && \
+    dd if="$input" of="tftp-test/tftp-test-file" bs=1024 count=170
+
+for addr in $ADDRESSES; do
+    echo "trying with address \`$addr'..." >&2
+
+    rm -f tftp-test-file
+    echo "get tftp-test-file" | "$TFTP" $addr $PORT
+
+    cmp tftp-test/tftp-test-file tftp-test-file
+    result=$?
+
+    if [ "$result" -ne 0 ]; then
+       # Failure.
+       break
+    fi
+done
+
+kill "$inetd_pid"
+
+rm -rf tftp-test tftp-test-file "$INETD_CONF"
+
+exit $result

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


commit 2354c306dc5a2513ef631e5eab26118857db7640
Author: Alfred M. Szmidt <address@hidden>
Date:   Tue Oct 19 19:00:38 2010 +0200

    Silence sc_program_name errors.

diff --git a/ChangeLog b/ChangeLog
index 2ab8b07..18c06f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2010-10-19  Alfred M. Szmidt  <address@hidden>
+
+       Silence sc_program_name errors.
+
+       * cfg.mk (local-checks-to-skip): Removed sc_program_name from
+       list.
+       * tests/localhost.c: Include <progname.h>.
+       (main): Set type to `int main (int argc, char **argv)'.  Call
+       set_program_name.
+       * talkd/talkd.c: Include <progname.h>.
+       (main): Call set_program_name.
+       * libinetutils/argcv.c: Include <progname.h>.
+       (main): Set type to `int main (int argc, char **argv)'.  Call
+       set_program_name.
+       * ifconfig/options.c (parse_cmdline): Removed call to
+       set_program_name.
+       * ifconfig/ifconfig.c: Include <progname.h>
+       (main): Call set_program_name.
+
+       * bootstrap.conf (gnulib_modules): Added git-merge-changelog to
+       list.
+
 2010-10-18  Alfred M. Szmidt  <address@hidden>
 
        Always use <termios.h> interface.
diff --git a/bootstrap.conf b/bootstrap.conf
index 01dceda..120b99f 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -43,6 +43,7 @@ getpass
 gettext
 gettext-h
 getusershell
+git-merge-changelog
 glob
 gnupload
 inttostr
diff --git a/cfg.mk b/cfg.mk
index 0a52165..88d0b75 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -25,7 +25,6 @@ local-checks-to-skip = \
        sc_error_message_uppercase \
        sc_immutable_NEWS \
        sc_m4_quote_check \
-       sc_program_name \
        sc_prohibit_atoi_atof \
        sc_prohibit_stat_st_blocks \
        sc_prohibit_strcmp \
diff --git a/ifconfig/ifconfig.c b/ifconfig/ifconfig.c
index e330061..5fbec62 100644
--- a/ifconfig/ifconfig.c
+++ b/ifconfig/ifconfig.c
@@ -43,6 +43,7 @@
 #include <sys/ioctl.h>
 #include <net/if.h>
 #include <arpa/inet.h>
+#include <progname.h>
 #include "ifconfig.h"
 
 int
@@ -51,7 +52,7 @@ main (int argc, char *argv[])
   int err = 0;
   int sfd;
   struct ifconfig *ifp;
-
+  set_program_name (argv[0]);
   parse_cmdline (argc, argv);
 
   sfd = socket (AF_INET, SOCK_STREAM, 0);
diff --git a/ifconfig/options.c b/ifconfig/options.c
index dcd38d9..578e664 100644
--- a/ifconfig/options.c
+++ b/ifconfig/options.c
@@ -566,7 +566,6 @@ parse_cmdline (int argc, char *argv[])
 {
   int index;
   struct ifconfig *ifp = ifs;
-  set_program_name (argv[0]);
 
   parse_opt_set_default_format (NULL);
   iu_argp_init ("ifconfig", program_authors);
diff --git a/libinetutils/argcv.c b/libinetutils/argcv.c
index b1d2862..e5a16b1 100644
--- a/libinetutils/argcv.c
+++ b/libinetutils/argcv.c
@@ -21,6 +21,7 @@
 
 #include "argcv.h"
 #include <ctype.h>
+#include <progname.h>
 
 /*
  * takes a string and splits it into several strings, breaking at ' '
@@ -177,11 +178,12 @@ argcv_string (int argc, char **argv, char **pstring)
 #if 0
 char *command = "set prompt=\"& \"";
 
-main ()
+int
+main (int argc, char **argv)
 {
   int i, argc;
   char **argv;
-
+  set_program_name (argv[0]);
   argcv_get (command, "=", &argc, &argv);
   printf ("%d args:\n", argc);
   for (i = 0; i < argc; i++)
diff --git a/talkd/talkd.c b/talkd/talkd.c
index 39063ed..ea58c54 100644
--- a/talkd/talkd.c
+++ b/talkd/talkd.c
@@ -22,6 +22,7 @@
 #include <intalkd.h>
 #include <signal.h>
 #include <libinetutils.h>
+#include <progname.h>
 
 #ifndef LOG_FACILITY
 # define LOG_FACILITY LOG_DAEMON
@@ -95,6 +96,7 @@ static struct argp argp = {argp_options, parse_opt, args_doc, 
doc};
 int
 main (int argc, char *argv[])
 {
+  set_program_name (argv[0]);
   /* Parse command line */
   iu_argp_init ("talkd", program_authors);
   argp_parse (&argp, argc, argv, 0, NULL, NULL);
diff --git a/tests/localhost.c b/tests/localhost.c
index 0b8e03d..1427db6 100644
--- a/tests/localhost.c
+++ b/tests/localhost.c
@@ -21,12 +21,13 @@
 #include "libinetutils.h"
 
 #include <stdio.h>
+#include <progname.h>
 
 int
-main (void)
+main (int argc, char **argv)
 {
   const char *p = localhost ();
-
+  set_program_name (argv[0]);
   if (!p)
     return 1;
 

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

Summary of changes:
 ChangeLog            |   30 ++++++++++++++++++
 bootstrap.conf       |    1 +
 cfg.mk               |    1 -
 ifconfig/ifconfig.c  |    3 +-
 ifconfig/options.c   |    1 -
 libinetutils/argcv.c |    6 ++-
 talkd/talkd.c        |    2 +
 tests/Makefile.am    |    7 ++++
 tests/localhost.c    |    5 ++-
 tests/tftp.sh        |   80 ++++++++++++++++++++++++++++++++++++++++++++++++++
 10 files changed, 129 insertions(+), 7 deletions(-)
 create mode 100755 tests/tftp.sh


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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