Mailing List Archive

Test suite: testing for the *absence* of a string ?
Is it possible to use the exim test suite to test for the
*absence* of a particular string in Exim's response to EHLO,
or rather to make the test fail if a particular string occurs.

I can work around this by checking the response to HELP,
but it would be encouraging to be able to fail a test
if in a dialog like:

exim -DSERVER=server -bd -oX PORT_D
****
client -t2 127.0.0.1 PORT_D
??? 220
ehlo foobar
??? 250-
??? 250-
??? 250-
??? 250

one of the 250- responsed included the string CLIENTID,
which should not be advertised over an unecrypted connection.

Any ideas ?

If not, should I decide to implement this feature,
does anyone have thoughts on the details ?

--
Andrew C. Aitchison Kendal, UK
andrew@aitchison.me.uk

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-dev-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Test suite: testing for the *absence* of a string ? [ In reply to ]
On 10/03/2024 15:12, Andrew C Aitchison via Exim-dev wrote:
> Any ideas ?

Will not listing the right number of "250-" lines, maybe
even with their full texts, do the job?
--
Cheers,
Jeremy


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-dev-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Test suite: testing for the *absence* of a string ? [ In reply to ]
On Sun, 10 Mar 2024, Jeremy Harris via Exim-dev wrote:

> On 10/03/2024 15:12, Andrew C Aitchison via Exim-dev wrote:
>> Any ideas ?
>
> Will not listing the right number of "250-" lines, maybe
> even with their full texts, do the job?

Thanks.

Yes, that does work - as long as the lines contain
enough text to rule out the forbidden string.

I'd taken out the text from the 250- lines, since I
have had trouble with other parts of the test script,
and had forgotten that I will be able to put those
back when I have that under control.

As they say, debugging is twice as hard as writing the code,
and only on a good day am I smart enough to see whether
a test failure means the code is wrong or the test.

Thanks again.

--
Andrew C. Aitchison Kendal, UK
andrew@aitchison.me.uk

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-dev-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/