rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

Tests fail on Alpine Linux #2089

Open rtoy opened 2 months ago

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-05 18:36:10 Created by comcloudway on 2022-11-30 15:35:20 Original: https://sourceforge.net/p/maxima/bugs/4052


Hi, we are trying to package maxima for Alpine Linux. Unfortunately, running make checkseems to cause some problems.

I've now tried building maxima using sbcl, ecl and gcl (using GNU Autotools) but every time a couple of tests fail. I also set up an Alpine APKBUILD which builds maxima without GNU Autotools using sbcl. This results in less failed checks, but it still fails two tests:

Unexpected error 1:

Running tests in rtest5: 
********************** Problem 80 (line 219) ***************
Input:
describe(sin)
Result:
 -- Function: sin (<x>)
     - Sine.
  There are also some inexact matches for `sin'.
  Try `?? sin' to see them.
true
... Which was correct, but was expected to be wrong due to a known bug in
 Maxima or SBCL.
82/82 tests passed (not counting 1 expected errors)
The following 1 problem passed but was expected to fail: (80)

Unexpected error 2:

Running tests in rtest16: 
********************** Problem 583 (line 2249) ***************
Input:
closeto(li (10.0) - (9.614026386274297 - 6.392131317965607 %i), 5.618e-15)
          4
Result:
7.944109290391274e-15
This differed from the expected result:
true
********************** Problem 595 (line 2297) ***************
Input:
closeto(li (10.0) - (11.2390407376113 - 3.679606571301997 %i), 
          5
                                                         9.930140000000001e-15)
Result:
1.25607396694702e-14
This differed from the expected result:
true
rat: replaced -406810.0 by -406810/1 = -406810.0
rat: replaced -492380.0 by -492380/1 = -492380.0
rat: replaced 0.07050000000000001 by 141/2000 = 0.0705
                                    t 492380           t 85570
Refusing to factor polynomial 47 (%e )       - 4702 (%e )      + 4655
                            because its degree exceeds factor_max_degree (1000)
720/722 tests passed (not counting 2 expected errors)
The following 2 problems failed: (583 595)

Overview:

Error summary:
Error(s) found:
  /builds/comcloudway/aports/testing/maxima/src/maxima-5.46.0/tests/rtest16.mac problems:
    (583 595)
Tests that were expected to fail but passed:
  /builds/comcloudway/aports/testing/maxima/src/maxima-5.46.0/tests/rtest5.mac problem:
    (80)
2 tests failed out of 12,722 total tests.

The full build log (on x86_64) can be found on the alpine gitlab as well as the PR.

NOTE: the reason for not using autotools is that make check isn't verbose, so fetching the log is kind of complicated. Whereas this prints everything to the standard output.

Attachments:

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-05 18:36:11 Created by robert_dodier on 2023-02-09 19:41:02 Original: https://sourceforge.net/p/maxima/bugs/4052/#9813


Thanks for the report. About test 80 in rtest5, note that it is a test which passed, although it was expected to fail (because documentation is expected to be not present unless using autotools).

About the tests in rtest16, it looks like the tolerance for numerical comparison could be increased for those tests. I'll try to take a look at it.

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-05 18:36:14 Created by robert_dodier on 2023-03-23 04:10:12 Original: https://sourceforge.net/p/maxima/bugs/4052/#0824


I have looked at rtest16 on a couple of different platforms, and I can't reproduce the errors. It's likely that's just a consequence of different C math libraries getting called. I'm not sure what to do about that.

Anyway as a practical matter, I guess the path forward for Alpine Linux requires patching rtest16 to increase the tolerance for the failed tests. (I can increase the tolerance in Git, but then that would be an unreleased patch until the next release, which would be Maxima 5.47, and there is no definite schedule for that.)