- Nov 18, 2021
-
-
Gabriel Krisman Bertazi authored
When multiple FS errors occur, only the first is stored. This testcase validates this behavior by issuing two different errors and making sure only the first is stored, while the second is simply accumulated in error_count. Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
-
Gabriel Krisman Bertazi authored
This test corrupts an inode entry with an invalid mode through debugfs and then tries to access it. This should result in a ext4 error, which we monitor through the fanotify group. In order for this test to succeed, it requires a kernel fix introduced by kernel commit 124e7c61deb2 ("ext4: fix error code saved on super block during file system abort"), which is added to .tags. Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
-
Gabriel Krisman Bertazi authored
Allocate a test directory and corrupt it with debugfs. The corruption is done by writing an invalid inode mode. This file can be later looked up to trigger a corruption error. Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
-
Gabriel Krisman Bertazi authored
In order to test FAN_FS_ERROR, we want to corrupt the filesystem. The easiest way to do it is by using debugfs. Add a small helper to issue debugfs requests. Since most likely this will be the only testcase to need this, don't bother making it a proper helper for now. Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> --- changes since v1: - Add .needs_cmds to require debugfs
-
Gabriel Krisman Bertazi authored
Verify the FID provided in the event. If the FH has size 0, this is assumed to be a superblock error (i.e. null FH). Reviewed-by: Petr Vorel <pvorel@suse.cz> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> --- Changes since v2: - Move FILEID_INVALID define to header file (Amir) - Don't use FSID_VAL_MEMBER (Petr) Changes since v1: - Move defines to header file. - Use 0-len FH for sb error
-
Gabriel Krisman Bertazi authored
Implement some validation for the generic error info record emitted by the kernel. The error number is fs-specific but, well, we only support ext4 for now anyway. Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> --- Changes since v2: - check for error record type in autotools (Amir) Changes since v1: - Move defines to header file.
-
Gabriel Krisman Bertazi authored
fanotify22 is a new test validating the FAN_FS_ERROR file system error event. This adds some basic structure for the next patches and a single test of error reporting during filesystem abort The strategy for error reporting testing in fanotify22 goes like this: - Generate a broken filesystem - Start FAN_FS_ERROR monitoring group - Make the file system notice the error through ordinary operations - Observe the event generated FAN_FS_ERROR was added in the kernel by Linux commit 9709bd548f11 ("fanotify: Allow users to request FAN_FS_ERROR events"). Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> --- Changes since v3: - fanotify21 -> fanotify22 (Matthew) Changes since v1: - Move defines to header file. - Move fanotify_mark(2) to do_test (Amir) - Merge abort test here
-
Gabriel Krisman Bertazi authored
Add a helper for tests to fail if an event is not available in the kernel. Since some events only work with REPORT_FID or a specific class, update the verifier to allow those to be specified. Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Matthew Bobrowski <repnop@google.com> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com> --- If I understand correctly, the decision was to leave fanotify10 unchanged and this is what I've done here. Changes since v1: - Use SAFE_FANOTIFY_INIT instead of open coding. (Amir) - Use FAN_CLASS_NOTIF for fanotify12 testcase. (Amir)
-
Gabriel Krisman Bertazi authored
Like done for init flags and event types, and a macro to require a specific mark type. Reviewed-by: Matthew Bobrowski <repnop@google.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
-
tangmeng authored
Signed-off-by: tangmeng <tangmeng@uniontech.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
-
tangmeng authored
Signed-off-by: tangmeng <tangmeng@uniontech.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
-
Dai Shili authored
1) merge pread03 into pread02 2) use TST_EXP_FAIL2 macro Signed-off-by: Dai Shili <daisl.fnst@fujitsu.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
-
- Nov 17, 2021
-
-
Richard Palethorpe authored
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
-
Richard Palethorpe authored
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com> Cc: Yang Xu <xuyang2018.jy@fujitsu.com>
-
Yang Xu authored
Like statx04.c, but use stx_attributes_mask before test so we only test flag which has been implemented by the underlying filesystem. Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>
-
Yang Xu authored
Also add docparse formatting. Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>
-
Yang Xu authored
Since STATX_ATTR_COMPRESSED flag are non-supported on xfs, we should skip it and test three other flags. Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>
-
- Nov 16, 2021
-
-
Masayoshi Mizuma authored
controllers/pids/pids.sh doesn't work in the cgroup v2 environment because some interfaces of cgroup v2 are different from cgroup v1. The test itself is useful for cgroup v2 as well, so let's get it available for cgroup v2. The test starts with cgroup v2 if it's mounted already. On some systems, like as Fedora 35 and CentOS Stream 9, systemd mounts cgroup v2 as the default while system booting. Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>
-
Richard Palethorpe authored
Some tests can never be run under 32-bit compatibility mode. This adds a flag to skip them. This will show up in the meta data in addition to causing the test to exit with TCONF if compat mode is detected at runtime. It's possible that support for compat mode will be added to CAN. If this happens then we will have to probe the interface for support when in 32-bit compat mode. Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com> Suggested-by: Cyril Hrubis <chrubis@suse.cz> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
-
Richard Palethorpe authored
This is primarily to avoid printing the uname info two or more times. Which is increasingly likely with using tst_kernel_bits in other library functions. Also with features like test variants where setup may be run multiple times. Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
-
QI Fuli authored
Signed-off-by: QI Fuli <qi.fuli@fujitsu.com> Reviewed-by: Yang Xu <xuyang2018.jy@fujitsu.com>
-
QI Fuli authored
divide into two testcases convert to new API Signed-off-by: QI Fuli <qi.fuli@fujitsu.com> Reviewed-by: Yang Xu <xuyang2018.jy@fujitsu.com>
-
- Nov 15, 2021
-
-
Matthew Bobrowski authored
This is a new test that performs verification on the values returned within the struct fanotify_event_info_pidfd record when the notification group has been initialized with the FAN_REPORT_PIDFD flag. Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Matthew Bobrowski <repnop@google.com> [ pvorel: Add fanotify20 entry into runtest file, fix checkpatch.pl complains, mention kernel commit in docs ] Signed-off-by: Petr Vorel <pvorel@suse.cz>
-
Matthew Bobrowski authored
This test ensures that the fanotify API returns the expected error status code -EINVAL when an invalid flag is supplied alongside the new FAN_REPORT_PIDFD initialization flag. Currently, FAN_REPORT_TID is the only initialization flag that is not permitted in conjunction with FAN_REPORT_PIDFD, so we explicitly provide test coverage for this. We also add an extra trivial test case to ensure that the initialization behavior with the other FAN_REPORT_* related flags is working as intended. Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Matthew Bobrowski <repnop@google.com> [ pvorel: Add fanotify20 entry into runtest file, mention kernel commit in docs ] Signed-off-by: Petr Vorel <pvorel@suse.cz>
-
Matthew Bobrowski authored
Add a helper macro which checks for the presence of specific fanotify initialization flag(s). This is a trivial macro that can be used throughout fanotify tests to check whether the underlying running kernel supports the supplied fanotify initialization flag(s). Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Matthew Bobrowski <repnop@google.com>
-
Joerg Vehlow authored
The actual load of the test was optimized away, because there was no way to reach the memory used for calculation from the outside of the function. To fix this, the memory used for the matrices is now allocated in the main thread and passed to the workload function as a pointer. This should prevent optimization and also allows for the matrices to be bigger, without overflowing the stack. Reviewed-by: Cyril Hrubis <chrubis@suse.cz> Reviewed-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
-
Joerg Vehlow authored
Cleanup the code: - Add static where apropriate - Moved mutex_cpu to set_affinity and correctly initialize it. It is only used in this function, so moving it into the scope makes the code a easier to read - malloc & memset can easily be replaced by calloc Reviewed-by: Cyril Hrubis <chrubis@suse.cz> Reviewed-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
-
Petr Vorel authored
bookworm (testing) does not have libsepol1-dev. It has only libsepol-dev, which is virtual package on sid (unstable) and all released versions, thus safe to use it for all Debian releases. Signed-off-by: Petr Vorel <pvorel@suse.cz>
-
Joerg Vehlow authored
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
-
Joerg Vehlow authored
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
-
Joerg Vehlow authored
Even if groups with a set cpuset.cpus exist, the original bug can still be in the kernel. It was possible to create a group, set cpuset.cpus and only then set cpuset.cpu_exclusive to 1. This did not trigger the bug. This patche sets cpuset.cpus for all groups to an empty value, before running the test and resets them to their original value after the test. Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de> Acked-by: Richard Palethorpe <rpalethorpe@suse.com>
-
Joerg Vehlow authored
The bug can also be reproduced with only one cpu. Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de> Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>
-
Joerg Vehlow authored
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de> Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>
-
- Nov 11, 2021
-
-
Yang Xu authored
Reviewed-by: Cyril Hrubis <chrubis@suse.cz> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
-
Yang Xu authored
Add syscall number for quotactl_fd, refer to glibc's submission[1]. [1]https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=89dc0372a9055e7ef86fe19be6201fa0b16b2f0e Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
-
Yang Xu authored
Also remove useless header files and add linux git in test structure. Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
-
Yang Xu authored
When use -O quota options for mkfs.ext4, quota mount option will be ignored since 3.5 kernel[1]. Since the Oldest tested kernel version is 3.10, we can remove mount option directly. [1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7c319d3 Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
-
Yang Xu authored
Add a linux tag and fix docparse formatting. Also remove useless geteuid. Reviewed-by: Cyril Hrubis <chrubis@suse.cz> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
-
Yang Xu authored
Since usrquota and groupquota supports visible quota files with two formats(vfsv0 and vfsv1) on ext4, so add a test variants to test it. Also fix docparse formatting and move some code to lapi/quotactl.h or quotactl_var.h for reuse. Remove useless geteuid. Reviewed-by: Cyril Hrubis <chrubis@suse.cz> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
-
- Nov 10, 2021
-
-
chengweibin authored
Closes: https://github.com/linux-test-project/ltp/pull/881 Reviewed-by: Cyril Hrubis <chrubis@suse.cz> Reviewed-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: chengweibin <chengweibin@uniontech.com> Signed-off-by: Petr Vorel <pvorel@suse.cz>
-