Giter VIP home page Giter VIP logo

linux-test-project / ltp Goto Github PK

View Code? Open in Web Editor NEW
2.3K 191.0 995.0 62.96 MB

Linux Test Project (mailing list: https://lists.linux.it/listinfo/ltp)

Home Page: https://linux-test-project.readthedocs.io/

License: GNU General Public License v2.0

Shell 12.96% Makefile 2.72% Python 0.35% C 75.96% Perl 1.54% Tcl 0.01% HTML 6.06% Awk 0.02% M4 0.21% Roff 0.02% Starlark 0.03% Smarty 0.02% SmPL 0.02% Assembly 0.10% Dockerfile 0.01%
c linux linux-kernel test-automation unix posix syscalls linux-test ltp libc

ltp's Introduction

Linux Test Project

Linux Test Project is a joint project started by SGI, OSDL and Bull developed and maintained by SUSE, Red Hat, Fujitsu, IBM, Cisco, Oracle and others. The project goal is to deliver tests to the open source community that validate reliability, robustness, and stability of the Linux Kernel.

The testing suites contain a collection of tools for testing the Linux kernel and related features. Our goal is to improve the Linux kernel and system libraries by bringing test automation.

Warning

LTP tests shouldn't run in production systems. In particular, growfiles, doio, and iogen, stress the I/O capabilities of the systems and they are intended to find (or cause) problems.

Some references:

ltp's People

Contributors

acerv avatar akodanev avatar amir73il avatar avinesh avatar casparant avatar ebiggers avatar fenggw-fnst avatar frankenmichl avatar gaowanlong avatar jj-tarun avatar jstancek avatar kraj avatar krzk avatar maninder42 avatar mdoucha avatar metan-ucw avatar mofx avatar ngie-eign avatar pandawei avatar pevik avatar vapier avatar vireshk avatar wangli5665 avatar wangxiaoguang avatar xuyang0410 avatar yangx-jy avatar zenglg avatar zhanglianjie-163 avatar zhaogongyi avatar ziyaoxie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ltp's Issues

CMD_TCPCMDS_ADD aren't executed

I try to run the network test, it happened that CMD_TCPCMDS_ADD (addtional TCP/IP commands tests) is not executed.
In /opt/ltp/testscripts/networktests.sh:

 92 if [ $(($CMD&$CMD_TCPCMDS_ADD)) -ne 0 ]; then
 93     echo "Entered tcp cmds addition"
 94     cat  ${LTPROOT}/runtest/tcp_cmds_addition >> $CMDFILE
 95 fi

The value of $(($CMD&$CMD_TCPCMDS_ADD) is always 0, so these tests are not written to $CMDFILE, which make the addtional tests are not executed.

LTP project TCases documentation

I have a concern regarding the LTP project test cases documentation , is it there somewhere or only we have to rely on the test case source code ?

As i need to analyze some of the test cases after being executed at my system however i can't find a documentation for that to understand the purpose of the test.

My proposal is to have this documentation added to the source code itself instead of having it somewhere else. (as a comments at the beginning of the test code)
If this is not doable, then what are the proposals that we might have for doing so ?

Thanks for this useful project and i hope we all work to get it always in a better shape

cross-compile with uClibc toolchain

Hi,

I get a compile error when cross-compiling with a uClibc based toolchain.
Buildroot has a fix included, which works for me.
Any idea why it is not yet included?

--- ltp-full-20140422.orig/testcases/realtime/lib/libstats.c 2014-04-23 10:37:00.000000000 +0200
+++ ltp-full-20140422/testcases/realtime/lib/libstats.c 2014-06-27 10:55:59.401744516 +0200
@@ -46,6 +46,11 @@
#include <libstats.h>
#include <librttest.h>

+#ifdef UCLIBC
+/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) /
+#define exp10(x) (exp((x) * log(10)))
+#endif /
UCLIBC */
+
int save_stats = 0;

/* static helper functions */

best regards
Waldemar

getrusage04 fails on aarch64 (qemu)

<<<test_start>>>
tag=getrusage04 stime=1472867024
cmdline="getrusage04"
contacts=""
analysis=exit
<<<test_output>>>
getrusage04    0  TINFO  :  Expected timers granularity is 10000 us
getrusage04    0  TINFO  :  Using 1 as multiply factor for max [us]time increment (1000+10000us)!
getrusage04    0  TINFO  :  utime:           0us; stime:         774us
getrusage04    0  TINFO  :  utime:           0us; stime:       20682us
getrusage04    1  TFAIL  :  getrusage04.c:133: stime increased > 11000us:
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=0 cstime=3
<<<test_end>>>

Logs and test setup: https://openqa.suse.de/tests/539773#downloads

Kdump test code is out of date.

/proc filesystem has been refactored in 3.10, many function used in Kdump test has been removed.
For example.
In current code, it use create_proc_* but it changed to proc_create.

Please update the test code.

Passing ltp-pan -a option from runltp

I'm looking to pass -a to ltp-pan from runltp in order to control where the zoofile is created.
Is there a way to do this, or is this a feature that needs to be implemented?

C(PP)FLAGS do not seem to percolate during 16bits and 64bits syscall compilation

Hi,

First, I must warn you that I am currently working on 20130109 ltp version (we do not have time at work to update to latest versions...). We are currently porting Linux to our processor architecture, and we need to have tests running, hence we decided to use ltp. Everything worked well on our first architecture but now, our compiler has to deal with two different architectures and to distinguish them, we have a gcc flag -mcore=a or -mcore=b.
The problem is that during compilation of 16 bits syscalls (setresgid01/2/3_16 for example), CFLAGS do not seem to be propagated :

*-linux-gcc -mcore=b /AND A LOT OF OTHER FLAGS/ -c -o setresgid01_16.o setresgid01.c
*
-linux-gcc -L../../../../lib setresgid03_16.o -lltp -o setresgid03_16

As you can see on second line, c flags do not appear : I checked out your latest version of compat_16.mk to see if any modification might help, but no.
The same problem appears with 64 bits syscalls (And I did the same modifications in newer_64.mk than in your latest compat_16.mk (that you did not do by the way), but it did not help either).

Do you have any hint ? Maybe I just don't set the correct environment variables (FYI : I build ltp through buildroot, and I set TARGET_C(PP)FLAGS), maybe that's a problem you already solved in newest version...

Thanks for your help guys, hope you don't mind me asking questions about very old versions :)

Alexandre Ghiti

syscalls/memcpy: expects specific behavior despite it's undefined one.

Last two testcases of memcpy expects copying of overlapping memory regions to succeed, despite the C standard clearly states following:

7.24.2.1 The memcpy function
...
If copying takes place between objects that overlap, the behavior is undefined.

Another thing, does it make sense having C library tests in the syscalls subfolder?
For example memcmp, memcpy, memset, etc.

As far as I understand, those are not syscalls. Am I just missing some motivation behind this?

execle01 can fail randomly

In testcase testcases/kernel/syscalls/execle/execle01.c because the env array at line 54 is not NULL terminated the code uses whatever is left on the stack. This can lead to incorrect behavior depending on what garbage is on the stack.

mtest05 fail on read only remote machine

2016-08-26T11:37:31 Test: mtest05 Testparm: mmstress
mmstress 0 TINFO : run mmstress -h for all options
mmstress 0 TINFO : test1: Test case tests the race condition between simultaneous read faults in the same address space.
mmstress 1 TFAIL : mmstress.c:927: TEST 1 Failed
mmstress 0 TINFO : test2: Test case tests the race condition between simultaneous write faults in the same address space.
map_and_thread(): open(): Read-only file system
map_and_thread(): open(): Read-only file system
......
I run tests on read-only remote machine

Looks like the test tries to create new file in test binary folder..
map_and_thread("./tmp.file.1", thread_fault, READ_FAULT, NUMTHREAD, &retval);

Invalid argument on setrlimit

kill11 and abort01 fail when setting the rlimit for RLIMIT_CORE on Ubuntu16.04.

I have tried to manually set the rlimit value using the default method, from resource.h - setrlimit(), and it worked (method returned 0 and the value was changed)

kill11 0 TINFO : Adjusting RLIMIT_CORE to 1048576
kill11 1 TBROK : ../../../../include/old/safe_macros.h:322: kill11.c:207: setrlimit(4,0x7ffe8314ec80) failed: errno=EINVAL(22): Invalid argument
kill11 2 TBROK : ../../../../include/old/safe_macros.h:322: Remaining cases broken

abort01 0 TINFO : Adjusting RLIMIT_CORE to 1048576
abort01 1 TBROK : ../../../../include/old/safe_macros.h:322: abort01.c:142: setrlimit(4,0x7ffebb497a20) failed: errno=EINVAL(22): Invalid argument
abort01 2 TBROK : ../../../../include/old/safe_macros.h:322: Remaining cases broken

set panic_on_oom=0 for min_free_kbytes

Hi,
th TC min_free_kbytes usually triggers an reset on our system because panic_on_oom is enabled by default.
Since panic_on_oom=0 is a requirement for this test, may be this value should be set and recovered by the tests itself?

Query-LTP network test supports infiniband interface testing

Hello Team,
I am getting failures during LTP network stress at udp,tcp,icmp for infiniband interfaces on Linux servers. I have added 20 byte ib addresses for these interfaces in ltp_network_stress still can observe above failures.
Is LTP supports infiniband interfaces or any hints how i can derive and add infini adresses during LTP network stress ? Your comment can help me to go further on issue.

Regrads,
-Prajakta

cpuhotplug04 fails because can not offline cpu0

Hello all,
I have one issue when execute cpuhotplug04. Our kernel doesn't allow offline cpu0 while the test tries to offline the hotpluggable CPUs. So the test fails with error "Could not offline cpu0". Does anybody have idea about this, please help.

rm: cannot remove ‘/tmp/ltp-ERPU3UTBBb/sandbox’: Device or resource busy

Start LTP on Qemu Malta RAM=2048M. Debian Linux 4.6.
Сommand run: /opt/ltp/runltp
It starts running tests.

Gnu C                  gcc (Debian 4.9.2-10) 4.9.2
Gnu make               4.0
util-linux             linux 2.25.2
mount                  linux 2.25.2 (libmount 2.25.0: selinux, assert, debug)
modutils               18
e2fsprogs              1.42.12
Linux C Library        > libc.2.19
Dynamic linker (ldd)   2.19
Procps                 3.3.9
Net-tools              1.60
iproute2              iproute2-ss140804
Kbd                    1.15.5
Sh-utils               8.23
Modules Loaded         

free reports:
             total       used       free     shared    buffers     cached
Mem:       2059664     259136    1800528      13440      23168      85584
-/+ buffers/cache:     150384    1909280
Swap:            0          0          0

/proc/cpuinfo
system type             : MIPS Malta
machine                 : mti,malta
processor               : 0
cpu model               : MIPS GENERIC QEMU V0.0  FPU V0.0
BogoMIPS                : 1076.42
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 64
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 1, address/irw mask: [0x0ff8]
isa                     : mips1 mips2 mips3 mips4 mips5 mips32r1 mips32r2 mips64r1 mips64r2
ASEs implemented        : mips3d
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

After wait for a few hours I get:

<<<test_start>>>
tag=input06 stime=1461670111
cmdline="input06"
contacts=""
analysis=exit
<<<test_output>>>
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.3/modules.dep.bin'
input06     0  TINFO  :  Trying to load uinput kernel module
input06     0  TINFO  :  Failed to load the uinput module
input06     1  TCONF  :  input_helper.c:167: Unable to find and open uinput
input06     2  TCONF  :  input_helper.c:167: Remaining cases not appropriate for configuration
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=32 corefile=no
cutime=16 cstime=0
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20160126-113-g7671740

       ###############################################################

            Done executing testcases.
            LTP Version:  20160126-113-g7671740
       ###############################################################

rm: cannot remove ‘/tmp/ltp-ERPU3UTBBb/sandbox’: Device or resource busy

I tried to run away from input06 test.
This error remains.

<<<test_start>>>
tag=getaddrinfo_01 stime=1465318359
cmdline="getaddrinfo_01"
contacts=""
analysis=exit
<<<test_output>>>
getaddrinfo_01    1  TFAIL  :  getaddrinfo_01.c:118: getaddrinfo IPv4 basic lookup ("debian") returns -2 ("Name or service not known")
getaddrinfo_01    2  TFAIL  :  getaddrinfo_01.c:577: getaddrinfo IPv6 basic lookup ("debian") returns -2 ("Name or service not known")
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=1 cstime=4
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20160126-113-g7671740

       ###############################################################

            Done executing testcases.
            LTP Version:  20160126-113-g7671740
       ###############################################################

rm: cannot remove ‘/tmp/ltp-8ZPhQ3fCOY/sandbox’: Device or resource busy

How do I avoid the error ?
Thanks!

memcg_function test case numbers error

`
<<<test_start>>>
tag=memcg_function stime=1325378846
cmdline=" memcg_function_test.sh"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
/data/ltp/testcases/bin/memcg_function_test.sh: line 282: [: 18446744073692774399: integer expression expected
memcg_function_test 1 TINFO : Running memcg_process --mmap-anon -s 4096
memcg_function_test 1 TINFO : Warming up pid: 6834
memcg_function_test 1 TINFO : Process is still here after warm up: 6834
memcg_function_test 1 TPASS : rss is 4096 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 2 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 2 TINFO : Running memcg_process --mmap-file -s 4096
memcg_function_test 2 TINFO : Warming up pid: 6852
memcg_function_test 2 TINFO : Process is still here after warm up: 6852
memcg_function_test 2 TPASS : rss is 0 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 3 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 3 TINFO : Running memcg_process --shm -k 3 -s 4096
memcg_function_test 3 TINFO : Warming up pid: 6870
memcg_function_test 3 TINFO : Process is still here after warm up: 6870
memcg_function_test 3 TPASS : rss is 0 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 4 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 4 TINFO : Running memcg_process --mmap-anon --mmap-file --shm -s 4096
memcg_function_test 4 TINFO : Warming up pid: 6888
memcg_function_test 4 TINFO : Process is still here after warm up: 6888
memcg_function_test 4 TPASS : rss is 4096 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 5 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 5 TINFO : Running memcg_process --mmap-lock1 -s 4096
memcg_function_test 5 TINFO : Warming up pid: 6905
memcg_function_test 5 TINFO : Process is still here after warm up: 6905
memcg_function_test 5 TPASS : rss is 4096 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 6 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 6 TINFO : Running memcg_process --mmap-anon -s 4096
memcg_function_test 6 TINFO : Warming up pid: 6922
memcg_function_test 6 TINFO : Process is still here after warm up: 6922
memcg_function_test 6 TPASS : rss is 4096 as expected
memcg_function_test 7 TPASS : rss is 0 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 8 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 8 TINFO : Running memcg_process --mmap-file -s 4096
memcg_function_test 8 TINFO : Warming up pid: 6942
memcg_function_test 8 TINFO : Process is still here after warm up: 6942
memcg_function_test 8 TPASS : rss is 0 as expected
memcg_function_test 9 TPASS : rss is 0 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 10 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 10 TINFO : Running memcg_process --shm -k 8 -s 4096
memcg_function_test 10 TINFO : Warming up pid: 6962
memcg_function_test 10 TINFO : Process is still here after warm up: 6962
memcg_function_test 10 TPASS : rss is 0 as expected
memcg_function_test 11 TPASS : rss is 0 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 12 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 12 TINFO : Running memcg_process --mmap-anon --mmap-file --shm -s 4096
memcg_function_test 12 TINFO : Warming up pid: 6982
memcg_function_test 12 TINFO : Process is still here after warm up: 6982
memcg_function_test 12 TPASS : rss is 4096 as expected
memcg_function_test 13 TPASS : rss is 0 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 14 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 14 TINFO : Running memcg_process --mmap-lock1 -s 4096
memcg_function_test 14 TINFO : Warming up pid: 7002
memcg_function_test 14 TINFO : Process is still here after warm up: 7002
memcg_function_test 14 TPASS : rss is 4096 as expected
memcg_function_test 15 TPASS : rss is 0 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 16 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 16 TINFO : Running memcg_process --mmap-anon -s 8192
/data/ltp/testcases/bin/memcg_lib.sh: line 185: 7022 Killed memcg_process $1 -s $2
memcg_function_test 16 TPASS : memory.failcnt is 9, > 0 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 17 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 17 TINFO : Running memcg_process --mmap-file -s 8192
/data/ltp/testcases/bin/memcg_lib.sh: line 185: 7035 Killed memcg_process $1 -s $2
memcg_function_test 17 TPASS : memory.failcnt is 9, > 0 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 18 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 18 TINFO : Running memcg_process --shm -s 8192
/data/ltp/testcases/bin/memcg_lib.sh: line 185: 7049 Killed memcg_process $1 -s $2
memcg_function_test 18 TPASS : memory.failcnt is 9, > 0 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 19 TINFO : restore /dev/memcg/memory.use_hierarchy failed
/data/ltp/testcases/bin/memcg_lib.sh: line 248: 7062 Killed memcg_process $2 -s $3
memcg_function_test 19 TPASS : process 7062 is killed
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 20 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 20 TFAIL : Failed to lock memory
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 21 TINFO : restore /dev/memcg/memory.use_hierarchy failed
/data/ltp/testcases/bin/memcg_lib.sh: line 248: 7085 Killed memcg_process $2 -s $3
memcg_function_test 21 TPASS : process 7085 is killed
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 22 TINFO : restore /dev/memcg/memory.use_hierarchy failed
/data/ltp/testcases/bin/memcg_lib.sh: line 248: 7098 Killed memcg_process $2 -s $3
memcg_function_test 22 TPASS : process 7098 is killed
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 23 TINFO : restore /dev/memcg/memory.use_hierarchy failed
/data/ltp/testcases/bin/memcg_lib.sh: line 248: 7111 Killed memcg_process $2 -s $3
memcg_function_test 23 TPASS : process 7111 is killed
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 24 TINFO : restore /dev/memcg/memory.use_hierarchy failed
/data/ltp/testcases/bin/memcg_lib.sh: line 248: 7123 Killed memcg_process $2 -s $3
memcg_function_test 24 TPASS : process 7123 is killed
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 25 TINFO : restore /dev/memcg/memory.use_hierarchy failed
/data/ltp/testcases/bin/memcg_lib.sh: line 237: 7134 Segmentation fault memcg_process $2 -s $3
memcg_function_test 25 TPASS : process 7134 is killed
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 26 TINFO : restore /dev/memcg/memory.use_hierarchy failed
/data/ltp/testcases/bin/memcg_lib.sh: line 248: 7147 Killed memcg_process $2 -s $3
memcg_function_test 26 TPASS : process 7147 is killed
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 27 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 27 TPASS : input=4095, limit_in_bytes=4096
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 28 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 28 TPASS : input=4097, limit_in_bytes=8192
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 29 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 29 TPASS : input=1, limit_in_bytes=4096
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 30 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 30 TPASS : echo -1 > memory.limit_in_bytes passed as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 31 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 31 TPASS : echo 1.0 > memory.limit_in_bytes failed as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 32 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 32 TPASS : echo 1xx > memory.limit_in_bytes failed as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 33 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 33 TPASS : echo xx > memory.limit_in_bytes failed as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 34 TINFO : restore /dev/memcg/memory.use_hierarchy failed
/data/ltp/testcases/bin/test.sh: line 249: echo: write error: Invalid argument
memcg_function_test 34 TFAIL : echo 1 > memory.force_empty failed unexpectedly
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 35 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 35 TPASS : echo 1 > memory.force_empty failed as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 36 TINFO : restore /dev/memcg/memory.use_hierarchy failed
/data/ltp/testcases/bin/test.sh: line 249: echo: write error: Invalid argument
memcg_function_test 36 TFAIL : echo 0 > memory.force_empty failed unexpectedly
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 37 TINFO : restore /dev/memcg/memory.use_hierarchy failed
/data/ltp/testcases/bin/test.sh: line 249: echo: write error: Invalid argument
memcg_function_test 37 TFAIL : echo 1.0 > memory.force_empty failed unexpectedly
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 38 TINFO : restore /dev/memcg/memory.use_hierarchy failed
/data/ltp/testcases/bin/test.sh: line 249: echo: write error: Invalid argument
memcg_function_test 38 TFAIL : echo 1xx > memory.force_empty failed unexpectedly
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 39 TINFO : restore /dev/memcg/memory.use_hierarchy failed
/data/ltp/testcases/bin/test.sh: line 249: echo: write error: Invalid argument
memcg_function_test 39 TFAIL : echo xx > memory.force_empty failed unexpectedly
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 40 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 40 TPASS : echo 1 > /dev/memcg/memory.force_empty failed as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 41 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 41 TINFO : Running memcg_process --mmap-anon -s 4096
memcg_function_test 41 TINFO : Warming up pid: 7281
memcg_function_test 41 TINFO : Process is still here after warm up: 7281
memcg_function_test 41 TPASS : rss is 4096 as expected
memcg_function_test 42 TPASS : rss is 0 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 43 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 43 TINFO : Running memcg_process --mmap-anon -s 4096
memcg_function_test 43 TINFO : Warming up pid: 7303
memcg_function_test 43 TINFO : Process is still here after warm up: 7303
memcg_function_test 43 TPASS : rss is 4096 as expected
memcg_function_test 44 TPASS : rss is 0 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 45 TINFO : restore /dev/memcg/memory.use_hierarchy failed
memcg_function_test 45 TINFO : Running memcg_process --mmap-anon -s 4096
memcg_function_test 45 TINFO : Warming up pid: 7325
memcg_function_test 45 TINFO : Process is still here after warm up: 7325
memcg_function_test 45 TPASS : rss is 4096 as expected
memcg_function_test 46 TPASS : rss is 0 as expected
/data/ltp/testcases/bin/memcg_lib.sh: line 428: echo: write error: Device or resource busy
memcg_function_test 47 TINFO : restore /dev/memcg/memory.use_hierarchy failed
<<<execution_status>>>
initiation_status="ok"
duration=78 termination_type=exited termination_id=1 corefile=no
cutime=122 cstime=565
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20160510

   ###############################################################

        Done executing testcases.
        LTP Version:  20160510
   ###############################################################

`

memcg_function_test.sh total_case=38, but show 47 above.

By debug, I find into tst_resm funcion two times, so as follow:
memcg_function_test 6 TPASS : rss is 4096 as expected
memcg_function_test 7 TPASS : rss is 0 as expected
At this time, TST_COUNT add two times, lead to number error.

mremap01 is TBROK on ppc64le

<<<test_start>>>
tag=mremap01 stime=1472852641
cmdline="mremap01"
contacts=""
analysis=exit
<<<test_output>>>
mremap01    1  TBROK  :  tst_sig.c:233: unexpected signal SIGBUS(7) received (pid = 15068).
mremap01    2  TBROK  :  tst_sig.c:233: Remaining cases broken
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=2 corefile=no
cutime=17 cstime=12
<<<test_end>>>

Logs and test setup: https://openqa.suse.de/tests/539272#downloads.

How to run LTP for many different linux kernels on local PC?

Hi, I only want to test kernel which base on linux kernel, such as android kernel, not all linux features. Can I use this LTP frawork to test android kernel on my PC? Here, I have built android OS image, and I don't want to flash this image to any device. Is it possiable? Can any one help me? Thanks so much~

ptrace tests fail to build with glibc-2.18

sys/ptrace.h from glibc-2.18 defines ptrace_peeksiginfo_args which is also defined in linux/ptrace.h

This breaks the build on the ptrace tests:

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_FORTIFY_SOURCE=2 -I/home/test/src/toolchain/ltp/testcases/kernel/include -I../../../../include -I../../../../include -L../../../../lib ptrace04.c -lltp -o ptrace04
In file included from ptrace.h:22:0,
from ptrace04.c:18:
/usr/include/linux/ptrace.h:58:8: error: redefinition of 'struct ptrace_peeksiginfo_args'
struct ptrace_peeksiginfo_args {
^
In file included from ptrace.h:9:0,
from ptrace04.c:18:
/usr/include/sys/ptrace.h:191:8: note: originally defined here
struct ptrace_peeksiginfo_args

LTP tries to build open-posix tests with default cc even if custom compiler is provided

On master I configure LTP to be build with GCC5:

CC=/usr/bin/gcc-5 ./configure --with-open-posix-testsuite
make -j$(getconf _NPROCESSORS_ONLN) all

All but open-posix tests are built with GCC5. The open-posix test are attempted to be build with stock GCC (/usr/bin/gcc I guess) which is not present in my installation (SLES 12SP1 with GCC5 from Toolchain Module):

make[5]: Leaving directory '/root/ToolchainModuleTesting/BUILD/ltp-master/testcases/kernel/include'
/usr/bin/gcc-5 -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_FORTIFY_SOURCE=2 -I/root/ToolchainModuleTesting/BUILD/ltp-master/testcases/kernel/include -I../../../../include -I../../../../include   -L../../../../lib  delete_module01.c   -lltp -o delete_module01
...
make[4]: Leaving directory '/root/ToolchainModuleTesting/BUILD/ltp-master/testcases/kernel/module/delete_module'
...
Generating buildonly Makefiles
Generating runnable Makefiles
conformance/interfaces/pthread_create/15-1.c should be test.
Generating test-tools Makefiles
make[3]: Leaving directory '/root/ToolchainModuleTesting/BUILD/ltp-master/testcases/open_posix_testsuite'
make[3]: Entering directory '/root/ToolchainModuleTesting/BUILD/ltp-master/testcases/open_posix_testsuite/conformance'
make[4]: Entering directory '/root/ToolchainModuleTesting/BUILD/ltp-master/testcases/open_posix_testsuite/conformance/behavior'
make[5]: Entering directory '/root/ToolchainModuleTesting/BUILD/ltp-master/testcases/open_posix_testsuite/conformance/behavior/timers'
/bin/sh: cc: command not found
conformance/behavior/timers/1-1 compile FAILED; SKIPPING
/bin/sh: cc: command not found
conformance/behavior/timers/2-1 compile FAILED; SKIPPING
make[5]: Leaving directory '/root/ToolchainModuleTesting/BUILD/ltp-master/testcases/open_posix_testsuite/conformance/behavior/timers'
...

writev03 FAIL in linux 4.4.32

writev03 0 TINFO : Enter block 1
writev03 1 TFAIL : writev03.c:145: Got EFAULT
writev03 0 TINFO : Exit block 1
writev03 0 TINFO : Enter block 2
writev03 2 TFAIL : writev03.c:167: Got EFAULT
writev03 0 TINFO : Exit block 2
writev03 0 TINFO : Enter block 3
writev03 3 TFAIL : writev03.c:191: Got EFAULT
writev03 0 TINFO : Exit block 3

dma_thread_diotest supposed to always TFAIL ?

We are using LTP in the AGL project, and have the following bug report :
https://jira.automotivelinux.org/browse/SPEC-88

Basically, data corruption is detected by the test ; but reading the Linux kernel man page in its latest version : http://man7.org/linux/man-pages/man2/open.2.html ("O_DIRECT I/Os should never be run concurrently with the fork(2) system call")

And we can see in the test source code that it is using the O_DIRECT flag :
https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/io/direct_io/dma_thread_diotest.c#L376
together with fork() :
https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/io/direct_io/dma_thread_diotest.c#L205

Hence my question : is the test failure an intended behaviour, and if it is, should we ignore it completely ?

(PS : tested on MMC with a ext3 file system)

tst_rmdir() does not clean after itself.

I've noticed, that in lots of tests are creating TMP directory using tst_tmpdir() and removing it with tst_rmdir(), which stills leaves some allocated memory hanging. For example kernel/sycalls/open/open3. Relevant piece from Valgrind:

$ valgrind --leak-check=full --track-origins=yes --show-leak-kinds=all ./open03

==13942== HEAP SUMMARY:
==13942==     in use at exit: 15 bytes in 1 blocks
==13942==   total heap usage: 3 allocs, 2 frees, 32,840 bytes allocated
==13942== 
==13942== 15 bytes in 1 blocks are still reachable in loss record 1 of 1
==13942==    at 0x4C2C857: malloc (vg_replace_malloc.c:291)
==13942==    by 0x4EBC729: strdup (strdup.c:42)
==13942==    by 0x406022: tst_tmpdir (tst_tmpdir.c:156)
==13942==    by 0x40267F: main (open03.c:85)
==13942== 
==13942== LEAK SUMMARY:
==13942==    definitely lost: 0 bytes in 0 blocks
==13942==    indirectly lost: 0 bytes in 0 blocks
==13942==      possibly lost: 0 bytes in 0 blocks
==13942==    still reachable: 15 bytes in 1 blocks
==13942==         suppressed: 0 bytes in 0 blocks

Would it be logical to clean-up during tst_rmdir() call?

Pass foreign to AM_INIT_AUTOMAKE

If I grab the git repo and run autoreconf, I get this error:

Makefile.am: error: required file './NEWS' not found
Makefile.am: error: required file './ChangeLog' not found

As LTP doesn't use GNU standards you'll want to tell automake this by having in configure.ac:

AM_INIT_AUTOMAKE([foreign])

As a sidenote, you could replace include/mk/automake.mk with just "autoreconf" for the bootstrap. After that

pthread_barrier_destroy_2-1 should be dropped

After glibc-2.23, the algorithm of pthread_barrier is changed by:

commit b02840bacdefde318d2ad2f920e50785b9b25d69
Author: Torvald Riegel [email protected]
Date: Wed Jun 24 14:37:32 2015 +0200

New pthread_barrier algorithm to fulfill barrier destruction requirements. 

The previous barrier implementation did not fulfill the POSIX requirements 
for when a barrier can be destroyed. Specifically, it was possible that 
threads that haven't noticed yet that their round is complete still access 
the barrier's memory, and that those accesses can happen after the barrier 
has been legally destroyed. 
The new algorithm does not have this issue, and it avoids using a lock 
internally. 

After the change:

  • /* Destroying a barrier is only allowed if no thread is blocked on it.
  • Thus, there is no unfinished round, and all modifications to IN will
  • have happened before us (either because the calling thread took part
  • in the most recent round and thus synchronized-with all other threads
  • entering, or the program ensured this through other synchronization).
  • We must wait until all threads that entered so far have confirmed that
  • they have exited as well. To get the notification, pretend that we have
  • reached the reset threshold. */

But the test pthread_barrier_destroy_2-1 is to test destroying the barrier while child is waiting/blocked, it will return EBUSY before glibc-2.23, but after, it will never return if there is thread blocked.

So I think the test is invalid anymore.

Cannot run test when root FS in RO-mode

Because zoo-file created in root-fs (which could be read-only) - test case failed with error:
pan(8410): Could not open zoo as "8410", errno:30 Read-only file system

inotify06 is TBROK on s390x

<<<test_start>>>
tag=inotify06 stime=1472860628
cmdline="inotify06"
contacts=""
analysis=exit
<<<test_output>>>
inotify06    1  TBROK  :  inotify06.c:104: inotify_init failed: errno=EMFILE(24): Too many open files
inotify06    2  TBROK  :  inotify06.c:104: Remaining cases broken
inotify06    0  TWARN  :  tst_tmpdir.c:219: tst_rmdir: rmobj(/tmp/tmpdir/ltp-QVLX1Calrh/inoKxGKBW) failed: unlink(/tmp/tmpdir/ltp-QVLX1Calrh/inoKxGKBW/fname_0) failed; errno=2: No such file or directory
inotify06    1  TBROK  :  safe_macros.c:370: inotify06.c:96: unlink(fname_2) failed: errno=ENOENT(2): No such file or directory
inotify06    2  TBROK  :  safe_macros.c:370: Remaining cases broken
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=6 corefile=no
cutime=0 cstime=0
<<<test_end>>>

Logs and test setup here: https://openqa.suse.de/tests/539803#downloads

prot_hsymlinks fail on read only remote machine

2016-08-26T12:07:51 Test: prot_hsymlinks Testparm: prot_hsymlinks
useradd: cannot lock /etc/passwd; try again later.
userdel: user 'hsym' does not exist
prot_hsymlinks 1 TBROK : prot_hsymlinks.c:320: Failed to run cmd: useradd hsym
prot_hsymlinks 2 TBROK : prot_hsymlinks.c:320: Remaining cases broken
prot_hsymlinks 3 TBROK : prot_hsymlinks.c:320: Failed to run cmd: userdel -r hsym
prot_hsymlinks 4 TBROK : tst_sig.c:233: unexpected signal SIGIOT/SIGABRT(6) received (pid = 24146).
prot_hsymlinks 5 TBROK : tst_sig.c:233: unexpected signal SIGIOT/SIGABRT(6) received (pid = 24146)
......
I run tests on read-only remote machine #87
I think it should return 32 test not supported in case of read-only file system

Many scripts citing /bin/sh use BASH-specific features

Recent Debian distributions (Squeeze and Wheezy) ship with a variant of the Almquist Shell as /bin/sh. This trips up many scripts which presume /bin/bash is /bin/sh, including runltp and ltpmenu and many test-running scripts such as testscripts/runEALtests.sh and testcases/kernel/fs/doio/rwtest. Most blatant symptom is the use of '[[' in place of '['.

First noticed when playing with ltp-20140115 but still visible in master/HEAD as of 2014-03-20 (commit SHA of bc63a8f).

utimensat01 failed in linux 4.4.32

Testing immutable append-only file, owned by self

***** Testing times==NULL case *****
Pathname test
Owner=nobody; perms=-rw-------; EFAs=Immutable,Append_Only,Extents
./utimensat01 -q /tmp/ltp-k5Jun7qhjX/utimensat_tests/utimensat.test_file
EXPECTED: EACCES
RESULT: EPERM
utimensat01 67 TFAIL : FAILED test 67

runall test including possible resets

Hallo all,
first of all, thank your for this project.
I'm using LTP to test embedded devices and my primer target is to monitor state of system development.
The problem which i have is that some LTP test may cause system reset (it is kind of normal), and i wont to be able to continue the test, and gether all possible results including reset events.

I didn't found any LTP tool with this functionality. If there are some, please point me. If there are nothing ready to use, where is the best place to begin and make it upstream ready?

LTP supported Architechtures

1.What are the architectures supported by LTP.(ARM,PPC).

LTP is written with portability in mind so it should run basically on anything Linux based (new architectures may require tweaks in LTP syscall tables in testcases/kernel/include though).

ARM and PPC should work just fine.

2.I have also considered LAVA & Auto test, which will be best suited for my job

You are mixing apples and oranges here. LTP is a testsuite which is collection of tests, LAVA and Auto test are frameworks to install machines and run testsuites. As a matter of fact both LAVA and Auto test can run LTP as well.

inotify.03: missing warning concerning loss of data

testcases/kernel/syscalls/inotify/inotify03.c
should warn that the drive used for testing will be formatted and this will result in data loss. Only after confirmation by the user the test should continue.

Furthermore, please, add the test to
testcases/kernel/syscalls/inotify/README

fsstress -l 0 does not loop forever

When I run the latest fsstress (as of commit 0841eee) with the -l 0 option, the program exits almost immediately:

time ./fsstress -X -w -d /tmp/fsstress-dir -l 0 -n 100 -p 100 -s urandom
seed = 1427394847

real 0m1.770s
user 0m0.073s
sys 0m0.732s

Is this as intended?

Cross compiling LTP

The INSTALL file says:

= start =
To cross compile, you must specify the correct variables:

  1. When running configure (CC, CXX, CXXFLAGS, LDLIBS, etc).
  2. Manually edit include/mk/config.mk, as described in Configuration.

Note: Do not specify variables on the command-line. Use config.mk instead.
= end =

I copied include/mk/config.mk.default to include/mk/config.mk and edited include/mk/config.mk to include the my cross-compile variables:

CROSS_COMPILE :=
SYSROOT := --sysroot=
CC := $(CROSS_COMPILE)gcc $(SYSROOT)
LD := $(CROSS_COMPILE)ld $(SYSROOT)

I then ran "./configure --host=x86_64-linux-gnu --prefix=/nobackup/awardak/ltp/ltp-full-20140115/build/" and it overwrote my config.mk changes above.

How do I properly set my cross compilation env?

Thanks,
Aman

Gcov Branch test coverage can not reach 100%(Single line statement is considered branch)

when I worked on my test coverage project, an issue was occured.my program lists below:
/_/
qtDrwDbus::qtDrwDbus()
{
qRegisterMetaType("InfoStruct");
}
/_
/
Gcov was used to test coverage of this program,however,the "qRegisterMetaType("InfoStruct");" be considered as a branch,so that the branch test coverage rate was decreased.

Please help explain the reason of the problem and how to solve the problem !Thank you

perf_event_open01.c:158: perf_event_open failed unexpectedly: TEST_ERRNO=EOPNOTSUPP(95): Operation not supported

For some reason this test is always failing.

root@mx6q:/opt/ltp# ./testcases/bin/perf_event_open01
perf_event_open01 1 TFAIL : perf_event_open01.c:158: perf_event_open failed unexpectedly: TEST_ERRNO=EOPNOTSUPP(95): Operation not supported

At same time perf_event_open02 seems to work properly.
root@mx6q:/opt/ltp# ./testcases/bin/perf_event_open02
perf_event_open02 0 TINFO : overall task clock: 254455926
perf_event_open02 0 TINFO : hw sum: 1800001050, task clock sum: 1525280694
perf_event_open02 0 TINFO : ratio: 5.994282
perf_event_open02 1 TPASS : test passed

IMO, if perf_event_open01 filed becouse this operation is not supported, then it should return 32 instead of 1.

mtest06_3 do not using custom tmp ltp folder

mtest06_3 failed with this log:

2016-06-23T10:51:53 Test: mtest06_3 Testparm: mmap3 -x 0.002 -p
mkfile(): mkstemp(): Read-only file system
main(): mkfile(): Failed to create temp file.
mkfile(): mkstemp(): Read-only file system

I run tests on readonly remote machine, for more info see:
#57

looks like mmap3 is ignoring LTPTMP env variable.

umount tests fail on x86_64 (in Qemu) on Ext4 loop device

<<<test_start>>>
tag=umount01 stime=1472853322
cmdline="umount01"
contacts=""
analysis=exit
<<<test_output>>>
mke2fs 1.42.11 (09-Jul-2014)
umount01    0  TINFO  :  Using test device LTP_DEV='/dev/loop1'
umount01    0  TINFO  :  Formatting /dev/loop1 with ext2 opts='' extra opts=''
umount01    0  TINFO  :  umount() failed with EBUSY possibly some daemon (gvfsd-trash) is probing newly mounted dirs
umount01    1  TFAIL  :  umount01.c:71: umount(2) Failed while  unmounting mntpoint errno = 16 : Device or resource busy
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=1 cstime=2
<<<test_end>>>
<<<test_start>>>
tag=umount02 stime=1472853322
cmdline="umount02"
contacts=""
analysis=exit
<<<test_output>>>
mke2fs 1.42.11 (09-Jul-2014)
/dev/loop1 is mounted; will not make a filesystem here!
umount02    0  TINFO  :  Using test device LTP_DEV='/dev/loop1'
umount02    0  TINFO  :  Formatting /dev/loop1 with ext2 opts='' extra opts=''
umount02    1  TBROK  :  tst_mkfs.c:81: mkfs.ext2 failed with 1
umount02    2  TBROK  :  tst_mkfs.c:81: Remaining cases broken
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=2 corefile=no
cutime=0 cstime=0
<<<test_end>>>
<<<test_start>>>
tag=umount03 stime=1472853322
cmdline="umount03"
contacts=""
analysis=exit
<<<test_output>>>
mke2fs 1.42.11 (09-Jul-2014)
/dev/loop1 is mounted; will not make a filesystem here!
umount03    0  TINFO  :  Using test device LTP_DEV='/dev/loop1'
umount03    0  TINFO  :  Formatting /dev/loop1 with ext2 opts='' extra opts=''
umount03    1  TBROK  :  tst_mkfs.c:81: mkfs.ext2 failed with 1
umount03    2  TBROK  :  tst_mkfs.c:81: Remaining cases broken
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=2 corefile=no
cutime=0 cstime=1
<<<test_end>>>
<<<test_start>>>
tag=umount2_01 stime=1472853322
cmdline="umount2_01"
contacts=""
analysis=exit
<<<test_output>>>
mke2fs 1.42.11 (09-Jul-2014)
/dev/loop1 is mounted; will not make a filesystem here!
umount2_01    0  TINFO  :  Using test device LTP_DEV='/dev/loop1'
umount2_01    0  TINFO  :  Formatting /dev/loop1 with ext2 opts='' extra opts=''
umount2_01    1  TBROK  :  tst_mkfs.c:81: mkfs.ext2 failed with 1
umount2_01    2  TBROK  :  tst_mkfs.c:81: Remaining cases broken
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=2 corefile=no
cutime=0 cstime=0
<<<test_end>>>
<<<test_start>>>
tag=umount2_02 stime=1472853322
cmdline="umount2_02"
contacts=""
analysis=exit
<<<test_output>>>
mke2fs 1.42.11 (09-Jul-2014)
/dev/loop1 is mounted; will not make a filesystem here!
umount2_02    0  TINFO  :  Using test device LTP_DEV='/dev/loop1'
umount2_02    0  TINFO  :  Formatting /dev/loop1 with ext2 opts='' extra opts=''
umount2_02    1  TBROK  :  tst_mkfs.c:81: mkfs.ext2 failed with 1
umount2_02    2  TBROK  :  tst_mkfs.c:81: Remaining cases broken
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=2 corefile=no
cutime=0 cstime=0
<<<test_end>>>
<<<test_start>>>
tag=umount2_03 stime=1472853322
cmdline="umount2_03"
contacts=""
analysis=exit
<<<test_output>>>
mke2fs 1.42.11 (09-Jul-2014)
/dev/loop1 is mounted; will not make a filesystem here!
umount2_03    0  TINFO  :  Using test device LTP_DEV='/dev/loop1'
umount2_03    0  TINFO  :  Formatting /dev/loop1 with ext2 opts='' extra opts=''
umount2_03    1  TBROK  :  tst_mkfs.c:81: mkfs.ext2 failed with 1
umount2_03    2  TBROK  :  tst_mkfs.c:81: Remaining cases broken
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=2 corefile=no
cutime=0 cstime=1
<<<test_end>>>

Logs and test setup: https://openqa.suse.de/tests/539393#downloads

new access01 tests fail as root

Is running this test as root unsupported? Here is the output:
<<<test_output>>>
access01.c:88: PASS: access(accessfile_rwx, F_OK)
incrementing stop
access01.c:88: PASS: access(accessfile_rwx, X_OK)
access01.c:88: PASS: access(accessfile_rwx, W_OK)
access01.c:88: PASS: access(accessfile_rwx, R_OK)
access01.c:88: PASS: access(accessfile_rwx, R_OK|W_OK)
access01.c:88: PASS: access(accessfile_rwx, R_OK|X_OK)
access01.c:88: PASS: access(accessfile_rwx, W_OK|X_OK)
access01.c:88: PASS: access(accessfile_rwx, R_OK|W_OK|X_OK)
access01.c:88: PASS: access(accesfile_x, X_OK)
access01.c:88: PASS: access(accesfile_w, W_OK)
access01.c:88: PASS: access(accesfile_r, R_OK)
access01.c:105: PASS: access(accesfile_r, X_OK): EACCES
access01.c:95: FAIL: access(accesfile_r, W_OK) succeded unexpectedly
access01.c:95: FAIL: access(accesfile_w, R_OK) succeded unexpectedly
access01.c:105: PASS: access(accesfile_w, X_OK): EACCES
access01.c:95: FAIL: access(accesfile_x, R_OK) succeded unexpectedly
access01.c:95: FAIL: access(accesfile_x, W_OK) succeded unexpectedly
access01.c:105: PASS: access(accesfile_r, W_OK|X_OK): EACCES
access01.c:105: PASS: access(accesfile_r, R_OK|X_OK): EACCES
access01.c:95: FAIL: access(accesfile_r, R_OK|W_OK) succeded unexpectedly
access01.c:105: PASS: access(accesfile_r, R_OK|W_OK|X_OK): EACCES
access01.c:105: PASS: access(accesfile_w, W_OK|X_OK): EACCES
access01.c:105: PASS: access(accesfile_w, R_OK|X_OK): EACCES
access01.c:95: FAIL: access(accesfile_w, R_OK|W_OK) succeded unexpectedly
access01.c:105: PASS: access(accesfile_w, R_OK|W_OK|X_OK): EACCES
access01.c:95: FAIL: access(accesfile_x, W_OK|X_OK) succeded unexpectedly
access01.c:95: FAIL: access(accesfile_x, R_OK|X_OK) succeded unexpectedly
access01.c:95: FAIL: access(accesfile_x, R_OK|W_OK) succeded unexpectedly
access01.c:95: FAIL: access(accesfile_x, R_OK|W_OK|X_OK) succeded unexpectedly

max_map_count: do not count [vdso] mapping on ia64

I'm getting this on rhel5 on Itanium:
max_map_count 0 TINFO : set overcommit_memory to 2
max_map_count 0 TINFO : set max_map_count to 64
max_map_count 0 TINFO : set overcommit_memory to 2
max_map_count 0 TINFO : set max_map_count to 64
max_map_count 1 TFAIL : 66 map entries in total, but expected 64 entries
max_map_count 0 TINFO : set max_map_count to 256
max_map_count 0 TINFO : set overcommit_memory to 2
max_map_count 0 TINFO : set max_map_count to 64
max_map_count 1 TFAIL : 66 map entries in total, but expected 64 entries
max_map_count 0 TINFO : set max_map_count to 256
max_map_count 2 TFAIL : 258 map entries in total, but expected 256 entries
...

A possible fix is:

--- a/testcases/kernel/mem/tunable/max_map_count.c
+++ b/testcases/kernel/mem/tunable/max_map_count.c
@@ -137,6 +137,18 @@ static int filter_map(char *line)
{
return strncmp(line, "ffff0000-ffff1000", 17) == 0;
}
+#elif defined(ia64)
+static int filter_map(char *line)
+{

  •   char buf[BUFSIZ];
    
  •   int ret;
    
  •   ret = sscanf(line, "%_p-%_p %_4s %_p %_2d:%_2d %*d %s", buf);
    
  •   if (ret != 1)
    
  •           return 0;
    
  •   return strcmp(buf, "[vdso]") == 0;
    
    +}
    #else
    static int filter_map(char *line)
    {

Error in compiling setxattr01

LTP fails to compile on a SLES12 new release, my system has the following specs:

  • distro: SLES12 with kernel 4.4.16-56-default
  • glibc-2.22-48.44.x86_64
  • gcc 4.8.5

The errors I'm getting are:

make[5]: Leaving directory '/root/ltp/testcases/kernel/include'
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -I/root/ltp/testcases/kernel/include -I../../../../include -I../../../../include -I../../../../include/old/   -L../../../../lib  mount01.c   -lltp -o mount01
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -I/root/ltp/testcases/kernel/include -I../../../../include -I../../../../include -I../../../../include/old/   -L../../../../lib  setuid_test.c   -lltp -o setuid_test
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -I/root/ltp/testcases/kernel/include -I../../../../include -I../../../../include -I../../../../include/old/   -L../../../../lib  mount04.c   -lltp -o mount04
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -I/root/ltp/testcases/kernel/include -I../../../../include -I../../../../include -I../../../../include/old/   -L../../../../lib  mount02.c   -lltp -o mount02
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -I/root/ltp/testcases/kernel/include -I../../../../include -I../../../../include -I../../../../include/old/   -L../../../../lib  mount06.c   -lltp -o mount06
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -I/root/ltp/testcases/kernel/include -I../../../../include -I../../../../include -I../../../../include/old/   -L../../../../lib  mount05.c   -lltp -o mount05
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -I/root/ltp/testcases/kernel/include -I../../../../include -I../../../../include -I../../../../include/old/   -L../../../../lib  mount03.c   -lltp -o mount03
mount03.c: In function ‘test_rwflag’:
mount03.c:210:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (write(fildes, write_buffer, strlen(write_buffer)) !=
                                                         ^
make[4]: Leaving directory '/root/ltp/testcases/kernel/syscalls/mount'
make[4]: Entering directory '/root/ltp/testcases/kernel/syscalls/bdflush'
make -C "/root/ltp/testcases/kernel/include" -f "/root/ltp/testcases/kernel/include/Makefile" all
make[5]: Entering directory '/root/ltp/testcases/kernel/include'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/root/ltp/testcases/kernel/include'
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_FORTIFY_SOURCE=2 -I/root/ltp/testcases/kernel/include -I../../../../include -I../../../../include -I../../../../include/old/   -L../../../../lib  bdflush01.c   -lltp -o bdflush01
make[4]: Leaving directory '/root/ltp/testcases/kernel/syscalls/bdflush'
make[4]: Entering directory '/root/ltp/testcases/kernel/syscalls/setxattr'
make -C "/root/ltp/testcases/kernel/include" -f "/root/ltp/testcases/kernel/include/Makefile" all
make[5]: Entering directory '/root/ltp/testcases/kernel/include'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/root/ltp/testcases/kernel/include'
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -D_FORTIFY_SOURCE=2 -I/root/ltp/testcases/kernel/include -I../../../../include -I../../../../include -I../../../../include/old/   -L../../../../lib  setxattr01.c   -lltp -o setxattr01
**setxattr01.c:102:14: error: ‘ENOATTR’ undeclared here (not in a function)
   .exp_err = ENOATTR,**
              ^
<builtin>: recipe for target 'setxattr01' failed
make[4]: *** [setxattr01] Error 1
make[4]: Leaving directory '/root/ltp/testcases/kernel/syscalls/setxattr'
../../../include/mk/generic_trunk_target.inc:93: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/root/ltp/testcases/kernel/syscalls'
../../include/mk/generic_trunk_target.inc:93: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/root/ltp/testcases/kernel'
../include/mk/generic_trunk_target.inc:93: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/root/ltp/testcases'
Makefile:114: recipe for target 'testcases-all' failed
make: *** [testcases-all] Error 2

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.