Irrlicht unit tests

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
juozas
Posts: 14
Joined: Sun Mar 27, 2022 12:58 pm
Location: Lithuania
Contact:

Re: Irrlicht unit tests

Post by juozas »

Last line upon closing example:

Code: Select all

R8G8B8Quit message received.
Did you forget std::endl?
Anyway, I also noticed you added some useful code to the tests, so I'm posting the full output of screenshot test here, you might find it useful :)

Code: Select all

Starting test 48, 'screenshot'
Running test testShots
Testing driver OpenGL 3.3
Color Format 0 supported
Color Format 1 supported
Color Format 2 supported
Color Format 3 supported
Color Format 4 unsupported
Color Format 5 unsupported
Color Format 6 unsupported
Color Format 7 unsupported
Color Format 8 unsupported
Color Format 9 unsupported
Color Format 10 unsupported
Color Format 11 unsupported
Color Format 12 unsupported
Color Format 13 unsupported
Color Format 14 unsupported
Color Format 15 unsupported
Color Format 16 unsupported
Color Format 17 unsupported
Color Format 18 unsupported
Color Format 19 unsupported
Color Format 20 unsupported
Color Format 21 unsupported
Color Format 22 unsupported
Color Format 23 unsupported
Color Format 24 unsupported
Color Format 25 unsupported
Color Format 26 unsupported
Color Format 27 unsupported
Color Format 28 unsupported
Color Format 29 unsupported
Color Format 30 unsupported
Running test testShotsOfShots
Testing driver Irrlicht Software Driver 1.0
Image match: 100.000000%
Testing driver Burning's Video 0.52 beautiful
Image match: 100.000000%
Testing driver OpenGL 3.3
Image match: 100.000000%
Running test testShotsOfShots
Testing driver Irrlicht Software Driver 1.0
Image match: 100.000000%
Testing driver Burning's Video 0.52 beautiful
Image match: 100.000000%
Testing driver OpenGL 3.3
Image match: 86.368736%
Writing mismatched image to 'results/OpenGL-shotsInShots2.png'
driver color format: R8G8B8

******** Test failure ********
Test 48 'screenshot' failed
******** Test failure ********
Edit: not much useful as pointed in edit of the previous post
Сделано в СССР

OS: Ubuntu Linux 22.04 LTS 64 bit
CPU: Intel Pentium Dual-Core E6300 @ 2.80GHz
RAM: DDR2 @ 2G
GPU: NVIDIA GeForce GT 710 @ 2G (Driver version: 470)
CuteAlien
Admin
Posts: 9647
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht unit tests

Post by CuteAlien »

Thanks. Not sure I'll figure this one out. There's not too much that can go wrong, it's simply glReadPixels returning the wrong result as soon as antialiasing is enabled. Maybe something that's not guaranteed to work (will read a bit more about glx, maybe I find some hint in the documentation).

At least we know now that rendering itself is fine. And except for such tests it's usually better to render to a texture instead of reading the framebuffer anyway. So not too big of a problem. And I found some other suspicious stuff while looking at this *sigh*
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
juozas
Posts: 14
Joined: Sun Mar 27, 2022 12:58 pm
Location: Lithuania
Contact:

Re: Irrlicht unit tests

Post by juozas »

Small issue with unit tests when running on Linux. Near the end I see a message saying

Code: Select all

sh: 1: tests.log: not found
you should use something like

Code: Select all

gnome-text-editor tests.log
for gui based default text editor (if available), or

Code: Select all

editor tests.log
for terminal/curses/etc based one. Don't forget to make sure the command exists, e.g. use

Code: Select all

