Commit Graph

383 Commits

Author SHA1 Message Date
Adam Rutkowski
93c8932a17 pyocf: fix management queue stop/put
Queue is stopped when reference counter drops to 0, so no need to
manually stop management queue after cache stop - simple put is
enough.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-04-25 13:21:25 -04:00
Katarzyna Łapińska
bf879c4b09
Merge pull request #113 from Deixx/tests_start_stop
pyocf tests for start/stop
2019-04-23 12:10:17 +02:00
Adam Rutkowski
e11edcacd8 Rename makefile ENV* variables to OCF_ENV*
'ENV' variable is set and used by OS utilities  on some Linux
distros, interfering with OCF build system. Renaming ENV and
other ENV* variables to OCF_ENV* to avoid conflicts.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-04-20 16:54:04 +02:00
Daniel Madej
1aa5e99173 Pyocf tests for start/stop
Tests for starting cache and checking if mode works properly
Tests for stopping cache
Negative and stress tests

Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2019-04-18 17:00:14 +02:00
Adam Rutkowski
79cb39e273
Merge pull request #129 from imjfckm/master
Fix cores volumes dropping before close
2019-04-18 09:41:33 -04:00
Jan Musial
be88300071 Fix cores volumes dropping before close
* Add references to Cores in Cache, ctx holds caches, caches hold cores,
  everything gets cleaned up nicely

* GC in Python seems to be a bit lazy, if we want to run CI on
  low-memory machines we need to make sure it does run in between tests
  'cause we don't want no huge Volumes hanging around for long

Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-04-18 14:11:59 +02:00
Daniel Madej
99c448aae6
Merge pull request #124 from katlapinka/security_config
Security tests for start cache command
2019-04-18 14:07:32 +02:00
Kamil Łepek
92837ec2f3
Merge pull request #119 from Deixx/tests_neg_io
Negative tests for IO path
2019-04-18 14:06:15 +02:00
klapinsk
f9eab4c749 Security tests for start cache command 2019-04-18 13:43:27 +02:00
Daniel Madej
876294f603 Negative tests for IO path
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2019-04-18 12:58:02 +02:00
Jan Musial
75c3948f6d Secure erase tests
Implement simple secure erase tests. Perform IO that will trigger
copying of Data buffers and make sure OCF calls secure erase on them.

Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-04-18 12:51:59 +02:00
Michał Mielewczyk
d4e929140e
Merge pull request #127 from arutk/pytest_wait_io
pyocf: wait for pending I/O before cache stop
2019-04-18 09:21:50 +02:00
Katarzyna Łapińska
c80ca4a9a8
Merge pull request #122 from KamilLepek/security_tests
Add security fuzzy tests and improve pyocf api
2019-04-18 07:33:11 +02:00
Adam Rutkowski
d607402f2b pyocf: wait for pending I/O before cache stop
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-04-17 18:12:56 -04:00
Michal Mielewczyk
5e52ac4ef2 Rename 'printf' field name in logger ops to 'print'.
Due the aggresive security checks in compiler 'printf' might be substituded with
'__printf_chk'. However it does not differentiate whether substituted string is
library function call whether field in structure.

By renaming field we prevent it to be unintentionally subustituted by the
preprocessor.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-04-17 11:37:47 -04:00
Kamil Lepek
d55195ecf5 Add security fuzzy tests and improve pyocf api
Fuzzy tests added for:
changing cache mode
attaching cache device with fuzzed cache line size
setting cleaning policy
setting alru params
setting acp params
setting seq cut off policy per cache
setting seq cut off policy per core
2019-04-17 12:46:25 +02:00
Kamil Łepek
00c434fb66
Merge pull request #115 from imjfckm/leaks
Fix leaky tests
2019-04-16 10:20:56 +02:00
Jan Musial
003d6505aa Fix leaky tests
Fix some instance tracking to prevent Python-side objects from leaking
buffers.
Also, reduce min size of Cache instance (real minimum should be around ~~19MiB,
but we need to make it more deterministic and 20 MiB seems to be reasonable).

Still some stuff left to do, but it needs more investigation and, for
now, this should suffice just to enable some form of CI.

Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-04-16 09:55:02 +02:00
Kamil Lepek
465e9acd2c Add randomizers for ctypes and string in pyocf 2019-04-16 09:51:02 +02:00
Kamil Lepek
5ceb69e9c8 Added cache mode change in pyocf and basic test 2019-04-11 10:57:25 +02:00
Daniel Madej
f9c22262fb
Merge pull request #109 from KamilLepek/add_remove
Pyocf add/remove tests
2019-04-10 15:02:22 +02:00
Jan Musial
db46a9decb Stop using mgmt queue for IO in pyocf
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-04-10 11:25:39 +02:00
Kamil Lepek
c453bddc28 Pyocf add/remove tests 2019-04-09 10:17:39 +02:00
Daniel Madej
1fa52e84a8 Extract cache.flush() method from cache.stop()
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2019-04-04 11:13:45 +02:00
Jan Musial
be773a45af Add remove_core fcn
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-04-04 10:58:29 +02:00
Daniel Madej
d9d4f2fab1
Merge pull request #99 from katlapinka/ini
Ini
2019-04-04 10:50:39 +02:00
klapinsk
a8780655e2 *.ini files added 2019-04-04 10:29:20 +02:00
Jan Musial
753ab00331 Fix core_new_io
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-04-03 15:48:14 +02:00
Jan Musial
59178eef01 Make libocf.so loading CWD independent
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-04-03 12:28:15 +02:00
Jan Musial
545d5b8aac Make pyocf work with async API
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-04-03 11:13:27 +02:00
Michal Rakowski
e5227cef89 Implement pyocf adapter with sample OCF test
PyOCF is a tool written with testing OCF functionality in mind.
It is a Python3 (3.6 version required) package which wraps OCF
by providing Python objects in place of OCF objects (volumes, queues,
etc). Thin layer of translation between OCF objects and PyOCF objects
enables using customized behaviors for OCF primitives by subclassing
PyOCF classes.

This initial version implements only WT and WI modes and single,
synchronously operating Queue.

TO DO:

  - Queues/Cleaner/MetadataUpdater implemented as Python threads
  - Loading of caches from PyOCF Volumes (fix bugs in OCF)
  - Make sure it works multi-threaded for more sophisticated tests

Co-authored-by: Jan Musial <jan.musial@intel.com>
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-03-07 12:48:40 +01:00
Robert Baldyga
ad10d58a2c Update posix environment
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-01-15 09:41:33 +01:00
Michal Rakowski
ad3467ddd4 Added Makefile for ocf lib to be used in functional tests
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-01-08 12:58:28 +01:00