Re: [Zope-dev] Help review #181754

2010-07-21 Thread Wichert Akkerman
On 2010-7-21 07:32, Wolfgang Schnerring wrote:
 * Wichert Akkermanwich...@wiggy.net  [2010-07-20 19:28]:
 On 2010-7-20 18:15, Christian Theune wrote:
 At least, WRT this bug, I don't think it's a good idea to ask explicitly
 for bad requests to go to the application as the test layer should model
 real server behaviour as closely as possible. And again it wouldn't make
 sense anyway as you can't pass an unparsable request to the application.

 I'm not sure I agree. Like everything else servers have bugs, so it
 can't hurt to test how your application would behave given certain
 server bugs.

 I don't think it is usually a productive assumption that lower layers
 fail to uphold their end of the contract. Maybe an
 extrapolation/hyperbole illustrates my opinion: Cosmic rays might also
 flip bits in your computer's RAM or disk, but I don't think it's
 worthwile to test how your application reacts when the python
 interpreter (or whoever, really) presents it with mangled data
 structures or objects or whatnot.

And for some situations you do want to explicitly test for such things. 
It all depends on how critical your app is. I'm not sure I'm not the 
only one who has tested code with randomly broken/bit-flipped input to 
test robustness.

Wichert.

-- 
Wichert Akkerman wich...@wiggy.net   It is simple to make things.
http://www.wiggy.net/  It is hard to make things simple.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help review #181754

2010-07-21 Thread Christian Theune
On 07/21/2010 09:17 AM, Wichert Akkerman wrote:
 On 2010-7-21 07:32, Wolfgang Schnerring wrote:
 * Wichert Akkermanwich...@wiggy.net   [2010-07-20 19:28]:
 On 2010-7-20 18:15, Christian Theune wrote:
 At least, WRT this bug, I don't think it's a good idea to ask explicitly
 for bad requests to go to the application as the test layer should model
 real server behaviour as closely as possible. And again it wouldn't make
 sense anyway as you can't pass an unparsable request to the application.

 I'm not sure I agree. Like everything else servers have bugs, so it
 can't hurt to test how your application would behave given certain
 server bugs.

 I don't think it is usually a productive assumption that lower layers
 fail to uphold their end of the contract. Maybe an
 extrapolation/hyperbole illustrates my opinion: Cosmic rays might also
 flip bits in your computer's RAM or disk, but I don't think it's
 worthwile to test how your application reacts when the python
 interpreter (or whoever, really) presents it with mangled data
 structures or objects or whatnot.

 And for some situations you do want to explicitly test for such things.
 It all depends on how critical your app is. I'm not sure I'm not the
 only one who has tested code with randomly broken/bit-flipped input to
 test robustness.

That double negative confuses the hell out of me. :)

However, I don't think the request of the given bug matches that 
requirement anyway.

Christian

-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Help review #181754

2010-07-20 Thread Christian Theune
Hi,

I just rejected issue 
https://bugs.edge.launchpad.net/zope.app.testing/+bug/181754

There might be room for different oppinions and if anyone would like to 
veto the decision, I'd welcome a discussion.

Christian

-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help review #181754

2010-07-20 Thread Wichert Akkerman
On 2010-7-20 17:39, Christian Theune wrote:
 Hi,

 I just rejected issue
 https://bugs.edge.launchpad.net/zope.app.testing/+bug/181754

 There might be room for different oppinions and if anyone would like to
 veto the decision, I'd welcome a discussion.

Your rejection contains an assumption that the request won't make it to 
the application. Is that assumption testable?

Wichert.


-- 
Wichert Akkerman wich...@wiggy.net   It is simple to make things.
http://www.wiggy.net/  It is hard to make things simple.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help review #181754

2010-07-20 Thread Christian Theune
On 07/20/2010 06:01 PM, Wichert Akkerman wrote:
 On 2010-7-20 17:39, Christian Theune wrote:
 Hi,

 I just rejected issue
 https://bugs.edge.launchpad.net/zope.app.testing/+bug/181754

 There might be room for different oppinions and if anyone would like to
 veto the decision, I'd welcome a discussion.

 Your rejection contains an assumption that the request won't make it to
 the application. Is that assumption testable?

I guess so.

I think it's relatively clear that the application server should 
insulate the application from malignant requests.

The details probably depend on the HTTP implementation. zope.server, 
zope.app.twisted, Paster and others might deal with this differently. 
Looking at the interfaces between those parts of the application it 
makes no sense to have syntactially invalid requests end up on the 
application level.

At least, WRT this bug, I don't think it's a good idea to ask explicitly 
for bad requests to go to the application as the test layer should model 
real server behaviour as closely as possible. And again it wouldn't make 
sense anyway as you can't pass an unparsable request to the application.

Christian

-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help review #181754

2010-07-20 Thread Wichert Akkerman
On 2010-7-20 18:15, Christian Theune wrote:
 At least, WRT this bug, I don't think it's a good idea to ask explicitly
 for bad requests to go to the application as the test layer should model
 real server behaviour as closely as possible. And again it wouldn't make
 sense anyway as you can't pass an unparsable request to the application.

I'm not sure I agree. Like everything else servers have bugs, so it 
can't hurt to test how your application would behave given certain 
server bugs.

Wichert.


-- 
Wichert Akkerman wich...@wiggy.net   It is simple to make things.
http://www.wiggy.net/  It is hard to make things simple.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help review #181754

2010-07-20 Thread Christian Theune
On 07/20/2010 07:28 PM, Wichert Akkerman wrote:
 On 2010-7-20 18:15, Christian Theune wrote:
 At least, WRT this bug, I don't think it's a good idea to ask explicitly
 for bad requests to go to the application as the test layer should model
 real server behaviour as closely as possible. And again it wouldn't make
 sense anyway as you can't pass an unparsable request to the application.

 I'm not sure I agree. Like everything else servers have bugs, so it
 can't hurt to test how your application would behave given certain
 server bugs.

Right. IMHO this specific bug asked for would usually mean that the 
server breaks and can pass anything to the application. Whatever 
happens: the server needs to prepare a data structure to hand over to 
the application. If it can't do that, then there's nothing to test what 
happens with the application.

I guess this kind of test (what happens with the application if it 
receives invalid data) needs to work around server/publisher components 
and inject data directly to application methods.

Christian

-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Help review #181754

2010-07-20 Thread Wolfgang Schnerring
* Wichert Akkerman wich...@wiggy.net [2010-07-20 19:28]:
 On 2010-7-20 18:15, Christian Theune wrote:
 At least, WRT this bug, I don't think it's a good idea to ask explicitly
 for bad requests to go to the application as the test layer should model
 real server behaviour as closely as possible. And again it wouldn't make
 sense anyway as you can't pass an unparsable request to the application.

 I'm not sure I agree. Like everything else servers have bugs, so it 
 can't hurt to test how your application would behave given certain 
 server bugs.

I don't think it is usually a productive assumption that lower layers
fail to uphold their end of the contract. Maybe an
extrapolation/hyperbole illustrates my opinion: Cosmic rays might also
flip bits in your computer's RAM or disk, but I don't think it's
worthwile to test how your application reacts when the python
interpreter (or whoever, really) presents it with mangled data
structures or objects or whatnot.

To put it differently, yes, servers have bugs, but the place to fix them
is in the server. If we can't rely on our layers/abstractions to hold,
I feel we lose most if not all benefits of having them in the first place.

Wolfgang

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )