GithubHelp home page GithubHelp logo

imaptest's People

Contributors

brong avatar cmouse avatar dependabot[bot] avatar emersion avatar fleischie avatar interlinked1 avatar mrannanj avatar sergey-kitov avatar sirainen avatar slusarz avatar stephanbosch avatar thuovila avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imaptest's Issues

Add submission testing

When running imaptest, it can do LMTP testing by submitting mails over LMTP. It would be a useful feature to be able to do the same over submission port, this would make it easier to test submission feature. The feature should work similarly to LMTP one.

Can't build ImapTest 20170131 against Dovecot 2.2.27

Building http://dovecot.org/nightly/imaptest/imaptest-20170131.tar.gz against the headers (that Dovecot 2.2.27 provides) fails:

Start: rpmbuild imaptest-20170131-1.fc26.src.rpm
Building target platforms: x86_64
Building for target x86_64
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.qO2sDa
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf imaptest-1.0.0
+ /usr/bin/gzip -dc /builddir/build/SOURCES/imaptest-20170131.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd imaptest-1.0.0
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ sed -e 's@\(^LIBDOVECOT .*\)@\1 -Wl,-rpath -Wl,/usr/lib64/dovecot@' -i src/Makefile.in
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.nk0F1q
+ umask 022
+ cd /builddir/build/BUILD
+ cd imaptest-1.0.0
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ export LDFLAGS
+ '[' 1 = 1 ']'
+++ dirname ./configure
++ find . -name config.guess -o -name config.sub
+ for i in $(find $(dirname ./configure) -name config.guess -o -name config.sub)
++ basename ./config.sub
+ '[' -f /usr/lib/rpm/redhat/config.sub ']'
+ /usr/bin/rm -f ./config.sub
++ basename ./config.sub
+ /usr/bin/cp -fv /usr/lib/rpm/redhat/config.sub ./config.sub
'/usr/lib/rpm/redhat/config.sub' -> './config.sub'
+ for i in $(find $(dirname ./configure) -name config.guess -o -name config.sub)
++ basename ./config.guess
+ '[' -f /usr/lib/rpm/redhat/config.guess ']'
+ /usr/bin/rm -f ./config.guess
++ basename ./config.guess
+ /usr/bin/cp -fv /usr/lib/rpm/redhat/config.guess ./config.guess
'/usr/lib/rpm/redhat/config.guess' -> './config.guess'
+ '[' 1 = 1 ']'
+ '[' x '!=' x-specs=/usr/lib/rpm/redhat/redhat-hardened-ld ']'
++ find . -name ltmain.sh
+ for i in $(find . -name ltmain.sh)
+ /usr/bin/sed -i.backup -e 's~compiler_flags=$~compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"~' ./ltmain.sh
+ ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-dovecot=/usr/lib64/dovecot
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for x86_64-redhat-linux-gnu-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for x86_64-redhat-linux-gnu-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for x86_64-redhat-linux-gnu-ar... no
checking for ar... ar
checking for x86_64-redhat-linux-gnu-strip... no
checking for strip... strip
checking for x86_64-redhat-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for "/usr/lib64/dovecot/dovecot-config"... /usr/lib64/dovecot/dovecot-config
checking whether OS supports plugin dependencies... yes
checking for valgrind... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating stamp.h
config.status: creating imaptest-config.h
config.status: executing depfiles commands
config.status: executing libtool commands
+ make -j8
make  all-recursive
make[1]: Entering directory '/builddir/build/BUILD/imaptest-1.0.0'
Making all in src
make[2]: Entering directory '/builddir/build/BUILD/imaptest-1.0.0/src'
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/dovecot    -std=gnu99 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2   -c checkpoint.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/dovecot    -std=gnu99 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2   -c client.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/dovecot    -std=gnu99 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2   -c client-state.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/dovecot    -std=gnu99 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2   -c commands.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/dovecot    -std=gnu99 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2   -c imap-client.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/dovecot    -std=gnu99 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2   -c imaptest.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/dovecot    -std=gnu99 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2   -c imaptest-lmtp.c
checkpoint.c: In function 'checkpoint_update':
checkpoint.c:142:3: warning: implicit declaration of function 't_malloc_no0'; did you mean 't_malloc0'? [-Wimplicit-function-declaration]
   t_malloc_no0(dest_keywords_size);
   ^~~~~~~~~~~~
   t_malloc0
checkpoint.c:141:53: warning: pointer/integer type mismatch in conditional expression
  keywords_remapped = dest_keywords_size == 0 ? NULL :
                                                     ^
