Displaying 3 results from an estimated 3 matches for "6f33623".
Did you mean:
63623
2018 Nov 13
0
[PATCH] tests: Fix shebang tests on FreeBSD.
...ons(-)
diff --git a/tests/shebang.pl b/tests/shebang.pl
index 17c7821..e6f1630 100755
--- a/tests/shebang.pl
+++ b/tests/shebang.pl
@@ -1,4 +1,4 @@
-#!../nbdkit perl
+#!../src/nbdkit ../plugins/perl/.libs/nbdkit-perl-plugin.so
use strict;
diff --git a/tests/shebang.py b/tests/shebang.py
index 6f33623..e836255 100755
--- a/tests/shebang.py
+++ b/tests/shebang.py
@@ -1,4 +1,4 @@
-#!../nbdkit python
+#!../src/nbdkit ../plugins/python/.libs/nbdkit-python-plugin.so
disk = bytearray(1024 * 1024)
diff --git a/tests/shebang.rb b/tests/shebang.rb
index 34588d1..ccf4519 100755
--- a/tests/shebang.rb...
2019 Nov 25
0
[PATCH nbdkit 1/2] python: For v2 API, avoid copy by passing a buffer to pread.
...3f3 100644
--- a/tests/python-exception.py
+++ b/tests/python-exception.py
@@ -62,5 +62,5 @@ def get_size(h):
return 0
-def pread(h, count, offset):
- return ""
+def pread(h, buf, offset):
+ buf[:] = bytearray(len(buf))
diff --git a/tests/shebang.py b/tests/shebang.py
index 6f33623..0634589 100755
--- a/tests/shebang.py
+++ b/tests/shebang.py
@@ -13,6 +13,7 @@ def get_size(h):
return len(disk)
-def pread(h, count, offset):
+def pread(h, buf, offset):
global disk
- return disk[offset:offset+count]
+ end = offset + len(buf)
+ buf[:] = disk[offset:end]
--...
2019 Nov 25
3
[PATCH nbdkit 0/2] python: Implement pread passing buffer for v2 API.
As suggested by Nir, here:
https://www.redhat.com/archives/libguestfs/2019-November/thread.html#00220