Testing non-determinism (ruby and threads)

Open
#2,251 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp, ruby
Domain
testing

Research direction

Start with testdata/ruby/basic_testcore.rb at test_27 (around line 1684), where the failure is reported, and trace how that test is run from testdata/ruby/basic.rb and the test epilogue. Reproduce the rbaTests:basic failure repeatedly and investigate the Ruby/threads behavior around the assertion; done means the cause is understood and the test behaves reliably.

Written by the indexing model from the issue text.

Description

Hi!

I'm in the process of packaging klayout for GNU Guix. I think by now I've got almost everything sorted out - except for 1 unit test failure.

Running rbaTests:basic
    Special chars: <&>
    Loaded suite Basic_TestClass
    Started
    ...................F
    ==============================================
    Failure: test_27(Basic_TestClass)
    /tmp/guix-build-klayout-0.30.5.drv-0/source/testdata/ruby/basic_testcore.rb:1684:in `test_27'
         1681:     end
         1682:
         1683:     GC.start
      => 1684:     assert_equal(RBA::B.has_inst, false)
         1685:
         1686:   end
         1687:
    <true> expected but was
    <false>

    diff:
    ? tru e
    ? fals
    ==============================================
    ....................ANYTHING
    ANYTHING
    .....Special chars: <&>
    ..........

    Finished in 0.516415394 seconds.
    ----------------------------------------------
    55 tests, 1151 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
    98.1818% passed
    ----------------------------------------------
    106.50 tests/s, 2228.83 assertions/s
    Test rbaTests:basic failed:
    (last checkpoint: ../../../src/rba/unit_tests/rbaTests.cc, line 65): Exception caught: RuntimeError: Tests failed (1 Errors + Failures)
      /tmp/guix-build-klayout-0.30.5.drv-0/source/testdata/ruby/test_epilogue.rb:36:in `<top (required)>'
      /tmp/guix-build-klayout-0.30.5.drv-0/source/testdata/ruby/basic.rb:32:in `load'
      /tmp/guix-build-klayout-0.30.5.drv-0/source/testdata/ruby/basic.rb:32:in `<top (required)>'

Since this is the only failure I somewhat doubt that it's a packaging issue - but I'm way out of my ball-park here. Any ideas? I guess klayout works fine otherwise (but I have no means to check that for I am not an EDA designer).

Dominant language
C++
Stars
1.2k
Forks
305
Avg merge
3d 2h
Merged PRs (30d)
11

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from KLayout/klayout

All issues in KLayout/klayout

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.