checkpoint.c: In function 'checkpoint_neg':
checkpoint.c:326:2: warning: implicit declaration of function 'i_zero'; did you mean 'bzero'? [-Wimplicit-function-declaration]
  i_zero(&ctx);
  ^~~~~~
  bzero
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/dovecot    -std=gnu99 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2   -c mailbox.c
client-state.c: In function 'imap_client_append_continue':
client-state.c:335:7: error: 'OSTREAM_SEND_ISTREAM_RESULT_FINISHED' undeclared (first use in this function)
  case OSTREAM_SEND_ISTREAM_RESULT_FINISHED:
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
client-state.c:335:7: note: each undeclared identifier is reported only once for each function it appears in
client-state.c:337:7: error: 'OSTREAM_SEND_ISTREAM_RESULT_WAIT_INPUT' undeclared (first use in this function); did you mean 'OSTREAM_SEND_ISTREAM_RESULT_FINISHED'?
  case OSTREAM_SEND_ISTREAM_RESULT_WAIT_INPUT:
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       OSTREAM_SEND_ISTREAM_RESULT_FINISHED
client-state.c:339:7: error: 'OSTREAM_SEND_ISTREAM_RESULT_WAIT_OUTPUT' undeclared (first use in this function); did you mean 'OSTREAM_SEND_ISTREAM_RESULT_WAIT_INPUT'?
  case OSTREAM_SEND_ISTREAM_RESULT_WAIT_OUTPUT:
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       OSTREAM_SEND_ISTREAM_RESULT_WAIT_INPUT
client-state.c:342:7: error: 'OSTREAM_SEND_ISTREAM_RESULT_ERROR_INPUT' undeclared (first use in this function); did you mean 'OSTREAM_SEND_ISTREAM_RESULT_WAIT_INPUT'?
  case OSTREAM_SEND_ISTREAM_RESULT_ERROR_INPUT:
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       OSTREAM_SEND_ISTREAM_RESULT_WAIT_INPUT
client-state.c:345:7: error: 'OSTREAM_SEND_ISTREAM_RESULT_ERROR_OUTPUT' undeclared (first use in this function); did you mean 'OSTREAM_SEND_ISTREAM_RESULT_ERROR_INPUT'?
  case OSTREAM_SEND_ISTREAM_RESULT_ERROR_OUTPUT:
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       OSTREAM_SEND_ISTREAM_RESULT_ERROR_INPUT
client-state.c: In function 'store_verify_parse':
client-state.c:519:2: warning: implicit declaration of function 'i_zero'; did you mean 'bzero'? [-Wimplicit-function-declaration]
  i_zero(ctx);
  ^~~~~~
  bzero
client.c: In function 'client_init':
client.c:235:18: error: too few arguments to function 'i_stream_create_fd'
  client->input = i_stream_create_fd(fd, 1024*64);
                  ^~~~~~~~~~~~~~~~~~
In file included from client.c:6:0:
/usr/include/dovecot/istream.h:36:17: note: declared here
 struct istream *i_stream_create_fd(int fd, size_t max_buffer_size,
                 ^~~~~~~~~~~~~~~~~~
client.c:236:19: error: too few arguments to function 'o_stream_create_fd'
  client->output = o_stream_create_fd(fd, (size_t)-1);
                   ^~~~~~~~~~~~~~~~~~
In file included from client.c:7:0:
/usr/include/dovecot/ostream.h:35:1: note: declared here
 o_stream_create_fd(int fd, size_t max_buffer_size, bool autoclose_fd);
 ^~~~~~~~~~~~~~~~~~
mailbox.c:12:10: fatal error: message-part-data.h: No such file or directory
 #include "message-part-data.h"
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:467: mailbox.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:467: client.o] Error 1
imap-client.c: In function 'imap_client_input':
imap-client.c:533:25: error: storage size of 'fatal' isn't known
  enum imap_parser_error fatal;
                         ^~~~~
imap-client.c:533:25: warning: unused variable 'fatal' [-Wunused-variable]
make[2]: *** [Makefile:467: imap-client.o] Error 1
client-state.c: In function 'client_handle_cmd_reply':
client-state.c:836:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
    if (strstr(line, "Document has been deleted") != NULL) {
       ^
client-state.c:840:3: note: here
   case STATE_APPEND:
   ^~~~
make[2]: *** [Makefile:467: client-state.o] Error 1
imaptest-lmtp.c: In function 'imaptest_lmtp_send':
imaptest-lmtp.c:109:2: warning: implicit declaration of function 'i_zero'; did you mean 'bzero'? [-Wimplicit-function-declaration]
  i_zero(&lmtp_set);
  ^~~~~~
  bzero
make[2]: Leaving directory '/builddir/build/BUILD/imaptest-1.0.0/src'
make[1]: *** [Makefile:356: all-recursive] Error 1
make[1]: Leaving directory '/builddir/build/BUILD/imaptest-1.0.0'
make: *** [Makefile:283: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.nk0F1q (%build)

Imaptest for very old dovecot?

Hello to all,

I am trying to profile dovecot with memory-mapped IO and
I realized that a very old version of it, already uses it for reading
e-mails (dovecot-1.0.0). I managed to install it, but now
I do not know if and how I can compile imaptest with such
an old version.

It fails early on as there is not dovecot-config file in the old dovecot.
Even if this is fixed, is this possible to run imaptest with an old version?

Best Regards,
Chloe

Current NOTIFY tests are invalid

The current NOTIFY tests (src/tests/notify) use the MessageNew, MessageExpunge, and FlagChange events independently, which is invalid per RFC 5465, Section 5:

   If the FlagChange and/or AnnotationChange events are specified,
   MessageNew and MessageExpunge MUST also be specified by the client.
   Otherwise, the server MUST respond with the tagged BAD response.

   If one of MessageNew or MessageExpunge is specified, then both events
   MUST be specified.  Otherwise, the server MUST respond with the
   tagged BAD response.

imaptest: Panic: file profile.c: line 462 (user_timestamp_handle): assertion failed: (user->timestamps[ts] > 0)

imaptest can crash if ran without mail session timeout, because LOGOUT timestamp is set to -1 in user_fill_timestamps and not set to anything else later on.

# gdb --args imaptest host=192.168.1.119 pass=supersecret mbox=testmbox no_tracking profile=profile_pop3.conf
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-119.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/imaptest...Reading symbols from /usr/lib/debug/usr/bin/imaptest.debug...done.
done.
(gdb) r
Starting program: /usr/bin/imaptest host=192.168.1.119 pass=supersecret mbox=testmbox no_tracking profile=profile_pop3.conf
Logi List Stat Sele Fetc Fet2 Stor Dele Expu Appe Logo LMTP 
   8    0    0    8    0  405    0    0  400    0    0    0   8/  8 [80%]
Panic: file profile.c: line 462 (user_timestamp_handle): assertion failed: (user->timestamps[ts] > 0)
Error: Raw backtrace: #0 t_askpass[0x7ffff7b10fd0] -> #1 backtrace_append[0x7ffff7b11230] -> #2 backtrace_get[0x7ffff7b11390] -> #3 i_syslog_error_handler[0x7ffff7b1b850] -> #4 default_fatal_handler[0x7ffff7b1b920] -> #5 i_panic[0x7ffff7a725f7] -> #6 _init[0x555555569160] -> #7 io_loop_handle_timeouts[0x7ffff7b33ce0] -> #8 io_loop_handler_run_internal[0x7ffff7b35840] -> #9 io_loop_handler_run[0x7ffff7b340c0] -> #10 io_loop_run[0x7ffff7b34320] -> #11 _init[0x55555555ab00] -> #12 __libc_start_main[0x7ffff6d43460] -> #13 _init[0x55555555b9e7]

Program received signal SIGABRT, Aborted.
0x00007ffff6d57387 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.17-307.el7.1.x86_64 libgcc-4.8.5-39.el7.x86_64 libunwind-1.2-2.el7.x86_64
(gdb) up
#1  0x00007ffff6d58a78 in abort () from /lib64/libc.so.6
(gdb) 
#2  0x00007ffff7b1b8b7 in default_fatal_finish (status=0, 
    type=<optimized out>) at failures.c:459
459			abort();
(gdb) 
#3  fatal_handler_real (ctx=<optimized out>, format=<optimized out>, 
    args=<optimized out>) at failures.c:471
