Bug 423728 - inefficient-qlist fails on 32bit architectures
Summary: inefficient-qlist fails on 32bit architectures
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-01 07:46 UTC by Pino Toscano
Modified: 2020-07-01 19:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pino Toscano 2020-07-01 07:46:29 UTC
SUMMARY
When testing clazy 1.7, the inefficient-qlist test fails when run on 32bit Linux architectures; this is similar/related to the old bug 401494 and bug 413169.
Because of the changes done for bug 413169, it does not fail on x86, however it still fails on other 32bit architectures (e.g. arm, mips, powerpc).

STEPS TO REPRODUCE
1. build clazy on a 32bit Linux architecture different than x86
2. run the test suite, either from the build directory, or after installation

OBSERVED RESULT
These are the outputs on armhf, and (sort of different name in library directory) they are the same also on the other affected architectures:

Qt version: 51402
Qt headers: /usr/include/arm-linux-gnueabihf/qt5
clazy-standalone connect-non-signal/392441.cpp  -checks=connect-non-signal  -- -Wno-unused-value -Qunused-arguments -std=c++14 -isystem /usr/include/arm-linux-gnueabihf/qt5 -fPIC -L /usr/lib/arm-linux-gnueabihf 
Running: clang -Xclang -load -Xclang ClazyPlugin.so -Xclang -add-plugin -Xclang clazy  -Wno-unused-value -Qunused-arguments -std=c++14 -isystem /usr/include/arm-linux-gnueabihf/qt5 -fPIC -L /usr/lib/arm-linux-gnueabihf -c  -Xclang -plugin-arg-clazy -Xclang inefficient-qlist inefficient-qlist/main.cpp
output_file=inefficient-qlist/main.cpp.out
[FAIL] inefficient-qlist (plugin)
diff -Naur --strip-trailing-cr inefficient-qlist/main.cpp.expected.x86 inefficient-qlist/main.cpp.result
--- inefficient-qlist/main.cpp.expected.x86	2020-06-28 23:30:42.000000000 +0000
+++ inefficient-qlist/main.cpp.result	2020-07-01 06:29:31.920309898 +0000
@@ -1,4 +1,4 @@
 inefficient-qlist/main.cpp:24:5: warning: Use QVector instead of QList for type with size 9 bytes [-Wclazy-inefficient-qlist]
 inefficient-qlist/main.cpp:38:11: warning: Use QVector instead of QList for type with size 9 bytes [-Wclazy-inefficient-qlist]
 inefficient-qlist/main.cpp:40:5: warning: Use QVector instead of QList for type with size 9 bytes [-Wclazy-inefficient-qlist]
-inefficient-qlist/main.cpp:53:5: warning: Use QVector instead of QList for type with size 12 bytes [-Wclazy-inefficient-qlist]
+inefficient-qlist/main.cpp:53:5: warning: Use QVector instead of QList for type with size 16 bytes [-Wclazy-inefficient-qlist]

Logs:
https://buildd.debian.org/status/fetch.php?pkg=clazy&arch=armel&ver=1.7-1&stamp=1593585667&raw=1
https://buildd.debian.org/status/fetch.php?pkg=clazy&arch=armhf&ver=1.7-1&stamp=1593585009&raw=1
https://buildd.debian.org/status/fetch.php?pkg=clazy&arch=mipsel&ver=1.7-1&stamp=1593588667&raw=1

EXPECTED RESULT
inefficient-qlist & inefficient-qlist-soft pass on any architecture.

ADDITIONAL INFORMATION
IMHO the change done for bug 413169 was more a workaround than a real fix; ideally the test output should be adapted to whatever is the actual size of QVariant.
Comment 1 Sergio Martins 2020-07-01 16:09:22 UTC
People are starting to port QVector to QList already, in preparation to Qt 6.

I think this check just adds salt to injury and we should stop confusing users. Would rather disable it than waste more time on it
Comment 2 Pino Toscano 2020-07-01 16:22:20 UTC
Note I'm just a humble packager in this context, so I don't have any opinion in one way or another. My concern is making sure that the test suite works on all the architectures in Debian where LLVM is available.
Comment 3 Sergio Martins 2020-07-01 18:01:25 UTC
Git commit dbde38f1a67c2968c951629a5f5629c9847078bd by Sergio Martins.
Committed on 01/07/2020 at 17:57.
Pushed by smartins into branch '1.7'.

inefficient-qlist: Disable flaky test on arm 32bit

This check will be disabled in master, so no point wasting time.
People are already (re-)porting QVector->QList due to Qt6 changes,
so let's not confuse people more.

M  +2    -1    tests/inefficient-qlist/config.json
M  +12   -1    tests/run_tests.py

https://invent.kde.org/sdk/clazy/commit/dbde38f1a67c2968c951629a5f5629c9847078bd
Comment 4 Sergio Martins 2020-07-01 18:01:40 UTC
please check if it works now
Comment 5 Pino Toscano 2020-07-01 18:53:14 UTC
Thanks, it is skipped now.