snoyberg / tar-conduit

Conduit based tar extraction mechanism
MIT License
8 stars 9 forks source link

Tast failure during stackage build #33

Open alaendle opened 1 year ago

alaendle commented 1 year ago
Error: [S-7282]
       Stack failed to execute the build plan.

       While executing the build plan, Stack encountered the error:

       Error: [S-1995]
       Test suite failure for package tar-conduit-0.3.2.1
           tests:  exited with: ExitFailure 1
       Full log available at /var/stackage/work/unpack-dir/.stack-work/logs/tar-conduit-0.3.2.1-test.log

           Case                         Allocated     Max    Live  GCs  Check
           tar 1 files                     23,160   4,872   4,872    0  OK   
           tar 10 files                   194,336   8,680   8,680    0  OK   
           tar 100 files                1,895,736   8,680   8,680    0  OK   
           tar 1000 files              18,937,296   8,680   8,680    2  OK   
           tar 10000 files            189,353,272   8,680   8,680   25  OK   
           tar file of 1 bytes             23,024   4,872   4,872    0  OK   
           tar file of 10 bytes            23,160   4,872   4,872    0  OK   
           tar file of 100 bytes           23,296   4,872   4,872    0  OK   
           tar file of 1000 bytes          23,432   4,872   4,872    0  OK   
           tar file of 10000 bytes         23,568   4,872   4,872    0  OK   
           untar 1 files                   36,288   6,432   6,432    0  OK   
           untar 10 files                 303,024  10,160  10,160    0  OK   
           untar 100 files              2,946,864  10,160  10,160    0  OK   
           untar 1000 files            29,385,264  10,160  10,160    4  OK   
           untar 10000 files          293,769,280  10,160  10,160   41  OK   
           untar file of 1 bytes           36,152   6,432   6,432    0  OK   
           untar file of 10 bytes          36,288   6,432   6,432    0  OK   
           untar file of 100 bytes         36,424   6,432   6,432    0  OK   
           untar file of 1000 bytes        36,560   6,432   6,432    0  OK   
           untar file of 10000 bytes       36,696   6,432   6,432    0  OK   

           tar/untar
             content [✔]
           tar/untar/tar
             structure [✘]
           untar
             create-intermediate [✔]
           ustar
             minimal [✔]
             long file name <255 [✔]
           GNUtar
             LongLink - a file with long file name [✔]
             LongLink - multiple files with long file names [✔]
             Large User Id [✔]
             All Large Numeric Values [✔]
             Negative Values [✔]
             Negative Size [✔]
             tar/untar Property [✔]
               +++ OK, passed 100 tests.
           unsupported headers
             associated payload is discarded [✔]

           Failures:

             tests/Spec.hs:55:17: 
             1) tar/untar/tar structure
                  uncaught exception: IOException of type PermissionDenied
                  /tmp/tar-conduit-tests10828-0.out/src: setOwnerAndGroup: permission denied (Operation not permitted)

             To rerun use: --match "/tar/untar/tar/structure/"

           Randomized with seed 1142610118

           Finished in 0.7709 seconds
           13 examples, 1 failure

Disabled tests for stackage build.

ysangkok commented 1 year ago

How did you test this @alaendle ?

It works for me on Debian Bullseye with nightly-2023-06-25:

stack test --resolver nightly-2023-06-25

or cabal with index-state 2023-06-25T07:15:04Z and ghc from ghcup.

 % cabal test -w ghc-9.6.2
Resolving dependencies...
Build profile: -w ghc-9.6.2 -O1
In order, the following will be built (use -v for more details):
 - tar-conduit-0.3.2.1 (lib) (configuration changed)
 - tar-conduit-0.3.2.1 (test:tests) (configuration changed)
 - tar-conduit-0.3.2.1 (test:space) (configuration changed)
