bug-inetutils
[Top][All Lists]
Advanced

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

Re: How to check for perl or usable printf tools?


From: Simon Josefsson
Subject: Re: How to check for perl or usable printf tools?
Date: Sun, 25 Sep 2022 11:19:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Erik Auerswald <auerswal@unix-ag.uni-kl.de> writes:

> Hi all,
>
> On Mon, Sep 12, 2022 at 12:45:32PM +0200, Erik Auerswald wrote:
>> On Mon, Sep 12, 2022 at 05:16:00AM -0400, Alfred M. Szmidt wrote:
>> >    > I am trying to use the reported input file that crashes tftp for
>> >    > the test.  This file contains non-printable characters (i.e.,
>> >    > it is a "binary" file).  I do not want to add this binary file
>> >    > as-is to the git repository.
>> > 
>> >    Why?  I don't see anything fundamentally wrong with commiting a
>> >    binary fuzz file that trigger som particular bad behaviour.
>> > 
>> > Yeah, the other solution are far more cumbersome to maintain than a
>> > binary file.
>> 
>> OK, then I'll change the tftp-regressions.sh test to directly use the
>> binary input from the fuzzer.
>
> I have just done this, see commit d3270b73ecf1207d30d852ecc50119cbc4422464.

Thank you!

I committed some minor fixes to make CI/CD build, see
https://gitlab.com/jas/inetutils/-/pipelines/

/Simon
From e1a74879088865d9bb01ac7a61ded2b5ecc13fdf Mon Sep 17 00:00:00 2001
From: Simon Josefsson <simon@josefsson.org>
Date: Sun, 25 Sep 2022 10:23:54 +0200
Subject: [PATCH] Fix 'make dist' and 'make syntax-check'.

* tests/Makefile.am (EXTRA_DIST): Unconditionally distribute crash file.
* tests/crash-tftp-msg2021-12_18.bin: Renamed.
* cfg.mk (exclude_file_name_regexp--sc_trailing_blank)
(exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF): Add crash file.
* tests/tools.sh (srcdir): Set fallback srcdir.
* tests/tftp-regressions.sh: Use new filename in srcdir.
---
 cfg.mk                                              |   5 ++++-
 tests/Makefile.am                                   |   3 +--
 ...p-msg2021-12_18 => crash-tftp-msg2021-12_18.bin} | Bin
 tests/tftp-regressions.sh                           |   2 +-
 4 files changed, 6 insertions(+), 4 deletions(-)
 rename tests/{crash-tftp-msg2021-12_18 => crash-tftp-msg2021-12_18.bin} (100%)

diff --git a/cfg.mk b/cfg.mk
index 3c1bbc87..1138b274 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -64,7 +64,10 @@ exclude_file_name_regexp--sc_obsolete_symbols = \
        ^tests/identify.c$$
 
 exclude_file_name_regexp--sc_trailing_blank = \
-       ^gl/top/README-release.diff$$
+       ^(tests/crash-tftp-msg2021-12_18.bin|gl/top/README-release.diff)$$
+
+exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
+       ^tests/crash-tftp-msg2021-12_18.bin$$
 
 sc_unsigned_char:
        @prohibit=u''_char \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 82e8209d..ce23a32b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -20,7 +20,7 @@ AM_CPPFLAGS = $(iu_INCLUDES)
 
 LDADD = $(iu_LIBRARIES)
 
-EXTRA_DIST = tools.sh.in ifconfig_modes.sh
+EXTRA_DIST = tools.sh.in ifconfig_modes.sh crash-tftp-msg2021-12_18.bin
 
 noinst_PROGRAMS = identify
 identify_LDADD = $(top_builddir)/lib/libgnu.a $(LIBUTIL) $(PTY_LIB)
@@ -46,7 +46,6 @@ if ENABLE_traceroute
 dist_check_SCRIPTS += traceroute-localhost.sh
 endif
 if ENABLE_tftpd
-EXTRA_DIST += crash-tftp-msg2021-12_18
 dist_check_SCRIPTS += tftp-regressions.sh
 endif
 if ENABLE_inetd
diff --git a/tests/crash-tftp-msg2021-12_18 b/tests/crash-tftp-msg2021-12_18.bin
similarity index 100%
rename from tests/crash-tftp-msg2021-12_18
rename to tests/crash-tftp-msg2021-12_18.bin
diff --git a/tests/tftp-regressions.sh b/tests/tftp-regressions.sh
index dd388dc1..cfd35f10 100755
--- a/tests/tftp-regressions.sh
+++ b/tests/tftp-regressions.sh
@@ -52,7 +52,7 @@ RESULT=0
 # https://lists.gnu.org/archive/html/bug-inetutils/2021-12/msg00018.html
 EFFORTS=`expr $EFFORTS + 1`
 $silence echo 'Checking crash bug from message 2021-12/18...' >&2
-"$TFTP" < crash-tftp-msg2021-12_18 >/dev/null 2>&1
+"$TFTP" < $srcdir/crash-tftp-msg2021-12_18.bin >/dev/null 2>&1
 if test $? -ne 0; then
     $silence echo 'Regression of tftp crash bug from message 2021-12/18.' >&2
     RESULT=1
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


reply via email to

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