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

Test failure in test_amdgpu due to multi GPU rework #1599

Open
parona-source opened this issue Mar 1, 2025 · 0 comments
Open

Test failure in test_amdgpu due to multi GPU rework #1599

parona-source opened this issue Mar 1, 2025 · 0 comments

Comments

@parona-source
Copy link

Describe the bug
d224507 changed the AMDGPU class in a way that tests don't work and its nontrivial to fix. Either the AMDGPU class needs to be changed so that tests can add their own metrics_path or see about using a testing framework that allows you to mock this.

List relevant hardware/software information

  • Linux Distribution: Gentoo Linux
  • MangoHud version: a27f491
  • GPU: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] (rev c1)

To Reproduce
Steps to reproduce the behavior:

  1. meson setup build --wipe -Dtests=enabled -Dwith_xnvctrl=disabled && meson compile -C build && meson test -C build
  2. See error

Expected behavior
Tests passing

Additional context

Test output
$ git rev-parse HEAD && meson setup build --wipe -Dtests=enabled -Dwith_xnvctrl=disabled && meson compile -C build && meson test -C build 
a27f4917f2cf3fb0131811537247987376398640
The Meson build system
Version: 1.7.0
Source dir: /home/ask/sources/MangoHud
Build dir: /home/ask/sources/MangoHud/build
Build type: native build
Project name: MangoHud
Project version: v0.8.0
C compiler for the host machine: ccache cc (gcc 15.0.1 "cc (Gentoo 15.0.1_pre20250223-r1 p46) 15.0.1 20250223 (experimental)")
C linker for the host machine: cc ld.bfd 2.44
C++ compiler for the host machine: ccache c++ (gcc 15.0.1 "c++ (Gentoo 15.0.1_pre20250223-r1 p46) 15.0.1 20250223 (experimental)")
C++ linker for the host machine: c++ ld.bfd 2.44
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python3 (mako) found: YES (/usr/bin/python3) modules: mako
Checking if "GCC atomic builtins" compiles: YES 
Checking if "Supports timespec_get" compiles: YES 
Checking for function "bswap32" : YES 
Checking for function "bswap64" : YES 
Checking for function "clz" : YES 
Checking for function "clzll" : YES 
Checking for function "ctz" : YES 
Checking for function "expect" : YES 
Checking for function "ffs" : YES 
Checking for function "ffsll" : YES 
Checking for function "popcount" : YES 
Checking for function "popcountll" : YES 
Checking for function "unreachable" : YES 
Found pkg-config: YES (/usr/bin/pkg-config) 2.3.0
Run-time dependency x11 found: YES 1.8.11
Run-time dependency wayland-client found: YES 1.23.1
Run-time dependency dbus-1 found: YES 1.16.0
Run-time dependency xkbcommon found: YES 1.8.0
Run-time dependency threads found: YES
Compiler for C supports arguments -Werror=implicit-function-declaration: YES 
Compiler for C supports arguments -Werror=missing-declarations: YES 
Compiler for C supports arguments -Werror=missing-prototypes: YES 
Compiler for C supports arguments -Werror=return-type: YES 
Compiler for C supports arguments -Werror=incompatible-pointer-types: YES 
Compiler for C supports arguments -Wno-unused-parameter: YES 
Compiler for C supports arguments -Qunused-arguments: NO 
Compiler for C supports arguments -fno-math-errno: YES 
Compiler for C supports arguments -fno-trapping-math: YES 
Compiler for C supports arguments -Wno-missing-field-initializers: YES 
Compiler for C++ supports arguments -Werror=missing-declarations: YES 
Compiler for C++ supports arguments -Werror=return-type: YES 
Compiler for C++ supports arguments -Wno-unused-parameter: YES 
Compiler for C++ supports arguments -Qunused-arguments: NO 
Compiler for C++ supports arguments -fno-math-errno: YES 
Compiler for C++ supports arguments -fno-trapping-math: YES 
Compiler for C++ supports arguments -Wno-non-virtual-dtor: YES 
Compiler for C++ supports arguments -Wno-missing-field-initializers: YES 
Checking for function "dlopen" : YES 
Checking for function "clock_gettime" : YES 

Executing subproject vulkan-headers 

vulkan-headers| Project name: vulkan-headers
vulkan-headers| Project version: 1.2.158
vulkan-headers| C compiler for the host machine: ccache cc (gcc 15.0.1 "cc (Gentoo 15.0.1_pre20250223-r1 p46) 15.0.1 20250223 (experimental)")
vulkan-headers| C linker for the host machine: cc ld.bfd 2.44
vulkan-headers| Build targets in project: 1
vulkan-headers| Subproject vulkan-headers finished.

