arvidn / libtorrent

an efficient feature complete C++ bittorrent implementation
http://libtorrent.org
Other
5.15k stars 994 forks source link

test_copy_file fails in CI build for Void Linux #7712

Open MIvanchev opened 1 month ago

MIvanchev commented 1 month ago

libtorrent version 2.0.10: platform/architecture: x86_64 compiler and compiler version: GCC

See here

       Start  14: test_copy_file
 14/106 Test  #14: test_copy_file ...................***Failed    1.02 sec
test: /builddir/libtorrent-rasterbar-2.0.10/build/test/test_copy_file
cwd_prefix = "/builddir/libtorrent-rasterbar-2.0.10/build/test/test_tmp_6529_"
[/builddir/libtorrent-rasterbar-2.0.10/test/test_copy_file.cpp.sparse_file]

cwd: /builddir/libtorrent-rasterbar-2.0.10/build/test/test_tmp_6529_1
test-case: /builddir/libtorrent-rasterbar-2.0.10/test/test_copy_file.cpp.sparse_file
rnd = b80473f4
filesystem: 2035054128
original_size: 8192

***** /builddir/libtorrent-rasterbar-2.0.10/test/test_copy_file.cpp:200 "TEST_ERROR: check failed: "original_size >= 50'000'000"" *****

copy_size: 8192

[/builddir/libtorrent-rasterbar-2.0.10/test/test_copy_file.cpp.basic      ] ***PASS***
[/builddir/libtorrent-rasterbar-2.0.10/test/test_copy_file.cpp.sparse_file] 1 FAILURES

I'm trying to package 2.0.10 for Void Linux but hitting this test failure. Info on how to fix/disable the test would be much appreciated! :)

arvidn commented 1 month ago

my guess is that there's some issue related to using "overlayfs".

MIvanchev commented 1 month ago

@arvidn How can I disable it?

arvidn commented 1 month ago

from my reading, it seems you may be running a "LiveCD" installation, with the underlying operating system mounted as read-only, and then an overlayfs with a writeable partition.

MIvanchev commented 1 month ago

I am more than willing to disable the test instead of investing time to fix it... is there a command line switch or something?

arvidn commented 1 month ago

I believe the CMakeList.txt uses glob to pick up the tests, so just removing the file would do it. When building with boost-build, you can remove the line in tests/Jamfile mentioning test_copy_file.cpp.

arvidn commented 1 month ago

I think this PR would fix it. would you mind testing it on your build image? https://github.com/arvidn/libtorrent/pull/7715