summaryrefslogtreecommitdiffstats
path: root/debian/tests/cifs-share-access-uring
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:02 +0000
commit0a354ad0b2c9eaaa204c31db478da109dc6d2a8b (patch)
tree2467caa8ad20a7fca31bef64224e41a4238db0c9 /debian/tests/cifs-share-access-uring
parentAdding upstream version 2:4.20.0+dfsg. (diff)
downloadsamba-0a354ad0b2c9eaaa204c31db478da109dc6d2a8b.tar.xz
samba-0a354ad0b2c9eaaa204c31db478da109dc6d2a8b.zip
Adding debian version 2:4.20.0+dfsg-1~exp1.debian/2%4.20.0+dfsg-1_exp1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/cifs-share-access-uring')
-rw-r--r--debian/tests/cifs-share-access-uring31
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/tests/cifs-share-access-uring b/debian/tests/cifs-share-access-uring
new file mode 100644
index 0000000..fb4b9c5
--- /dev/null
+++ b/debian/tests/cifs-share-access-uring
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+set -x
+set -e
+
+. debian/tests/util
+
+ensure_uring_available
+
+username="smbtest$$"
+password="$$"
+add_user "${username}" "${password}"
+
+myshare="myshare$$"
+add_share "${myshare}" io_uring
+
+echo "Creating file with random data and computing its md5"
+populate_share "${myshare}" "${username}"
+
+echo "Mounting //localhost/${myshare} via CIFS"
+temp_mount=$(mktemp -d)
+mount -t cifs //localhost/"${myshare}" "$temp_mount" -o user="${username}",username="${username}",password="${password}"
+
+echo "Verifying MD5 via cifs"
+cd "$temp_mount"
+md5sum -c data.md5
+result=$?
+cd -
+umount "$temp_mount"
+rmdir "$temp_mount"
+exit "$result"