commit - ec5d75ef0eb4b9bfe701449ba0d58b281229f7c9
commit + 6426034367784b59e8ad9c12f37e97eecd284cfa
blob - d621b3adb30381c42b93e1e4f2f07194836c9e3b
blob + b215875eac1c994824752758c475d43b3617eb0a
--- regress/lisp/9p-test/kami-tests.lisp
+++ regress/lisp/9p-test/kami-tests.lisp
(defparameter *remote-test-path-huge* "/test-file-huge")
+(defparameter *remote-test-path-big-buffer* "/test-file-big-buffer")
+
(defparameter *remote-test-path-contents* (format nil "qwertyuiopasdfghjklòàù è~%"))
(alexandria:define-constant +remote-test-path-ovewrwrite-data+ "12" :test #'string=)
(deftest test-write-huge-file ((kami-suite) (test-collect-dir-root-children))
(let* ((size-file (stat-size (write-huge-file *remote-test-path-huge*))))
+ (assert-equality #'= (length (make-huge-data)) size-file)))
+
+(defun write-big-buffer (path &optional (root "/"))
+ (with-open-ssl-stream (stream
+ socket
+ *host*
+ *port*
+ *client-certificate*
+ *certificate-key*)
+ (let* ((*messages-sent* ())
+ (*buffer-size* 4292608)
+ (root-fid (mount stream root))
+ (saved-root-fid (clone-fid stream root-fid))
+ (fid (create-path stream root-fid path))
+ (data (make-huge-data)))
+ (9p-write stream fid 0 data)
+ (9p-clunk stream fid)
+ (read-all-pending-messages stream)
+ (path-info stream saved-root-fid path))))
+
+(deftest test-write-big-buffer ((kami-suite) (test-collect-dir-root-children))
+ (let* ((size-file (stat-size (write-huge-file *remote-test-path-big-buffer*))))
(assert-equality #'= (length (make-huge-data)) size-file)))
(defun read-huge-file (path &optional (root "/"))