Checking for size of "void*" : 8 
Found CMake: /usr/bin/cmake (3.31.6)
Run-time dependency imgui found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency imgui

Executing subproject imgui 

imgui| Project name: imgui
imgui| Project version: 1.89.9
imgui| C++ compiler for the host machine: ccache c++ (gcc 15.0.1 "c++ (Gentoo 15.0.1_pre20250223-r1 p46) 15.0.1 20250223 (experimental)")
imgui| C++ linker for the host machine: c++ ld.bfd 2.44
imgui| Library d3dcompiler found: NO
imgui| Library d3d9 skipped: feature dx9 disabled
imgui| Library d3d10 skipped: feature dx10 disabled
imgui| Library d3d11 skipped: feature dx11 disabled
imgui| Library d3d12 skipped: feature dx12 disabled
imgui| Dependency appleframeworks (modules: Foundation, AppKit, GameController, Metal) skipped: feature metal disabled
imgui| Dependency gl skipped: feature opengl disabled
imgui| Dependency sdl2 skipped: feature sdl_renderer disabled
imgui| Dependency vulkan skipped: feature vulkan disabled
imgui| Has header "webgpu/webgpu.h" skipped: feature webgpu disabled
imgui| Dependency glfw3 skipped: feature glfw disabled
imgui| Dependency sdl2 skipped: feature sdl2 disabled
imgui| Dependency appleframeworks (modules: Carbon, Cocoa, GameController) skipped: feature osx disabled
imgui| Library dwmapi skipped: feature win disabled
imgui| Dependency allegro-5 skipped: feature allegro5 disabled
imgui| Dependency allegro_primitives-5 skipped: feature allegro5 disabled
imgui| Build targets in project: 3
imgui| Subproject imgui finished.

Dependency imgui from subproject subprojects/imgui-1.89.9 found: YES 1.89.9
Run-time dependency implot found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency implot

Executing subproject implot 

implot| Project name: ImGui Plotting Library
implot| Project version: 0.16
implot| C++ compiler for the host machine: ccache c++ (gcc 15.0.1 "c++ (Gentoo 15.0.1_pre20250223-r1 p46) 15.0.1 20250223 (experimental)")
implot| C++ linker for the host machine: c++ ld.bfd 2.44
implot| Build targets in project: 4
implot| Subproject implot finished.

Dependency implot from subproject subprojects/implot-0.16 found: YES 0.16
Run-time dependency spdlog found: YES 1.15.1

Executing subproject spdlog 

spdlog| Project name: spdlog
spdlog| Project version: 1.14.1
spdlog| C++ compiler for the host machine: ccache c++ (gcc 15.0.1 "c++ (Gentoo 15.0.1_pre20250223-r1 p46) 15.0.1 20250223 (experimental)")
spdlog| C++ linker for the host machine: c++ ld.bfd 2.44
spdlog| Dependency threads found: YES unknown (cached)
spdlog| Header "format" has symbol "__cpp_lib_format" skipped: feature std_format disabled
spdlog| Dependency fmt skipped: feature external_fmt disabled
spdlog| Build targets in project: 5
spdlog| Subproject spdlog finished.

Run-time dependency nlohmann_json found: YES 3.11.3
Program glslang found: YES (/usr/bin/glslang)
Program git found: YES (/usr/bin/git)
Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES 
Compiler for C supports link arguments -Wl,-z,relro: YES 
Compiler for C supports link arguments -Wl,--exclude-libs,ALL: YES 
Compiler for C supports link arguments -lGL: YES 
Compiler for C supports link arguments -static-libstdc++: YES 
WARNING: extract_all_objects called without setting recursive
keyword argument. Meson currently defaults to
non-recursive to maintain backward compatibility but
the default will be changed in meson 2.0.

Configuring MangoHud.x86_64.json using configuration
Configuring mangohud using configuration
Program appstreamcli found: YES (/usr/bin/appstreamcli)
Run-time dependency cmocka found: YES 1.1.5
Build targets in project: 12

MangoHud v0.8.0

  Subprojects
    imgui         : YES
    implot        : YES
    spdlog        : YES
    vulkan-headers: YES

  User defined options
    tests         : enabled
    with_xnvctrl  : disabled

Found ninja-1.12.1 at /usr/bin/ninja
INFO: autodetecting backend as ninja                                                                              
INFO: calculating backend command to run: /usr/bin/ninja -C /home/ask/sources/MangoHud/build
ninja: Entering directory `/home/ask/sources/MangoHud/build'
[34/114] Generating src/overlay.frag.spv.h with a custom command
../src/overlay.frag
[37/114] Generating src/overlay.vert.spv.h with a custom command
../src/overlay.vert
[114/114] Linking target amdgpu
ninja: Entering directory `/home/ask/sources/MangoHud/build'
ninja: no work to do.
1/2 validate metainfo file        OK              0.01s
2/2 test amdgpu                   FAIL            0.50s   (exit status 255 or signal 127 SIGinvalid)
>>> MESON_TEST_ITERATION=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=176 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 /home/ask/sources/MangoHud/build/amdgpu