which <command>
and do apropriate stuff depending on what you get (don't forget to exclude angled brackets from command, empty string returned by above means command tested does not exist)
You can directly call any edtor by command name, e.g. gedit, mousepad, leafpad, gvim/vim.gtk3 etc. for gui based editor or vim, nano, ed, etc. for terminal based one.
Last edited by juozas on Sun Aug 28, 2022 8:32 am, edited 2 times in total.
Сделано в СССР

OS: Ubuntu Linux 22.04 LTS 64 bit
CPU: Intel Pentium Dual-Core E6300 @ 2.80GHz
RAM: DDR2 @ 2G
GPU: NVIDIA GeForce GT 710 @ 2G (Driver version: 470)
CuteAlien
Admin
Posts: 9647
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht unit tests

Post by CuteAlien »

I guess the safe way would be to call more or less. Unfortunately no real default associations with txt files available. editor... kinda might work, didn't know this opens some (nano on my fresh installed Debian system it seems).

Thanks anyway, I'll take another look at this in a few days (just switched to new computer last week and my system isn't fully set-up yet right now... I hope I remember, just noticing my todo list is also still only on old system *sigh*).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
CuteAlien
Admin
Posts: 9647
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht unit tests

Post by CuteAlien »

I've added some comment how to find results on Linux when $PAGER is not set. You can also do something like: export PAGER=myfavoritetexttool
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
juozas
Posts: 14
Joined: Sun Mar 27, 2022 12:58 pm
Location: Lithuania
Contact:

Re: Irrlicht unit tests

Post by juozas »

Found some warnings when compiling unit tests (revision 6625), some might not be new, listing them anyway.\

Code: Select all

g++ -Wall -ansi -pedantic -fno-exceptions -O0 -g -D_DEBUG  -I../include -I/usr/X11R6/include -pipe  -c -o archiveReader.o archiveReader.cpp
archiveReader.cpp:356:13: warning: ‘bool {anonymous}::testMountFile(irr::io::IFileSystem*)’ defined but not used [-Wunused-function]
  356 | static bool testMountFile(IFileSystem* fs)
      |             ^~~~~~~~~~~~~

Code: Select all

g++ -Wall -ansi -pedantic -fno-exceptions -O0 -g -D_DEBUG  -I../include -I/usr/X11R6/include -pipe  -c -o matrixOps.o matrixOps.cpp
matrixOps.cpp: In function ‘void {anonymous}::calltest()’:
matrixOps.cpp:526:25: warning: ‘void irr::core::CMatrix4<T>::transformBox(irr::core::aabbox3d<float>&) const [with T = float]’ is deprecated [-Wdeprecated-declarations]
  526 |         mat.transformBox(bb1);
      |         ~~~~~~~~~~~~~~~~^~~~~
In file included from ../include/SMaterial.h:9,
                 from ../include/IMeshBuffer.h:9,
                 from ../include/IDynamicMeshBuffer.h:8,
                 from ../include/CDynamicMeshBuffer.h:8,
                 from ../include/irrlicht.h:34,
                 from testUtils.h:5,
                 from matrixOps.cpp:4:
../include/matrix4.h:1299:36: note: declared here
 1299 |         IRR_DEPRECATED inline void CMatrix4<T>::transformBox(core::aabbox3d<f32>& box) const
      |                                    ^~~~~~~~~~~
matrixOps.cpp:482:14: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
  482 |         bool b = mat == mat2;
      |              ^
matrixOps.cpp:509:19: warning: variable ‘v3’ set but not used [-Wunused-but-set-variable]
  509 |         vector3df v3 = mat.getScale();
      |                   ^~

Code: Select all

g++ -Wall -ansi -pedantic -fno-exceptions -O0 -g -D_DEBUG  -I../include -I/usr/X11R6/include -pipe  -c -o testUtils.o testUtils.cpp
testUtils.cpp: In function ‘void logTestString(const char*, ...)’:
testUtils.cpp:512:22: warning: format not a string literal and no format arguments [-Wformat-security]
  512 |         (void)printf(logString);
      |                      ^~~~~~~~~
