Commit 7b84bc88 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

tempfs: check inaccessible tempfs mounts

criu dump should return an error in this case
Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 16ae562e
...@@ -205,6 +205,7 @@ TST_DIR = \ ...@@ -205,6 +205,7 @@ TST_DIR = \
overmount_fifo \ overmount_fifo \
overmount_sock \ overmount_sock \
tempfs \ tempfs \
tempfs_overmounted \
tempfs_ro \ tempfs_ro \
tempfs_subns \ tempfs_subns \
mnt_ro_bind \ mnt_ro_bind \
......
#include <stdbool.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <linux/limits.h>
#include "zdtmtst.h"
const char *test_doc = "Check tmpfs mount";
const char *test_author = "Pavel Emelianov <xemul@parallels.com>";
char *dirname;
TEST_OPTION(dirname, string, "directory name", 1);
int main(int argc, char **argv)
{
test_init(argc, argv);
mkdir(dirname, 0700);
if (mount("none", dirname, "tmpfs", 0, "") < 0) {
fail("Can't mount tmpfs");
return 1;
}
if (mount("none", dirname, "tmpfs", 0, "") < 0) {
fail("Can't mount tmpfs");
return 1;
}
test_daemon();
test_waitsig();
pass();
return 0;
}
{'flavor': 'ns uns', 'flags': 'suid crfail'}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment