RKWardCoreTest::initTestCase() failed on riscv64

Bo YU tsu.yubo at gmail.com
Sat Jun 1 08:02:14 BST 2024


Hi,

On Sat, Jun 1, 2024 at 3:49 AM Thomas Friedrichsmeier
<thomas.friedrichsmeier at kdemail.net> wrote:
>
> Sorry, forgot to keep you in CC. Please reply to the list.
>
> ---
>
> Hi,
>
> On Fri, 31 May 2024 17:57:26 +0800
...
>
> No, that won't be enough. For one thing, the "1000" is only the default
> parameter value, and may not apply. To increase all command timeouts,
> see tline 68:
>
> ```
> while (!done && (t.elapsed() < timeoutms)) {
> ```
>
> you might want to write 3*timeoutms, here, for instance.
>
> The timeout that actually got hit in your case is a different one,
> on line 102, however:
>
> ```
> if (t.elapsed() > 40000) break;
> ```
>
> you'd have to adjust that, separately.

Thanks, it works!

```
...
Build Architecture: riscv64
Build Type: binary
Build-Space: 1129116
Build-Time: 1742
Distribution: unstable
Host Architecture: riscv64
Install-Time: 249
Job: /home/debian-buildd/ftbfs/rkward/rkward_0.7.5-3.dsc
Lintian: warn
Machine Architecture: riscv64
Package: rkward
Package-Time: 2128
Source-Version: 0.7.5-3
Space: 1129116
Status: successful
Version: 0.7.5-3
--------------------------------------------------------------------------------
Finished at 2024-06-01T05:01:50Z
Build needed 00:35:28, 1129116k disk space

--- a/rkward/autotests/core_test.cpp
+++ b/rkward/autotests/core_test.cpp
@@ -27,6 +27,15 @@
 #include "../core/renvironmentobject.h"
 #include "../misc/rkcommonfunctions.h"

+/* have to increase timeout on riscv64 */
+
+#define IS_RV64 0
+
+#if defined(__riscv) && (__riscv_xlen == 64)
+  #undef IS_RV64
+  #define IS_RV64 1
+#endif
+
 QElapsedTimer _test_timer;

 void testLog(const char* fmt, va_list args) {
@@ -65,7 +74,7 @@
                bool *_done = &done;
                connect(command->notifier(),
&RCommandNotifier::commandFinished, this, [_done, callback](RCommand
*command) { *_done = true; callback(command); });
                RInterface::issueCommand(command, chain);
-               while (!done && (t.elapsed() < timeoutms)) {
+               while (!done && (t.elapsed() < (IS_RV64 ? timeoutms *
5 : timeoutms))) {
                        qApp->processEvents();
                }
                if (!done) {
@@ -99,7 +108,7 @@
                QElapsedTimer t;
                t.start();
                while (!(RInterface::instance()->backendIsDead() ||
RInterface::instance()->backendIsIdle())) {
-                       if (t.elapsed() > 40000) break;
+                       if (t.elapsed() > (IS_RV64 ? 63000 : 40000)) break;
                        qApp->sendPostedEvents();
                }
                if (RInterface::instance()->backendIsIdle()) {

```

I will submit the patch to Debian side.

BTW, do we need riscv64 build CI for rkward? I can think of some ways
if we need.

BR,
Bo
>
> Regards
> Thomas


More information about the rkward-devel mailing list