test: add heavy load loopback block device test

This commit is contained in:
Lennart Poettering
2020-10-22 15:10:03 +02:00
parent b202ec2068
commit f93ba37530
4 changed files with 264 additions and 1 deletions
+2 -1
View File
@@ -89,10 +89,11 @@ int mount_option_mangle(
int mode_to_inaccessible_node(const char *runtime_dir, mode_t mode, char **dest);
/* Useful for usage with _cleanup_(), unmounts, removes a directory and frees the pointer */
static inline void umount_and_rmdir_and_free(char *p) {
static inline char* umount_and_rmdir_and_free(char *p) {
PROTECT_ERRNO;
(void) umount_recursive(p, 0);
(void) rmdir(p);
free(p);
return NULL;
}
DEFINE_TRIVIAL_CLEANUP_FUNC(char*, umount_and_rmdir_and_free);