summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2023-03-26 01:50:00 +0900
committerRyo Nakamura <upa@haeena.net>2023-03-26 01:50:00 +0900
commit1bd832a135d027243c0b0c1ea5a740f82d429cd1 (patch)
tree0a2fd63ec04cd22fce6992cb2f5d6651dd12e5d7
parent834407379dfe4a3205259f08a02259458b6a6401 (diff)
parent6be61e8adff9690fd2d0cc943a1ac63939b5f0d8 (diff)
Merge branch 'main' of github.com:upa/mscp
-rwxr-xr-xscripts/test-in-container.sh1
-rw-r--r--src/platform.c2
-rw-r--r--test/test_e2e.py4
3 files changed, 4 insertions, 3 deletions
diff --git a/scripts/test-in-container.sh b/scripts/test-in-container.sh
index 1e003b3..cdaef47 100755
--- a/scripts/test-in-container.sh
+++ b/scripts/test-in-container.sh
@@ -11,6 +11,7 @@ set -x
# Run sshd
if [ ! -e /var/run/sshd.pid ]; then
/usr/sbin/sshd
+ sleep 1
fi
ssh-keyscan localhost >> ${HOME}/.ssh/known_hosts
diff --git a/src/platform.c b/src/platform.c
index 9346ce6..1a8357d 100644
--- a/src/platform.c
+++ b/src/platform.c
@@ -101,7 +101,7 @@ sem_t *sem_create(int value)
if (sem_init(sem, 0, value) < 0) {
free(sem);
- return sem;
+ return NULL;
}
return sem;
diff --git a/test/test_e2e.py b/test/test_e2e.py
index 521992e..31d9b44 100644
--- a/test/test_e2e.py
+++ b/test/test_e2e.py
@@ -144,7 +144,7 @@ def test_min_chunk(mscp, src_prefix, dst_prefix):
src = File("src", size = 16 * 1024).make()
dst = File("dst")
- run2ok([mscp, "-H", "-s", 8192, src_prefix + src.path, dst_prefix + dst.path])
+ run2ok([mscp, "-H", "-s", 32768, src_prefix + src.path, dst_prefix + dst.path])
assert check_same_md5sum(src, dst)
src.cleanup()
@@ -155,7 +155,7 @@ def test_thread_affinity(mscp, src_prefix, dst_prefix):
src = File("src", size = 64 * 1024).make()
dst = File("dst")
- run2ok([mscp, "-H", "-n", 4, "-m", "0x01", "-s", 8192, "-S", 65536,
+ run2ok([mscp, "-H", "-n", 4, "-m", "0x01",
src_prefix + src.path, dst_prefix + dst.path])
assert check_same_md5sum(src, dst)