Age | Commit message (Collapse) | Author |
|
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
|
|
Check for quota_v2 driver to avoid error:
quotaon: Quota format not supported in kernel
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
[ pvorel: further cleanup: using ROD, TST_MIN_KVER, fix for -iN use,
use tst_selinux_enabled, create get_blocks() ]
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
Add the verification on the sctp driver for all the sctp tests.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
|
|
Use TERRNO because we're not using the TEST() macro.
For those:
lib/tst_capability.c
sched_setaffinity/sched_setaffinity01.c
timerfd/timerfd04.c
Signed-off-by: zhao gongyi <zhaogongyi@huawei.com>
Reviewed-by: Li Wang <liwang@redhat.com>
|
|
After converting can to new library API (7e7804118, 042f4fbb7)
See also: #782
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
socketcan-users appears to be no more.
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
|
|
Functionality moved into can_common.h and the test executables.
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
|
|
Behavior is approximately the same except for the following:
* Test will continue after non-fatal errors.
* We now check the return value of `setsocketopt` and that I/O
completed the specified number of bytes.
* The command line arg, device name, must be prepended with `-D`
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
|
|
Behavior is mostly the same, but on some errors we print fail and
continue instead of exiting immediately. It appears this would result
in more information being printed if there is a failure.
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
|
|
This may be referred to with
SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
The kernel version includes the syscall note, but the contents of the
syscall note have never been included within the LTP CAN tests.
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
|
|
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
|
|
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
|
|
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
|
|
Also merge sched_getparam02 into sched_getparam01.
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
|
|
calling modprobe, rmmod and working with zram device requires root.
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
Test for 8f7013ba6.
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
Merge the two cases because each of them is very simple.
Signed-off-by: Shiyang Ruan <ruansy.fnst@cn.fujitsu.com>
Reviewed-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
|
|
Signed-off-by: Feiyu Zhu <zhufy.jy@cn.fujitsu.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
|
|
Signed-off-by: Shiyang Ruan <ruansy.fnst@cn.fujitsu.com>
Reviewed-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
|
|
Also make use of TST_EXP_FAIL
Signed-off-by: Feiyu Zhu <zhufy.jy@cn.fujitsu.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
|
|
Also make use of TST_EXP_FAIL
Signed-off-by: Feiyu Zhu <zhufy.jy@cn.fujitsu.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
|
|
Also make use of TST_EXP_FAIL
Signed-off-by: Feiyu Zhu <zhufy.jy@cn.fujitsu.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
|
|
Also make use of TST_EXP_FAIL
Signed-off-by: Feiyu Zhu <zhufy.jy@cn.fujitsu.com>
Reviwed-by: Cyril Hrubis <chrubis@suse.cz>
|
|
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
Closes: #744
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Tim Gates <tim.gates@iress.com>
|
|
While amending f2bfd9961 I made 2 mistakes: missing quote, and getopt
separator --, because -n option cannot be passed to test_robind.sh.
Fixes: f2bfd9961 ("fs/lftest: Convert to new library")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
Since the previous patch, it removes useless getpagesize()
check because this function never fail. But it also remove
the page_size assignment and it lead case fail as below:
msync02 1 TBROK : msync02.c:133: mmap failed: errno=EINVAL(22): Invalid argument
msync02 2 TBROK : msync02.c:133: Remaining cases broken
msync02 3 TBROK : msync02.c:147: munmap failed: errno=EINVAL(22): Invalid argument
Fix this and also fix compiler warning by using size_t data type instead of int.
Fixes: 60f4b01194ca ("syscalls/msync01: Remove useless getpagesize() check")
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Reviewed-by: Li Wang <liwang@redhat.com>
|
|
If semctl09 failed in one of the SAFE_*() functions during unprivileged user
test case, SAFE_SEMCTL() in cleanup() would fail with EPERM because the sem_id
is owned by root. Make sure that cleanup() always runs with root EUID.
Fixes: 2a3e43abe ("syscalls/ipc: semctl09: add a test for SEM_STAT_ANY")
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Martin Doucha <mdoucha@suse.cz>
|
|
Detect non-POSIX mallopt() support with autotools.
Expect mallinfo() is implemented if mallopt() implemented, thus *not*
check it with autotools.
NOTE: mallopt() is supported in glibc and uClibc.
Remove M_NLBLKS test. According man page (and checked with glibc and
uClibc implementations, only M_MXFAST is implemented).
Reviewed-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
Unlike sysconf() the getpagesize() call cannot fail.
This fixes compiler warning integer expressions of different signedness.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
Test for the Real Time Clock driver.
* Veirify that,
* 1) set a RTC time
* 2) read the RTC time after set RTC time at once
* 3) compare the set time and the read is identical
Signed-off-by: Cixi Geng <cixi.geng1@unisoc.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
|
|
* Reading the RTC in the setup as well as timestamping with monotonic
timer
* Getting a second monotonic timestamp in the cleanup
* Setting the RTC to the value taken in setup plus the difference in
the monotonic timer timestamps
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Cixi Geng <cixi.geng1@unisoc.com>
|
|
Add:
get rtc time and set rtc time;
Implemented a function that covert rtc time to time_t
this will be used in tst_rtc_save and tst_rtc_restore
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Cixi Geng <cixi.geng1@unisoc.com>
|
|
Fixes 45 instances of warning type:
- warning: comparison of integer expressions of different signedness
Closes: https://github.com/linux-test-project/ltp/pull/772
Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
|
|
Test changes:
* use new LTP NUMA API (tst_get_nodemap())
* add nodemask verification for get_mempolicy01.c
* split failure cases into get_mempolicy02.c
Also finally remove common_j_h.c and include_j_h.h,
which are no longer needed.
Reviewed-by: Li Wang <liwang@redhat.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
new error message is more informative:
tcp_fastopen_run 1 TCONF: veth driver not available
then the old one:
Error: Unknown device type.
tcp_fastopen_run 1 TBROK: ip li add name ltp_ns_veth1 type veth peer name ltp_ns_veth2 failed
NOTE: originally added in 305a78e4c and temporarily reverted in
7fe2ad11d due problems which were fixed in commit
"lib: Fix kernel module detection on BusyBox".
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
BusyBox modinfo implementation does not exit with 0 when module not
found. Our own API implementation used for module detection in
tst_check_driver() was fixed in previous commit thus use it.
Reported-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
BusyBox modprobe implementation does not support -n switch.
It does support -D, which could be used, *but* unless is busybox binary
configured with CONFIG_MODPROBE_SMALL=y (IMHO the default).
We could use modinfo and grep output for 'filename:', but we agreed on
ML that having our own implementation will be the best as it also
does not require modinfo as external dependency.
Implementation searches for for module presence in
/lib/modules/$(uname -r)/modules.{dep,builtin}.
Also treat '-' and '_' in module name as the same (follow kmod implementation).
Changed return code on error from 1 to -1 (no update needed on callers
of the function). Document return code and params in the header.
On Android still assume all drivers are available because modules.* files
might not be available. We could search for modules in /lib/modules or
/vendor/lib/modules or /system/lib/modules (old aosp), but to to determine
built-in drivers we need modules.builtin (it's required also by Busybox
mod{info,probe} implementation).
This fixes many tests on BusyBox, e.g. *all* network tests (tests using
tst_net.sh) after 305a78e4c ("tst_net.sh: Require veth for netns").
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
Current TST_EXP_PASS macro reports the double passed for
one subtest, for example:
--------------------------------------------
tst_test.c:1261: TINFO: Timeout per run is 0h 05m 00s
access02.c:62: TPASS: access(file_f, F_OK) as root passed
access02.c:141: TPASS: access(file_f, F_OK) as root behaviour is correct.
access02.c:62: TPASS: access(file_f, F_OK) as nobody passed
access02.c:141: TPASS: access(file_f, F_OK) as nobody behaviour is correct.
access02.c:62: TPASS: access(file_r, R_OK) as root passed
...
Summary:
passed 32
failed 0
broken 0
skipped 0
warnings 0
--------------------------------------------
It is just a minor cleanup rather than a fix.
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
|
|
Current TST_EXP_FD macro reports the double passed for
one subtest, for example:
--------------------------------------------
./open01
tst_test.c:1261: TINFO: Timeout per run is 0h 05m 00s
open01.c:48: TPASS: open() with sticky bit returned fd 3
open01.c:59: TPASS: sticky bit is set as expected
open01.c:48: TPASS: open() with sirectory bit returned fd 3
open01.c:59: TPASS: sirectory bit is set as expected
Summary:
passed 4
failed 0
broken 0
skipped 0
warnings 0
--------------------------------------------
It is just a minor cleanup rather than a fix.
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
|
|
1) TST_EXP_{PASS,FD}_SILENT don't report TPASS when SCALL succeeds.
2) TST_EXP_{PASS,FD} calls TST_EXP_{PASS,FD}_SILENT and reports
TPASS when SCALL succeeds.
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
|
|
Increase time waiting for swap memory to settle before performing
checks with occupied swap memory. This decreases the chance of
the test to fail in the case of the swap memory taking longer than
expected to settle.
This fixes sporadic failures observed on IBM s390x systems such as this:
swapping01.c:149: TPASS: no heavy swapping detected, 4534 MB swapped.
swapping01.c:106: TINFO: available physical memory: 7348 MB
swapping01.c:109: TINFO: try to allocate: 9552 MB
swapping01.c:112: TINFO: memory allocated: 9552 MB
swapping01.c:140: TINFO: swap free init: 25019 MB
swapping01.c:141: TINFO: swap free now: 20484 MB
swapping01.c:149: TPASS: no heavy swapping detected, 4534 MB swapped.
swapping01.c:106: TINFO: available physical memory: 7348 MB
swapping01.c:109: TINFO: try to allocate: 9553 MB
swapping01.c:112: TINFO: memory allocated: 9553 MB
swapping01.c:140: TINFO: swap free init: 25018 MB
swapping01.c:141: TINFO: swap free now: 17694 MB
swapping01.c:149: TPASS: no heavy swapping detected, 7323 MB swapped.
swapping01.c:106: TINFO: available physical memory: 7318 MB
swapping01.c:109: TINFO: try to allocate: 9514 MB
swapping01.c:112: TINFO: memory allocated: 9514 MB
swapping01.c:140: TINFO: swap free init: 25019 MB
swapping01.c:141: TINFO: swap free now: 17697 MB
swapping01.c:145: TFAIL: heavy swapping detected: 7322 MB swapped.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Suggested-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Li Wang <liwang@redhat.com>
|
|
Signed-off-by: ouyangciyan <zintown@qq.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
|
|
Reviewed by: Enji Cooper <yaneurabeya@gmail.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
[ pvorel: Add route_cleanup, style cleanup ]
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
[ pvorel: Remove sleep $NS_DURATION, style cleanup ]
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
[ pvorel: Remove sleep $NS_DURATION, style cleanup ]
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
Additional changes:
- Use temp directory instead of working dir
- 100 buffers is the default now and can be changed using -n
- Removed some useless output (nseek, nwrite was always bufnum)
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
|
|
Values close to LONG_MAX are incorrectly handled by some aarch64
kernel versions, which return EINVAL instead of ENOMEM. Issue has
been fixed in v5.6:
commit 597399d0cb91 ("arm64: tags: Preserve tags for addresses translated via TTBR1")
commit d0022c0ef29b ("arm64: memory: Add missing brackets to untagged_addr() macro")
Signed-off-by: Jan Stancek <jstancek@redhat.com>
|