Bug 413169 - inefficient-qlist fails on Linux x86 (32bit)
Summary: inefficient-qlist fails on Linux x86 (32bit)
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: 2019-10-19 04:53 UTC by Pino Toscano
Modified: 2020-07-01 17:59 UTC (History)
1 user (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 2019-10-19 04:53:56 UTC
SUMMARY
When testing clazy 1.6, the inefficient-qlist test fails when run on x86 32bit Linux architectures (i.e. i386 in Debian).

STEPS TO REPRODUCE
1. build clazy on Linux x86
2. run the test suite, either from the build directory, or after installation

OBSERVED RESULT
Qt version: 51103
Qt headers: /usr/include/i386-linux-gnu/qt5
clazy-standalone old-style-connect/port_qsignalspy.cpp  -export-fixes=old-style-connect/port_qsignalspy.cpp.clazy-standalone.yaml -checks=old-style-connect  -- -Wno-unused-value -Qunused-arguments -std=c++14 -isystem /usr/include/i386-linux-gnu/qt5 -fPIC -L /usr/lib/i386-linux-gnu 
Running: clang -Xclang -load -Xclang ClazyPlugin.so -Xclang -add-plugin -Xclang clazy  -Wno-unused-value -Qunused-arguments -std=c++14 -isystem /usr/include/i386-linux-gnu/qt5 -fPIC -L /usr/lib/i386-linux-gnu -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 inefficient-qlist/main.cpp.result
--- inefficient-qlist/main.cpp.expected	2019-10-12 08:39:47.000000000 +0000
+++ inefficient-qlist/main.cpp.result	2019-10-18 14:14:56.093460474 +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 16 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]

Log:
https://buildd.debian.org/status/fetch.php?pkg=clazy&arch=i386&ver=1.6-1&stamp=1571408147&raw=1

EXPECTED RESULT
inefficient-qlist passes on any architecture.

SOFTWARE/OS VERSIONS
clazy 1.6

ADDITIONAL INFORMATION
Basically the test properly detects QList<QVariant> as inefficient, just that the error message does not match the baseline due to the different size of QVariant.

This was introduced with commit 948a23ae1b1553cf67dc8b523236cc0e7dc74994.
Comment 1 Sergio Martins 2019-10-20 00:08:48 UTC
Git commit 6b140de078c0dc6f5e6d6732512ad5e454d887d0 by Sergio Martins.
Committed on 20/10/2019 at 00:08.
Pushed by smartins into branch '1.6'.

inefficient-qlist: Fix test on 32-bit platforms

The warning is different.

A  +4    -0    tests/inefficient-qlist/main.cpp.expected.x86
M  +5    -1    tests/run_tests.py

https://commits.kde.org/clazy/6b140de078c0dc6f5e6d6732512ad5e454d887d0
Comment 2 Sergio Martins 2020-07-01 17:59:35 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