🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90812

More on NNTP testing

#90812
From: Johann 'Myrkraverk' Oskarsson
Date: Wed, 27 Sep 2023 08:54
47 lines
2562 bytes
Dear news.software.nntp,

As per my previous thread, I've started experimenting with NNTP.

I first set up INN in a VM that I'm "talking to" for the moment.

So testing things that work is easy.  What I'm more concerned with,
right now, is the negative testing: testing the things that shouldn't
work.  [Something that most programmers forget to do.]

So, I can trivially create /an NNTP server/ that replies with the wrong
greeting line, or perhaps no line at all.

What I'm wondering about, is how the software should behave if the first
line is simply invalid.  There are various cases, such as

1) the initial greeting never arrives,

2) the initial response code is not one of 200, 201, 400, 502,

3) the initial response line does not terminate with CR LF within
    512 octets,

4) the byte following the response code is not space.

Reading RFC 3977, section 3.1, I can get the sense that

   201This is a valid response line CR LF

but nobody does it in practice?  [Note, the CR LF is meant without
space separation in my example.]  Spec lawyers would be helpful here,
maybe.

It's easy to create these examples, and then have an NNTP library return
or throw an error (yes, even in C; we just use longjmp()), but how would
end user software want to deal with such cases?

How do people using newsreaders want to log such errors, and/or complain
about it?  To whom?

Having some answers to these questions may help me determine how I
structure my library, and create a newsreader.

Thanks,
-- 
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk
Technical Details
Message-ID: <65SQM.565977$9o89.411905@fx05.ams4>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <65SQM.565977$9o89.411905@fx05.ams4>
Subject: More on NNTP testing
Date: Wed, 27 Sep 2023 16:54:24 +0800
From: Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1
Newsgroups: news.software.nntp
Content-Language: en-US
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 47
X-Complaints-To: abuse@easynews.com
Organization: Easynews - www.easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.