cache test failures #90

Closed
opened 2020-08-05 19:25:48 +08:00 by sb10q · 1 comment

Probably appeared after 4b6c5d5679

test/coredevice> env ARTIQ_ROOT=/home/sb/artiq-zynq/examples python -m unittest test_cache.py -v
test_borrow (test_cache.CacheTest) ... FAIL
test_get_empty (test_cache.CacheTest) ... ok
test_put_get (test_cache.CacheTest) ... FAIL
test_replace (test_cache.CacheTest) ... FAIL

======================================================================
FAIL: test_borrow (test_cache.CacheTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/sb/artiq/artiq/test/coredevice/test_cache.py", line 45, in test_borrow
    exp.get_put("x4", [])
AssertionError: CacheError not raised

======================================================================
FAIL: test_put_get (test_cache.CacheTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/sb/artiq/artiq/test/coredevice/test_cache.py", line 33, in test_put_get
    self.assertEqual(exp.get("x2"), [1, 2, 3])
AssertionError: Lists differ: [8, 10502656, 16777216] != [1, 2, 3]

First differing element 0:
8
1

- [8, 10502656, 16777216]
+ [1, 2, 3]

======================================================================
FAIL: test_replace (test_cache.CacheTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/sb/artiq/artiq/test/coredevice/test_cache.py", line 39, in test_replace
    self.assertEqual(exp.get("x3"), [1, 2, 3, 4, 5])
AssertionError: Lists differ: [8, 10502656, 16777216, 108, 26885] != [1, 2, 3, 4, 5]

First differing element 0:
8
1

- [8, 10502656, 16777216, 108, 26885]
+ [1, 2, 3, 4, 5]

----------------------------------------------------------------------
Ran 4 tests in 0.719s

FAILED (failures=3)
Probably appeared after https://git.m-labs.hk/M-Labs/artiq-zynq/commit/4b6c5d567913e65f13c9eca80a862a8e7cd1f9f5 ```text test/coredevice> env ARTIQ_ROOT=/home/sb/artiq-zynq/examples python -m unittest test_cache.py -v test_borrow (test_cache.CacheTest) ... FAIL test_get_empty (test_cache.CacheTest) ... ok test_put_get (test_cache.CacheTest) ... FAIL test_replace (test_cache.CacheTest) ... FAIL ====================================================================== FAIL: test_borrow (test_cache.CacheTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/sb/artiq/artiq/test/coredevice/test_cache.py", line 45, in test_borrow exp.get_put("x4", []) AssertionError: CacheError not raised ====================================================================== FAIL: test_put_get (test_cache.CacheTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/sb/artiq/artiq/test/coredevice/test_cache.py", line 33, in test_put_get self.assertEqual(exp.get("x2"), [1, 2, 3]) AssertionError: Lists differ: [8, 10502656, 16777216] != [1, 2, 3] First differing element 0: 8 1 - [8, 10502656, 16777216] + [1, 2, 3] ====================================================================== FAIL: test_replace (test_cache.CacheTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/sb/artiq/artiq/test/coredevice/test_cache.py", line 39, in test_replace self.assertEqual(exp.get("x3"), [1, 2, 3, 4, 5]) AssertionError: Lists differ: [8, 10502656, 16777216, 108, 26885] != [1, 2, 3, 4, 5] First differing element 0: 8 1 - [8, 10502656, 16777216, 108, 26885] + [1, 2, 3, 4, 5] ---------------------------------------------------------------------- Ran 4 tests in 0.719s FAILED (failures=3) ```

Two of the failures are caused by memory corruption as I forgot to leak the vector after transmute, and the vector is dropped afterwards. Simple fix.

For the cache error test, I should mark the cache line as used and set them to not used after kernel reload?

Two of the failures are caused by memory corruption as I forgot to leak the vector after transmute, and the vector is dropped afterwards. Simple fix. For the cache error test, I should mark the cache line as used and set them to not used after kernel reload?
sb10q closed this issue 2020-08-06 10:30:12 +08:00
sb10q started working 2020-08-06 10:45:42 +08:00
sb10q stopped working 2020-08-06 10:45:46 +08:00
4s
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Total Time Spent: 4 seconds
sb10q
4 seconds
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#90
There is no content yet.