shlomif / fc-solve

Freecell Solver - a C library for automatically solving Freecell and some other variants of card Solitaire
https://fc-solve.shlomifish.org/
MIT License
58 stars 12 forks source link

freecell-solver-6.6.0: test suite is failing #87

Closed kloczek closed 1 year ago

kloczek commented 2 years ago

Yeah .. looks like somethiong is wrong

+ cd freecell-solver-6.6.0
+ /usr/bin/make -O -j48 V=1 VERBOSE=1 -C x86_64-redhat-linux-gnu test ARGS=--output-on-failure
make: Entering directory '/home/tkloczko/rpmbuild/BUILD/freecell-solver-6.6.0/x86_64-redhat-linux-gnu'
Running tests...
/usr/bin/ctest --force-new-ctest-process --output-on-failure
Test project /home/tkloczko/rpmbuild/BUILD/freecell-solver-6.6.0/x86_64-redhat-linux-gnu
    Start 1: perl_run_tests
1/1 Test #1: perl_run_tests ...................***Failed    0.18 sec
dbm-fc-solver
Open failed: No such file or directory at /home/tkloczko/rpmbuild/BUILD/freecell-solver-6.6.0/run-tests.pl line 126.
bin dbm-fc-solver dbm-fc-solver
bin dbm-fc-solver linux-vdso.so.1

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.18 sec

The following tests FAILED:
          1 - perl_run_tests (Failed)
Errors while running CTest
shlomif commented 2 years ago

@kloczek : hi.

  1. Are you using mock?

  2. please provide more details - https://github.com/shlomif/writing-the-perfect-question ,

kloczek commented 2 years ago

No, I'm using just plain rpmbuild. How test suite is started it does't matter. You can try to reporoduce those two commands from first two lines provided partial build log.

shlomif commented 2 years ago

@kloczek : hi, this script succeeds here:

set -e -x
make package_source
rpmbuild -ts freecell-solver-6.6.0.tar.xz
mock /home/shlomif/progs/Rpms/SRPMS/freecell-solver-6.6.0-1.src.rpm
unset CFLAGS
rpmbuild -ta freecell-solver-6.6.0.tar.xz
shlomif[fcs]:$trunk/fc-solve/B$ git show | head
commit e0b0a5ce639e7fd02b6c9bd593a5b92a0dd1a5fa
Author: Shlomi Fish <shlomif@shlomifish.org>
Date:   Tue May 17 09:27:57 2022 +0300

    fix "mock" src.rpm build

    https://github.com/shlomif/fc-solve/issues/87

diff --git a/fc-solve/source/CMakeLists.txt b/fc-solve/source/CMakeLists.txt
index a94840f33..d9d9050c0 100644
shlomif[fcs]:$trunk/fc-solve/B$ inxi -CSG
System:
  Host: telaviv1.shlomifish.org Kernel: 5.17.6-200.fc35.x86_64 arch: x86_64
    bits: 64 Desktop: Xfce v: 4.16.0 Distro: Fedora release 35 (Thirty Five)
CPU:
  Info: dual core model: Intel Core i3-2100 bits: 64 type: MT MCP cache:
    L2: 512 KiB
  Speed (MHz): avg: 2747 min/max: 1600/3100 cores: 1: 2711 2: 2759 3: 2779
    4: 2741
Graphics:
  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics
    driver: i915 v: kernel
  Display: x11 server: X.Org v: 1.20.14 driver: X: loaded: modesetting
    unloaded: fbdev,vesa gpu: i915 resolution: 1920x1080~60Hz
  OpenGL: renderer: Mesa Intel HD Graphics 2000 (SNB GT1)
    v: 3.3 Mesa 21.3.8
shlomif[fcs]:$trunk/fc-solve/B$

also - please use mock and provide more details

shlomif commented 2 years ago

@kloczek : ping!

shlomif commented 2 years ago

@kloczek : Closing due to lack of responsiveness, and to avoid clutter. We can reopen the ticket later.

kloczek commented 2 years ago

Again it doesn't matter how I'm building fc-solve. Test suite is failing .. rpm based build procedure. I'm not using Fedora and really have no idea that mock has to do with reported issue.

shlomif commented 2 years ago

Again it doesn't matter how I'm building fc-solve. Test suite is failing .. rpm based build procedure. I'm not using Fedora and really have no idea that mock has to do with reported issue.

Please be more cooperative and informative,

kloczek commented 2 years ago

Please let me know what do you want to know..

kloczek commented 2 years ago

It would be really good to see any suggestions about some diagnostics which I can try to perform around test suite which may expose cause of that fail.

shlomif commented 2 years ago

