[sanlock] branch rindex-1 created (now 070e9f2)
by git repository hosting
This is an automated email from the git hooks/post-receive script.
teigland pushed a change to branch rindex-1
in repository sanlock.
at 070e9f2 sanlock: add resource index
This branch includes the following new commits:
new 070e9f2 sanlock: add resource index
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
6 years, 3 months
[sanlock] branch master updated (b7b0fe9 -> 19a07f6)
by git repository hosting
This is an automated email from the git hooks/post-receive script.
teigland pushed a change to branch master
in repository sanlock.
from b7b0fe9 Start the daemon tests module
new 20b3d31 Add vim configuration
new 70bdc86 Extract start_sanlock_deamon() helper
new ced9ae9 Start new daemon for every test
new 95873c9 Add tests for sanlock lockfile
new 97358a6 Do not unlink sanlock lockfile on shutdown
new c46aa2e Normalize sanlock exit code
new fc4f190 Introduce tests.util module
new 95093da Introduce conftest module
new 6be1f4f Move environment setup to a shell script
new c7fd1b6 Fix libsanlock build on Unubtu/Debian
new 19a07f6 Start python binding test module
The 11 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
.travis.yml | 5 +--
.vimrc | 4 ++
README.dev | 9 ++--
python/Makefile | 3 ++
src/Makefile | 4 +-
src/lockfile.c | 10 -----
src/lockfile.h | 1 -
src/main.c | 4 +-
tests/__init__.py | 0
tests/conftest.py | 21 +++++++++
tests/daemon_test.py | 63 +++++++++++++-------------
tests/direct_test.py | 11 +----
tests/env.sh | 16 +++++++
tests/{direct_test.py => python_test.py} | 16 ++-----
tests/util.py | 77 ++++++++++++++++++++++++++++++++
15 files changed, 170 insertions(+), 74 deletions(-)
create mode 100644 .vimrc
create mode 100644 tests/__init__.py
create mode 100644 tests/conftest.py
create mode 100644 tests/env.sh
copy tests/{direct_test.py => python_test.py} (59%)
create mode 100644 tests/util.py
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
6 years, 3 months
[PATCH 0/5] Add python bindings tests
by Nir Soffer
From: Nir Soffer <nsoffer(a)redhat.com>
This series improve the testing infrastructre and fix the build so we
can add python bindings tests with a running sanlock daemon.
First, the various test helper functions moved to new test/util.py
module, since we use them from both direct and daemon tests, and the new
python tests will need them as well.
The sanlock_daemon fixuture is also needed for testing the python
bindings with a running sanlock daemon, so it move to a new conftest.py,
the stanrad location for project pytest fixtures.
To help the python binding find libsanlock.so in runtime, we must start
python with LD_LIBRARY_PATH set. To help it to find sanlock run
directory, we need also SANLOCK_RUN_DIR. Since we need the environment
variables both for the python test process, and for the sanlock daemon
and client running by the tests, it is better to set the environment
before starting the tests, instead of inside the tests. A new
tests/env.sh script added to make it easy.
When building python binding on Travis CI, I found that libsanlock.so
was not linked correctly, failing to load with undefined symbol. This
was fixed by moving the libraries to the correct place in the compile
command.
Finally a new python test module was added, testing
sanlock.write_lockspace().
The patches created on top of:
commit aa3ebd88204b5b37ba0ff839dc209aad0e7b867a
Author: Nir Soffer <nsoffer(a)redhat.com>
Date: Fri Jan 12 23:45:42 2018 +0200
Normalize sanlock exit code
Nir Soffer (5):
Introduce tests.util module
Introduce conftest module
Move environment setup to a shell script
Fix libsanlock build on Unubtu/Debian
Start python binding test module
.travis.yml | 5 ++-
README.dev | 9 +++--
python/Makefile | 3 ++
src/Makefile | 4 +--
tests/__init__.py | 0
tests/conftest.py | 21 ++++++++++++
tests/daemon_test.py | 93 +++++-----------------------------------------------
tests/direct_test.py | 11 ++-----
tests/env.sh | 16 +++++++++
tests/python_test.py | 27 +++++++++++++++
tests/util.py | 77 +++++++++++++++++++++++++++++++++++++++++++
11 files changed, 164 insertions(+), 102 deletions(-)
create mode 100644 tests/__init__.py
create mode 100644 tests/conftest.py
create mode 100644 tests/env.sh
create mode 100644 tests/python_test.py
create mode 100644 tests/util.py
--
2.9.5
6 years, 3 months
[PATCH 0/5] General cleanup
by Nir Soffer
From: Nir Soffer <nsoffer(a)redhat.com>
This series fix some general issues and improve test coverage:
- Improve daemon tests infrastructure
- Add tests for sanlock lockfile funcionallity
- Fix race when unlinking lockfile on exit
- Normalize sanlock exit code on failures
Nir Soffer (5):
Extract start_sanlock_deamon() helper
Start new daemon for every test
Add tests for sanlock lockfile
Do not unlink sanlock lockfile on shutdown
Normalize sanlock exit code
src/lockfile.c | 10 -------
src/lockfile.h | 1 -
src/main.c | 4 +--
tests/daemon_test.py | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++--
4 files changed, 81 insertions(+), 16 deletions(-)
--
2.9.5
6 years, 3 months
[PATCH] Add vim configuration
by Nir Soffer
From: Nir Soffer <nsoffer(a)redhat.com>
Vim users can use "set exrc" to adapt vim to sanlock code style
automatically.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
.vimrc | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 .vimrc
diff --git a/.vimrc b/.vimrc
new file mode 100644
index 0000000..b2f8328
--- /dev/null
+++ b/.vimrc
@@ -0,0 +1,4 @@
+" Local vim configuration for sanlock
+set noexpandtab
+set shiftwidth=8
+set tabstop=8
--
2.9.5
6 years, 3 months
[sanlock] branch master updated (6e6838a -> b7b0fe9)
by git repository hosting
This is an automated email from the git hooks/post-receive script.
teigland pushed a change to branch master
in repository sanlock.
from 6e6838a Add travis CI integration
new c2dfa81 Fix lockfile() to use the given "dir" argument
new 48b0efd Add dir argument to sanlock_socket_address()
new d87294f Move SANLK_RUN_DIR to sanlock_internal.h
new 54d51a3 Add environment variables helpers
new 3b9fc77 Add SANLOCK_RUN_DIR environment variable
new 6a63007 Add SANLOCK_PRIVILEGED environment variable
new b7b0fe9 Start the daemon tests module
The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/Makefile | 9 +++++---
src/client.c | 8 ++++++-
src/env.c | 34 +++++++++++++++++++++++++++
src/{task.h => env.h} | 10 ++++----
src/lockfile.c | 7 +++---
src/main.c | 25 ++++++++++++++++----
src/sanlock_internal.h | 4 ++++
src/sanlock_sock.c | 4 ++--
src/sanlock_sock.h | 3 +--
tests/daemon_test.py | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++
10 files changed, 145 insertions(+), 22 deletions(-)
create mode 100644 src/env.c
copy src/{task.h => env.h} (57%)
create mode 100644 tests/daemon_test.py
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
6 years, 3 months
[PATCH 0/7] Add sanlock daemon tests
by Nir Soffer
From: Nir Soffer <nsoffer(a)redhat.com>
Modify sanlock so we can run sanlock daemon in the tests as current
user:
- Add an option to set the runtime directory via SANLOCK_RUN_DIR
enviroment variable
- Add an option to disable privileged operations via
SANLOCK_PRIVILEGED=0 enviroment variable
Both options should not be used in production, so we log a warning when
they are enabled.
SANLOCK_RUN_DIR effects both "sanlock daemon", "sanlock client" and
usage of libsanlock and libsanlock_client libraries, so we can test both
the executable and the python bindings.
With these modifications and the existing command line options, we can
run sanlock daemon in the tests as the current user. A new test module
was added with:
- sanlock_daemon() fixture that start the daemon at the start of the test
session, and stop it at the end of the session.
- run() function that use modified environment to access the daemon.
The first test initialize a lockspace using "sanlock client init".
Nir Soffer (7):
Fix lockfile() to use the given "dir" argument
Add dir argument to sanlock_socket_address()
Move SANLK_RUN_DIR to sanlock_internal.h
Add environment variables helpers
Add SANLOCK_RUN_DIR environment variable
Add SANLOCK_PRIVILEGED environment variable
Start the daemon tests module
src/Makefile | 9 +++++---
src/client.c | 8 ++++++-
src/env.c | 34 +++++++++++++++++++++++++++
src/env.h | 15 ++++++++++++
src/lockfile.c | 7 +++---
src/main.c | 25 ++++++++++++++++----
src/sanlock_internal.h | 4 ++++
src/sanlock_sock.c | 4 ++--
src/sanlock_sock.h | 3 +--
tests/daemon_test.py | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++
10 files changed, 155 insertions(+), 17 deletions(-)
create mode 100644 src/env.c
create mode 100644 src/env.h
create mode 100644 tests/daemon_test.py
--
2.9.5
6 years, 3 months
[sanlock] branch master updated (4f68755 -> 6e6838a)
by git repository hosting
This is an automated email from the git hooks/post-receive script.
teigland pushed a change to branch master
in repository sanlock.
from 4f68755 sanlock: use log debug calls with ids
new b03388f Start python based tests
new 85a3902 Run the tests from anywhere in the tree
new 6e6838a Add travis CI integration
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.
Summary of changes:
.gitignore | 1 +
.travis.yml | 13 +++++++++++++
README.dev | 20 ++++++++++++++++++++
tests/direct_test.py | 35 +++++++++++++++++++++++++++++++++++
4 files changed, 69 insertions(+)
create mode 100644 .travis.yml
create mode 100644 README.dev
create mode 100644 tests/direct_test.py
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
6 years, 3 months
[PATCH v2 0/3] Start simple functional tests
by Nir Soffer
From: Nir Soffer <nsoffer(a)redhat.com>
Add python based automated tests.
This will make it easy to tests the funcionllity of the sanlock
executable on a developer machine, or in CI environment.
Changes since v1:
- Document changing LD_LIBRARY_PATH to test the built libraries instead
of the installed version.
- Add travis CI integration
Nir Soffer (3):
Start python based tests
Run the tests from anywhere in the tree
Add travis CI integration
.gitignore | 1 +
.travis.yml | 13 +++++++++++++
README.dev | 20 ++++++++++++++++++++
tests/direct_test.py | 35 +++++++++++++++++++++++++++++++++++
4 files changed, 69 insertions(+)
create mode 100644 .travis.yml
create mode 100644 README.dev
create mode 100644 tests/direct_test.py
--
2.9.5
6 years, 3 months
[PATCH 0/2] Start simple functional tests
by Nir Soffer
From: Nir Soffer <nsoffer(a)redhat.com>
Add python based automated tests.
This will make it easy to tests the funcionllity of the sanlock
executable on a developer machine, or in CI environment.
Nir Soffer (2):
Start python based tests
Run the tests from anywhere in the tree
.gitignore | 1 +
README.dev | 16 ++++++++++++++++
tests/direct_test.py | 35 +++++++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+)
create mode 100644 README.dev
create mode 100644 tests/direct_test.py
--
2.9.5
6 years, 3 months