bug-mailutils
[Top][All Lists]
Advanced

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

Re: [bug-mailutils] make check failure in mailutils-2.99.96


From: Sergey Poznyakoff
Subject: Re: [bug-mailutils] make check failure in mailutils-2.99.96
Date: Fri, 27 Apr 2012 09:38:45 +0300

> I have 2 test failures in mailutils-2.99.96 in imap4d.  testsuite.log is
> attached.

Thanks! That's a bug in the testsuite, not the MU proper. I have
installed the attached patch. Note that you need build tools for
compiling the packet after applying it.

Regards,
Sergey

>From cb1b25db901a996ee5901fa02d4dce8aa3b1f70d Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <address@hidden>
Date: Fri, 27 Apr 2012 09:31:34 +0300
Subject: [PATCH] Avoid using expr in tests with ulong as its argument.

* configure.ac (MU_ULONG_MAX): Rename to MU_ULONG_MAX_1,
decrease by one accordingly.
* imap4d/tests/IDEF0955.at: Use MU_ULONG_MAX_1 instead of
calling expr.
* imap4d/tests/IDEF0956.at: Likewise.
* imap4d/tests/atlocal.in: Define MU_ULONG_MAX_1.
---
 configure.ac             |   10 +++++-----
 imap4d/tests/IDEF0955.at |    6 +++---
 imap4d/tests/IDEF0956.at |    4 ++--
 imap4d/tests/atlocal.in  |    2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index fae7bc2..221b6e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -643,7 +643,7 @@ AC_CHECK_TYPE(socklen_t, , AC_DEFINE(socklen_t, int, 
[Define to int if <sys/type
 AC_CHECK_TYPE(long long, , AC_DEFINE(LONG_LONG, long, [Define to long if 
compiler does not support]))
 AC_CHECK_TYPE(long double, , AC_DEFINE(LONG_DOUBLE, double, [Define to double 
if compiler does not support]))

-AC_SUBST(MU_ULONG_MAX)
+AC_SUBST(MU_ULONG_MAX_1)
 AC_RUN_IFELSE([AC_LANG_PROGRAM(
 [#include <stdio.h>
 #include <stdlib.h>
@@ -652,13 +652,13 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM(
  FILE *f = fopen ("conftest.val", "w");
  if (! f)
     exit (1);
- fprintf(f, "%lu\n", ULONG_MAX);
+ fprintf(f, "%lu\n", ULONG_MAX-1);
  fclose(f);
  return 0;]
 )],
- [MU_ULONG_MAX=`cat conftest.val`],
- [MU_ULONG_MAX=0],
- [MU_ULONG_MAX=0])
+ [MU_ULONG_MAX_1=`cat conftest.val`],
+ [MU_ULONG_MAX_1=0],
+ [MU_ULONG_MAX_1=0])

 AC_STRUCT_TM
 AC_CHECK_MEMBERS([struct tm.tm_zone, struct tm.tm_gmtoff, struct tm.tm_isdst],
diff --git a/imap4d/tests/IDEF0955.at b/imap4d/tests/IDEF0955.at
index df0ea7d..63b6a99 100644
--- a/imap4d/tests/IDEF0955.at
+++ b/imap4d/tests/IDEF0955.at
@@ -17,12 +17,12 @@
 AT_SETUP([IDEF0955])

 AT_CHECK([
-limit=`expr $MU_ULONG_MAX - 1`
+test $MU_ULONG_MAX_1 -eq 0 && AT_SKIP_TEST

 cat > input <<EOT
 1 select INBOX
-2 FETCH 1:$limit FLAGS
-3 UID FETCH 1:$limit FLAGS
+2 FETCH 1:$MU_ULONG_MAX_1 FLAGS
+3 UID FETCH 1:$MU_ULONG_MAX_1 FLAGS
 X LOGOUT
 EOT

diff --git a/imap4d/tests/IDEF0956.at b/imap4d/tests/IDEF0956.at
index 5e9fc0c..ff61d81 100644
--- a/imap4d/tests/IDEF0956.at
+++ b/imap4d/tests/IDEF0956.at
@@ -17,11 +17,11 @@
 AT_SETUP([IDEF0956])

 AT_CHECK([
-limit=`expr $MU_ULONG_MAX - 1`
+test $MU_ULONG_MAX_1 -eq 0 && AT_SKIP_TEST

 cat > input <<EOT
 1 select INBOX
-2 FETCH 1 BODY[[TEXT]]<0.$limit>
+2 FETCH 1 BODY[[TEXT]]<0.$MU_ULONG_MAX_1>
 X LOGOUT
 EOT

diff --git a/imap4d/tests/atlocal.in b/imap4d/tests/atlocal.in
index df55b32..9afc552 100644
--- a/imap4d/tests/atlocal.in
+++ b/imap4d/tests/atlocal.in
@@ -3,7 +3,7 @@
 # Copyright (C) 2011-2012 Free Software Foundation, Inc.

 address@hidden@:@abs_top_builddir@/imap4d:$top_srcdir:$srcdir:$PATH
address@hidden@
address@hidden@

 remove_untagged() {
   sed '/^\*/d'
--
1.7.3.2


reply via email to

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