From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: mic@digikod.net, gnoack@google.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4 3/5] Add landlock04 test
Date: Fri, 26 Jul 2024 18:31:06 +0200 [thread overview]
Message-ID: <20240726163106.GC1107201@pevik> (raw)
In-Reply-To: <20240725-landlock-v4-3-66f5a1c0c693@suse.com>
Hi all,
...
> +static void tester_run_fs_rules(const int rules, const int result)
> +{
> + if (rules & LANDLOCK_ACCESS_FS_EXECUTE)
> + _test_exec(result);
> +
> + if (rules & LANDLOCK_ACCESS_FS_WRITE_FILE)
> + _test_write(result);
> +
> + if (rules & LANDLOCK_ACCESS_FS_READ_FILE)
> + _test_read(result);
> +
> + if (rules & LANDLOCK_ACCESS_FS_READ_DIR)
> + _test_readdir(result);
> +
> + if (rules & LANDLOCK_ACCESS_FS_REMOVE_DIR)
> + _test_rmdir(result);
> +
> + if (rules & LANDLOCK_ACCESS_FS_REMOVE_FILE)
> + _test_rmfile(result);
> +
> + if (rules & LANDLOCK_ACCESS_FS_MAKE_CHAR)
> + _test_make(DEV_CHAR0, S_IFCHR, dev_chr, result);
FYI no need to skip vfat and exfat (.skip_filesystems), just certain tests. This
one above would need to be skipped.
> +
> + if (rules & LANDLOCK_ACCESS_FS_MAKE_BLOCK)
> + _test_make(DEV_BLK0, S_IFBLK, dev_blk, result);
and this...
> +
> + if (rules & LANDLOCK_ACCESS_FS_MAKE_REG)
> + _test_make(FILE_REGULAR, S_IFREG, 0, result);
> +
> + if (rules & LANDLOCK_ACCESS_FS_MAKE_SOCK)
> + _test_make(FILE_SOCKET, S_IFSOCK, 0, result);
and this...
> +
> + if (rules & LANDLOCK_ACCESS_FS_MAKE_FIFO)
> + _test_make(FILE_FIFO, S_IFIFO, 0, result);
and this...
> +
> + if (rules & LANDLOCK_ACCESS_FS_MAKE_SYM)
> + _test_symbolic(result);
and this.
Kind regards,
Petr
> +
> + if (rules & LANDLOCK_ACCESS_FS_TRUNCATE) {
> + if ((tst_kvercmp(6, 2, 0)) < 0) {
> + tst_res(TINFO, "Skip truncate test. Minimum kernel version is 6.2");
> + return;
> + }
> +
> + _test_truncate(result);
> + }
> +}
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-07-26 16:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-25 9:23 [LTP] [PATCH v4 0/5] landlock testing suite Andrea Cervesato
2024-07-25 9:23 ` [LTP] [PATCH v4 1/5] Add landlock03 test Andrea Cervesato
2024-07-26 11:01 ` Petr Vorel
2024-07-26 11:44 ` Andrea Cervesato via ltp
2024-07-25 9:23 ` [LTP] [PATCH v4 2/5] Add CAP_MKNOD fallback in lapi/capability.h Andrea Cervesato
2024-07-26 13:11 ` Petr Vorel
2024-07-25 9:23 ` [LTP] [PATCH v4 3/5] Add landlock04 test Andrea Cervesato
2024-07-26 13:06 ` Petr Vorel
2024-07-26 16:31 ` Petr Vorel [this message]
2024-07-25 9:23 ` [LTP] [PATCH v4 4/5] Add landlock05 test Andrea Cervesato
2024-07-25 9:23 ` [LTP] [PATCH v4 5/5] Add landlock06 test Andrea Cervesato
2024-07-26 13:24 ` Petr Vorel
2024-07-26 13:51 ` Mickaël Salaün
2024-07-26 14:32 ` Petr Vorel
2024-07-26 16:16 ` Petr Vorel
2024-07-26 16:21 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240726163106.GC1107201@pevik \
--to=pvorel@suse.cz \
--cc=andrea.cervesato@suse.de \
--cc=gnoack@google.com \
--cc=ltp@lists.linux.it \
--cc=mic@digikod.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.