SlideShare a Scribd company logo
Pynvme:
test NVMe devices in Python
https://github.com/cranechu/pynvme
<date/time> <footer> 2
Pynvme
Pynvme is a python extension module. Users can operate NVMe SSD
intuitively by Python scripts. It is designed for NVMe SSD testing
with performance considered. With third-party tools, e.g. emacs,
pycharm and pytest, pynvme is a convenient and professional NVMe
device test solution.
<date/time> <footer> 3
Pynvme in Python IDLE
SPDK
pynvme
<date/time> <footer> 4
Pynvme is based on SPDK
<date/time> <footer> 5
Pynvme Architecture
Test driver
(driver.c)
Python interface
(driver_wrap.pyx)
Python library
(nvme.so)
Build python library with Cython:
• setup.py
• driver.c
• driver.h
• cdriver.pxd
• driver_wrap.pyx
• Makefile
<date/time> <footer> 6
Pynvme Architecture
Test driver
(driver.c)
Python interface
(driver_wrap.pyx)
Python library
(nvme.so)
Organize test cases in
pytest:
• mvme.so
• pytest.ini
• conftest.py
• driver_test.py
Python test scripts
(driver_test.py)
Pytest fixtures
(conftest.py)
<date/time> <footer> 7
Why Python?
√ Many beautiful mature libraries
• pytest
• logging
• multiprocessing
• numpy
• matplotlib
• pydoc
• os, io, time, pytemperature, statistics, yaml, json, struct, ...
√ Friendly IDEs for developing, debugging, and testing
• Pycharm, emacs, vscode
√ CI: develop firmware softly
<date/time> <footer> 8
Pynvme CI Status
<date/time> <footer> 9
Config and Compile
− git clone https://github.com/cranechu/pynvme; cd pynvme
− git submodule update --init –recursive
− sudo ./spdk/scripts/pkgdep.sh
− sudo dnf install python3-pip -y
− sudo python3 -m pip install -r requirements.txt
− cd spdk; ./configure --without-isal; cd ..
− make spdk; make
− Fedora29 is recommended.
− find script examples in driver_test.py.
− find more => https://github.com/cranechu/pynvme
<date/time> <footer> 10
Test Scripts
pytest cases are
started with
test_
create qpair and
buffer for write
commands
write data, and
then read in the
callback
pytest fixtures
callback functions
called when cmds are
completed
fill buffer with
identify data
<date/time> <footer> 11
IOWorker
send IO in a
separated process
define IO patterns in
ioworker's parameter
list
wait ioworkers till
finish, and collect
result data
<date/time> <footer> 12
Fixtures of Pynvme
• create/delete test objects. in conftest.py:
• nvme0
• nvme0n1
• pcie
• ...
• parametrize of tests
• @pytest.mark.parametrize("qcount", [1, 2, 4, 8, 15])
• @pytest.mark.parametrize("repeat", range(10))
• test control
• @pytest.mark.skip("nvme over tcp")
• doc: https://docs.pytest.org/en/latest/fixture.html
<date/time> <footer> 13
Test Files
import pytest
import nvme
test functions
test file name
pytest collects test
files and cases before
execution
<date/time> <footer> 14
Pytest Execution
• '''The pytest framework makes it easy to write small tests, yet scales to
support complex functional testing for applications and libraries.'''
• '''pytest fixtures offer dramatic improvements over the classic xUnit
style of setup/teardown functions'''
• pytest test_mod.py # run tests in a module
• pytest testing/ # run tests in a directory
• pytest test_mod.py::test_func # run a specific test case
• pytest test_mod.py -s # run tests without log capturing
• https://media.readthedocs.org/pdf/pytest/latest/pytest.pdf
<date/time> <footer> 15
Pycharm: show case
Test
status
Test log
Test scripts
<date/time> <footer> 16
Welcome to use and contribute
https://github.com/cranechu/pynvme

More Related Content

What's hot

哥林多後書 10 13章 保羅與假使徒的爭戰
哥林多後書 10 13章 保羅與假使徒的爭戰哥林多後書 10 13章 保羅與假使徒的爭戰
哥林多後書 10 13章 保羅與假使徒的爭戰
Jian-Yu Fisher Ke
 
如何用k8s打造國產5G NFV平臺? 剖析經濟部5G核網技術的關鍵
如何用k8s打造國產5G NFV平臺?剖析經濟部5G核網技術的關鍵如何用k8s打造國產5G NFV平臺?剖析經濟部5G核網技術的關鍵
如何用k8s打造國產5G NFV平臺? 剖析經濟部5G核網技術的關鍵
Jace Liang
 
플레이오토 ECS 사용사례
플레이오토 ECS 사용사례플레이오토 ECS 사용사례
플레이오토 ECS 사용사례
JaeSeong Lee
 
一歩進んだXen仮想化環境構築
一歩進んだXen仮想化環境構築一歩進んだXen仮想化環境構築
一歩進んだXen仮想化環境構築
VirtualTech Japan Inc.
 
Vyos clustering ipsec
Vyos clustering ipsecVyos clustering ipsec
Vyos clustering ipsec
Gireesh Hariharasubramony
 
VMworld 2014: vCenter Server Architecture and Deployment Deep Dive
VMworld 2014: vCenter Server Architecture and Deployment Deep DiveVMworld 2014: vCenter Server Architecture and Deployment Deep Dive
VMworld 2014: vCenter Server Architecture and Deployment Deep Dive
VMworld
 
Primeiros Passos Com Elasticsearch
Primeiros Passos Com ElasticsearchPrimeiros Passos Com Elasticsearch
Primeiros Passos Com Elasticsearch
Anael Ferraz de Carvalho
 
Keystone at openstack multi sites
Keystone at openstack multi sitesKeystone at openstack multi sites
Keystone at openstack multi sites
Vietnam Open Infrastructure User Group
 
Pegasus In Depth (2018/10)
Pegasus In Depth (2018/10)Pegasus In Depth (2018/10)
Pegasus In Depth (2018/10)
涛 吴
 
Deep dive in Docker Overlay Networks
Deep dive in Docker Overlay NetworksDeep dive in Docker Overlay Networks
Deep dive in Docker Overlay Networks
Laurent Bernaille
 
EL QUINTO REINO ETERNO PRESENTE AQUÍ EN PIE Y AHORA
EL QUINTO REINO ETERNO PRESENTE AQUÍ EN PIE Y AHORAEL QUINTO REINO ETERNO PRESENTE AQUÍ EN PIE Y AHORA
EL QUINTO REINO ETERNO PRESENTE AQUÍ EN PIE Y AHORA
UNIVERSIDAD PLENO CONOCIMIENTO
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL AdministrationCommand Prompt., Inc
 
14회 jco 컨퍼런스 조대협의 소프트웨어 개발 배포용
14회 jco 컨퍼런스 조대협의 소프트웨어 개발 배포용14회 jco 컨퍼런스 조대협의 소프트웨어 개발 배포용
14회 jco 컨퍼런스 조대협의 소프트웨어 개발 배포용
Terry Cho
 
NVMe over Fabric
NVMe over FabricNVMe over Fabric
NVMe over Fabric
singh.gurjeet
 
Percona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replicationPercona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replication
mysqlops
 
Top 40 synack interview questions and answers pdf ebook free download
Top 40 synack interview questions and answers pdf ebook free downloadTop 40 synack interview questions and answers pdf ebook free download
Top 40 synack interview questions and answers pdf ebook free download
selinasimpson158
 
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon Web Services Korea
 
提摩太前書 第一章 打那美好的仗
提摩太前書 第一章打那美好的仗提摩太前書 第一章打那美好的仗
提摩太前書 第一章 打那美好的仗
查經簡報分享
 
SRM versus Stretched Clusters: Choosing the Right Solution
SRM versus Stretched Clusters: Choosing the Right SolutionSRM versus Stretched Clusters: Choosing the Right Solution
SRM versus Stretched Clusters: Choosing the Right SolutionScott Lowe
 
What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...
What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...
What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...
Edureka!
 

What's hot (20)

哥林多後書 10 13章 保羅與假使徒的爭戰
哥林多後書 10 13章 保羅與假使徒的爭戰哥林多後書 10 13章 保羅與假使徒的爭戰
哥林多後書 10 13章 保羅與假使徒的爭戰
 
如何用k8s打造國產5G NFV平臺? 剖析經濟部5G核網技術的關鍵
如何用k8s打造國產5G NFV平臺?剖析經濟部5G核網技術的關鍵如何用k8s打造國產5G NFV平臺?剖析經濟部5G核網技術的關鍵
如何用k8s打造國產5G NFV平臺? 剖析經濟部5G核網技術的關鍵
 
플레이오토 ECS 사용사례
플레이오토 ECS 사용사례플레이오토 ECS 사용사례
플레이오토 ECS 사용사례
 
一歩進んだXen仮想化環境構築
一歩進んだXen仮想化環境構築一歩進んだXen仮想化環境構築
一歩進んだXen仮想化環境構築
 
Vyos clustering ipsec
Vyos clustering ipsecVyos clustering ipsec
Vyos clustering ipsec
 
VMworld 2014: vCenter Server Architecture and Deployment Deep Dive
VMworld 2014: vCenter Server Architecture and Deployment Deep DiveVMworld 2014: vCenter Server Architecture and Deployment Deep Dive
VMworld 2014: vCenter Server Architecture and Deployment Deep Dive
 
Primeiros Passos Com Elasticsearch
Primeiros Passos Com ElasticsearchPrimeiros Passos Com Elasticsearch
Primeiros Passos Com Elasticsearch
 
Keystone at openstack multi sites
Keystone at openstack multi sitesKeystone at openstack multi sites
Keystone at openstack multi sites
 
Pegasus In Depth (2018/10)
Pegasus In Depth (2018/10)Pegasus In Depth (2018/10)
Pegasus In Depth (2018/10)
 
Deep dive in Docker Overlay Networks
Deep dive in Docker Overlay NetworksDeep dive in Docker Overlay Networks
Deep dive in Docker Overlay Networks
 
EL QUINTO REINO ETERNO PRESENTE AQUÍ EN PIE Y AHORA
EL QUINTO REINO ETERNO PRESENTE AQUÍ EN PIE Y AHORAEL QUINTO REINO ETERNO PRESENTE AQUÍ EN PIE Y AHORA
EL QUINTO REINO ETERNO PRESENTE AQUÍ EN PIE Y AHORA
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
14회 jco 컨퍼런스 조대협의 소프트웨어 개발 배포용
14회 jco 컨퍼런스 조대협의 소프트웨어 개발 배포용14회 jco 컨퍼런스 조대협의 소프트웨어 개발 배포용
14회 jco 컨퍼런스 조대협의 소프트웨어 개발 배포용
 
NVMe over Fabric
NVMe over FabricNVMe over Fabric
NVMe over Fabric
 
Percona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replicationPercona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replication
 
Top 40 synack interview questions and answers pdf ebook free download
Top 40 synack interview questions and answers pdf ebook free downloadTop 40 synack interview questions and answers pdf ebook free download
Top 40 synack interview questions and answers pdf ebook free download
 
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
 
提摩太前書 第一章 打那美好的仗
提摩太前書 第一章打那美好的仗提摩太前書 第一章打那美好的仗
提摩太前書 第一章 打那美好的仗
 
SRM versus Stretched Clusters: Choosing the Right Solution
SRM versus Stretched Clusters: Choosing the Right SolutionSRM versus Stretched Clusters: Choosing the Right Solution
SRM versus Stretched Clusters: Choosing the Right Solution
 
What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...
What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...
What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...
 

Similar to Pynvme introduction

CI and CD
CI and CDCI and CD
Simple tools to fight bigger quality battle
Simple tools to fight bigger quality battleSimple tools to fight bigger quality battle
Simple tools to fight bigger quality battle
Anand Ramdeo
 
Test Kitchen and Infrastructure as Code
Test Kitchen and Infrastructure as CodeTest Kitchen and Infrastructure as Code
Test Kitchen and Infrastructure as Code
Cybera Inc.
 
Performance and Scalability Testing with Python and Multi-Mechanize
Performance and Scalability Testing with Python and Multi-MechanizePerformance and Scalability Testing with Python and Multi-Mechanize
Performance and Scalability Testing with Python and Multi-Mechanize
coreygoldberg
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
Haiqi Chen
 
Software development practices in python
Software development practices in pythonSoftware development practices in python
Software development practices in python
Jimmy Lai
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
Pavol Pitoňák
 
Making the most of your Test Suite
Making the most of your Test SuiteMaking the most of your Test Suite
Making the most of your Test Suiteericholscher
 
Yaetos Tech Overview
Yaetos Tech OverviewYaetos Tech Overview
Yaetos Tech Overview
prevota
 
Django rest framework
Django rest frameworkDjango rest framework
Django rest framework
Blank Chen
 
Development of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-BalancerDevelopment of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-Balancer
Fabrice Servais
 
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Martin Etmajer
 
php & performance
 php & performance php & performance
php & performance
simon8410
 
CI and CD
CI and CDCI and CD
Regain Control Thanks To Prometheus
Regain Control Thanks To PrometheusRegain Control Thanks To Prometheus
Regain Control Thanks To Prometheus
Etienne Coutaud
 
Monitoring the Dynamic Resource Usage of Scala and Python Spark Jobs in Yarn:...
Monitoring the Dynamic Resource Usage of Scala and Python Spark Jobs in Yarn:...Monitoring the Dynamic Resource Usage of Scala and Python Spark Jobs in Yarn:...
Monitoring the Dynamic Resource Usage of Scala and Python Spark Jobs in Yarn:...
Spark Summit
 
Strategy-driven Test Generation with Open Source Frameworks
Strategy-driven Test Generation with Open Source FrameworksStrategy-driven Test Generation with Open Source Frameworks
Strategy-driven Test Generation with Open Source Frameworks
Dimitry Polivaev
 
Developers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonDevelopers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomon
Ineke Scheffers
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web Applications
Graham Dumpleton
 

Similar to Pynvme introduction (20)

CI and CD
CI and CDCI and CD
CI and CD
 
Simple tools to fight bigger quality battle
Simple tools to fight bigger quality battleSimple tools to fight bigger quality battle
Simple tools to fight bigger quality battle
 
Test Kitchen and Infrastructure as Code
Test Kitchen and Infrastructure as CodeTest Kitchen and Infrastructure as Code
Test Kitchen and Infrastructure as Code
 
Performance and Scalability Testing with Python and Multi-Mechanize
Performance and Scalability Testing with Python and Multi-MechanizePerformance and Scalability Testing with Python and Multi-Mechanize
Performance and Scalability Testing with Python and Multi-Mechanize
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
Software development practices in python
Software development practices in pythonSoftware development practices in python
Software development practices in python
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
 
Making the most of your Test Suite
Making the most of your Test SuiteMaking the most of your Test Suite
Making the most of your Test Suite
 
Yaetos Tech Overview
Yaetos Tech OverviewYaetos Tech Overview
Yaetos Tech Overview
 
Django rest framework
Django rest frameworkDjango rest framework
Django rest framework
 
Development of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-BalancerDevelopment of a Cisco ACI device package for NGINX as a Load-Balancer
Development of a Cisco ACI device package for NGINX as a Load-Balancer
 
FV04_MostoviczT_RAD
FV04_MostoviczT_RADFV04_MostoviczT_RAD
FV04_MostoviczT_RAD
 
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
 
php & performance
 php & performance php & performance
php & performance
 
CI and CD
CI and CDCI and CD
CI and CD
 
Regain Control Thanks To Prometheus
Regain Control Thanks To PrometheusRegain Control Thanks To Prometheus
Regain Control Thanks To Prometheus
 
Monitoring the Dynamic Resource Usage of Scala and Python Spark Jobs in Yarn:...
Monitoring the Dynamic Resource Usage of Scala and Python Spark Jobs in Yarn:...Monitoring the Dynamic Resource Usage of Scala and Python Spark Jobs in Yarn:...
Monitoring the Dynamic Resource Usage of Scala and Python Spark Jobs in Yarn:...
 
Strategy-driven Test Generation with Open Source Frameworks
Strategy-driven Test Generation with Open Source FrameworksStrategy-driven Test Generation with Open Source Frameworks
Strategy-driven Test Generation with Open Source Frameworks
 
Developers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonDevelopers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomon
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web Applications
 

Recently uploaded

Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 

Recently uploaded (20)

Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 

Pynvme introduction

  • 1. Pynvme: test NVMe devices in Python https://github.com/cranechu/pynvme
  • 2. <date/time> <footer> 2 Pynvme Pynvme is a python extension module. Users can operate NVMe SSD intuitively by Python scripts. It is designed for NVMe SSD testing with performance considered. With third-party tools, e.g. emacs, pycharm and pytest, pynvme is a convenient and professional NVMe device test solution.
  • 3. <date/time> <footer> 3 Pynvme in Python IDLE SPDK pynvme
  • 4. <date/time> <footer> 4 Pynvme is based on SPDK
  • 5. <date/time> <footer> 5 Pynvme Architecture Test driver (driver.c) Python interface (driver_wrap.pyx) Python library (nvme.so) Build python library with Cython: • setup.py • driver.c • driver.h • cdriver.pxd • driver_wrap.pyx • Makefile
  • 6. <date/time> <footer> 6 Pynvme Architecture Test driver (driver.c) Python interface (driver_wrap.pyx) Python library (nvme.so) Organize test cases in pytest: • mvme.so • pytest.ini • conftest.py • driver_test.py Python test scripts (driver_test.py) Pytest fixtures (conftest.py)
  • 7. <date/time> <footer> 7 Why Python? √ Many beautiful mature libraries • pytest • logging • multiprocessing • numpy • matplotlib • pydoc • os, io, time, pytemperature, statistics, yaml, json, struct, ... √ Friendly IDEs for developing, debugging, and testing • Pycharm, emacs, vscode √ CI: develop firmware softly
  • 9. <date/time> <footer> 9 Config and Compile − git clone https://github.com/cranechu/pynvme; cd pynvme − git submodule update --init –recursive − sudo ./spdk/scripts/pkgdep.sh − sudo dnf install python3-pip -y − sudo python3 -m pip install -r requirements.txt − cd spdk; ./configure --without-isal; cd .. − make spdk; make − Fedora29 is recommended. − find script examples in driver_test.py. − find more => https://github.com/cranechu/pynvme
  • 10. <date/time> <footer> 10 Test Scripts pytest cases are started with test_ create qpair and buffer for write commands write data, and then read in the callback pytest fixtures callback functions called when cmds are completed fill buffer with identify data
  • 11. <date/time> <footer> 11 IOWorker send IO in a separated process define IO patterns in ioworker's parameter list wait ioworkers till finish, and collect result data
  • 12. <date/time> <footer> 12 Fixtures of Pynvme • create/delete test objects. in conftest.py: • nvme0 • nvme0n1 • pcie • ... • parametrize of tests • @pytest.mark.parametrize("qcount", [1, 2, 4, 8, 15]) • @pytest.mark.parametrize("repeat", range(10)) • test control • @pytest.mark.skip("nvme over tcp") • doc: https://docs.pytest.org/en/latest/fixture.html
  • 13. <date/time> <footer> 13 Test Files import pytest import nvme test functions test file name pytest collects test files and cases before execution
  • 14. <date/time> <footer> 14 Pytest Execution • '''The pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries.''' • '''pytest fixtures offer dramatic improvements over the classic xUnit style of setup/teardown functions''' • pytest test_mod.py # run tests in a module • pytest testing/ # run tests in a directory • pytest test_mod.py::test_func # run a specific test case • pytest test_mod.py -s # run tests without log capturing • https://media.readthedocs.org/pdf/pytest/latest/pytest.pdf
  • 15. <date/time> <footer> 15 Pycharm: show case Test status Test log Test scripts
  • 16. <date/time> <footer> 16 Welcome to use and contribute https://github.com/cranechu/pynvme