aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-04-15updatesHEADmasterViresh Kumar
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-02-05quota_remount_test01: update to new APIKory Maincent
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>
2021-02-05sctp/func_test: add check on the sctp driverKory Maincent
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>
2021-02-04ttype: using TERRNO to macth errnozhao gongyi
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>
2021-02-01can: Fix docparser formattingPetr Vorel
After converting can to new library API (7e7804118, 042f4fbb7) See also: #782 Signed-off-by: Petr Vorel <pvorel@suse.cz>
2021-02-01can: Update contact detailsRichard Palethorpe
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>
2021-02-01can: Remove obsolete test wrapper scriptRichard Palethorpe
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>
2021-02-01can_recv_own_msgs: Convert to new libraryRichard Palethorpe
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>
2021-02-01can_filter: Convert to new libraryRichard Palethorpe
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>
2021-02-01can: Add COPYING with dual license textRichard Palethorpe
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>
2021-02-01can: Add can_common.h for vcan device setupRichard Palethorpe
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>
2021-02-01API: Add FILE_SCANF to new libRichard Palethorpe
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz> Reviewed-by: Petr Vorel <pvorel@suse.cz>
2021-01-31syscalls/sched_getparam03: Convert to new API and cleanupXiao Yang
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
2021-01-31syscalls/sched_getparam{01, 02}: Convert to new API and cleanupXiao Yang
Also merge sched_getparam02 into sched_getparam01. Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
2021-01-29zram: Require rootPetr Vorel
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>
2021-01-28testinfo.pl: Optimize importsPetr Vorel
Signed-off-by: Petr Vorel <pvorel@suse.cz>
2021-01-28lib: Add test for tst_check_driver()Petr Vorel
Test for 8f7013ba6. Reviewed-by: Cyril Hrubis <chrubis@suse.cz> Signed-off-by: Petr Vorel <pvorel@suse.cz>
2021-01-28syscalls/time{01, 02}: Convert to new API and merge themShiyang Ruan
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>
2021-01-28syscalls/ipc: semctl07: Convert to new API and cleanupFeiyu Zhu
Signed-off-by: Feiyu Zhu <zhufy.jy@cn.fujitsu.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
2021-01-27syscalls/times01: Convert to new APIShiyang Ruan
Signed-off-by: Shiyang Ruan <ruansy.fnst@cn.fujitsu.com> Reviewed-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
2021-01-26syscalls/ipc: semctl05: Convert to new API and cleanupFeiyu Zhu
Also make use of TST_EXP_FAIL Signed-off-by: Feiyu Zhu <zhufy.jy@cn.fujitsu.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
2021-01-26syscalls/ipc: semctl04: Convert to new API and cleanupFeiyu Zhu
Also make use of TST_EXP_FAIL Signed-off-by: Feiyu Zhu <zhufy.jy@cn.fujitsu.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
2021-01-26syscalls/ipc: semctl03: Convert to new API and cleanupFeiyu Zhu
Also make use of TST_EXP_FAIL Signed-off-by: Feiyu Zhu <zhufy.jy@cn.fujitsu.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
2021-01-26syscalls/ipc: semctl02: Convert to new API and cleanupFeiyu Zhu
Also make use of TST_EXP_FAIL Signed-off-by: Feiyu Zhu <zhufy.jy@cn.fujitsu.com> Reviwed-by: Cyril Hrubis <chrubis@suse.cz>
2021-01-26fcntl_common.h: Add include guardsPetr Vorel
Signed-off-by: Petr Vorel <pvorel@suse.cz>
2021-01-26epoll: Fix typo failiure -> failureTim Gates
Closes: #744 Reviewed-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Tim Gates <tim.gates@iress.com>
2021-01-26runtest/fs_readonly: Fix regression on test_robind54Petr Vorel
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>
2021-01-26syscalls/msync: Assgin value for page_szYang Xu
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>
2021-01-25semctl09: Fix EPERM warning in cleanup()Martin Doucha
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>
2021-01-25mallopt01: Rewrite to new APIPetr Vorel
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>
2021-01-25syscalls/msync01: Remove useless getpagesize() checkPetr Vorel
Unlike sysconf() the getpagesize() call cannot fail. This fixes compiler warning integer expressions of different signedness. Signed-off-by: Petr Vorel <pvorel@suse.cz>
2021-01-25device-drivers/rtc: add verify rtc set time caseCixi Geng
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>
2021-01-25lib: implement rtc_clock_save and rtc_clock_restore functionCixi Geng
* 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>
2021-01-25lib: add tst_rtctime* for rtc testCixi Geng
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>
2021-01-25syscalls: Fix compiler warnings for comparison of different signednessTree Davies
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>
2021-01-25syscalls/get_mempolicy01: Rewrite to new APIPetr Vorel
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>
2021-01-25tst_net.sh: Require veth for netns (again)Petr Vorel
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>
2021-01-25zram: Fix module detection on BusyBoxPetr Vorel
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>
2021-01-25tst_check_driver(): Fix kernel module detection on BusyBoxPetr Vorel
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>
2021-01-25syscalls: Take use of TST_EXP_PASS_SILENTXiao Yang
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>
2021-01-25syscalls/open01.c: Take use of TST_EXP_FD_SILENTXiao Yang
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>
2021-01-25include/tst_test_macros.h: Add TST_EXP_{PASS, FD}_SILENT macrosXiao Yang
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>
2021-01-24swapping01: make test more robustAlexander Egorenkov
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>
2021-01-22kernel/syscalls/memfd_create: fix case2's tst_res argumentouyangciyan
Signed-off-by: ouyangciyan <zintown@qq.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
2021-01-21travis: Test NUMA also on FedoraPetr Vorel
Reviewed by: Enji Cooper <yaneurabeya@gmail.com> Signed-off-by: Petr Vorel <pvorel@suse.cz>
2021-01-21network/stress/route-change: Convert to new APIJoerg Vehlow
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>
2021-01-21network/stress/multicast/query-flood: Convert to new APIJoerg Vehlow
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>
2021-01-21network/stress/multicast/packet-flood: Convert to new APIJoerg Vehlow
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>
2021-01-21fs/lftest: Convert to new libraryJoerg Vehlow
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>
2021-01-21openposix/mlock_8-1,munlock_10-1: document known aarch64 issueJan Stancek
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>