J Lumby
2021-Jan-18 15:21 UTC
dovecot 2.3.13 : make check FAILURE : Assert failed: buffer_append_full_file
On 1/18/21 12:25 AM, Aki Tuomi wrote:>> 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 >>>> >>> >> 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.No,? for this attempt I ran all steps as non-root including make.> >> >> >> 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.You are in the wrong place -in the file? -? you are looking at line 61,my error occurred at line 54 -? see error message earlier. It is make some kind of test for size of record being read.> > 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?Hoping you will answer these ...>>> Aki >>> . >> Cheers,??? John Lumby > Aki > .
Aki Tuomi
2021-Jan-18 16:22 UTC
dovecot 2.3.13 : make check FAILURE : Assert failed: buffer_append_full_file
> On 18/01/2021 17:21 J Lumby <johnlumby at hotmail.com> wrote: > > > On 1/18/21 12:25 AM, Aki Tuomi wrote: > >> 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 > >>>> > >>> > >> 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. > No,? for this attempt I ran all steps as non-root including make. > > > >> > >> > >> 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. > > You are in the wrong place -in the file? -? you are looking at line > 61,my error occurred at line 54 -? see error message earlier. > > It is make some kind of test for size of record being read. > > > > > 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? > Hoping you will answer these ... > >>> Aki > >>> . > >> Cheers,??? John Lumby > > Aki > > .line 52 does chmod to 0000 lines 54-55 attempts to read this file now, and expects it to fail line 56 ensures that there was actual error provided Aki