Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flac v1.5.0: case40-expect.meta test fail on aarch64 linux #806

Open
KSJ2000 opened this issue Feb 13, 2025 · 7 comments · May be fixed by #809
Open

flac v1.5.0: case40-expect.meta test fail on aarch64 linux #806

KSJ2000 opened this issue Feb 13, 2025 · 7 comments · May be fixed by #809

Comments

@KSJ2000
Copy link

KSJ2000 commented Feb 13, 2025

While building flac version 1.5.0 on aarch64 linux, at least one of the metaflac tests fail:

Test project /build/source/build
      Start  1: libFLAC
      Start  4: generate_streams
      Start  3: grabbag
 1/10 Test  #3: grabbag ..........................   Passed    0.34 sec
 2/10 Test  #4: generate_streams .................   Passed    1.97 sec
      Start  5: flac
      Start  6: metaflac
      Start  7: replaygain
      Start  8: seeking
      Start  9: streams
      Start 10: compression
 3/10 Test  #1: libFLAC ..........................   Passed    2.29 sec
      Start  2: libFLAC++
 4/10 Test  #7: replaygain .......................   Passed    0.69 sec
 5/10 Test  #6: metaflac .........................***Failed    0.69 sec
Generating stream...
test case00: --list...  \c
OK
test case01: STREAMINFO --show-* shortcuts...  \c
OK
test case02: --add-padding...  \c
OK
test case02: whether -o does not change input file...  \c
OK
test case03: --set-tag=ARTIST...  \c
OK
test case03: -o --set-tag=ARTIST...  \c
OK
test case04: --set-tag=ARTIST...  \c
OK
test case05: --set-tag=ARTIST...  \c
OK
test case06: --set-tag=TITLE...  \c
OK
test case07: --show-vendor-tag --show-tag=ARTIST...  \c
OK
test case08: --remove-first-tag=ARTIST...  \c
OK
test case09: --remove-tag=ARTIST...  \c
OK
test case10: --list --block-type=VORBIS_COMMENT...  \c
OK
test case11: --list --block-number=0...  \c
OK
test case12: --list --block-number=1,2,999...  \c
OK
test case13: --list --block-type=VORBIS_COMMENT,PADDING...  \c
OK
test case14: --list --except-block-type=SEEKTABLE,VORBIS_COMMENT...  \c
OK
test case15: --list --except-block-type=STREAMINFO...  \c
OK
test case16: --add-padding=4321 * 2...  \c
OK
test case17: --merge-padding...  \c
OK
test case18: --add-padding=0...  \c
OK
test case18: whether -o does not change input file...  \c
OK
test case19: --sort-padding...  \c
OK
test case19: -o --sort-padding...  \c
OK
test case20: --add-padding=0...  \c
OK
test case21: --remove-all-tags...  \c
OK
test case21: whether -o does not change input file...  \c
OK
test case22: --remove --block-number=1,99 --dont-use-padding...  \c
OK
test case22: -o --remove --block-number=1,99 --dont-use-padding...  \c
OK
test case22: whether -o does not change input file...  \c
OK
test case23: --remove --block-number=99 --dont-use-padding...  \c
OK
test case23: -o --remove --block-number=99 --dont-use-padding...  \c
OK
test case23: whether -o does not change input file...  \c
OK
test case24: --remove --block-type=PADDING...  \c
OK
test case24: -o --remove --block-type=PADDING...  \c
OK
test case24: whether -o does not change input file...  \c
OK
test case25: --remove --block-type=PADDING --dont-use-padding...  \c
OK
test case25: -o --remove --block-type=PADDING --dont-use-padding...  \c
OK
test case26: --add-padding=0 * 2...  \c
OK
test case27: --remove --except-block-type=PADDING...  \c
OK
test case28: --remove-all...  \c
OK
test case29: --remove-all --dont-use-padding...  \c
OK
test case30: --remove-all --dont-use-padding...  \c
OK
test case31: --set-tag=......  \c
OK
test case32: --remove-all-tags --set-tag=......  \c
OK
test case33: --remove-all-tags --set-tag=......  \c
OK
test case34: --remove-all-tags --set-tag=......  \c
OK
test case35: --remove-all-tags --set-tag=......  \c
OK
test case36: --remove-all-tags --set-tag=......  \c
OK
test case37: --remove-all-tags --set-tag=......  \c
OK
test case38: --remove-all-tags --set-tag=......  \c
OK
test case39: --import-tags-from=-...  \c
OK
test case40: --import-tags-from=[FILE]...  \c
ERROR: metadata does not match expected /build/source/test/metaflac-test-files/case40-expect.meta

 6/10 Test  #8: seeking ..........................   Passed    0.93 sec
 7/10 Test  #2: libFLAC++ ........................   Passed    1.00 sec
 8/10 Test #10: compression ......................   Passed    2.82 sec
 9/10 Test  #5: flac .............................   Passed   20.70 sec
10/10 Test  #9: streams ..........................   Passed  305.36 sec
@KSJ2000
Copy link
Author

KSJ2000 commented Feb 15, 2025

As I thought, not just case40 fails. This is the log for case39 failing:
https://logs.ofborg.org/logfile/nixos/nixpkgs.381219/b86ec841-44a4-4d1d-b8bb-2673245806d5

@ktmf01
Copy link
Collaborator

ktmf01 commented Feb 15, 2025

Could you check whether disabling ctest multithreading solves anything?

@KSJ2000
Copy link
Author

KSJ2000 commented Feb 15, 2025

modify to 0 here?

flac/config.cmake.h.in

Lines 91 to 92 in 1507800

/* Define if multithreading is enabled */
#cmakedefine HAVE_PTHREAD 1

@ktmf01
Copy link
Collaborator

ktmf01 commented Feb 15, 2025

That is not what I meant. How do you invoke ctest?

@ktmf01
Copy link
Collaborator

ktmf01 commented Feb 17, 2025

I've taken a look at this, and there indeed seems to a problem in CMake running the tests in parallel.

Can you try with this patch?

diff --git a/test/test_replaygain.sh b/test/test_replaygain.sh
index 11fb77dc..b5dea14c 100755
--- a/test/test_replaygain.sh
+++ b/test/test_replaygain.sh
@@ -140,7 +140,4 @@ for ACTION in $REPLAYGAIN_FREQ ; do
   done
 done

-
-rm -f $testdir/out.flac $testdir/out.meta
-
 exit 0

@KSJ2000
Copy link
Author

KSJ2000 commented Feb 17, 2025

Ok, I just installed asahi to build flac and the ctest does not give any errors locally. I don't know if it's because of the 16k page kernel or some other hack they are doing to run linux on apple silicon.
Maybe ofborg uses more traditional aarch64 linux hardware which is why it takes 15h+ to even start building when the x86_64 version does it pretty fast.
I'll have to apply the patch and hope for the best, both on this solution working and ofborg not giving any errors for pointing to staging branch.

@KSJ2000
Copy link
Author

KSJ2000 commented Feb 18, 2025

Success!

@ktmf01 ktmf01 linked a pull request Feb 18, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants