mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 09:58:09 +00:00
zdtm: check enabled file systems
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
c58802edbf
commit
aee6cca66a
@ -233,6 +233,7 @@ TST_DIR = \
|
||||
mnt_ext_dev \
|
||||
mntns_deleted \
|
||||
unlink_regular00 \
|
||||
mnt_enablefs \
|
||||
|
||||
TST_DIR_FILE = \
|
||||
chroot \
|
||||
|
43
test/zdtm/static/mnt_enablefs.c
Normal file
43
test/zdtm/static/mnt_enablefs.c
Normal file
@ -0,0 +1,43 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <linux/limits.h>
|
||||
|
||||
#include "zdtmtst.h"
|
||||
|
||||
const char *test_doc = "Check enabled file systems (--enable-fs)";
|
||||
const char *test_author = "Andrei Vagin <avagin@virtuozzo.com>";
|
||||
|
||||
char *dirname;
|
||||
TEST_OPTION(dirname, string, "directory name", 1);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char fname[PATH_MAX];
|
||||
|
||||
test_init(argc, argv);
|
||||
|
||||
mkdir(dirname, 0777);
|
||||
|
||||
if (mount("zdtm_nfsd", dirname, "nfsd", 0, NULL) == -1) {
|
||||
pr_perror("mount");
|
||||
return -1;
|
||||
}
|
||||
|
||||
snprintf(fname, sizeof(fname), "%s/exports", dirname);
|
||||
|
||||
test_daemon();
|
||||
test_waitsig();
|
||||
|
||||
if (access(fname, F_OK))
|
||||
fail();
|
||||
|
||||
pass();
|
||||
|
||||
return 0;
|
||||
}
|
3
test/zdtm/static/mnt_enablefs.checkskip
Executable file
3
test/zdtm/static/mnt_enablefs.checkskip
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
unshare -m --propagation private mount -t nfsd nfsd /mnt
|
1
test/zdtm/static/mnt_enablefs.desc
Normal file
1
test/zdtm/static/mnt_enablefs.desc
Normal file
@ -0,0 +1 @@
|
||||
{'flavor': 'ns', 'feature': 'mnt_id', "flags": "suid", "opts" : "--enable-fs nfsd" }
|
Loading…
x
Reference in New Issue
Block a user