testUtils.cpp:515:40: warning: format not a string literal and no format arguments [-Wformat-security]
  515 |                 (void)fprintf(logFile, logString);
      |                                        ^~~~~~~~~

Code: Select all

g++ -Wall -ansi -pedantic -fno-exceptions -O0 -g -D_DEBUG  -I../include -I/usr/X11R6/include -pipe  -c -o textureFeatures.o textureFeatures.cpp
textureFeatures.cpp: In function ‘bool {anonymous}::lockAllMipLevels(irr::video::E_DRIVER_TYPE)’:
textureFeatures.cpp:140:58: warning: ‘irr::video::ITexture* irr::video::IVideoDriver::addTexture(const path&, irr::video::IImage*, void*)’ is deprecated [-Wdeprecated-declarations]
  140 |                 video::ITexture* tex = driver->addTexture("miptest", image, mipdata);
      |                                        ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/IQ3Shader.h:11,
                 from ../include/IAnimatedMeshMD3.h:9,
                 from ../include/irrlicht.h:59,
                 from testUtils.h:5,
                 from textureFeatures.cpp:4:
../include/IVideoDriver.h:336:42: note: declared here
  336 |                 IRR_DEPRECATED ITexture* addTexture(const io::path& name, IImage* image, void* mipmapData)
      |                                          ^~~~~~~~~~
Some warnings triggered by IRR_DEPRECATED data type. Unit tests should probably be updated. Running Ubuntu Linux 22.04 LTS with Nvidia binary driver 470 and updated GeForce video card.
Сделано в СССР

OS: Ubuntu Linux 22.04 LTS 64 bit
CPU: Intel Pentium Dual-Core E6300 @ 2.80GHz
RAM: DDR2 @ 2G
GPU: NVIDIA GeForce GT 710 @ 2G (Driver version: 470)
CuteAlien
Admin
Posts: 9647
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht unit tests

Post by CuteAlien »

Thanks, I get most as well. Fixed the trivial ones, will have to check the rest. But currently still struggling with another report.

Not getting the printf one btw, I guess Ubuntu has newer gcc version by now than my Debian stable (still gcc 12.2.0 here).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
juozas
Posts: 14
Joined: Sun Mar 27, 2022 12:58 pm
Location: Lithuania
Contact:

Re: Irrlicht unit tests

Post by juozas »

I run gcc 11.4.0 on 22.04 LTS, while 24.04 has 13.2.0, which is newer.
Сделано в СССР

OS: Ubuntu Linux 22.04 LTS 64 bit
CPU: Intel Pentium Dual-Core E6300 @ 2.80GHz
RAM: DDR2 @ 2G
GPU: NVIDIA GeForce GT 710 @ 2G (Driver version: 470)
CuteAlien
Admin
Posts: 9647
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht unit tests

Post by CuteAlien »

Hm, strange - even copy-pasted the line you used for compiling. Usually it's the newer GCC's adding warnings, not removing them ;-)
edit: I made a fix in [r6672] which should remove that warning.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
juozas
Posts: 14
Joined: Sun Mar 27, 2022 12:58 pm
Location: Lithuania
Contact:

Re: Irrlicht unit tests

Post by juozas »

Svn reports that most recent version at the time I'm posting (Sat May 11 18:58:08 UTC 2024) is 6628 and not 6672, probably the repository is not synced properly, the printf warning is still there.
Сделано в СССР

OS: Ubuntu Linux 22.04 LTS 64 bit
CPU: Intel Pentium Dual-Core E6300 @ 2.80GHz
RAM: DDR2 @ 2G
GPU: NVIDIA GeForce GT 710 @ 2G (Driver version: 470)
CuteAlien
Admin
Posts: 9647
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht unit tests

Post by CuteAlien »

Sorry, just typo, meant r6627 not 72. Also I didn't notice that warnings is triggered by 2 lines so I only had fixed one of them. [r6629] has the other one fixed now (I hope).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply