- 12 Jul, 2019 12 commits
-
-
Kirill Smelkov authored
* master: */tests: Use defer instead of finally *: Use defer for dbclose & friends
-
Kirill Smelkov authored
-
Kirill Smelkov authored
try/finally was used in a couple of places to save/restore default ZBlk format setting. Move the restore part close to save with the help of defer.
-
Kirill Smelkov authored
For tests this makes sure that if one test fails, it won't make following tests fail just because the next test will fail trying to lock test database. For regular code (demo_zbigarray.py) this is also a good thing to do - to always close the database irregardless of whether an exception was raised before program reached end of main. Pygolang becomes regular - not test only - dependency. Being regular dependency is currently required only by demo_zbigarray.py, but it will be also used in upcoming wcfs, so adding pygolang into wendelin.core dependencies aligns with the plan. dbclose now uses defer almost everywhere - there are still few places in tests, where one test function is opening/closing test database multiple times - those were not (yet ?) converted.
-
Kirill Smelkov authored
-
Kirill Smelkov authored
* master: */tests: Use pytest.raises in modern way
-
Kirill Smelkov authored
-
Kirill Smelkov authored
Instead of raises(Exception, 'code') do with raises(Exception): code This removes lots of warnings, similar to below example: bigfile/tests/test_basic.py::test_basic /home/kirr/src/wendelin/wendelin.core/bigfile/tests/test_basic.py:79: PytestDeprecationWarning: raises(..., 'code(as_a_string)') is deprecated, use the context manager form or use `exec()` directly See https://docs.pytest.org/en/latest/deprecations.html#raises-warns-exec raises(ROAttributeError, "f.blksize = 1") # RO attribute
-
Kirill Smelkov authored
Else after first failing tests all furhter test can't start because trying to stat testmntpt/.wcfs gives ENOTCONN.
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
- 11 Jul, 2019 27 commits
-
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
This allows to make decision to drop a page right after writeout for wcfs case. If vmas for one fileh were allowed to be mixed - we could not know whether to drop the page & its memory from RAM or not - even if there is no vma mapped in !wcfs mode, it could be created later, and by dropping RAM cahce we hit severe slowness. NOTE: in between transactions there is usually no vmas mapped, so this case is not artificial. By requiring that all VMAs are of the same kind under one fileh we avoid this ambiguity.
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
* master: include: Fix typos
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
* master: bigfile: Fix typos
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
Kirill Smelkov authored
* master: bigfile/virtmem/test: Factor-out asserting on ram->lru_list and fileh->dirty_pages bigfile/virtmem/test: Fix test_file_access_pagefault's undef place
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-> into CHECK_MRU and CHECK_DIRTY. Besides improving signal/noise ratio in tests, it also gives more details by printing full lists when things are found to be different from expected.
-
- 10 Jul, 2019 1 commit
-
-
Kirill Smelkov authored
-