please try using "git master", rpmbuild -ts and mock and paste the output of inxi -CSG (= system details)

kloczek commented 2 years ago

Does any test suite issue has been solved since last release? On what kind of system details depends test suite result of the perl_run_tests unit?

Really please focus on diagnosing test suite issue.

kloczek commented 2 years ago

rpmbuild -ts builds src.rpm out of tar ball which inside must contain spec file. Why do you want me to build that src.rpm? This is only archiving operation and still it has nothing to do with test suite.

shlomif commented 2 years ago

Does any test suite issue has been solved since last release?

yes. several.

On what kind of system details depends test suite result of the perl_run_tests unit?

deps, compilers, tools, etc. See the gh actions' config settings..

Really please focus on diagnosing test suite issue.

it should be done in a pristine environment which is what mock gives you.

shlomif commented 2 years ago

rpmbuild -ts builds src.rpm out of tar ball which inside must contain spec file.

Why do you want me to build that src.rpm?

due to a mock-based pristine env.

This is only archiving operation and still it has nothing to do with test suite.

shlomif commented 2 years ago

@kloczek : ping

kloczek commented 2 years ago

I'm not using mock .. please. Build methodology has nothing to do with that issue .. please (again). I'm building rpm packages almost +30 years (since Redhat 2.0.2). Please don't tell me how I should build my packages. I'm using my own methodology using LXC zones in which are installed ONLY packages listed in BuildRequires (+ its dependencies). On my own devel systems I have ONLY software installed out of rpm packages so my systems are ALWAYS pristine.

I'm disappointed a bit because you are really not even trying to focus on test suite issue .. 😞

shlomif commented 2 years ago

hi @kloczek !

The .spec.in currently reads:

%check
rm -f t/t/tidyall.t
src="`pwd`"
if test -d build
then
    cd build
elif test -d "%{__cmake_builddir}"
then
    cd "%{__cmake_builddir}"
fi
perl "$src"/run-tests.pl

It doesn't contain a call to make [flags] test ! where is it coming from?

The output you provided is reduced, non-verbose, and incomplete.

heirecka commented 2 years ago

Sorry, to excavate this, but I'll try to be more helpful than the person who originally opened the issue.

I see basically the same test failure when trying to build a distro package (for Exherbo in this case). If a check or test target exists, we usually just run that (we could run ctest like in the rpmbuild above, but shouldn't really matter). For completeness sake I'll add the output of that at the bottom, but the error isn't different from the rpmbuild, so let's just look at the (IMO) interesting part.

Open failed: No such file or directory at /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/freecell-solver-6.6.0/run-tests.pl line 126.

If I basically do what the spec fragment above does, go to the cmake build dir and run perl ${SOURCE_DIR}/run-tests.pl manually I get:

build # perl ../freecell-solver-6.6.0/run-tests.pl       
board_gen/pi-make-microsoft-freecell-board
bin board_gen/pi-make-microsoft-freecell-board board_gen/pi-make-microsoft-freecell-board
bin board_gen/pi-make-microsoft-freecell-board linux-vdso.so.1
Open failed: No such file or directory at ../freecell-solver-6.6.0/run-tests.pl line 126.

I don't know any perl, but with that and the code of run-tests.pl it looks like it want's to run Digest::SHA->new(256)->addfile($bin)->b64digest; on linux-vdso.so.1, which fails because it's only a virtual shared object, which doesn't really exist, muss less in the build dir. strace seems to confirm that. The linux-vdso seems to come from ldd's output, but again I don't speak perl and I can't even say what the test is supposed to test.

The slightly odd thing is, that I'm pretty sure that the tests worked with the same version (6.6.0) in the past and only broke recently with some update down in the stack. If ldd's output is actually involved that would be my first suspect.

I hope that helps :)