Configuring library for tar-conduit-0.3.2.1..
Preprocessing library for tar-conduit-0.3.2.1..
Building library for tar-conduit-0.3.2.1..
Configuring test suite 'tests' for tar-conduit-0.3.2.1..
Configuring test suite 'space' for tar-conduit-0.3.2.1..
Preprocessing test suite 'tests' for tar-conduit-0.3.2.1..
Building test suite 'tests' for tar-conduit-0.3.2.1..
Preprocessing test suite 'space' for tar-conduit-0.3.2.1..
Building test suite 'space' for tar-conduit-0.3.2.1..
Running 1 test suites...
Test suite space: RUNNING...
Running 1 test suites...
Test suite tests: RUNNING...
Test suite space: PASS
Test suite logged to:
/home/janus/flipstone/tar-conduit/dist-newstyle/build/x86_64-linux/ghc-9.6.2/tar-conduit-0.3.2.1/t/space/test/tar-conduit-0.3.2.1-space.log
1 of 1 test suites (1 of 1 test cases) passed.
Test suite tests: PASS
Test suite logged to:
/home/janus/flipstone/tar-conduit/dist-newstyle/build/x86_64-linux/ghc-9.6.2/tar-conduit-0.3.2.1/t/tests/test/tar-conduit-0.3.2.1-tests.log
1 of 1 test suites (1 of 1 test cases) passed.

Previous results were from git. But pulling from Hackage yields the same results:


janus@janus-ux305ca /tmp % cabal get tar-conduit
Downloading  tar-conduit-0.3.2.1
Downloaded   tar-conduit-0.3.2.1
Unpacking to tar-conduit-0.3.2.1/
[...]
cabal test -w ghc-9.6.2
[...]
Test suite space: RUNNING...
[2 of 2] Linking /tmp/tar-conduit-0.3.2.1/dist-newstyle/build/x86_64-linux/ghc-9.6.2/tar-conduit-0.3.2.1/t/tests/build/tests/tests
Test suite space: PASS
Test suite logged to:
/tmp/tar-conduit-0.3.2.1/dist-newstyle/build/x86_64-linux/ghc-9.6.2/tar-conduit-0.3.2.1/t/space/test/tar-conduit-0.3.2.1-space.log
1 of 1 test suites (1 of 1 test cases) passed.
Running 1 test suites...
Test suite tests: RUNNING...
Test suite tests: PASS
Test suite logged to:
/tmp/tar-conduit-0.3.2.1/dist-newstyle/build/x86_64-linux/ghc-9.6.2/tar-conduit-0.3.2.1/t/tests/test/tar-conduit-0.3.2.1-tests.log
1 of 1 test suites (1 of 1 test cases) passed.
ysangkok commented 1 year ago

For posterity, the contents of tar-conduit-0.3.2.1-tests.log on my system:

Test suite tests: RUNNING...

tar/untar
  content [✔]
tar/untar/tar
  structure [✔]
untar
  create-intermediate [✔]
ustar
  minimal [✔]
  long file name <255 [✔]
GNUtar
  LongLink - a file with long file name [✔]
  LongLink - multiple files with long file names [✔]
  Large User Id [✔]
  All Large Numeric Values [✔]
  Negative Values [✔]
  Negative Size [✔]
  tar/untar Property [✔]
    +++ OK, passed 100 tests.
unsupported headers
  associated payload is discarded [✔]

Finished in 1.0023 seconds
13 examples, 0 failures
Test suite tests: PASS
Test suite logged to: /tmp/tar-conduit-0.3.2.1/dist-newstyle/build/x86_64-linux/ghc-9.6.2/tar-conduit-0.3.2.1/t/tests/test/tar-conduit-0.3.2.1-tests.log
alaendle commented 1 year ago

@ysangkok - I also wasn't able to reproduce this on my machine; I've only encountered this on the stackage build server - so it might be a strange onetime occurrence - or it might have to do with the way stackage builds the packages: https://github.com/commercialhaskell/stackage/blob/b760495570e8e3dd72330fa0bb32439eaacb07f6/automated/build.sh#L136 - also I'm not really sure if it is worth to invest time to fully analyze this thing; it was more my attention to maybe revisit the (test) code and reconsider if something is wrong; if it is o.k. for you that we didn't expect test case success during stackage build, feel free to simple close the issue.