[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Fwd: Re: POSIX.1-1990 TAR format checking]



Test Team,

FYI, Joerg has written POSIX.1-1990 tar(1) tests.  We should evaluate it for
inclusion in LSB-COMMANDS.

https://sourceforge.net/pm/task.php?func=detailtask&project_task_id=56472&group_id=1107&group_project_id=3050

George (gk4)

-------- Original Message --------
Subject: Re: POSIX.1-1990 TAR format checking
Date: Tue, 18 Jun 2002 11:31:43 +0200 (CEST)
From: Joerg Schilling <schilling@fokus.gmd.de>
To: gk4@austin.ibm.com, schilling@fokus.gmd.de

>From gk4@austin.ibm.com Mon Jun 17 19:36:31 2002

>Very cool.  We will need to go and take a look at it.  FYI, we are currently
>getting ready to release v1.2 of everything at the LSB.  It might take a few
>weeks before someone takes a look at it; however, someone might surprise me by
>looking at it sooner.

Thank you for your interest!


It was a quick hack (done in less than a day ;-) and so it did contain a minor 
bug: the summary information for the whole archive has been wrong.

For this reason, I replaced the source archive just now...

I would be interested to know whether there is interest for POSIX.1-2001 
conformance checking. For now, "star" seems to be only implementation and there 
may not be a real demand. If somebody really likes to start coding POSIX.1-1001
extended TAR headers, he could use star as a reference implementation.
It prints some warnings for hard deviations from the standard.

Some hints for testing:

A TAR implementation needs to be tested in both ways:

-	the outout of the TAR archiver needs to be checked with "tartest"

-	The TAR archiver needs to be checked against archive files that cause
	extreme situations or bad coding.

To make an example: the "pax" found on SuSE-8.0 is not acceptable:

/*--------------------------------------------------------------------------*/
pax  -v < ustar-bad-filetypes.tar 
-rw-r--r--  1 486      1060             0 Jun 15 16:41 file
-rw-r--r--  1 486      1060             0 Jun 15 16:41 bad1
-rw-r--r--  1 486      1060             0 Jun 15 16:41 bad2
-rw-r--r--  1 486      1060             0 Jun 15 16:41 bad3
-rw-r--r--  1 486      1060             0 Jun 15 16:41 bad4
pax: ustar vol 1, 5 files, 3584 bytes read, 0 bytes written.

No warnings are generated!
/*--------------------------------------------------------------------------*/
pax  -v < ustar-bad-signedsum.tar 
-rw-r--r-T  1 root     300           1024 Jun 15  1994 file
pax: Invalid header, starting valid header search.
-rw-r--r-T  1 root     300           1024 Jun 15  1994 file2

Illegal signed checksums should be handled in a more user friendly way.
/*--------------------------------------------------------------------------*/
bzip2 -d < ustar-big-2g.tar.bz2 | pax  -v 
-rw-------  1 486      1060     2147483647 Jun 15 16:53 big
pax: ustar vol 1, 1 files, 8192 bytes read, 0 bytes written.

The program is not even able to correctly deal with non-large files :-(
This is really bad!
/*--------------------------------------------------------------------------*/

>> I just published star-1.5a03 on
>> 
>> ftp://ftp.fokus.gmd.de/pub/unix/star/alpha/
>> 
>> It now contains a new programm called "tartest" that checks "stdin"
>> for POSIX.1-1990 TAR compliance.
>> 
>> There are also new test archives on:
>> 
>> ftp://ftp.fokus.gmd.de/pub/unix/star/testscript/
>> 
>> e.g.
>> 
>> -rw-r--r--   1 jes      glone      17920 Jun 15 14:43 ustar-all-filetytes.tar
>> -rw-r--r--   1 jes      glone       3584 Jun 15 16:48 ustar-bad-filetypes.tar
>> -rw-r--r--   1 jes      glone       1706 Jun 15 17:10 ustar-big-2g.tar.bz2
>> -rw-r--r--   1 jes      glone       6215 Jun 15 18:18 ustar-big-8g.tar.bz2
>> 
>> To test the correct behavior in read mode.

Jörg

 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de		(uni)  If you don't have iso-8859-1
       schilling@fokus.gmd.de		(work) chars I am J"org Schilling
 URL:  http://www.fokus.gmd.de/usr/schilling   ftp://ftp.fokus.gmd.de/pub/unix


-- 
To UNSUBSCRIBE, email to lsb-test-request@lists.linuxbase.org
with subject of "unsubscribe". Trouble? Email listmaster@lists.linuxbase.org



Reply to: