[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sanlock-devel
Subject:    [sanlock] 04/04: README.dev: update userstorage doc
From:       pagure () pagure ! io
Date:       2022-11-27 14:44:45
Message-ID: 20221127144441.6B61D1D7F9A3 () pagure02 ! fedoraproject ! org
[Download RAW message or body]

This is an automated email from the git hooks/post-receive script.

nsoffer pushed a commit to branch master
in repository sanlock.

commit 1b306f0abb173393cb478f09d58a9b0777bc1387
Author: Albert Esteve <aesteve@redhat.com>
AuthorDate: Wed Nov 9 14:50:57 2022 +0100

    README.dev: update userstorage doc
    
    Update documentation regarding userstorage
    setup and teardown.
    
    Signed-off-by: Albert Esteve <aesteve@redhat.com>
    Signed-off-by: Nir Soffer <nsoffer@redhat.com>
---
 README.dev | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/README.dev b/README.dev
index 1bf1d17..46b0088 100644
--- a/README.dev
+++ b/README.dev
@@ -54,9 +54,29 @@ Or using environment variable:
 Testing 4K support
 ==================
 
-To enable the 4k tests, you need to setup 4k stroage for the tests:
+To enable the 4k tests, you need to have userstorage installed.
+First, you need to create a virtual environment
+(https://docs.python.org/3/library/venv.html), and then install
+the userstorage library from the requirements.txt.
+This only needs to be done once:
 
-    $ python tests/storage.py setup
+    $ python3 -m venv ~/.venv/sanlock
+    $ source ~/.venv/sanlock/bin/activate
+    $ pip install --upgrade pip
+    $ pip install -r requirements.txt
+    $ deactivate
+
+Before running the tests, you need to enter the virtual environment:
+
+    $ source ~/.venv/sanlock/bin/activate
+
+The shell prompt will change to show the virtual environment name:
+
+    (sanlock) [user@hostname sanlock]$
+
+Then, you just need to setup 4k storage for the tests:
+
+    $ userstorage create tests/storage.py
 
 This creates two loop devices with 4k sector size; one for testing sanlock with
 4k block device, and the other for testing with a filesystem backed by a 4k
@@ -64,10 +84,14 @@ block device.
 
 To teardown the storage:
 
-    $ python tests/storage.py teardown
+    $ userstorage delete tests/storage.py
 
 The script unmounts the filesystem and detaches the loop devices.
 
 The storage helper script uses sudo to perform privileged operations. The best
 way to use it is to setup the environment once at the start of the session, and
 teardown when you finish.
+
+To deactivate the virtual environment:
+
+    $ deactivate

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
sanlock-devel mailing list -- sanlock-devel@lists.fedorahosted.org
To unsubscribe send an email to sanlock-devel-leave@lists.fedorahosted.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedorahosted.org/archives/list/sanlock-devel@lists.fedorahosted.org
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic