Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing co19 ffi tests #45381

Closed
mkustermann opened this issue Mar 19, 2021 · 2 comments
Closed

Failing co19 ffi tests #45381

mkustermann opened this issue Mar 19, 2021 · 2 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi

Comments

@mkustermann
Copy link
Member

The following tests are failing:


FAILED: dartk-vm release_ia32 co19/LibTest/ffi/IntPtr/IntPtr_A01_t01
Expected: Pass
Actual: RuntimeError

--- Command "vm" (took 01.000386s):
DART_CONFIGURATION=ReleaseIA32 out/ReleaseIA32/dart --sound-null-safety --ignore-unrecognized-flags --packages=/usr/local/google/home/kustermann/repositories/sdk-gclient4/sdk/.packages /usr/local/google/home/kustermann/repositories/sdk-gclient4/sdk/tests/co19/src/LibTest/ffi/IntPtr/IntPtr_A01_t01.dart

exit code:
255

stderr:
Unhandled exception:
Expect.equals(expected: <-32768>, actual: <32768>) fails.
#0      _fail (file:///usr/local/google/home/kustermann/repositories/sdk-gclient4/sdk/tests/co19/src/Utils/expect.dart:20:5)
#1      Expect.equals (file:///usr/local/google/home/kustermann/repositories/sdk-gclient4/sdk/tests/co19/src/Utils/expect_common.dart:30:5)
#2      main (file:///usr/local/google/home/kustermann/repositories/sdk-gclient4/sdk/tests/co19/src/LibTest/ffi/IntPtr/IntPtr_A01_t01.dart:30:14)
#3      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:283:19)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

--- Re-run this test:
python tools/test.py -n dartk-strong-linux-release-ia32 co19/LibTest/ffi/IntPtr/IntPtr_A01_t01

                                                                                                                   
FAILED: dartk-vm release_ia32 co19/LibTest/ffi/Array/IntPtrArray_A01_t01                                                                                                                                           
Expected: Pass                                                                                                                                                                                                     
Actual: RuntimeError                                                                                                                                                                                               
                                                                                                                                                                                                                   
--- Command "vm" (took 02.000465s):                                                                                                                                                                                
DART_CONFIGURATION=ReleaseIA32 out/ReleaseIA32/dart --sound-null-safety --ignore-unrecognized-flags --packages=/usr/local/google/home/kustermann/repositories/sdk-gclient4/sdk/.packages /usr/local/google/home/kus
termann/repositories/sdk-gclient4/sdk/tests/co19/src/LibTest/ffi/Array/IntPtrArray_A01_t01.dart                                                                                                                    
                                                                                                                                                                                                                   
exit code:
255

stderr:
Unhandled exception:
Expect.equals(expected: <-32768>, actual: <32768>) fails.
#0      _fail (file:///usr/local/google/home/kustermann/repositories/sdk-gclient4/sdk/tests/co19/src/Utils/expect.dart:20:5)
#1      Expect.equals (file:///usr/local/google/home/kustermann/repositories/sdk-gclient4/sdk/tests/co19/src/Utils/expect_common.dart:30:5)
#2      main (file:///usr/local/google/home/kustermann/repositories/sdk-gclient4/sdk/tests/co19/src/LibTest/ffi/Array/IntPtrArray_A01_t01.dart:39:16)
#3      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:283:19)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

--- Re-run this test:
python tools/test.py -n dartk-strong-linux-release-ia32 co19/LibTest/ffi/Array/IntPtrArray_A01_t01

Assigned @dcharkes to triage whether the tests are wrong or the FFI implementation.

@mkustermann mkustermann added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi labels Mar 19, 2021
@dcharkes
Copy link
Contributor

      if (sizeOf<IntPtr>() == 4) {
        array[i] = 32768;
        Expect.equals(-32768, array[i]);
        array[i] = -32768;
        Expect.equals(-32768, array[i]);
        array[i] = -32769;
        Expect.equals(32767, array[i]);
      } else {
        array[i] = 32768;
        Expect.equals(32768, array[i]);
        array[i] = -32769;
        Expect.equals(-32769, array[i]);
      }

The tests are wrong, the boundary should not be at +-2^15, but at +-2^31 for 4 byte/32 bit platforms.

@dcharkes dcharkes assigned sgrekhov and unassigned dcharkes Mar 19, 2021
@sgrekhov
Copy link
Contributor

Fixed by dart-lang/co19@11238c2

dart-bot pushed a commit that referenced this issue Mar 22, 2021
2021-03-22 sgrekhov@unipro.ru Fixes #1032. Change place where analyzer expects COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
2021-03-22 sgrekhov@unipro.ru Fixes #1027. Typo fixed
2021-03-22 sgrekhov@unipro.ru Fixes #1026. Missed experimental flag added
2021-03-22 sgrekhov@unipro.ru Fixes SDK issue #45381. Use 32-bit int boundaries for 32-bit systems
2021-03-19 sgrekhov@unipro.ru #1024. Tests that plays with the integers not representable in JS moved to separate files. These files will be skipped on JS

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: Idc63625a841f1f90b0cce5db9ca6add13e4d1192
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192303
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
dart-bot pushed a commit that referenced this issue Mar 22, 2021
This reverts commit 03e8ddd.