=== Starting src_test
Makefile found, looking for potential test targets
/usr/x86_64-pc-linux-gnu/bin/cmake -S/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/freecell-solver-6.6.0 -B/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build --check-build-system CMakeFiles/Makefile.cmake 0
make  -f CMakeFiles/Makefile2 check
make[1]: Entering directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
/usr/x86_64-pc-linux-gnu/bin/cmake -S/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/freecell-solver-6.6.0 -B/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/x86_64-pc-linux-gnu/bin/cmake -E cmake_progress_start /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build/CMakeFiles 0
make  -f CMakeFiles/Makefile2 CMakeFiles/check.dir/all
make[2]: Entering directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
make  -f CMakeFiles/check.dir/build.make CMakeFiles/check.dir/depend
make[3]: Entering directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
cd /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build && /usr/x86_64-pc-linux-gnu/bin/cmake -E cmake_depends "Unix Makefiles" /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/freecell-solver-6.6.0 /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/freecell-solver-6.6.0 /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build/CMakeFiles/check.dir/DependInfo.cmake --color=
make[3]: Leaving directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
make  -f CMakeFiles/check.dir/build.make CMakeFiles/check.dir/build
make[3]: Entering directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
perl /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/freecell-solver-6.6.0/run-tests.pl
make[3]: Leaving directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
/usr/x86_64-pc-linux-gnu/bin/cmake -E cmake_echo_color --switch= --progress-dir=/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build/CMakeFiles --progress-num= "Built target check"
make[2]: Leaving directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
/usr/x86_64-pc-linux-gnu/bin/cmake -E cmake_progress_start /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build/CMakeFiles 0
make[1]: Leaving directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
Found check target
/usr/x86_64-pc-linux-gnu/bin/cmake -S/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/freecell-solver-6.6.0 -B/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build --check-build-system CMakeFiles/Makefile.cmake 0
make  -f CMakeFiles/Makefile2 check
make[1]: Entering directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
/usr/x86_64-pc-linux-gnu/bin/cmake -S/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/freecell-solver-6.6.0 -B/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/x86_64-pc-linux-gnu/bin/cmake -E cmake_progress_start /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build/CMakeFiles 0
make  -f CMakeFiles/Makefile2 CMakeFiles/check.dir/all
make[2]: Entering directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
make  -f CMakeFiles/check.dir/build.make CMakeFiles/check.dir/depend
make[3]: Entering directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
cd /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build && /usr/x86_64-pc-linux-gnu/bin/cmake -E cmake_depends "Unix Makefiles" /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/freecell-solver-6.6.0 /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/freecell-solver-6.6.0 /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build/CMakeFiles/check.dir/DependInfo.cmake --color=
make[3]: Leaving directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
make  -f CMakeFiles/check.dir/build.make CMakeFiles/check.dir/build
make[3]: Entering directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
perl /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/freecell-solver-6.6.0/run-tests.pl
make -j1 ARGS=--verbose check
freecell-solver-fc-pro-range-solve
bin freecell-solver-fc-pro-range-solve freecell-solver-fc-pro-range-solve
bin freecell-solver-fc-pro-range-solve linux-vdso.so.1
make[3]: Leaving directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
make[2]: Leaving directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
make[1]: Leaving directory '/var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/build'
Open failed: No such file or directory at /var/tmp/paludis/build/games-board-freecell-solver-6.6.0/work/freecell-solver-6.6.0/run-tests.pl line 126.
make[3]: *** [CMakeFiles/check.dir/build.make:73: CMakeFiles/check] Error 2
make[2]: *** [CMakeFiles/Makefile2:928: CMakeFiles/check.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:935: CMakeFiles/check.dir/rule] Error 2
make: *** [Makefile:540: check] Error 2
shlomif commented 2 years ago

@heirecka : please try the run-tests.pl from latest git master. thanks

kloczek commented 2 years ago

I've been trying to integrate with my rpm spec file necessary commits but looks like now it is a bit hard to form minimal set of commits at already it is +150 commits since last release. I'll retest that when you will make next release. BTW .. do you have any plans to make next release soon? 🤔

shlomif commented 2 years ago

I've been trying to integrate with my rpm spec file necessary commits but looks like now it is a bit hard to form minimal set of commits at already it is +150 commits since last release. I'll retest that when you will make next release. BTW .. do you have any plans to make next release soon? thinking

hi @kloczek . please try this patch: https://www.shlomifish.org/Files/files/code/fcs-runtests.patch

heirecka commented 2 years ago

@heirecka : please try the run-tests.pl from latest git master. thanks

Still complains about linux-vdso.so.1, but no longer fatally and successfully runs the rest of the tests.

# perl ../freecell-solver-6.6.0/run-tests.pl                                                          
freecell-solver-range-parallel-solve
bin freecell-solver-range-parallel-solve freecell-solver-range-parallel-solve
bin freecell-solver-range-parallel-solve linux-vdso.so.1
Open failed: No such file or directory at ../freecell-solver-6.6.0/run-tests.pl line 127.
shlomif commented 2 years ago

hi @heirecka .

@heirecka : please try the run-tests.pl from latest git master. thanks

Still complains about linux-vdso.so.1, but no longer fatally

I catch the exception and emit a warning.

and successfully runs the rest of the tests.

so it is working fine now? is the build successful?

# perl ../freecell-solver-6.6.0/run-tests.pl                                                          
freecell-solver-range-parallel-solve
bin freecell-solver-range-parallel-solve freecell-solver-range-parallel-solve
bin freecell-solver-range-parallel-solve linux-vdso.so.1
Open failed: No such file or directory at ../freecell-solver-6.6.0/run-tests.pl line 127.
heirecka commented 2 years ago

