dovecot 2.3.13 : make check FAILURE : Assert failed: buffer_append_full_file
Aki Tuomi
aki.tuomi at open-xchange.com
Mon Jan 18 07:25:48 EET 2021
> On 18/01/2021 00:35 J Lumby <johnlumby at hotmail.com> wrote:
>
>
> Thanks Aki.
>
>
> On 1/16/21 10:18 AM, Aki Tuomi wrote:
> >> On 16/01/2021 16:36 J Lumby <johnlumby at hotmail.com> wrote:
> >>
> >>
> >>
> >> make check had one failure as follows :
> >>
> >> test-buffer-istream.c:54: Assert failed: buffer_append_full_file(result,
> >> TEST_FILENAME, SIZE_MAX, &error) == BUFFER_APPEND_READ_ERROR
> >> test-buffer-istream.c:56: Assert failed: error != NULL && *error != '\0'
> >> buffer_append_full_file .............................................. :
> >> FAILED
> >>
> > Hi!
> >
> > You are running make check as root. Try running it as non-root user.
>
> You were absolutely correct with your diagnosis - yes I was running
> make check as root.
>
> I did so because I run dovecot itself as root - as instructed by the
> wiki :
>
>
> Running Dovecot : Starting :
>
> "Dovecot can simply be started by running dovecot as root"
>
> And (I assume) it is best to run the make check under same userid, i.e.
> root, otherwise it is not testing what will actually be running.
>
> But anyway I tried running make check under non-root and the result was
> much worse - some indeterminate FAIL much earlier :
>
> Making check in lib-ssl-iostream
> make[2]: Entering directory
> '/mnt/julywext/wextmisc/fed30GBroot/ahcombld/dovecot-2.3.13/src/lib-ssl-iostream'
> make check-local
> make[3]: Entering directory
> '/mnt/julywext/wextmisc/fed30GBroot/ahcombld/dovecot-2.3.13/src/lib-ssl-iostream'
> for bin in test-iostream-ssl; do \
> if ! /bin/sh ../../run-test.sh ../.. ./$bin; then exit 1; fi; \
> done
> collect2: error: ld returned 213 exit status
> Failed to run: ./test-iostream-ssl
>
This is because you have also compiled the source as root and fails to write to those directories. You need to build as non-root, too.
> I ran it with sh -x to see if it would tell me any more but all it
> indicated is that, somewhere during execution of valgrind, it hits
> this error from ld.
>
> My valgrind is the latest, 3.16.1,
>
>
> May we re-visit the FAIL I reported originally ? Why does it FAIL
> when run under userid root?
>
Because it's testing that it cannot read a file it has no permissions to read. root can read all files. You can see it does a chmod few lines before.
> I am guessing that somehow root gets a higher limit for the count
> parameter on read(fd , *buf , count) than non-root? Although the man
> page for read() does not indicate any such distinction.
>
> Or is dovecot implementing its own user-id-specific limit?
>
> And, what code could I add to test-buffer-istream.c to make it print
> out the offending errno?
>
> Or, perhaps easier - is it safe to ignore this one FAIL?
>
> >
> > Aki
> > .
> Cheers, John Lumby
Aki
More information about the dovecot
mailing list