Ok:                 1   
Expected Fail:      0   
Fail:               1   
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   

Full log written to /home/ask/sources/MangoHud/build/meson-logs/testlog.txt

$ cat /home/ask/sources/MangoHud/build/meson-logs/testlog.txt
Log of Meson test suite run on 2025-03-01T20:14:00.831152

Inherited environment: SHELL=/bin/bash WINDOWID=1 COLORTERM=truecolor XDG_CONFIG_DIRS=/home/ask/.config/kdedefaults:/etc/xdg KGLOBALACCELD_PLATFORM=org.kde.kwin LESS='-R -M --shift 5' XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1 XDG_MENU_PREFIX=plasma- JDK_HOME=/home/ask//.gentoo/java-config-2/current-user-vm CONFIG_PROTECT_MASK='/etc/sandbox.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/terminfo /etc/dconf /etc/ca-certificates.conf /etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuild' R_HOME=/usr/lib64/R PKG_CONFIG_PATH=/usr/share/guile-data/3.0/pkgconfig LANGUAGE='' PROTON_LOG_DIR=/home/ask//.local/share/proton_log JAVA_HOME=/home/ask//.gentoo/java-config-2/current-user-vm DOTNET_ROOT=/opt/dotnet-sdk-bin-8.0 SHELL_SESSION_ID=f8f2e44be7b34f80b404a98613c93f27 ANT_HOME=/usr/share/ant DESKTOP_SESSION=plasma GPG_TTY=/dev/pts/22 EDITOR=vi XDG_SEAT=seat0 PWD=/home/ask/sources/MangoHud CONFIG_PROTECT='/var/bind /usr/share/maven-bin-3.9/conf /usr/share/gnupg/qualified.txt /usr/share/config /usr/lib64/libreoffice/program/sofficerc' LOGNAME=ask XDG_SESSION_TYPE=wayland MANPATH=/home/ask//.gentoo/java-config-2/current-user-vm/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/15/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.44/man:/etc/java-config-2/current-system-vm/man/:/usr/local/share/man:/usr/share/man:/usr/lib/rust/man-1.82.0:/usr/lib/rust/man-1.83.0:/usr/lib/rust/man-1.84.0:/usr/lib/rust/man-1.84.1:/usr/lib/rust/man-1.85.0:/usr/lib/rust/man-bin-1.81.0:/usr/lib/llvm/21/share/man:/usr/lib/llvm/19/share/man:/usr/lib/llvm/18/share/man:/etc/eselect/wine/share/man PNPM_HOME=/home/ask/.local/share/pnpm XAUTHORITY=/run/user/1000/xauth_ckyLxO SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 OPENCL_PROFILE=ocl-icd MOTD_SHOWN=pam VIRTUALENVWRAPPER_SCRIPT=/usr/bin/virtualenvwrapper.sh MANGOHUD=1 HOME=/home/ask/ SSH_ASKPASS=/usr/bin/ksshaskpass LANG=en_GB.utf8 LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.7z=01;31:*.ace=01;31:*.alz=01;31:*.apk=01;31:*.arc=01;31:*.arj=01;31:*.bz=01;31:*.bz2=01;31:*.cab=01;31:*.cpio=01;31:*.crate=01;31:*.deb=01;31:*.drpm=01;31:*.dwm=01;31:*.dz=01;31:*.ear=01;31:*.egg=01;31:*.esd=01;31:*.gz=01;31:*.jar=01;31:*.lha=01;31:*.lrz=01;31:*.lz=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.lzo=01;31:*.pyz=01;31:*.rar=01;31:*.rpm=01;31:*.rz=01;31:*.sar=01;31:*.swm=01;31:*.t7z=01;31:*.tar=01;31:*.taz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tgz=01;31:*.tlz=01;31:*.txz=01;31:*.tz=01;31:*.tzo=01;31:*.tzst=01;31:*.udeb=01;31:*.war=01;31:*.whl=01;31:*.wim=01;31:*.xz=01;31:*.z=01;31:*.zip=01;31:*.zoo=01;31:*.zst=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.cfg=00;32:*.conf=00;32:*.diff=00;32:*.doc=00;32:*.ini=00;32:*.log=00;32:*.patch=00;32:*.pdf=00;32:*.ps=00;32:*.tex=00;32:*.txt=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:' _VIRTUALENVWRAPPER_API=' mkvirtualenv rmvirtualenv lsvirtualenv showvirtualenv workon add2virtualenv cdsitepackages cdvirtualenv lssitepackages toggleglobalsitepackages cpvirtualenv setvirtualenvproject mkproject cdproject mktmpenv wipeenv allvirtualenv' XDG_CURRENT_DESKTOP=KDE KONSOLE_DBUS_SERVICE=:1.588 WAYLAND_DISPLAY=wayland-0 KONSOLE_DBUS_SESSION=/Sessions/1 INCUS_EDK2_PATH=/usr/share/edk2-ovmf PROFILEHOME='' XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 KONSOLE_VERSION=241202 KDE_SESSION_UID=1000 INFOPATH=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.44/info:/usr/share/autoconf-2.72/info:/usr/share/autoconf-2.71/info:/usr/share/autoconf-2.13/info:/usr/share/automake-1.17/info:/usr/share/automake-1.16.5/info:/usr/share/info:/usr/share/info/emacs-30-vcs:/usr/share/guile-data/3.0/info JAVAC=/home/ask//.gentoo/java-config-2/current-user-vm/bin/javac XDG_SESSION_CLASS=user STUDIO_JDK=/opt/android-studio/jbr TERM=xterm-256color LESSOPEN='|lesspipe %s' USER=ask COLORFGBG='15;0' QT_WAYLAND_RECONNECT=1 KDE_SESSION_VERSION=6 PAM_KWALLET5_LOGIN=/run/user/1000/kwallet5.socket MANPAGER=manpager NPM_CONFIG_GLOBALCONFIG=/etc/npm/npmrc DISPLAY=:1 SHLVL=1 PAGER=/usr/bin/less LEX=flex XDG_VTNR=7 PROTON_LOG=1 XDG_SESSION_ID=4 XDG_RUNTIME_DIR=/run/user/1000 GCC_SPECS='' GSETTINGS_BACKEND=dconf QT_AUTO_SCREEN_SCALE_FACTOR=0 XDG_DATA_DIRS=/usr/local/share:/usr/share:/etc/eselect/wine/share KDE_FULL_SESSION=true PATH=/home/ask/.local/share/pnpm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/21/bin:/usr/lib/llvm/19/bin:/usr/lib/llvm/18/bin:/etc/eselect/wine/bin:/home/ask/.local/bin:/home/ask/.local/bin:/home/ask/.local/bin GTK_USE_PORTAL=1 DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbus-9PH0u235LW,guid=07178a59dd48609e2cc2b15a67c1fba3 LV2_PATH=/usr/lib64/lv2 KDE_APPLICATIONS_AS_SCOPE=1 MAIL=/var/mail/ask SHELL_SETS_TITLE=0 OLDPWD=/home/ask LADSPA_PATH=/usr/lib64/ladspa KONSOLE_DBUS_WINDOW=/Windows/1 _=/usr/bin/meson 