so it is working fine now? is the build successful?

Yes, thank you for fixing that.

shlomif commented 2 years ago

so it is working fine now? is the build successful?

Yes, thank you for fixing that.

you're welcome.

shlomif commented 2 years ago

I've been trying to integrate with my rpm spec file necessary commits but looks like now it is a bit hard to form minimal set of commits at already it is +150 commits since last release. I'll retest that when you will make next release. BTW .. do you have any plans to make next release soon? thinking

Hi @kloczek ! I want to mint a new release only after you've made sure the patch is working for you. Please do the needful.

shlomif commented 1 year ago

Should be fixed in freecell-solver-6.8.0. Closing for now,

kloczek commented 1 year ago

Just tested 6.8.0 and looks like still something is wrong

+ cd freecell-solver-6.8.0
+ /usr/bin/make -O -j48 V=1 VERBOSE=1 -C x86_64-redhat-linux-gnu test ARGS=--output-on-failure
make: Entering directory '/home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu'
Running tests...
/usr/bin/ctest --force-new-ctest-process --output-on-failure
Test project /home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu
    Start 1: perl_run_tests
1/1 Test #1: perl_run_tests ...................***Failed    0.31 sec
freecell-solver-range-parallel-solve
bin freecell-solver-range-parallel-solve freecell-solver-range-parallel-solve
bin freecell-solver-range-parallel-solve /home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu/libfreecell-solver.so.0
bin freecell-solver-range-parallel-solve /lib64/libc.so.6
board_gen/pi-make-microsoft-freecell-board
bin board_gen/pi-make-microsoft-freecell-board board_gen/pi-make-microsoft-freecell-board
bin board_gen/pi-make-microsoft-freecell-board /lib64/libc.so.6
fc-solve
bin fc-solve fc-solve
bin fc-solve /home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu/libfreecell-solver.so.0
bin fc-solve /lib64/libc.so.6
freecell-solver-fc-pro-range-solve
bin freecell-solver-fc-pro-range-solve freecell-solver-fc-pro-range-solve
bin freecell-solver-fc-pro-range-solve /home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu/libfreecell-solver.so.0
bin freecell-solver-fc-pro-range-solve /lib64/libc.so.6
dbm-fc-solver
bin dbm-fc-solver dbm-fc-solver
bin dbm-fc-solver /lib64/libc.so.6
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu'
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu'
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu'
make[1]: *** No rule to make target 'boards'.  Stop.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu'
make failed at /home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/run-tests.pl line 265.
shlomif commented 1 year ago

Just tested 6.8.0 and looks like still something is wrong

For the last time: please either provide the requested info, or leave us alone.

+ cd freecell-solver-6.8.0
+ /usr/bin/make -O -j48 V=1 VERBOSE=1 -C x86_64-redhat-linux-gnu test ARGS=--output-on-failure
make: Entering directory '/home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu'
Running tests...
/usr/bin/ctest --force-new-ctest-process --output-on-failure
Test project /home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu
    Start 1: perl_run_tests
1/1 Test #1: perl_run_tests ...................***Failed    0.31 sec
freecell-solver-range-parallel-solve
bin freecell-solver-range-parallel-solve freecell-solver-range-parallel-solve
bin freecell-solver-range-parallel-solve /home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu/libfreecell-solver.so.0
bin freecell-solver-range-parallel-solve /lib64/libc.so.6
board_gen/pi-make-microsoft-freecell-board
bin board_gen/pi-make-microsoft-freecell-board board_gen/pi-make-microsoft-freecell-board
bin board_gen/pi-make-microsoft-freecell-board /lib64/libc.so.6
fc-solve
bin fc-solve fc-solve
bin fc-solve /home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu/libfreecell-solver.so.0
bin fc-solve /lib64/libc.so.6
freecell-solver-fc-pro-range-solve
bin freecell-solver-fc-pro-range-solve freecell-solver-fc-pro-range-solve
bin freecell-solver-fc-pro-range-solve /home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu/libfreecell-solver.so.0
bin freecell-solver-fc-pro-range-solve /lib64/libc.so.6
dbm-fc-solver
bin dbm-fc-solver dbm-fc-solver
bin dbm-fc-solver /lib64/libc.so.6
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu'
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu'
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu'
make[1]: *** No rule to make target 'boards'.  Stop.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/x86_64-redhat-linux-gnu'
make failed at /home/tkloczko/rpmbuild/BUILD/freecell-solver-6.8.0/run-tests.pl line 265.