471		default_fatal_finish(ctx->type, status);
(gdb) 
#4  0x00007ffff7b1b941 in default_fatal_handler (ctx=<optimized out>, 
    format=<optimized out>, args=<optimized out>) at failures.c:479
479		fatal_handler_real(ctx, format, args);
(gdb) 
#5  0x00007ffff7a726ba in i_panic (
    format=format@entry=0x555555572838 "file %s: line %d (%s): assertion failed: (%s)") at failures.c:523
523		fatal_handler(&ctx, format, args);
(gdb) 
#6  0x00005555555697d9 in user_timestamp_handle (user_connected=true, 
    ts=USER_TIMESTAMP_LOGOUT, user=0x55555578bbf8) at profile.c:462
462				i_assert(user->timestamps[ts] > 0);
(gdb) 
#7  user_run_actions (user=0x55555578bbf8) at profile.c:510
510			switch (user_timestamp_handle(user, ts, user_connected)) {
(gdb) p user_connected
$1 = <optimized out>
(gdb) up
#8  users_timeout (context=<optimized out>) at profile.c:554
554			user_run_actions(*userp);
(gdb) down
#7  user_run_actions (user=0x55555578bbf8) at profile.c:510
510			switch (user_timestamp_handle(user, ts, user_connected)) {
(gdb) list 500
495	}
496	
497	static void user_run_actions(struct user *user)
498	{
499		enum user_timestamp ts;
500		bool user_connected = user_client_is_connected(user->active_client);
501	
502		if (disconnect_clients) {
503			if (user_connected)
504				user_logout(user->active_client);
(gdb) p user_client_is_connected(user->active_client)
No symbol "user_client_is_connected" in current context.
(gdb) p user_client 
Display all 19314 possibilities? (y or n)
(gdb) p user->active_client
$2 = (struct user_client *) 0x55555578bd18
(gdb) p *user->active_client
$3 = {user = 0x55555578bbf8, profile = 0x555555786aa8, last_logout = 0, 
  clients = {arr = {buffer = 0x55555578bd78, element_size = 8}, 
    v = 0x55555578bd78, v_modifiable = 0x55555578bd78}, mailboxes = {arr = {
      buffer = 0x55555578bdd8, element_size = 8}, v = 0x55555578bdd8, 
    v_modifiable = 0x55555578bdd8}, pop3_uidls_pool = 0x0, pop3_uidls = {
    arr = {buffer = 0x0, element_size = 0}, v = 0x0, v_modifiable = 0x0}, 
  draft_cmd = 0x0, draft_uid = 0}
(gdb) p *user->active_client->clients
Attempt to take contents of a non-pointer value.
(gdb) p user->active_client->clients
$4 = {arr = {buffer = 0x55555578bd78, element_size = 8}, v = 0x55555578bd78, 
  v_modifiable = 0x55555578bd78}
(gdb) p user->active_client->clients.arr
$5 = {buffer = 0x55555578bd78, element_size = 8}
(gdb) p user->active_client->clients.arr->buffer->used
$6 = 8
(gdb) p user->active_client->clients.v[0][0]
$7 = (struct client * const) 0x55555588cb20
(gdb) p user->active_client->clients.v[0][0][0]
$8 = {refcount = 1, user = 0x55555578bbf8, user_client = 0x55555578bd18, v = {
    input = 0x5555555685e0 <pop3_client_input>, 
    output = 0x555555567bb0 <pop3_client_output>, 
    connected = 0x555555567bc0 <pop3_client_connected>, 
    send_more_commands = 0x555555567df0 <pop3_client_send_more_commands>, 
    logout = 0x555555567dd0 <pop3_client_logout>, 
    free = 0x555555567bd0 <pop3_client_free>, disconnected = 0x0}, 
  protocol = CLIENT_PROTOCOL_POP3, port = 110, idx = 0, global_id = 1, 
  cur = 0, fd = 12, rawlog_fd = -1, input = 0x55555588cc90, 
  output = 0x55555588ced0, ssl_iostream = 0x0, io = 0x55555578aa20, to = 0x0, 
  login_state = LSTATE_AUTH, state = STATE_EXPUNGE, last_io = 1599031953, 
  delayed = false, disconnected = false, logout_sent = false, idling = false}
(gdb) p user->active_client->clients.v[0][0][0].state
$9 = STATE_EXPUNGE
(gdb) p user->ts
There is no member named ts.
(gdb) p user->timestamps 
$10 = {-1, 1599034015, -1, -1, -1}

client.c:153:7: error: too many arguments to function ‘io_stream_create_ssl_client’

When 'make' imaptest version "0.0.0-590+b73f094" with dovecot 2.3.21 on ubuntu 16.04.7 LTS with openssl 2.3.0 and gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609 I get "client.c:153:7: error: too many arguments to function ‘io_stream_create_ssl_client’" as below listing show.

make
make all-recursive
make[1]: Entering directory '/usr/local/src/imaptest'
Making all in src
make[2]: Entering directory '/usr/local/src/imaptest/src'
CC imaptest-client.o
client.c: In function ‘client_wait_connect’:
client.c:155:7: warning: passing argument 5 of ‘io_stream_create_ssl_client’ from incompatible pointer type [-Wincompatible-pointer-types]
&client->input, &client->output,
^
In file included from client.c:9:0:
/usr/local/include/dovecot/iostream-ssl.h:58:5: note: expected ‘struct ostream **’ but argument is of type ‘struct istream **’
int io_stream_create_ssl_client(struct ssl_iostream_context *ctx, const char *host,
^
client.c:155:23: warning: passing argument 6 of ‘io_stream_create_ssl_client’ from incompatible pointer type [-Wincompatible-pointer-types]
&client->input, &client->output,
^
In file included from client.c:9:0:
/usr/local/include/dovecot/iostream-ssl.h:58:5: note: expected ‘struct ssl_iostream **’ but argument is of type ‘struct ostream **’
int io_stream_create_ssl_client(struct ssl_iostream_context *ctx, const char *host,
^
client.c:156:7: warning: passing argument 7 of ‘io_stream_create_ssl_client’ from incompatible pointer type [-Wincompatible-pointer-types]
&client->ssl_iostream, &error) < 0)
^
In file included from client.c:9:0:
/usr/local/include/dovecot/iostream-ssl.h:58:5: note: expected ‘const char **’ but argument is of type ‘struct ssl_iostream **’
int io_stream_create_ssl_client(struct ssl_iostream_context *ctx, const char *host,
^
client.c:153:7: error: too many arguments to function ‘io_stream_create_ssl_client’
if (io_stream_create_ssl_client(ssl_ctx, conf.host, &conf.ssl_set,
^
In file included from client.c:9:0:
/usr/local/include/dovecot/iostream-ssl.h:58:5: note: declared here
int io_stream_create_ssl_client(struct ssl_iostream_context *ctx, const char *host,
^
Makefile:634: recipe for target 'imaptest-client.o' failed
make[2]: *** [imaptest-client.o] Error 1
make[2]: Leaving directory '/usr/local/src/imaptest/src'
Makefile:485: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src/imaptest'
Makefile:413: recipe for target 'all' failed
make: *** [all] Error 2

fatal error

make install
Making install in src
CC imaptest-checkpoint.o
checkpoint.c:3:10: fatal error: 'lib.h' file not found
#include "lib.h"
^~~~~~~
1 error generated.
make[1]: *** [imaptest-checkpoint.o] Error 1
make: *** [install-recursive] Error 1

Can't build against Dovecot 2.2.27

Running: ./configure --with-dovecot=../dovecot-2.2.27 && make

Getting:

gcc -DHAVE_CONFIG_H -I. -I..  -I/root/dovecot-2.2.27 -I/root/dovecot-2.2.27/src/lib -I/root/dovecot-2.2.27/src/lib-dict -I/root/dovecot-2.2.27/src/lib-dns -I/root/dovecot-2.2.27/src/lib-http -I/root/dovecot-2.2.27/src/lib-mail -I/root/dovecot-2.2.27/src/lib-imap -I/root/dovecot-2.2.27/src/lib-fs -I/root/dovecot-2.2.27/src/lib-charset -I/root/dovecot-2.2.27/src/lib-auth -I/root/dovecot-2.2.27/src/lib-master -I/root/dovecot-2.2.27/src/lib-ssl-iostream -I/root/dovecot-2.2.27/src/lib-compression -I/root/dovecot-2.2.27/src/lib-settings -I/root/dovecot-2.2.27/src/lib-test -I/root/dovecot-2.2.27/src/lib-sasl -I/root/dovecot-2.2.27/src/lib-stats -I/root/dovecot-2.2.27/src/lib-dcrypt -I/root/dovecot-2.2.27/src/lib-program-client    -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2   -MT client.o -MD -MP -MF .deps/client.Tpo -c -o client.o client.c
client.c: In function ‘client_init’:
client.c:235: erreur: too few arguments to function ‘i_stream_create_fd’
client.c:236: erreur: too few arguments to function ‘o_stream_create_fd’
make[2]: *** [client.o] Erreur 1
make[2]: quittant le répertoire « /root/imaptest-1.0.0/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /root/imaptest-1.0.0 »
make: *** [all] Erreur 2

Possible RFC compliance issues in test cases

Hi,

First of all, thank you for this excellent tool! It has been really helpful to detect and fix issues on our IMAP proxy.

I have spotted a few issues on the tests where certain responses are expected which I believe do not comply with RFC3501:

  • fetch-body-mime: BODY[1] or BODY[2] responses do not include headers and I believe that they should return both headers as well the body. Looking at section 6.4.6 of RFC3501 it states that "An empty section specification refers to the entire message, including the header." Even though this is referring to BODY[], I believe that BODY[1] should return both headers and body since BODY[1.HEADERS] returns the headers and BODY[1.TEXT] returns the actual body. If BODY[1] is the same as BODY[1.TEXT], there is no way to retrieve the entire section including headers as it is possible for instance when calling BODY[], BODY[HEADERS] and BODY[TEXT] which all return different sections of the entire message.

  • listext: Line 90 should start with * instead of !. As per RFC5258, if the mailbox exists and does not meet the selection criteria but it has a child that matches the selection criteria then the returned attributes should be () + CHILDINFO.

  • sort-size: Line 8 should be * sort 7 4 5 3 6 2 8 1

Please let me know your thoughts.

Thanks!

Allow disabling RECENT checks

IMAP4rev2 removes RECENT. Would be nice to be able to disable RECENT checks in imaptest, to have passing tests on IMAP4rev2 servers.

imaptest fails to compile against dovecot 2.3.20

what i did

all the above commands succeeded but running make failed with:

> make
make  all-recursive
make[1]: Entering directory '/Users/pvl/imaptest/dovecot--imaptest_git'
Making all in src
make[2]: Entering directory '/Users/pvl/imaptest/dovecot--imaptest_git/src'
  CC       imaptest-checkpoint.o
  CC       imaptest-client.o
client.c:156:30: error: too many arguments to function call, expected 7, have 8
                                                &client->ssl_iostream, &error) < 0)
                                                                       ^~~~~~
/Users/pvl/imaptest/dovecot-2.3.20/src/lib-ssl-iostream/iostream-ssl.h:58:5: note: 'io_stream_create_ssl_client' declared here
int io_stream_create_ssl_client(struct ssl_iostream_context *ctx, const char *host,
    ^
1 error generated.
make[2]: *** [Makefile:660: imaptest-client.o] Error 1
make[2]: Leaving directory '/Users/pvl/imaptest/dovecot--imaptest_git/src'
make[1]: *** [Makefile:487: all-recursive] Error 1
make[1]: Leaving directory '/Users/pvl/imaptest/dovecot--imaptest_git'
make: *** [Makefile:415: all] Error 2

if it's relevant, i'm on mac os 13 (ventura) on M1

please kindly advise how to resolve the issue. thank you.

Error compiling imaptest 20181206

Tried a few different versions of dovecot src. I'd do a MR but I don't know if this is the right solution for everyone.
I was getting the following error trying to compile (trimmed down):
imaptest-commands.o: In function command_send_binary': /build/dovecot/imaptest-20181206/src/commands.c:152: undefined reference to t_pop_check'
collect2: error: ld returned 1 exit status
Makefile:549: recipe for target 'imaptest' failed

I added to src/commands.c the following include:
#include "data-stack.h"

and it compiled just fine.

impatest on 32-bit architecture gives: client.c:153:7: error: too many arguments to function ‘io_stream_create_ssl_client’

I work with i686 32-bit architecture, ubuntu 16.04.7, dovecot 2.3.21 (47349e2482) and the latest imaptest server. Having tried "static binary of imaptest (built on Ubuntu 22.04). " That "should work on any modern Linux machine using libc." I get my machine is not modern because after failing to run with docker I try 'make' and get

make
make all-recursive
make[1]: Entering directory '/usr/local/src/imaptest-latest'
Making all in src
make[2]: Entering directory '/usr/local/src/imaptest-latest/src'
CC imaptest-checkpoint.o
CC imaptest-client.o
client.c: In function ‘client_wait_connect’:
client.c:155:7: warning: passing argument 5 of ‘io_stream_create_ssl_client’ from incompatible pointer type [-Wincompatible-pointer-types]
&client->input, &client->output,
^
In file included from client.c:9:0:
/usr/local/include/dovecot/iostream-ssl.h:58:5: note: expected ‘struct ostream **’ but argument is of type ‘struct istream **’
int io_stream_create_ssl_client(struct ssl_iostream_context *ctx, const char *host,
^
client.c:155:23: warning: passing argument 6 of ‘io_stream_create_ssl_client’ from incompatible pointer type [-Wincompatible-pointer-types]
&client->input, &client->output,
^
In file included from client.c:9:0:
/usr/local/include/dovecot/iostream-ssl.h:58:5: note: expected ‘struct ssl_iostream **’ but argument is of type ‘struct ostream **’
int io_stream_create_ssl_client(struct ssl_iostream_context *ctx, const char *host,
^
client.c:156:7: warning: passing argument 7 of ‘io_stream_create_ssl_client’ from incompatible pointer type [-Wincompatible-pointer-types]
&client->ssl_iostream, &error) < 0)
^
In file included from client.c:9:0:
/usr/local/include/dovecot/iostream-ssl.h:58:5: note: expected ‘const char **’ but argument is of type ‘struct ssl_iostream **’
int io_stream_create_ssl_client(struct ssl_iostream_context *ctx, const char *host,
^
client.c:153:7: error: too many arguments to function ‘io_stream_create_ssl_client’
if (io_stream_create_ssl_client(ssl_ctx, conf.host, &conf.ssl_set,
^
In file included from client.c:9:0:
/usr/local/include/dovecot/iostream-ssl.h:58:5: note: declared here
int io_stream_create_ssl_client(struct ssl_iostream_context *ctx, const char *host,
^
Makefile:634: recipe for target 'imaptest-client.o' failed
make[2]: *** [imaptest-client.o] Error 1
make[2]: Leaving directory '/usr/local/src/imaptest-latest/src'
Makefile:485: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src/imaptest-latest'
Makefile:413: recipe for target 'all' failed
make: *** [all] Error 2

Errors in log

Hello,

during tests (with your provided dovecot-crlf file) i can see many "ERROR:" logs but i cannot understand the sense of these errors.

Examples are:

Error: test5@badger****[352785]: uid=43545 1086092134.29926.26.camel@hurina: RFC822.SIZE size changed 129 -> '3983': * 20 FETCH (BODY (("text" "plain" NIL NIL NIL "quoted-printable" 842 18) ("application" "pgp-signature" ("name" "signature.asc") NIL "This is a digitally signed message part" "8bit" 196) "signed") BODY[HEADER.FIELDS ("In-Reply-To") ] "In-Reply-To: [email protected]

Error: test4@****[361355]: [email protected]: Header Message-ID changed '[email protected]' -> '': * 9 FETCH (BODYSTRUCTURE ("text" "plain" NIL NIL NIL "8bit" 52 1 NIL NIL NIL) BODY[HEADER.FIELDS ("To" "Message-ID" "To" "Cc") ] "

Why these operations are logged as error?

The current imap server (Courier) shows no errors in logs.

Thank you, regards

Gianluca

panic at end of checkpoint=1, secs=n runs

Hi,

When running with "checkpoint=1", and "secs=n", I'm seeing this panic (output below) consistently for any value of n: it will run happily for n seconds, then panic.

I'm using nightlies of both dovecot core and imaptest:

  • dovecot-20190509 (this looks like it's still the most recent?)
  • imaptest-20190504 (a little old now, but commit history doesn't suggest anything relevant has changed since)

Is this expected? I would expect it to shutdown cleanly after n seconds (just as if the operator had pressed ^C, which works fine).

Note that it panics after n seconds of runtime (verified by running time imaptest ..., but not shown here), so I guess it's trying to shut itself down cleanly, but is tripping over something? (i.e. it does not seem to be panicking during the run, but rather during the shutdown)

If I run without "checkpoint=1" then it does shut itself down cleanly after n seconds.

(This is with Cyrus IMAPd as the IMAP server being tested, but I should not expect that to make any difference.)

Happy to provide further diagnostics/debug output/etc if you tell me what you need!

Cheers,

ellie

$"/home/ellie/build/imaptest-20190504/src/imaptest" "host=127.0.0.1" "port=9101" "user=cassandane" "user2=user2" "pass=testpw" "mbox=/home/ellie/fastmail/cassandane/data/dovecot-crlf" "rawlog" "secs=30" "checkpoint=1"
Logi List Stat Sele Fetc Fet2 Stor Dele Expu Appe Logo ChkP 
100%  50%  50% 100% 100% 100%  50% 100% 100% 100% 100% 100% 
                          30%                  5%           
  75   37   37   74   63   92   25   33   59   54   66    0   9/ 10
  65   35   30   64   62   85   18   35   63   54   64    8  10/ 10
  60   32   30   59   61   88   22   37   58   50   60    8  10/ 10
  60   25   33   62   61   90   23   37   65   40   60    7  10/ 10
  53   22   20   51   51   63   25   30   49   42   53    9  10/ 10
  42   22   20   44   46   57   15   30   43   28   42    6  10/ 10
  60   32   31   55   54   74   21   28   58   49   60    9  10/ 10
  59   29   37   61   60   89   25   30   59   45   59    4  10/ 10
  55   29   36   56   56   82   20   32   57   35   55    6  10/ 10
  60   31   32   62   62  101   20   35   59   48   60    7  10/ 10
   0    0   30   43   29   64   86   91   98  120    1    0 ms/cmd avg
Logi List Stat Sele Fetc Fet2 Stor Dele Expu Appe Logo ChkP 
100%  50%  50% 100% 100% 100%  50% 100% 100% 100% 100% 100% 
                          30%                  5%           
  60   31   30   58   58   81   18   31   59   45   60    9  10/ 10
  58   31   30   58   57   85   21   31   59   47   58    7  10/ 10
  53   27   25   52   53   70   25   33   53   39   53    7  10/ 10
  57   23   34   57   57   86   30   32   56   33   57    5  10/ 10
  51   24   25   53   50   62   17   25   52   25   51    6  10/ 10
  57   29   29   53   57   77   22   30   56   41   57    8  10/ 10
  56   29   28   61   60   87   26   40   57   33   56    4  10/ 10
  37   20   16   37   34   47   12   19   36   32   37    9  10/ 10
  42   19   19   39   43   58   18   23   44   34   42    9  10/ 10
  46   21   18   47   47   77   19   22   45   34   46    6  10/ 10
   0    0   30   48   38   76   97  105  115  146    1    0 ms/cmd avg
Logi List Stat Sele Fetc Fet2 Stor Dele Expu Appe Logo ChkP 
100%  50%  50% 100% 100% 100%  50% 100% 100% 100% 100% 100% 
                          30%                  5%           
  46   25   26   46   45   55   18   24   47   33   46    7  10/ 10
  48   23   26   49   47   70   14   26   46   36   48    7  10/ 10
  46   21   20   46   48   60   24   24   48   22   48    8  10/ 10
  55   24   30   56   57   78   18   22   53   35   53    6  10/ 10
  52   26   23   52   51   69   20   24   55   43   53    9   9/ 10
  43   25   23   43   44   77   16   20   42   27   42    8  10/ 10
  54   31   27   52   51   69   18   35   52   39   54    9  10/ 10
  52   28   36   54   54   69   22   31   54   33   53    7   9/ 10
  57   28   25   55   56   86   19   28   56   37   56    8  10/ 10
  51   25   21   52   49   75   17   30   51   39   51    7  10/ 10
Panic: file client-state.c: line 222 (client_update_plan): assertion failed: (client->plan_size == 0)
Error: Raw backtrace: /home/ellie/build/dovecot-20190509/src/lib-dovecot/.libs/libdovecot.so.0(+0xd7e21) [0x7fac472c5e21] -> /home/ellie/build/dovecot-20190509/src/lib-dovecot/.libs/libdovecot.so.0(+0xd7e61) [0x7fac472c5e61] -> /home/ellie/build/dovecot-20190509/src/lib-dovecot/.libs/libdovecot.so.0(i_fatal+0) [0x7fac472293b3] -> /home/ellie/build/imaptest-20190504/src/.libs/imaptest(imap_client_plan_send_more_commands+0x545) [0x556ad75e3dd5] -> /home/ellie/build/imaptest-20190504/src/.libs/imaptest(client_send_more_commands+0x24) [0x556ad75e1e94] -> /home/ellie/build/imaptest-20190504/src/.libs/imaptest(checkpoint_neg+0x588) [0x556ad75e07d8] -> /home/ellie/build/imaptest-20190504/src/.libs/imaptest(+0x10280) [0x556ad75e7280] -> /home/ellie/build/imaptest-20190504/src/.libs/imaptest(+0xab55) [0x556ad75e1b55] -> /home/ellie/build/dovecot-20190509/src/lib-dovecot/.libs/libdovecot.so.0(io_loop_call_io+0x75) [0x7fac472df155] -> /home/ellie/build/dovecot-20190509/src/lib-dovecot/.libs/libdovecot.so.0(io_loop_handler_run_internal+0x113) [0x7fac472e0b63] -> /home/ellie/build/dovecot-20190509/src/lib-dovecot/.libs/libdovecot.so.0(io_loop_handler_run+0x56) [0x7fac472df266] -> /home/ellie/build/dovecot-20190509/src/lib-dovecot/.libs/libdovecot.so.0(io_loop_run+0x38) [0x7fac472df478] -> /home/ellie/build/imaptest-20190504/src/.libs/imaptest(main+0x8b9) [0x556ad75df9b9] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7fac469672e1] -> /home/ellie/build/imaptest-20190504/src/.libs/imaptest(_start+0x2a) [0x556ad75e00ba]
Aborted

Build Errors

I am getting build errors when compiling imaptest.

Steps to reproduce:

  1. Using: wget https://dovecot.org/releases/2.3/dovecot-2.3.20.tar.gz or wget https://dovecot.org/releases/2.2/dovecot-2.2.36.4.tar.gz
  2. For each extracting and building with ./configure && make
  3. Getting latest imaptest: wget http://dovecot.org/nightly/imaptest/imaptest-latest.tar.gz
  4. Building with ./configure --with-dovecot=../dovecot-2.2.36.4 && make or ./configure --with-dovecot=../dovecot-2.3.20 && make

I get the following errors:
With dovecot 2.2.36:

make[2]: Entering directory '/opt/vogel/imaptest/src'
  CC       imaptest-test-parser.o
test-parser.c: In function ‘test_parse_command_line’:
test-parser.c:535:38: error: macro "str_begins" passed 3 arguments, but takes just 2
  535 |  if (str_begins(line, "!ifenv ", &env) ||
      |                                      ^
In file included from /opt/vogel/dovecot-2.3.20/src/lib/lib.h:48,
                 from test-parser.c:3:
/opt/vogel/dovecot-2.3.20/src/lib/strfuncs.h:97: note: macro "str_begins" defined here
   97 | # define str_begins(h, n) (__builtin_constant_p(n) ? strncmp((h), (n), strlen(n))==0 : (str_begins)((h), (n)))
      | 
test-parser.c:535:6: warning: the address of ‘str_begins’ will always evaluate as ‘true’ [-Waddress]
  535 |  if (str_begins(line, "!ifenv ", &env) ||
      |      ^~~~~~~~~~
test-parser.c:536:39: error: macro "str_begins" passed 3 arguments, but takes just 2
  536 |      str_begins(line, "!ifnenv ", &env)) {
      |                                       ^
In file included from /opt/vogel/dovecot-2.3.20/src/lib/lib.h:48,
                 from test-parser.c:3:
/opt/vogel/dovecot-2.3.20/src/lib/strfuncs.h:97: note: macro "str_begins" defined here
   97 | # define str_begins(h, n) (__builtin_constant_p(n) ? strncmp((h), (n), strlen(n))==0 : (str_begins)((h), (n)))
      | 
test-parser.c:535:40: warning: the address of ‘str_begins’ will always evaluate as ‘true’ [-Waddress]
  535 |  if (str_begins(line, "!ifenv ", &env) ||
      |                                        ^~
test-parser.c:540:7: warning: implicit declaration of function ‘str_begins_with’; did you mean ‘str_begins’? [-Wimplicit-function-declaration]
  540 |   if (str_begins_with(line, "!ifnenv "))
      |       ^~~~~~~~~~~~~~~
      |       str_begins

With dovecot 2.3.20:

test-parser.c: In function ‘test_parse_header_line’:
test-parser.c:77:15: warning: implicit declaration of function ‘array_idx_get_space’; did you mean ‘array_insert_space’? [-Wimplicit-function-declaration]
   77 |   test_conn = array_idx_get_space(&test->connections, idx-1);
      |               ^~~~~~~~~~~~~~~~~~~
      |               array_insert_space
test-parser.c:77:13: warning: assignment to ‘struct test_connection *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   77 |   test_conn = array_idx_get_space(&test->connections, idx-1);
      |             ^
test-parser.c: In function ‘test_parse_imap_args’:
test-parser.c:165:25: error: storage size of ‘fatal’ isn’t known
  165 |  enum imap_parser_error fatal;
      |                         ^~~~~
test-parser.c:165:25: warning: unused variable ‘fatal’ [-Wunused-variable]
test-parser.c: In function ‘test_parse_command_line’:
test-parser.c:535:6: warning: implicit declaration of function ‘str_begins’; did you mean ‘str_len’? [-Wimplicit-function-declaration]
  535 |  if (str_begins(line, "!ifenv ", &env) ||
      |      ^~~~~~~~~~
      |      str_len
test-parser.c:540:7: warning: implicit declaration of function ‘str_begins_with’ [-Wimplicit-function-declaration]
  540 |   if (str_begins_with(line, "!ifnenv "))
      |       ^~~~~~~~~~~~~~~
test-parser.c: In function ‘test_parse_file’:
test-parser.c:787:7: warning: implicit declaration of function ‘i_stream_read_eof’; did you mean ‘i_stream_read_more’? [-Wimplicit-function-declaration]
  787 |  if (!i_stream_read_eof(input)) {
      |       ^~~~~~~~~~~~~~~~~
      |       i_stream_read_more
test-parser.c: In function ‘parser_has_logout’:
test-parser.c:823:2: warning: implicit declaration of function ‘array_foreach_elem’; did you mean ‘array_foreach_idx’? [-Wimplicit-function-declaration]
  823 |  array_foreach_elem(&test->cmd_groups, group) {
      |  ^~~~~~~~~~~~~~~~~~
      |  array_foreach_idx
test-parser.c:823:46: error: expected ‘;’ before ‘{’ token
  823 |  array_foreach_elem(&test->cmd_groups, group) {
      |                                              ^~
      |                                              ;
test-parser.c:821:29: warning: unused variable ‘cmd’ [-Wunused-variable]
  821 |  const struct test_command *cmd;
      |                             ^~~
test-parser.c:831:1: warning: no return statement in function returning non-void [-Wreturn-type]
  831 | }
      | ^
test-parser.c: In function ‘test_parser_read_test’:
test-parser.c:901:10: error: too few arguments to function ‘i_stream_create_fd’
  901 |  input = i_stream_create_fd(fd, (size_t)-1);
      |          ^~~~~~~~~~~~~~~~~~
In file included from test-parser.c:5:
/opt/vogel/dovecot-2.2.36.4/src/lib/istream.h:36:17: note: declared here
   36 | struct istream *i_stream_create_fd(int fd, size_t max_buffer_size,
      |                 ^~~~~~~~~~~~~~~~~~
test-parser.c: In function ‘test_parser_scan_dir’:
test-parser.c:955:44: error: expected ‘;’ before ‘{’ token
  955 |  array_foreach_elem(&test_paths, test_path) {
      |                                            ^~
      |                                            ;
test-parser.c:927:6: warning: unused variable ‘ret’ [-Wunused-variable]
  927 |  int ret = 0;
      |      ^~~
test-parser.c:921:53: warning: unused parameter ‘parser’ [-Wunused-parameter]
  921 | static int test_parser_scan_dir(struct test_parser *parser, const char *path)
      |                                 ~~~~~~~~~~~~~~~~~~~~^~~~~~
test-parser.c:964:1: warning: control reaches end of non-void function [-Wreturn-type]
  964 | }
      | ^
make[2]: *** [Makefile:882: imaptest-test-parser.o] Error 1
make[2]: Leaving directory '/opt/vogel/imaptest/src'
make[1]: *** [Makefile:484: all-recursive] Error 1
make[1]: Leaving directory '/opt/vogel/imaptest'
make: *** [Makefile:412: all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.