Hello and Good night Viktor!
SZÉPE Viktor <[email protected]> wrote:
|Idézem/Quoting Steffen Nurpmeso <[email protected]>:
|> SZÉPE Viktor <[email protected]> wrote:
|>|How to fix this one?
|>|
|>|> behave:lreply_futh_rth_etc: error: checksum mismatch (got 4160510524 \
|>|> 25272)
|>
|> I never have seen this on BSD, Linux nor Solaris. Interesting.
|> Which S-nail version, which OS, which CC?
|
|Latest.tar.xz v14.9.3, Debian stretch amd64, gcc version 6.3.0
|20170516 (Debian 6.3.0-18)
So like i already have said, i have never seen this problem.
I have adjusted the test script so that in the future it will be
possible to easily generate output. I attach a patch against
v14.9.3, just like
$ patch -p1 < PATCH
(but you know that, right). Afterwards you can do
$ ./cc-test.sh --mae-test ./s-nail t_behave_lreply_futh_rth_etc
and get a file mae-test-behave_lreply_futh_rth_etc, which would be
nice to see. On the other hand, one test case was missing,
interestingly the one which is likely the case that occurs most
often in practice, which already has been fixed in [f3087a5c] (Fix
**-honour* <-> *recipients-in-cc* for original To:). The comment
was right, only the code did not do that. (Again.)
This is already on [master], and will be in v14.9.4 next week.
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
diff --git a/cc-test.sh b/cc-test.sh
index 680453f7..1fe04ed0 100755
--- a/cc-test.sh
+++ b/cc-test.sh
@@ -1,5 +1,7 @@
#!/bin/sh -
-#@ Usage: ./cc-test.sh [--check-only s-mailx-binary]
+#@ Synopsis: ./cc-test.sh [--check-only s-mailx-binary]
+#@ ./cc-test.sh --mae-test s-mailx-binary [:TESTNAME:]
+#@ The latter generates output files.
#@ TODO _All_ the tests should happen in a temporary subdir.
# Public Domain
@@ -65,21 +67,30 @@ export LC_ALL LANG TZ SOURCE_DATE_EPOCH
unset POSIXLY_CORRECT
usage() {
- echo >&2 "Usage: ./cc-test.sh [--check-only s-mailx-binary]"
+ echo >&2 "Synopsis: ./cc-test.sh [--check-only s-mailx-binary]"
+ echo >&2 "Synopsis: ./cc-test.sh --mae-test s-mailx-binary [:TESTNAME:]"
exit 1
}
-CHECK_ONLY= MAILX=
+CHECK_ONLY= MAE_TEST= MAILX=
if [ "${1}" = --check-only ]; then
CHECK_ONLY=1
MAILX=${2}
[ -x "${MAILX}" ] || usage
+ shift 2
+elif [ "${1}" = --mae-test ]; then
+ MAE_TEST=1
+ MAILX=${2}
+ [ -x "${MAILX}" ] || usage
+ shift 2
+ cp=${cp:-`command -v cp`} # XXX
+ tr=${tr:-`command -v tr`} # XXX
fi
RAWMAILX=${MAILX}
MAILX="${MEMTESTER}${MAILX}"
export RAWMAILX MAILX
-if [ -n "${CHECK_ONLY}" ] && [ -z "${UTF8_LOCALE}" ]; then
+if [ -n "${CHECK_ONLY}${MAE_TEST}" ] && [ -z "${UTF8_LOCALE}" ]; then
# Try ourselfs for nl_langinfo(CODESET) output first (requires a new version)
i=`LC_ALL=C.utf8 "${RAWMAILX}" ${ARGS} -X '
\define cset_test {
@@ -216,6 +227,7 @@ have_feat() {
t_prolog() {
${rm} -rf "${BODY}" "${MBOX}" ${TRAP_EXIT_ADDONS}
TRAP_EXIT_ADDONS=
+ [ ${#} -gt 0 ] && printf '[%s]\n' "${1}"
}
t_epilog() {
t_prolog
@@ -223,8 +235,6 @@ t_epilog() {
check() {
restat=${?} tid=${1} eestat=${2} f=${3} s=${4}
- #x=`echo ${tid} | tr "/:=" "__-"`
- #cp -f "${f}" "${TMPDIR}/${x}"
[ "${eestat}" != - ] && [ "${restat}" != "${eestat}" ] &&
err "${tid}" 'unexpected exit status: '"${restat} != ${eestat}"
csum="`${cksum} < ${f}`"
@@ -234,6 +244,10 @@ check() {
ESTAT=1
printf '%s: error: checksum mismatch (got %s)\n' "${tid}" "${csum}"
fi
+ if [ -n "${MAE_TEST}" ]; then
+ x=`echo ${tid} | ${tr} "/:=" "__-"`
+ ${cp} -f "${f}" ./mae-test-"${x}"
+ fi
}
err() {
@@ -309,7 +323,7 @@ t_behave() {
t_behave_message_injections
t_behave_mime_types_load_control
- t_behave_smime
+ t_behave_s_mime
t_behave_maildir
t_behave_mass_recipients
@@ -318,7 +332,7 @@ t_behave() {
}
t_behave_X_opt_input_command_stack() {
- t_prolog
+ t_prolog t_behave_X_opt_input_command_stack
${cat} <<- '__EOT' > "${BODY}"
echo 1
@@ -412,7 +426,7 @@ t_behave_X_opt_input_command_stack() {
}
t_behave_X_errexit() {
- t_prolog
+ t_prolog t_behave_X_errexit
${cat} <<- '__EOT' > "${BODY}"
echo one
@@ -477,7 +491,7 @@ t_behave_X_errexit() {
}
t_behave_wysh() {
- t_prolog
+ t_prolog t_behave_wysh
${cat} <<- '__EOT' > "${BODY}"
#
@@ -552,7 +566,7 @@ t_behave_wysh() {
}
t_behave_input_inject_semicolon_seq() {
- t_prolog
+ t_prolog t_behave_input_inject_semicolon_seq
${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
define mydeepmac {
@@ -574,7 +588,7 @@ t_behave_input_inject_semicolon_seq() {
}
t_behave_commandalias() {
- t_prolog
+ t_prolog t_behave_commandalias
${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
commandalias echo echo hoho
@@ -600,7 +614,7 @@ t_behave_commandalias() {
}
t_behave_ifelse() {
- t_prolog
+ t_prolog t_behave_ifelse
# Nestable conditions test
${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
@@ -1318,7 +1332,7 @@ t_behave_ifelse() {
}
t_behave_localopts() {
- t_prolog
+ t_prolog t_behave_localopts
# Nestable conditions test
${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
@@ -1408,7 +1422,7 @@ t_behave_localopts() {
}
t_behave_macro_param_shift() {
- t_prolog
+ t_prolog t_behave_macro_param_shift
${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>/dev/null
define t2 {
@@ -1455,7 +1469,7 @@ t_behave_macro_param_shift() {
}
t_behave_addrcodec() {
- t_prolog
+ t_prolog t_behave_addrcodec
${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}"
vput addrcodec res e 1 <doog@def>
@@ -1572,7 +1586,7 @@ t_behave_addrcodec() {
}
t_behave_vexpr() {
- t_prolog
+ t_prolog t_behave_vexpr
${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>/dev/null
vput vexpr res = 9223372036854775807
@@ -1801,7 +1815,7 @@ t_behave_vexpr() {
}
t_behave_call_ret() {
- t_prolog
+ t_prolog t_behave_call_ret
${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Snomemdebug > "${MBOX}" 2>&1
define w1 {
@@ -1878,7 +1892,7 @@ t_behave_call_ret() {
}
t_behave_xcall() {
- t_prolog
+ t_prolog t_behave_xcall
${cat} <<- '__EOT' | ${MAILX} ${ARGS} -Snomemdebug > "${MBOX}" 2>&1
define work {
@@ -1967,7 +1981,7 @@ t_behave_xcall() {
}
t_behave_vpospar() {
- t_prolog
+ t_prolog t_behave_vpospar
${cat} <<- '__EOT' | ${MAILX} ${ARGS} > "${MBOX}" 2>&1
vpospar set hey, "'you ", world!
@@ -2032,7 +2046,7 @@ t_behave_vpospar() {
}
t_behave_atxplode() {
- t_prolog
+ t_prolog t_behave_atxplode
TRAP_EXIT_ADDONS="./.t*"
${cat} > ./.t.sh <<- '___'; ${cat} > ./.t.rc <<- '___'
@@ -2094,7 +2108,7 @@ t_behave_atxplode() {
}
t_behave_read() {
- t_prolog
+ t_prolog t_behave_read
TRAP_EXIT_ADDONS="./.t*"
${cat} <<- '__EOT' > .tin
@@ -2156,7 +2170,7 @@ t_behave_read() {
}
t_behave_mbox() {
- t_prolog
+ t_prolog t_behave_mbox
TRAP_EXIT_ADDONS="./.t*"
(
@@ -2227,7 +2241,7 @@ t_behave_mbox() {
}
t_behave_alternates() {
- t_prolog
+ t_prolog t_behave_alternates
TRAP_EXIT_ADDONS="./.t*"
${cat} <<-_EOT > ./.tsendmail.sh
@@ -2368,7 +2382,7 @@ _EOT
}
t_behave_alias() {
- t_prolog
+ t_prolog t_behave_alias
TRAP_EXIT_ADDONS="./.t*"
${cat} <<-_EOT > ./.tsendmail.sh
@@ -2410,7 +2424,7 @@ _EOT
}
t_behave_filetype() {
- t_prolog
+ t_prolog t_behave_filetype
TRAP_EXIT_ADDONS="./.t*"
${cat} <<-_EOT > ./.tsendmail.sh
@@ -2463,7 +2477,7 @@ t_behave_filetype() {
}
t_behave_record_a_resend() {
- t_prolog
+ t_prolog t_behave_record_a_resend
TRAP_EXIT_ADDONS="./.t.record ./.t.resent"
printf '
@@ -2488,7 +2502,7 @@ t_behave_record_a_resend() {
}
t_behave_e_H_L_opts() {
- t_prolog
+ t_prolog t_behave_e_H_L_opts
TRAP_EXIT_ADDONS="./.tsendmail.sh ./.t.mbox"
touch ./.t.mbox
@@ -2542,7 +2556,7 @@ t_behave_e_H_L_opts() {
}
t_behave_compose_hooks() { # TODO monster
- t_prolog
+ t_prolog t_behave_compose_hooks
TRAP_EXIT_ADDONS="./.t*"
(echo line one&&echo line two&&echo line three) > ./.treadctl
@@ -3451,7 +3465,7 @@ this is content of forward 1
}
t_behave_message_injections() {
- t_prolog
+ t_prolog t_behave_message_injections
TRAP_EXIT_ADDONS="./.t*"
${cat} <<-_EOT > ./.tsendmail.sh
@@ -3491,7 +3505,7 @@ t_behave_message_injections() {
}
t_behave_mime_types_load_control() {
- t_prolog
+ t_prolog t_behave_mime_types_load_control
TRAP_EXIT_ADDONS="./.t*"
${cat} <<-_EOT > ./.tmts1
@@ -3541,13 +3555,13 @@ t_behave_mime_types_load_control() {
t_epilog
}
-t_behave_smime() {
+t_behave_s_mime() {
have_feat smime || {
echo 'behave:s/mime: unsupported, skipped'
return
}
- t_prolog
+ t_prolog t_behave_s_mime
TRAP_EXIT_ADDONS="./.t.conf ./.tkey.pem ./.tcert.pem ./.tpair.pem"
TRAP_EXIT_ADDONS="${TRAP_EXIT_ADDONS} ./.VERIFY ./.DECRYPT ./.ENCRYPT"
TRAP_EXIT_ADDONS="${TRAP_EXIT_ADDONS} ./.tsendmail.sh"
@@ -3733,7 +3747,7 @@ t_behave_smime() {
}
t_behave_maildir() {
- t_prolog
+ t_prolog t_behave_maildir
TRAP_EXIT_ADDONS="./.t*"
(
@@ -3813,7 +3827,7 @@ t_behave_maildir() {
}
t_behave_mass_recipients() {
- t_prolog
+ t_prolog t_behave_mass_recipients
TRAP_EXIT_ADDONS="./.t*"
${cat} <<-_EOT > ./.tsendmail.sh
@@ -3881,7 +3895,7 @@ __EOT__
}
t_behave_lreply_futh_rth_etc() {
- t_prolog
+ t_prolog t_behave_lreply_futh_rth_etc
TRAP_EXIT_ADDONS="./.t*"
${cat} <<-_EOT > ./.tsendmail.sh
@@ -4017,7 +4031,7 @@ t_behave_lreply_futh_rth_etc() {
}
t_behave_iconv_mbyte_base64() {
- t_prolog
+ t_prolog t_behave_iconv_mbyte_base64
TRAP_EXIT_ADDONS="./.t*"
if [ -n "${UTF8_LOCALE}" ] && have_feat iconv &&
@@ -4126,7 +4140,7 @@ t_behave_iconv_mbyte_base64() {
# Note we unfortunately need to place some statements without proper
# indentation because of continuation problems
t_content() {
- t_prolog
+ t_prolog t_content
# MIME encoding (QP) stress message body
printf \
@@ -4373,10 +4387,15 @@ t_all() {
t_content
}
-if [ -z "${CHECK_ONLY}" ]; then
+if [ -z "${CHECK_ONLY}${MAE_TEST}" ]; then
cc_all_configs
-else
+elif [ -z "${MAE_TEST}" ] || [ ${#} -eq 0 ]; then
t_all
+else
+ while [ ${#} -gt 0 ]; do
+ ${1}
+ shift
+ done
fi
[ ${ESTAT} -eq 0 ] && echo Ok || echo >&2 'Errors occurred'