[C-prog-lang-l] phase 1 testing

Jan Pechanec jp at devnull.cz
Tue Apr 21 15:16:51 CEST 2020


On Tue, 21 Apr 2020, Tomáš Sláma wrote:

> Zdravím
>
> Raději píšu pouze vám, abych nespamoval skupinu :).

I'm adding the mailing list back, it's really the purpose of the 
mailing conference to have such discussions.  Please feel free to use 
it.

>> s/MYGUTAR/MYGNUTAR/
>
> Jej, omlouvám se, toho jsem si nevšiml :/.
>
> Chybu jsem napravil a testů mi nyní padá 8:

I can see the same thing on a lab machine in the MS building.

Sorry about that.  I will take a look at it, hopefully within a few 
days.

My macOS machines have GNU tar 1.32 which is the same version as on 
that Linux box I just used and I don't see right now what is the 
problem.

I only used my macOS machines when writing the tests and forgot to 
run it on a Linux distro as well.  Rightfully punished...

So, during your development, your implementation should fail in the 
same way as GNU tar on a Linux box until I figure it out and fix it.

Jan.

>
> Skript:
> ---
> #!/usr/bin/env fish
>
> export STEF=/home/xiaoxiae/Documents/Temporary/tar/stef/stef.sh
> export GNUTAR=/bin/tar
> export STEF_REGFILE_LOCAL_VARS=" "
> export MYGNUTAR=/bin/tar
>
> ./run-tests.sh (cat phase-1.tests)
> ---
>
> Výpis:
> ---
> === [ NPRG099 Tar Unit Tests ] ===
> Checking configuration sanity.
> Checking existence of executables provided by the following variables: GCC
> GNUTAR
> Checking existence of regular files provided by the following variables:
>
> --- [ Configuration Start ] ---
> WARNING: Using '/bin/tar' as the GNU tar testing binary.
> Created temporary directory 'dir.ohGyV'.
> Creating files:
>  aaa-file
>  file1.random
>  empty.data
>  file.zero
>  hello-world
>  small-file
>  file2.zero
>  file3.zero
>  another-file2
> Creating a GNU tar archive 'archive.tar'.
> Creating 'partial.tar' truncated in the middle of an archived file.
> Creating archives with missing ending zero block(s):
>  one-zero-block-missing.tar
>  two-zero-blocks-missing.tar
> --- [ Configuration End ] ---
>
> ---[ Running tests ] ---
>  001	PASS
>  002	FAIL
> --- 8< BEGIN diff output ---
> --- test-output-002.txt	2020-03-29 20:42:13.254157218 +0200
> +++ stef-output-file.data	2020-04-21 14:23:16.824682829 +0200
> @@ -1,9 +1,9 @@
> aaa-file
> another-file2
> empty.data
> -file.zero
> file1.random
> file2.zero
> file3.zero
> +file.zero
> hello-world
> small-file
> --- 8< END diff output ---
>  003	FAIL
> --- 8< BEGIN diff output ---
> --- test-output-003.txt	2020-03-29 20:42:13.254157218 +0200
> +++ stef-output-file.data	2020-04-21 14:23:16.834682829 +0200
> @@ -1,4 +1,4 @@
> aaa-file
> empty.data
> -file3.zero
> +file.zero
> small-file
> --- 8< END diff output ---
>  004	FAIL
> --- 8< BEGIN diff output ---
> --- test-output-004.txt	2020-03-29 20:42:13.254157218 +0200
> +++ stef-output-file.data	2020-04-21 14:23:16.844682829 +0200
> @@ -1,4 +1,4 @@
> aaa-file
> empty.data
> -file3.zero
> +file.zero
> small-file
> --- 8< END diff output ---
>  005	FAIL
> --- 8< BEGIN diff output ---
> --- test-output-005.txt	2020-03-29 20:42:13.254157218 +0200
> +++ stef-output-file.data	2020-04-21 14:23:16.864682829 +0200
> @@ -1,6 +1,6 @@
> aaa-file
> empty.data
> -file3.zero
> +file.zero
> small-file
> mytar: nonexistent1: Not found in archive
> mytar: nonexistent2: Not found in archive
> --- 8< END diff output ---
>  006	FAIL
> --- 8< BEGIN diff output ---
> --- test-output-006.txt	2020-03-29 20:42:13.254157218 +0200
> +++ stef-output-file.data	2020-04-21 14:23:16.884682829 +0200
> @@ -1,6 +1,6 @@
> aaa-file
> empty.data
> -file3.zero
> +file.zero
> small-file
> mytar: nonexistent1: Not found in archive
> mytar: nonexistent2: Not found in archive
> --- 8< END diff output ---
>  007	PASS
>  008	PASS
>  011	FAIL (return code 1)
> --- 8< BEGIN output ---
> Wrong tar return value 0.
> --- 8< END output ---
>  012	PASS
>  013	FAIL (return code 1)
> --- 8< BEGIN output ---
> Wrong tar return value 2.
> --- 8< END output ---
>  014	FAIL
> --- 8< BEGIN diff output ---
> --- test-output-014.txt	2020-03-29 20:42:13.254157218 +0200
> +++ stef-output-file.data	2020-04-21 14:23:16.904682829 +0200
> @@ -1 +1,4 @@
> aaa-file
> +another-file2
> +/bin/tar: Unexpected EOF in archive
> +/bin/tar: Error is not recoverable: exiting now
> --- 8< END diff output ---
>  015	PASS
>  016	PASS
> ---[ Tests finished ] ---
>
> --- [ Unconfiguration Start ] ---
> Skipping unconfiguration due to some test failures.
> --- [ Unconfiguration End ] ---
>
> === [ NPRG099 Tar Unit Tests Results ] ===
> WARNING: 8 test(s) FAILED !!!
> ---
>
> S pozdravem
> T. Sláma
>
> On 4/21/20 2:13 PM, Jan Pechanec wrote:
>> On Tue, 21 Apr 2020, Tomáš Sláma wrote:
>>
>>>> I have two questions.  First, do you have the latest reversion of the
>>>> tests (c-prog-lang repo)? And the other one - do you see the same
>>>> errors when you use GNU tar as the implementation?  If not, please see
>>>> README on how to do it.
>>>
>>> I do have the latest repository.
>>>
>>> As for checking the GNU tar implementation: it seems that I am unable to
>>> (following the README tutorial), since it still looks for 'mytar.c',
>>> even after setting STEF_REGFILE_LOCAL_VARS.
>>>
>>> The following script:
>>> ---
>>> #!/usr/bin/env fish
>>>
>>>
>>> export STEF=/home/xiaoxiae/Documents/Temporary/tar/stef/stef.sh
>>>
>>> export GNUTAR=/bin/tar
>>>
>>> export STEF_REGFILE_LOCAL_VARS=" "
>>>
>>> export MYGUTAR=/bin/tar
>>
>> s/MYGUTAR/MYGNUTAR/
>>
>> Btw, in general, if something does not seem to be working, please see
>> the test source code, fix it, and send me a pull request.
>>
>> However, that's not this case :-)
>>
>> Happy coding, Jan.
>>
>>>
>>>
>>>
>>> ./run-tests.sh (cat phase-1.tests)
>>> ---
>>>
>>> Yields:
>>> ---
>>> === [ NPRG099 Tar Unit Tests ] ===
>>> Checking configuration sanity.
>>> Checking existence of executables provided by the following variables:
>>> GCC GNUTAR
>>> Checking existence of regular files provided by the following variables:
>>>
>>> --- [ Configuration Start ] ---
>>> Checking 'mytar.c' existence.
>>> The source code filename must be named: 'mytar.c'
>>> It is: 'set-me-to-mytar.c-see-README'
>>> Configuration failed, fix it and rerun.  Exiting.
>>> ---
>>>
>>> Sincerely,
>>> T. Sláma
>>>
>>> On 4/21/20 12:12 PM, Jan Pechanec wrote:
>>>> On Mon, 20 Apr 2020, Tomáš Sláma wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I've been working on my implementation of GNU TAR and got to a point
>>>>> where some of the test are still failing but they (in my opinion)
>>>>> shouldn't be.
>>>>
>>>> Hi,
>>>>
>>>> I have two questions.  First, do you have the latest reversion of the
>>>> tests (c-prog-lang repo)? And the other one - do you see the same
>>>> errors when you use GNU tar as the implementation?  If not, please see
>>>> README on how to do it.
>>>>
>>>> If all tests pass with GNU tar then you will need to fix your
>>>> implementation.  Let us know if that's not the case.
>>>>
>>>> Thanks, Jan.
>>>>
>>>>   >
>>>>> Here's the condensed diff of those (2, 3, 4, 5, 6) that failed:
>>>>>
>>>>> -------------------------------------------
>>>>>
>>>>> 002
>>>>> ---
>>>>>   aaa-file
>>>>>   another-file2
>>>>>   empty.data
>>>>> -file.zero
>>>>>   file1.random
>>>>>   file2.zero
>>>>>   file3.zero
>>>>> +file.zero
>>>>>   hello-world
>>>>>   small-file
>>>>> ---
>>>>>
>>>>> 003
>>>>> ---
>>>>>   aaa-file
>>>>>   empty.data
>>>>> -file3.zero
>>>>> +file.zero
>>>>>   small-file
>>>>> ---
>>>>>
>>>>> 004
>>>>> ---
>>>>>   aaa-file
>>>>>   empty.data
>>>>> -file3.zero
>>>>> +file.zero
>>>>>   small-file
>>>>> ---
>>>>>
>>>>> 005
>>>>> ---
>>>>>   aaa-file
>>>>>   empty.data
>>>>> -file3.zero
>>>>> +file.zero
>>>>>   small-file
>>>>>   mytar: nonexistent1: Not found in archive
>>>>>   mytar: nonexistent2: Not found in archive
>>>>> ---
>>>>>
>>>>> 006
>>>>> ---
>>>>>   aaa-file
>>>>>   empty.data
>>>>> -file3.zero
>>>>> +file.zero
>>>>>   small-file
>>>>>   mytar: nonexistent1: Not found in archive
>>>>>   mytar: nonexistent2: Not found in archive
>>>>> ---
>>>>>
>>>>> -------------------------------------------
>>>>>
>>>>> I tried printing the bash variables from test-00x.sh variables and it
>>>>> seems that they don't match the test-output-00x.txt files. Am I missing
>>>>> something?
>>>>>
>>>>> Thanks (and sorry, if it's just me being confused :) )!
>>>>>
>>>>> T. Sláma
>>>>> _______________________________________________
>>>>> c-prog-lang-l mailing list
>>>>> c-prog-lang-l at mff.cuni.cz
>>>>> http://mbox.ms.mff.cuni.cz/listserv/listinfo/c-prog-lang-l
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> c-prog-lang-l mailing list
>>>> c-prog-lang-l at mff.cuni.cz
>>>> http://mbox.ms.mff.cuni.cz/listserv/listinfo/c-prog-lang-l
>>>>
>>> _______________________________________________
>>> c-prog-lang-l mailing list
>>> c-prog-lang-l at mff.cuni.cz
>>> http://mbox.ms.mff.cuni.cz/listserv/listinfo/c-prog-lang-l
>>>
>>
>>
>> _______________________________________________
>> c-prog-lang-l mailing list
>> c-prog-lang-l at mff.cuni.cz
>> http://mbox.ms.mff.cuni.cz/listserv/listinfo/c-prog-lang-l
>>
>

-- 
Jan Pechanec <jp (at) devnull (dot) cz>
http://www.devnull.cz


More information about the c-prog-lang-l mailing list