==================================== 1/2 =====================================
test:         validate metainfo file
start time:   18:14:00
duration:     0.01s
result:       exit status 0
command:      MESON_TEST_ITERATION=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=26 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 /usr/bin/appstreamcli validate --no-net --pedantic /home/ask/sources/MangoHud/build/../data/io.github.flightlessmango.mangohud.metainfo.xml
----------------------------------- stdout -----------------------------------
I: io.github.flightlessmango.mangohud:7: developer-name-tag-deprecated
I: io.github.flightlessmango.mangohud:~: developer-info-missing

✔ Validation was successful: infos: 2
==============================================================================

==================================== 2/2 =====================================
test:         test amdgpu
start time:   18:14:00
duration:     0.50s
result:       (exit status 255 or signal 127 SIGinvalid)
command:      MESON_TEST_ITERATION=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=176 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 /home/ask/sources/MangoHud/build/amdgpu
----------------------------------- stdout -----------------------------------
[==========] Running 4 test(s).
[ RUN      ] test_amdgpu_verify_metrics
[2025-03-01 20:14:00.838] [warning] [amdgpu.cpp:47] Unsupported gpu_metrics version: 0.0
[       OK ] test_amdgpu_verify_metrics
[ RUN      ] test_amdgpu_get_instant_metrics
[  FAILED  ] test_amdgpu_get_instant_metrics
[ RUN      ] test_amdgpu_get_samples_and_copy
----------------------------------- stderr -----------------------------------
[  ERROR   ] --- 0 != 0x40
[   LINE   ] --- ../tests/test_amdgpu.cpp:36: error: Failure!
==============================================================================


Summary of Failures:

2/2 test amdgpu            FAIL            0.50s   (exit status 255 or signal 127 SIGinvalid)

Ok:                 1   
Expected Fail:      0   
Fail:               1   
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   
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

No branches or pull requests

1 participant