Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 110591

Summary: atftp-0.7 fails optional tests
Product: Gentoo Linux Reporter: Matthew Almond <malmond>
Component: New packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://www.faqs.org/rfcs/rfc2348.html
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 104218    
Attachments: atftp-0.7-tests.patch
atftp-0.7-r1.ebuild

Description Matthew Almond 2005-10-26 19:52:31 UTC
This is an issue broken off from bug 104218. The optional tests that run when
FEATURES="maketest" fails on one visible error.



Reproducible: Always
Steps to Reproduce:
FEATURES="maketest" emerge =net-ftp/atftp-0.7
Actual Results:  
Creating test files ... done
Testing get, READ_0.bin ()... OK
Testing put, READ_0.bin ()... OK
Testing get, READ_511.bin ()... OK
Testing put, READ_511.bin ()... OK
Testing get, READ_512.bin ()... OK
Testing put, READ_512.bin ()... OK
Testing get, READ_2K.bin ()... OK
Testing put, READ_2K.bin ()... OK
Testing get, READ_BIG.bin ()... OK
Testing put, READ_BIG.bin ()... OK
Testing get, READ_128K.bin ()... OK
Testing put, READ_128K.bin ()... OK

Testing invalid file name ... OK

Testing blksize option ...
 minimum ... OK
 maximum ... OK
 block size 8 bytes ... OK
 block size 256 bytes ... OK
 block size 1428 bytes ... OK
 block size 16000 bytes ... OK
 block size 64000 bytes ... OK
 block size 65465 bytes ... ERROR

Testing tsize option... OK

Testing timeout option limit...
 minimum ... OK
 maximum ... OK
Compile atftp with debug support for more timeout testing

Testing high server load ... OK
FAIL: test.sh
===================
1 of 1 tests failed
===================

Expected Results:  
Creating test files ... done
Testing get, READ_0.bin ()... OK
Testing put, READ_0.bin ()... OK
Testing get, READ_511.bin ()... OK
Testing put, READ_511.bin ()... OK
Testing get, READ_512.bin ()... OK
Testing put, READ_512.bin ()... OK
Testing get, READ_2K.bin ()... OK
Testing put, READ_2K.bin ()... OK
Testing get, READ_BIG.bin ()... OK
Testing put, READ_BIG.bin ()... OK
Testing get, READ_128K.bin ()... OK
Testing put, READ_128K.bin ()... OK

Testing invalid file name ... OK

Testing blksize option ...
 minimum ... OK
 maximum ... OK
 block size 8 bytes ... OK
 block size 256 bytes ... OK
 block size 1428 bytes ... OK
 block size 16000 bytes ... OK
 block size 64000 bytes ... OK
 block size 65464 bytes ... OK

Testing tsize option... OK

Testing timeout option limit...
 minimum ... OK
 maximum ... OK
Compile atftp with debug support for more timeout testing

Testing high server load ... OK
PASS: test.sh
==================
All 1 tests passed
==================

There's two problems with test/test.sh.

1. I read through RFC 2348 and found that the last blocksize test is wrong.
Here's the spec:

----
#octets
         The number of octets in a block, specified in ASCII.  Valid
         values range between "8" and "65464" octets, inclusive....
----

2. There is a mistake in the tsize test that sets ERROR (and therefore the exit
code) when there is no error, making the overall test fail.
Comment 1 Matthew Almond 2005-10-26 19:57:40 UTC
Created attachment 71540 [details, diff]
atftp-0.7-tests.patch

A simple patch to solve both problems described. It can be applied with:

epatch ${FILESDIR}/${P}-tests.patch

inside the src_unpack() function.
Comment 2 INODE64 Sistemas 2005-11-03 09:48:41 UTC
Created attachment 72037 [details]
atftp-0.7-r1.ebuild

update atftp with password, debian and pcre patch 
new USE for pcre, readline
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-05-26 14:47:25 UTC
Fixed in cvs.