Displaying 4 results from an estimated 4 matches for "test_stringsbuf".
2016 Dec 24
0
[PATCH] lib: Use a common function to validate strings.
.../extern void guestfs_int_fadvise_normal (int fd);
extern void guestfs_int_fadvise_sequential (int fd);
extern void guestfs_int_fadvise_random (int fd);
diff --git a/src/unit-tests.c b/src/unit-tests.c
index 06d4d27..e22a61e 100644
--- a/src/unit-tests.c
+++ b/src/unit-tests.c
@@ -433,6 +433,45 @@ test_stringsbuf (void)
guestfs_close (g);
}
+/* Use the same macros as in src/drives.c */
+#define VALID_FORMAT_IFACE(str) \
+ guestfs_int_string_is_valid ((str), 1, SIZE_MAX, true, true, "-_")
+#define VALID_DISK_LABEL(str) \
+ guestfs_int_string_is_valid ((str), 1, 20, true, false, NULL)
+#defi...
2016 Dec 24
2
[PATCH] lib: Use a common function to validate strings.
As discussed in the thread on validating $TERM, it would be good to
have a common function to do this. This is such a function.
The main advantage is it includes unit tests which the previous
functions did not.
Rich.
2017 Jan 20
5
[PATCH 0/5] Rename src/ to lib/ and move common code to common/
This patch series moves some files and directories around but is only
code motion (or supposed to be).
A new directory, common/, is created for all of the common code which
is currently shared in random ways between parts of the project.
And src/ becomes lib/ (the largest change, but mostly mechanical).
In full this series makes the following changes:
src/libprotocol -> common/protocol
2017 Jan 25
10
[PATCH v2 0/7] Rename src/ to lib/ and move common code to common/
Previous patch series was posted here:
https://www.redhat.com/archives/libguestfs/2017-January/msg00059.html
v2 simply extends this patch series to cover the extra directories
common/edit, common/progress, common/windows and common/parallel.
The only remaining item is to consider whether we should rename mllib
to something else, mlcommon was my suggestion.
Rich.