Reason for revert: Change to hooks does not work with Windows.

Original change's description:
> [co19] Roll co19 to ae818220b12ec9c2470519db2c7167cbe4745e12
>
> 2021-03-22 sgrekhov@unipro.ru Fixes #1032. Change place where analyzer expects COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
> 2021-03-22 sgrekhov@unipro.ru Fixes #1027. Typo fixed
> 2021-03-22 sgrekhov@unipro.ru Fixes #1026. Missed experimental flag added
> 2021-03-22 sgrekhov@unipro.ru Fixes SDK issue #45381. Use 32-bit int boundaries for 32-bit systems
> 2021-03-19 sgrekhov@unipro.ru #1024. Tests that plays with the integers not representable in JS moved to separate files. These files will be skipped on JS
>
> Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
> Change-Id: Idc63625a841f1f90b0cce5db9ca6add13e4d1192
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192303
> Reviewed-by: William Hesse <whesse@google.com>
> Commit-Queue: Alexander Thomas <athom@google.com>

TBR=whesse@google.com,athom@google.com

Change-Id: I5f66db541034377f5d68424073282080d13fd34b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try
Cq-Include-Trybots: dart2js-nnbd-linux-x64-chrome-try
Cq-Include-Trybots: ddc-nnbd-linux-release-chrome-try
Cq-Include-Trybots: front-end-nnbd-linux-release-x64-try
Cq-Include-Trybots: vm-kernel-nnbd-linux-debug-x64-try
Cq-Include-Trybots: vm-kernel-nnbd-linux-release-simarm64-try
Cq-Include-Trybots: vm-kernel-nnbd-linux-release-x64-try
Cq-Include-Trybots: vm-kernel-nnbd-mac-release-x64-try
Cq-Include-Trybots: vm-kernel-nnbd-win-release-x64-try
Cq-Include-Trybots: vm-kernel-precomp-nnbd-linux-debug-x64-try
Cq-Include-Trybots: vm-kernel-precomp-nnbd-linux-release-simarm64-try
Cq-Include-Trybots: vm-kernel-precomp-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192380
Reviewed-by: William Hesse <whesse@google.com>
dart-bot pushed a commit that referenced this issue Mar 22, 2021
This reverts commit 88ee333.

Reason for revert: Hook added by mistake removed.

Original change's description:
> Revert "[co19] Roll co19 to ae818220b12ec9c2470519db2c7167cbe4745e12"
>
> This reverts commit 03e8ddd.
>
> Reason for revert: Change to hooks does not work with Windows.
>
> Original change's description:
> > [co19] Roll co19 to ae818220b12ec9c2470519db2c7167cbe4745e12
> >
> > 2021-03-22 sgrekhov@unipro.ru Fixes #1032. Change place where analyzer expects COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE
> > 2021-03-22 sgrekhov@unipro.ru Fixes #1027. Typo fixed
> > 2021-03-22 sgrekhov@unipro.ru Fixes #1026. Missed experimental flag added
> > 2021-03-22 sgrekhov@unipro.ru Fixes SDK issue #45381. Use 32-bit int boundaries for 32-bit systems
> > 2021-03-19 sgrekhov@unipro.ru #1024. Tests that plays with the integers not representable in JS moved to separate files. These files will be skipped on JS
> >
> > Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
> > Change-Id: Idc63625a841f1f90b0cce5db9ca6add13e4d1192
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192303
> > Reviewed-by: William Hesse <whesse@google.com>
> > Commit-Queue: Alexander Thomas <athom@google.com>
>
> TBR=whesse@google.com,athom@google.com
>
> Change-Id: I5f66db541034377f5d68424073282080d13fd34b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try
> Cq-Include-Trybots: dart2js-nnbd-linux-x64-chrome-try
> Cq-Include-Trybots: ddc-nnbd-linux-release-chrome-try
> Cq-Include-Trybots: front-end-nnbd-linux-release-x64-try
> Cq-Include-Trybots: vm-kernel-nnbd-linux-debug-x64-try
> Cq-Include-Trybots: vm-kernel-nnbd-linux-release-simarm64-try
> Cq-Include-Trybots: vm-kernel-nnbd-linux-release-x64-try
> Cq-Include-Trybots: vm-kernel-nnbd-mac-release-x64-try
> Cq-Include-Trybots: vm-kernel-nnbd-win-release-x64-try
> Cq-Include-Trybots: vm-kernel-precomp-nnbd-linux-debug-x64-try
> Cq-Include-Trybots: vm-kernel-precomp-nnbd-linux-release-simarm64-try
> Cq-Include-Trybots: vm-kernel-precomp-nnbd-linux-release-x64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192380
> Reviewed-by: William Hesse <whesse@google.com>

# Not skipping CQ checks because this is a reland.

Change-Id: Ie54fde2d92d1b2cdb3b70835f1f8c17e3c5ac477
Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192384
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi
Projects
None yet
Development

No branches or pull requests

3 participants