From e1a74879088865d9bb01ac7a61ded2b5ecc13fdf Mon Sep 17 00:00:00 2001 From: Simon Josefsson 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