Linux Test Project

LTP Changes during DECEMBER 2009


DECEMBER 09 Changelog

LTP Changes during NOVEMBER 2009


NOVEMBER 09 Changelog

LTP Changes during OCTOBER 2009


OCTOBER 09 Changelog

LTP Changes during SEPTEMBER 2009


September 2009 Changelog

LTP Changes during AUGUST 2009


August 2009 Changelog

LTP Changes during JULY 2009


July 2009 Changelog

LTP Changes during JUNE 2009


June 2009 Changelog

LTP Changes during MAY 2009


May 2009 Changelog

LTP Changes during APRIL 2009


April 2009 Changelog_1 and April 2009 Changelog_2

LTP Changes during MARCH 2009


March 2009 Changelog

LTP Changes during FEBRUARY 2009


Feb09 Changelog

LTP Changes during JANUARY 2009

Task Title

Task Description

PIDNS13 fix

Please find a patch to fix the sigsegv error on pidns13.c on containers. Signed-off-by: Veerendra C <>.

V4L2 test enhancements

Today I released version 0.3 of v4l-test, see for details. I also updated the LTP tree, and I attached the two files in this email. The first file is a patch against ltp-full-20081231. The second file is a tar.gz which contains the binary image files which are part of the original V4L2 API specification, revision 0.24. Signed-Off-By: Németh Márton <>.


Introduce autoconf to inotify03.c. Signed-off-by: Masatake YAMATO <>.

AUTOCONF error reporting info

The way to report a bug about configure: Introducing autoconf still causes a troble. Shooting the trouble may not be so difficult. However, some information is needed. I'll write them on INSTALL file. Signed-off-by: Masatake YAMATO <>.

UNZIP fix for Soft Links

Convert hardlinks to softlinks in testcases/commands/unzip/Makefile: Kamalesh Babulal <> wrote: The make install of the testcases/commands/ unzip fails, when the ltp sources are mounted on different filesystem other than /tmp, because the hardlinks are created by the testcase Makefile. This patches converts the hardlinks to softlinks. Signed-off-by: Kamalesh Babulal <>. CAI Qian <> replied: Are you really want to change the above two soft links to hard links? I do not see it helps to fix your problem, and it will leave broken links after "make clean". Kamalesh Babulal <> replied: Thanks for the review. I am resending the patch with the changes you have recommended. Signed-off-by: Kamalesh Babulal <>.

mmapstress03 fix: return back MAP_FIXED flag to mmap

There is a testcase in mmapstress03, which checks, that we can't mmap 2Gb-512Kb of RAM at address 0x7ff80000. But if host has > 2Gb of RAM+swap - it's valid operation: mmap maps 2Gb of ram at some other address and returns no errors. For correct working of this testcase we should add MAP_FIXED flag to mmap. Signed-Off-By: Dmitry Guryanov <>.

mmapstress03 fix: on x86_64:

There is a testcase in mmapstress03, which tries to mmap 2Gb-4Kb at address 0x7ffff000 and checks it returns error and errno is set to ENOMEM. But such mmap is possible on x86_64. So lets tune size and address to more suitable for 64-bit architectures. Signed-Off-By: Dmitry Guryanov <>.

madvise03 fix

madvice03: report TCONF instead of TWARN on old kernels: If kernel is too old for executing this test, we should report TCONF for exit code will be 0. Signed-Off-By: Dmitry Guryanov <>.

endian_switch01 fix

Nancy<> reported:Case "endian_switch01" FAIL on IBM Power 6 machine. The case failed on IBM JS22, p570 and p550. Is that the case bug or the OS bug? Thank you!. Subrata Modak <> replied: This will fail for all POWER machines which are not P6 & above, and, for all other archs. However, for other archs, it will throw you appropriate message like: $./testcases/bin/endian_switch01 endian_switch01 1 CONF : This system does not support running of switch() syscall. In P6 (and above), even it will fail if the kernel is not 2.6.26 & above. The support for this syscall was added only from then. Please see:;a=commit;h=745a14cc264b1832c638e41812e0cb04328b2db1. If you are running 2.6.26 on p6, then we need to investigate why this is failing, else, i would prefer to merge the following patch for avoiding to test in systems where the switch() support is not available at the first place itself. Signed-Off-By: Subrata Modak <>,

SELINUX reference Policy updates

This patch adds RHEL4 and RHEL5 detection to refpolicy Makefile and fixes policy compilation errors on RHEL5 introduced by the bounds test policy. Signed-off-by: Ramon de Carvalho Valle <>.


checking sys/capability.c for pidns14 and pidns16: this patch adds "sys/capability.c" checking for pidns14 and pidns16 testcases using autoconf support. Signed-off-by: Edjunior B. Machado <>.

TCORE build fix for non x86 systems

Edjunior Barbosa Machado <> wrote: in a ppc64 machine running SLES11 RC1, I'm trying to build the December 2008 LTP release (ltp-full-20081231) but it fails on "make". Mike Frysinger <> replied: tcore only works on x86 systems ... building /running on other systems makes no sense. Subrata Modak <> answered: Mike, Then the following Patch will be needed: Signed-Off-By: Subrata Modak <>.

VMSPLICE01 syntax Fix

A while back I had submitted an LTP patch for the vmsplice01 test case (sent on 03/27/2008). However, the code I see in the vmsplice01.c file now is not what the patch contains. Please find below the correction against the latest ltp release : Signed-off by: Vinay Sridhar <>.

NLS Device Drivers Build fixes for 2.6.25

Update kernel/device-drivers/nls test for 2.6.25: the attached patch makes the ltp/testcases/kernel/device-drivers/nls testsuite compileable under Linux kernel 2.6.25. Currently the test_nls_base() crashes with 2.6.25, but without calling that function the module loads and unloads cleanly. This can be a base for checking what is going wrong with nls. Signed-off-by: Márton Németh <>.

Release of GCOV Patches for 2.6.28


Sending the new patch along with the batch file to run the tests. Also made small modifications in the mesgq_nstest.c to fix: a) the warnings on tst_exit(). b) to remove the global var. And to return correct error num in the batch file Signed-off-by: Veerendra C <>.

TCORE build fix for non x86 systems

Avoiding build failures on ppc64, adding proper FLAG definitions and improving a bit of LTP specific stuff. Signed-Off-By: Subrata Modak <>. set flags properly and just use implicit make rules. Mike Frysinger <>

BLOCK Device Drivers Tests addition

I attached a preliminary testsuite for testing linux/block/genhd.c. The goal of this test suite is to check whether using block device is stable enough. A lot of test suites under ltp/testcases/kernel/device-drivers are based on the usage of block device so it shall work relayable. Note that the module under test is different in case of ltp/testcases/kernel/device-drivers/tbio/kernel_space testsuite. Signed-off-by: Márton Németh <>.

NLS Device Drivers documentation updates

[2nd Updates for kernel/device-drivers/nls test for 2.6.25]: Németh Márton initially wrote: the attached patch makes the ltp/testcases/kernel/device-drivers/nls testsuite compileable under Linux kernel 2.6.25. Currently the test_nls_base() crashes with 2.6.25, but without calling that function the module loads and unloads cleanly. This can be a base for checking what is going wrong with nls. Signed-off-by: Márton Németh <>. Subrata Modak replied: Thanks Németh for the patch. I tested the build on my machine 2.6.27, x86_64. I have merged this Patch. However, i would request you to send me another patch containing the following information: 1) Kernel config options to be enabled & any special library(s) to be installed to allow these tests to be built/run on kernel(s) > 2.6.25 in the following README:, 2) Then,, should contain information to build/install/run these tests. Since these are device drivers tests, and will be executed through insmod, etc, can we have a script which automates these steps and reports error in loading/unloading of modules as such. I think it can be a very small script as well. Németh Márton responded by: I added some descriptions in the mentioned READMEs. However, I would wait adding an automated shell script because the tests fails on my x86_32 system with 2.6.28, and for example "rmmod nlsTest" reports "ERROR: Module nlsTest is in use". The real problem is, however, that the one of the test case already caused NULL pointer exception. I also don't have any easy solution to report only the nlsTest output to the user other than first running "dmesg -c" and then load nlsTest.ko. After the module was loaded the "dmesg" will only show the output of the testsuite. The drawback is that the user will loose the first part of his/her "dmesg" in this way. Signed-Off-By: Németh Márton <>.

CRON fix

Prevent false negatives in cron_pos_tests caused by returning exit value of wrong command. This patch fixes erroneous failure caused by returning return value of a wrong command in cron tests. Signed-Off-By: "Jiri Palecek " <jirka@debian.POK.IBM.COM>.

SCHED fixes

This patch fixes the following error when running sched_cli_serv test case via runltp by making the path of the data file as a runtime option and giving an absolute path of it. Signed-Off-By: CAI Qian <>.


Fix broken symlink to Creating a link to by testcases/commands/unzip/Makefile, has a problem and it seems to be fixed by So I made a fix (this patch against ltp-full-20081231). Signed-off-by: Seiichi Ikarashi <>.

MSGCTL11 fix

Fix for msgctl11.c: Resending the fix after modifications based on suggestions from Mike Frysinger. PS: I've retained SHRT_MAX return value in the patch below as per the reason stated earlier. Signed-off by: Vinay Sridhar <>. fix

I encountered a failure on running This problem seems to be introduced by, Since I don't know why it wanted to eliminate rpcinfo command, I wrote two solutions attached. Signed-off-by: Seiichi Ikarashi <>.


Adding AUTOCONF rules for eventfd syscall tests. Signed-off-by: Masatake YAMATO <>.

BLOCK Device Drivers Tests Updates

Add "tc" paramter for "block" testsuite which enables the testsuite to run test cases separately. The default value of tc is 0 which preserves the original behaviour and runs all the available test cases. A user space shell script "" is also added which helps to run the test cases in kernel space. Signed-off-by: Márton Németh <>.

Add socket02 syscall test, testing socket(SOCK_CLOEXEC) and socketpair(SOCK_CLOEXEC). Signed-Off-By: Subrata Modak<>.

Add paccept01 syscall test, testing paccept(SOCK_CLOEXEC). Signed-Off-By: Subrata Modak<>,

Add signalfd4_01 syscall test, testing signalfd4(SFD_CLOEXEC). Signed-Off-By: Subrata Modak<>,

Add eventfd2_01 syscall test, testing eventfd2(EFD_CLOEXEC). Signed-Off-By: Subrata Modak<>.

Add timerfd02 syscall test, testing timerfd_create(TFD_CLOEXEC). Signed-Off-By: Subrata Modak<>.

Add epoll_create2_01 syscall test, testing epoll_create2(EPOLL_CLOEXEC). Signed-Off-By: Subrata Modak<>.

Add dup3_01 syscall test, testing dup3 (O_CLOEXEC). Signed-Off-By: Subrata Modak<>,.

Add pipe2_01 syscall test, testing pipe2(O_CLOEXEC). Signed-Off-By: Subrata Modak<>.

Add inotify_init1_01 syscall test, testing inotify_init1(O_CLOEXEC). Signed-Off-By: Subrata Modak<>.

Add socket03 syscall test, testing socket(SOCK_NONBLOCK). Signed-Off-By: Subrata Modak<>.

Add socketpair02 syscall test, testing socketpair(SOCK_NONBLOCK). Signed-Off-By: Subrata Modak<>.

Add paccept02 syscall test, testing paccept(SOCK_NONBLOCK). Signed-Off-By: Subrata Modak<>.

Add signalfd4_02 syscall test, testing signalfd4(SFD_NONBLOCK). Signed-Off-By: Subrata Modak<>.

Add eventfd2_02 syscall test, testing eventfd2(EFD_NONBLOCK). Signed-Off-By: Subrata Modak<>.

Add timerfd03 syscall test, testing timerfd_create(TFD_NONBLOCK). Signed-Off-By: Subrata Modak<>.

Add pipe2_02 syscall test, testing pipe2(O_NONBLOCK). Signed-Off-By: Subrata Modak<

Add inotify_init1_02 syscall test, testing inotify_init1(IN_NONBLOCK). Signed-Off-By: Subrata Modak<>.

FCNTL27 & 28 Fixes

This patch fixes fcntl27 and fcntl28 test cases failures seen on RHEL 4 kernel (2.6.9 based). Because it is kernel 2.6.9, the "expected_result" will be 0. However, the actual return code is the same as other kernels like 2.6.18, as it only allow F_RDLCK option to be placed on a read-only file descriptor (man fcntl). I have no idea where is the above kernel version and expected code mapping originally came from. I have searched the manpage of fcntl(), but not found any mention of 2.6.10. Since there is a check already, #ifdef F_SETLEASE. I have removed the above code like other fcntl* test cases, but I am willing to listen other options. Signed-off-by: CAI Qian <>.


Patch to Remove Checking for "termio.c_cflag": The only way Test can handle this to make it pass is to avoid checking for this flag which is causing the trouble, which this patch does. Signed-Off-By: Subrata Modak<>.


Integrate autotools a bit more so that we can take advantage of the configure features like tool chain selection and build flags. Mike Frysinger <>

DOCUMENTATION For Makefile Variables

move documentation from Makefile to INSTALL ... patch by Masatake YAMATO. Signed-off-by: Masatake YAMATO <>.

Update to OpenHPI 2.13.2. See for more details.

AT_ALLOW01 & AT_DENY01 Fixes

The at tests copy the testscript to the home directories of newly created users. This may fail if the home directory does not exist. This patch fixes that by adding an option to create home directories to useradd. Signed-Off-By: Jiri Palecek <>.

PAN Segmentation Fault Fix

This patch fixes a segfault of pan, when the command file doesn't end with a newline. Signed-Off-By: Jiri Palecek <>.

PIDNS Fixes for Build Failures on IA64

Seiichi Ikarashi reported:: I report ia64-specific build failures and a patch for them. Since ia64 glibc does not have the clone() function call, building testcases/kernel/containers/pidns/pidns12.c fails as follows. It's same for pidns13.c, pidns14.c, pidns16.c, pidns20.c, pidns21.c, pidns30.c, and pidns31.c. They should call clone2() instead of clone(), like check_pidns_enabled.c. I attached a patch to fix them. Signed-Off-By: Seiichi Ikarashi <>. Complete mail thread:


ftest02: size of 'name' buffer must be more than 3:: name will be passed to mkname function, which will copy to it temporary directory name. So let's it will be 128 as other buffers, passed to mkname. Signed-Off-By: Dmitry Guryanov <>.


Help text needs updating then ... now we need to run make autotools. this will invoke aclocal and automake. we dont actually use automake-generated Makefiles, but the fun helper files (, config.guess, etc...) come from automake. Here is a quickfix. However, it is not perfect. Could you improve this? Signed-off-by: Masatake YAMATO <>.


Removed check_header from Makefile of io_* testcases and use autoconf instead of the macro. Signed-off-by: Masatake YAMATO <>.

SYSLOG Updates

This patch fixes the syslog tests on Debian. The tests currently fail on Debian, because they check for a nonexistent file. Besides that, this patch adds rsyslogd as another possibility to supported syslog daemons. The patch changes the detection of syslog_cmd and CONFIG_FILE names; they are all detected by checking for possible files. I have not tested it on a different distro than Debian, but it should work on them too. Signed-Off-By: Jiri Palecek <>.


lcov: remove CRLF line breaks in source code when generating html output - added patch by

AUTOMAKE 1.10 Updates

Create a dummy when running just make. Require automake-1.10. Mike Frysinger <>.


Info regarding various dependant packages for LTP build/install. Subrata Modak<>.


lcov: modify end-of-line CR removal - s///g is 10% slower than s/// - \r may be 0x10 or 0x13 (see man perlport), Peter Oberparleiter <>.


geninfo: need to add CR removal to geninfo as well or checksumming will fail. Peter Oberparleiter <>.


[PATCH 1/6] Do not cleanup if it doesn't make sense: This is the first from the series of minor patches to syslog tests. Parts inspired by CAI Qian's remarks. Resend due to line-wrapping problems. - Check for existence of the backup file before moving it back, - Do not restart syslog daemon, if syslog command was not found, Signed-off-by: Jiri Palecek <>.


[PATCH 2/6] Use TFAIL/TPASS in some syslog tests. Signed-off-by: Jiri Palecek <>.


[PATCH 3/6] Fix paths for detecting syslog daemons: Allow /usr/sbin/syslog-ng as path to syslog-ng, because this is the path used in Debian syslog-ng packages. Also, detect /sbin/rsyslogd as rsyslog, which is its location on Fedora. Signed-off-by: Jiri Palecek <>.


[PATCH 4/6] Don't check for existence of the log file before the test with syslog-ng, because it might not exist and still work correctly. Signed-off-by: Jiri Palecek <>.


[PATCH 5/6] Add support for rsyslog in not-syslog-compatible mode: This adds the configuration directive: $ModLoad; to the beginning of the syslog configuration file when using rsyslog. Signed-off-by: Jiri Palecek <>.


[PATCH 6/6] Change the message and return value used to report missing supported syslog daemon. - note rsyslog in the message, - use TCONF to report unsuitable configuration, - return 0, which corresponds to other tests failing on TCONF, Signed-off-by: Jiri Palecek <>.


CAI Qian wrote: After apply the whole series of patches with the help of '-l'. The only failure for rsyslogd is syslog06: syslog06 0 INFO : syslog: Testing the log option: LOG_NDELAY... syslogtst 1 FAIL : open() has returned unexpected fd: -1, I have noticed this line here, # cat syslogtst.c. so it is not a surprise that open() returned -1. Jiri Palecek <> wrote back: Yes, that code is a gem :-) Does it work with the attached patch?. CAI Qian tested back: It works apart from something untidy.


Fix the following build warning: Signed-Off-By: Subrata Modak <>.

Parrellel build failures in /network/lib6/Makefile

Matt Helsley reported: The dependency description in testcases/network/lib6/Makefile breaks parallel builds: This patch fixes the problem by properly expressing the build depdency between the TARGET objects and runcc.a. Signed-off-by: Matt Helsley <>. Garrett Cooper <> replied: Sorry to knitpick, but runcc.a should really be librunc"c.a; otherwise it's not really linkable with ld when using -lruncc. You could also omit the lime with CC if implicit rules are enabled. Other than that the patch looks groovy!. Matt Helsley replied back: Since the -l flag is not being used to link with runcc.a that's not a problem. -l adds the naming requirement and searches multiple directories. Otherwise gcc behaves as if it were just another .o. I think the only reason to prefer -l is if we're going to install it as a library. I checked and, as best I could tell, runcc.a is only used in the network/lib6 testcases. This means using -l has no advantages so I don't intend to change this part of the patch. In fact I can't see why they bothered making an archive at all. But that's a different change than I intend to make :). I guess I never relied much on the implicit rules -- I suppose the implicit rule compiling and linking each target will be triggered because the "empty" rule: $(TARGETS): %: %.c runcc.a did not actually wind up creating its supposed target.. Thanks for the review. I'll post an updated patch soon. This patch fixes the problem by properly expressing the build depdency between the TARGET objects and runcc.a. Rely on the implicit rules as suggested by Garrett Cooper. Signed-off-by: Matt Helsley <>.

Named PIPE Fixes for NOMMU

[Patch 1/2] Used named PIPE in test cases for NOMMU arch instead of anonymous: In NOMMU arch, anonymous PIPE can't be accessed in child process if it is started by vfork/execve. This patch use named PIPE instead. The API sync_pipe_create() and sync_pipe_close() are changed to accept PIPE name. Signed-off-by: Sonic Zhang <>.

Named PIPE Fixes for NOMMU

[Patch 2/2] Used named PIPE in test cases for NOMMU arch instead of anonymous: In NOMMU arch, anonymous PIPE can't be accessed in child process if it is started by vfork/execve. This patch uses named PIPE instead and changes related test cases accordingly. Signed-off-by: Sonic Zhang <>.

IPC Namespace test Addition

Submitting a new testcase on semaphore to test the IPCNS in the containers. This patch contains the batch file to run the test on LTP. In this patch , I am checking the IPCNS functionaity: "Semaphore in parent NS is isolated from the container". Changelog: Removed the extra semget call in the check_semaphore(). Corrected the indentation. Acked-by: Serge Hallyn <>. Signed-Off-By: Veerendra <>.

linux-2.6.28-gcov.patch Fixes

gcov-kernel: fixed problem when compiling without O= parameter - coverage measurement was not available when kernel was compiled without O= parameter - files where not found by gcov - solution: change kbuild to always use absolute paths Peter Oberparleiter <>.

HUGETLB Tests Fixes

Here it goes. What i have tried to do is fix only the broken issues, where the test case(s) will not execute if enough hugepages are not available in the system. Now, i leave it on the discrition of the user to increase the hugepages in their system before executing these tests. Else, if you all agree on some way to autoset that before test execution, it would be welcome. Signed-Off-By: Subrata Modak <>.

DIOTEST07 Addition

Modify Makefile to include dma_thread_diotest7. Add dma_thread_diotest7. Add test Add test dma_thread_diotest7 command file. Add test_dma_thread_diotest7 to Signed-Off-By: Subrata Modak<>.

IPC Namespace test Addition

Testing semaphore isolation between 2 containers: Here is a test case to test the semaphore isloation in container environment. Test Assertion: - This testcase verifies the semaphore isoloation in 2 diff containers. - It tries to create/access a semaphore created with the same KEY. changelog: version 2 * Modified testcase, to use only 2 pipe's to sync between 2 containers. * Corrected the indentation. Signed-off-by: Veerendra C <>.

IPC Namespace test Addition

Testing shmem isolation between 2 containers: Please find the testcase to test the shared memory isolation in between 2 containers. Test Assertion: - This testcase verifies the Shared Memory isoloation in 2 containers. - It tries to create/access a Shared Memory created with the same KEY. Changelog: Version2 Removed extra pipe, to use only 2 pipe's for synchronizing between containers. Corrected from TPASS to TFAIL in the print statement. Signed-off-by: Veerendra C <>.

v4l-test Tests Updates

v4l-test 0.4 for LTP: Test cases for MAX_EM28XX_INPUT, MAX_EM28XX_TVNORMS removed as they might have confusing results if the tests are not executed agains em28xx driver. Some typos fixed. Signed-Off-By: Németh Márton <>.

Compilation Warning Fixes

This patch fixes compilation warnings introduced recently. Signed-off-by: CAI Qian <>.

PACCEPT tests Removal

Paccept() has not been accepted upstream, and accept4() has already been tested in LTP, which does the pretty much same thing as the test here, Hence, remove this test. Signed-off-by: CAI Qian <>.

LIBAIO Build Error Fixes

Make ltp compilable without libaio: This is a patch inspired by numerous whining recently seen on ltp-list concerning compile failures when libaio is not present. This includes changes: - add stubs to the aio tests, - remove -laio from doio and pipeio makefile, as it was superfluous, Changed the signatures of main() function (requested by Garrett Cooper). Signed-Off-By: Jiri Palecek <>.

LTP Changes during DECEMBER 2008

Task Title

Task Description


Fix from Jiri Palecek: Fix syntax errors (and bashisms) in some shell files.


Fix for failure in syscalls/stat04_64 and syscalls/lstat01A_64 testcases, by, Dmitry Guryanov <>.


Add _GNU_SOURCE for strsignal in spawn_ptrace_child.h. Mike Frysinger <>.

AUTOCONF 2.61 documentation

I've added small help target to Makefile & INSTALL talking about the new configuration setups. Signed-off-by: Masatake YAMATO <>.

MMAPSTRESS03 fix for x86_64

sbrk has arguments of type intptr_t, which is long in on x86_64. There is following line in mmapstress03: if (sbrk(-NUM_SEGS * pagesize) == NEG1) { Here the type of argument is int, because of constant NUM_SEGS, and this test fails here on x86_64. So let constants will be long. Signed-Off-By: Dmitry Guryanov <>.

EXECVE05 fix

This test case requires write permission for the dummy program. It would fail for those who put LTP on an read-only environment. So this patch copies the dummy test program to and performs the test in a private directory. p.s. this patch copy the one Renaud Lottiaux sent for execve02.c. Signed-Off-By: Roy Lee <>.


The following patch fixes two problems in loop variables of gtod_latency test case : 1) The loop variable 'k' could overflow on 32 bit systems, leading to a SEGV. 2) The inner loop was not of constant duration. This meant the frequency of calls to usleep() depend on the number of total iterations. It is desirable to make this frequency a constant. Signed-off-by: Sripathi Kodi <>, Acked-by: Darren Hart <>.

TLIBIO & PIPEIO enhancements

These patches enable AIO and listio in tlibio.c for linux, mostly by reusing code that is already in tlibio.c, and makes non-blocking read()/write() actually work. Also, they change pipeio.c to use this. Comments: 1) Patch 0001 enables aio and other types of io in tlibio.c code. Note that this means programs using functions from tlibio need linking with libaio and librt, 2) Patch 0002 changes non-blocking io in tlibio, so that it doesn't report EAGAIN to the client, but rather waits with select() for the io to become available (it would be possible extend this by adding more wait types). Also, it makes some minor changes to pipeio to make it work (eg. make opening the pipe always block, regardless of non-blocking setting). 3) Patch 0003 adds a semaphore to pipeio, to ensure all children have opened their pipes before reading & writing takes place. This avoids situations where one child gets to open the pipe after the parent deleted it (eg. because of an error). Also, it should eliminate all empty reads. 4) Patch 0004 changes error handling in pipeio to interpret every negative number as -errno. 5) Patch 0005 changes the way the end of the test is handled - before, the test ended after the last child was dead, but possibly before all data was read. The new way is to read all data and only if no data can be read, see if the children are dead. The patches should be applied in sequence. Signed-Off-By: Jiří Paleček <>,

AIODIO Signal Traps enhancements

The aiodio_sparse (and dio_sparse) tests use mmaped region of memory backed by a file, and populate the pages by writing to them. This can fail, eg. when Linux overcommits memory and the newly created pages do not fit; it results in the file not being properly deleted. This patch fixes that by trapping signals in these test (I used the standard libltp functions for that) and deleting the file in a cleanup function. Sorry that the patch may be little unclean - it was hand-edited. I will do something about that if it matters. Signed-Off-By: Jiří Paleček <>.

PROC01 Fix

The following patch removes a known failure that has been fixed in RHEL 5.3 and the fix also sent upstream, as well as adds missing copyright information. Signed-off-by: CAI Qian <>.

TI-RPC Fixes

Here is a new patch to be applied on the November Release (ltp-full-20081130.tgz). It fixes and improves build/install scripts in the Sun-RPC/TI RPC test suite. It takes care also about some portmap/rpcbind conflicts in the tests scripts. Signed-Off-By: Le Rouzic <>.


This patch fixes compilation errors on RHEL5 introduced by addition of the bounds test to default test list. Signed-off-by: Ramon de Carvalho Valle <>.


msgctl02: correct wrong FAIL result when msgmnb is larger than 65536. Signed-off-by: Seiichi Ikarashi <>.


Veerendra <> reported: In the latest LTP release ( LTP-full-20081130) the make is failing for Power machines for the 'utimensat' tests. Jiri Palecek <> replied: This is because TCID is needed to call tst_brk if the syscall doesn't exist or optimization doesn't eliminate the call. At the first sight, it might seem that syscall() is not called when NR_utimensat is undefined, because it is guarded by #ifdef, but it's not really so, because NR_utimensat is stubbed in linux_syscall_numbers.h. To fix it, apply the first patch, which moves the definition of TCID outside the #ifdef block - it should be there anyway. The second patch removes the conditional compilation altogether, because it is never effective. The patches should be applied in sequence. Signed-Off-By: Jiri Palecek <>.


The following patches fixes a useless error log and possible segmentation fault with fclose[1], a failure to report client and server failures[2], and missing data file installation[3]. Signed-off-by: CAI Qian <>.


Fixed typo when not defining SPEW_SIGNALS in my_yield(). Signed-Off-By: nobuhiro <>.


This series of patches fixes failures with mmapstress04, mmapstress07 and mmapstress08 test cases on IA-64, s390x and PPC64 mostly due to assuming page sizes on those architectures are 4K. This patch fixes mm testing list by removing hard-coded (4K alignment) arguments. Signed-off-by: CAI Qian <>.


This series of patches fixes failures with mmapstress04, mmapstress07 and mmapstress08 test cases on IA-64, s390x and PPC64 mostly due to assuming page sizes on those architectures are 4K. This patch fixes mmapstress04 test case by obtaining default settings from default page size. It also preserve the possibility to use user-specified arguments. Signed-off-by: CAI Qian <>.


This series of patches fixes failures with mmapstress04, mmapstress07 and mmapstress08 test cases on IA-64, s390x and PPC64 mostly due to assuming page sizes on those architectures are 4K. This patch fixes mmapstress07 test case by obtaining default settings from default page size. It also preserve the possibility to use user-specified arguments. Signed-off-by: CAI Qian <>.


This series of patches fixes failures with mmapstress04, mmapstress07 and mmapstress08 test cases on IA-64, s390x and PPC64 mostly due to assuming page sizes on those architectures are 4K. This patch fixes mmapstress08 test case by limiting this test to run for x86 architecture only due to it makes several assumptions about 4K page size etc, and I don't see the obvious way to make it work for non-x86 architectures. Signed-off-by: CAI Qian <>.

MEM01 Fix

Mem01 test case sometimes trigger OOM Killer. As the result, the test failed with a non-error code. This patch reduces the chance of OOM Killer by always reserving 16MB memory. It is a trade-off between not testing all available memory and dealing with false failure (extra work to waive the failure in automated environment and clean up unexpected test leftovers). I prefer the formal. Signed-off-by: CAI Qian <>.


commands/unzip: check exit code of all comands: 1. don't redirect all output to /dev/null. It's bad idea, because we can't investigate bugs without error messages. 2. check exit code of command "zip". If it failed, we get error during make install that can't found a zip file. Signed-Off-By: Andrew Vagin <>.

OPEN POSIX mq_send fix

Version 2: The test failed a few hours after I sent this off. I think it was caused by a pid collision which caused the test to use the same queue as an earlier failed test that didn't close out its queue. This version of the test uses O_EXCL to avoid this. And it cleans up the queue on every failure case. This test was racy. It relied on signals interrupting sleeps to do syncronization between processes. It also didn't cleanup the queue on the failure cases and assumed that its queue didn't already exist. This patch fixes these issues. Reported failures: Instead use a syncronization pipe to have the child thread send messages to the parent thread (with reasonable timeouts since this is testing blocking calls). # Apply to root of ltp-full-20081031 tree $ cd testcases/open_posix_testsuite/ $ make conformance/interfaces/mq_send/5-1.test $ conformance/interfaces/mq_send/5-1.test Signed-off-by: Brandon Philips <>

PIDNS Tests Addition

This is a proposal for 2 new testcases in the pidns testcases. They are related to POSIX message queues and notification on message arrival. Could you please review them? If a process registers for asynchronous notification on a POSIX message queue, it gets a signal and a siginfo_t structure when a message arrives on the message queue. The si_pid in the siginfo_t structure is set to the PID of the process that sent the message. If the process that sent the message is not in the same namespace as the notified one, this should be taken into account. pidns30 : notified process is in a descendant namespace wrt to the notifier. so the signal receiver doesn't know about the sender's pid. pidns31 : notified process is in an ancestor namespace wrt to the notifier. so the signal receiver should get the sender's PID in the signal receiver namespace. They currently fail, since the si_pid is not correctly set. But I just proposed a patch to fix this (see This testcase checks if the si_pid is correctly set when a process that has registered for notification on a posix mqueue is in a descendant namespace wrt the process that sends a message to that posix mqueue. Signed-off-by: Nadia Derbey <>, Acked-By: <>.

AUTOCONF for testcase/network/lib6

Tests in testcase/network/lib6 has been excluded because they occured build break on the earlier distributions. Now autoconf is introduced, we can include it again. Ths series of patches enable the lib6 tests. The initialization style of union, ".<member>=<value>", is one of the latest gcc extention. It's better not to use it. Signed-off-by: Mitsuru Chinen <>.


COMPILATION ERROR FIX for NETNS on ia64: Serge/Subrata, I have the patch , to fix the make problem for containers. Would you please review this ? In containers, it would dynamically check for the unshare() defn, in the linked libraries. This would not halt the make, if the unshare() is not found in the system. Signed-Off-By: Veerendra <>.

IOCTL03 Test Addition

Subrata Modak <> wrote: Hi Rusty, I found that you wrote a test program to verify whether all the valid IFF flags are implemented by TUNGETFEATURES ioctl (recently in 2.6.27:;a=commit;h=07240fd0902c872f044f523893364a1a24c9f278). I ported the same into LTP format and created the first draft version. Yet to test it on the latest kernel, but the first draft works fine. If you do not have any issue(s), can we add this code to LTP with your permission ??. Rusty Russell <> replied: Thanks, of course!. Signed-Off-By: Subrata Modak <>. Signed-Off-By: Rusty Russell <>.

PIDNS Tests Addition

Please find the patch for the pidns14.c testcase. Test Assertion: ** kill -USR1 container_init from outside a container, ** $ Where init has not defined a custom handler for USR1, ** $ Should kill the container, ** $ else the test fails, Signed-off-by: Veerendra C <>, Results: # ./pidns14 pidns14 1 PASS : container init is killed, as expected Sukadev, Included the changes suggested by you after doing waitpid() at the end. Please find the testcase for the below scenario. Assertion: ** kill - USR1 container_init, ** - from the parent process and also inside a container, ** - Where init has defined a custom handler for USR1, ** - Should call the handler, and, ** - Verify whether the signal handler is called from the proper process. Signed-off by: Veerendra C <>, Results: # ./pidns16 pidns16 0 INFO : sig_handler is signalled from pid 29640 pidns16 0 INFO : Container: Resumed after receiving SIGUSR1 from parentNS pidns16 0 INFO : sig_handler is signalled from pid 1 pidns16 0 INFO : Container: Resumed after sending SIGUSR1 from container itself pidns16 1 PASS : container init continued successfuly, after handling signal -USR1 Suka, After your comments, now I am checking in the signal handler the sending procee id. If it is from the parent ns and when it is from container init. Also made some small changes after doing waitpid() in main.

NUMA Fix on PPC64

Just a few fixes I've done while running the complete LTP suite on a ppc64 system. The test fails while running command "numa_node_size" which is unknown to my system. This patch replaces numa_node_size by "numactl --hardware". Signed-off-by: Gilles Carry <>.


Just a few fixes I've done while running the complete LTP suite on a ppc64 system. This definition is missing on powerpc specific code. utimensat test fails without this patch. Signed-off-by: Gilles Carry <>.

CRON_DENY01 Fix on PPC64

Just a few fixes I've done while running the complete LTP suite on a ppc64 system. Crontab command fail if user is not present in cron.allow file. This moves away cron.allow and restores it afterward. Signed-off-by: Gilles Carry <>.


Just a few fixes I've done while running the complete LTP suite on a ppc64 system. Crontab command fail if user is not present in cron.allow file. This moves away cron.allow and restores it afterward. Signed-off-by: Gilles Carry <>.

Addition of CPU CONTROLLER LATENCY TEST CASES by Sudhir Kumar <>

PIDNS Tests Addition

Testcase pidns10 on pidnamespace: The pidns10.c testcase verifies inside the container, if kill(-1, sig) fails with ESRCH when there are no processes in container besides container-init. Signed-off-by: Gowrishankar M <>, Acked-by: Sukadev Bhattiprolu <>.

PIDNS Tests Addition

Please accept below testcase patches for pid namespace. pidns12: Description: The pidns12.c testcase verifies that siginfo->si_pid is set to 0 if sender (parent process) is not in receiver's namespace. pidns13: The pidns13.c testcase checks container init, for async I/O triggered by peer namespace process. pidns17: The pidns17.c testcase verifies inside the container, if kill(-1, SIGUSR1) terminates all children running inside. Signed-off-by: Gowrishankar M <>, Acked-by: Sukadev Bhattiprolu <>.

Fix Warnings and Badness

Per request of Mike Frysinger, I resend this patch. The patch itself is the same, but the explanation is extended. Hope it's better this time. Hello, I'm sorry to say this, but some changes in the "Fix Warnings and Badness v2" patch[1] from October actually create bugs in the ltp tests. I think they should be reverted by applying the attached patch. The problems are of those types: 1) Calling: pthread_create(&th, &newattr, (void *)&new_thread, (void *)&newsockfd) is wrong if eg. newsockfd is a variable subsequently modified by the parent thread, not protected by locking. This is because there is a data race between the read in the new thread and the write in the parent thread. Moreover, it is quite often meant to pass different values to more threads in the ltp tests, which results in the different threads actually sharing the variable, which leads to unpredictable results. 2) Calling pthread_exit((void *)&exit_val); is wrong if exit_val is a local or thread-local variable, incl. errno. These variables cease to exist when the thread finishes, so subsequent dereferencing & read in the joining thread would read nonexistent variable. I think they should be reverted, because the warning (conversion pointer/integer) doesn't mean anything bad in this context (provided you use the same type on both sides, eg. the calling thread and the created thread) and other solutions just add unnecessary complexity. The patch goes a little further, while I was searching for related problems, I've found one typo and changed the signatures of some thread functions (they really should be (void* (*)(void*)), not (void* (*)(int))). I've discovered this when I debugged a deadlock in test_1_to_1_threads. BTW, shouldn't the first (or last) thread in this test call t_recv instead of t_send (see the relay function). Signed-Of-By: Jiří Paleček <>.


The test case "utimensat01" will test the function "utimensat" when the file isnot owned by self. It excepts it will return some error code. But if the test user is "root", it has super property and can be success. Signed-off-by: Zhang Xiliang <>.

Add Menu to

This patch adds a menu to in order to select the network tests like For the backword compatibility, the default test sets are left as-is. Namely, doesn't run any additional tests when no option is specified. Signed-off-by: Mitsuru Chinen <>.

Documentation Fix for

The description of the in INTALL file is a bit old. This patch adds the description regarding PAM and test menu. Signed-off-by: Mitsuru Chinen <>.

PIDNS Tests Addition

Please accept below testcase patches for pid namespace. They carry minor comments suggested by Suka and Nadia in lxc-dev.--- pidns20: The pidns20.c testcase verifies that signal handler of SIGUSR1 is called (and cinit is NOT terminated) when: - container-init blocks SIGUSR1, - parent queues SIGUSR1 and - a handler is specified for SIGUSR1 before it is unblocked. Change log: version 2: * added two pipes for reliable testing. version 1: * Submitted in lxc-dev. pidns21: The pidns21.c testcase verifies that container-init is terminated by SIGUSR1 when: - a handler is specified for SIGUSR1, - container-init blocks SIGUSR1, - parent queues SIGUSR1 and - handler for SIGUSR1 is set to system default before SIGUSR1 is unblocked.Change log: version 2: * added two pipes for reliable testing. version 1: * Submitted in lxc-dev. Signed-off-by: Gowrishankar M <>, Acked-by: Sukadev Bhattiprolu <>. Fix

I made few changes to ltp/testcases/kernel/fs/acl/ It is not working perfectly still there are issues with this script. I have posted patch and logs.attached strace log file. Please cross check results. Signed-off-by: Naresh Kamboju<>.

Fixes for lstat01A_64 & stat04_64

The problem is noticed only for these 2 tests lstat01A_64 and stat04_64. Analysis of the problem showed that these tests are called from runtest/syscall file. The problem is noticed because the symlink01.c file doesn't have implementation to take care lstat01A_64 and stat04_64 arguments that are passed in the file runtest/syscall. Solution: Simple solution is to remove lines. lstat01A_64 symlink01 -T lstat01_64 stat04_64 symlink01 -T stat04_64 from runtest/syscall. Other option is to provide feature in symlink01.c so that it can execute these tests successfully. I worked on one such patch. Please have a look. This runs same tests for lstat01A_64 and stat04_64 as is run for lstat01 and stat04 respectively. Signed-Off-By: Sharyathi Nagesh <>.

Fix for tcore_patch_test_suites

Updates for POUNDER21

Tests Integration of HYPERTHREADING

Tests Integration of tcore_patch_test_suites


Miscellenous Fixes for Compilation WARNINGS

SET_ROBUST_LIST01 Documentation Fix

ACCEPT4_01 Fix


FS Data Integrity Tests Integration

FS INOD Tests Fix

FS Permissions Tests Integration Fix

FS PROC Tests Integration

FS Race Condition Tests Integration

CD & FLOPPY Tests Integration

AIO Tests Integration

CPU HOTPLUG Tests Integration


New Options Addition for RUNLTP

INOTIFY03 Test Addition



Basic infrastructure for running the existing network testcases under CONTAINERS automatically.

Addition of Video for Linux Two (V4L2) API device driver tests



Some Makefile cleanups

Integrate ltp network, network stress, adp, autofs, exportfs, ro only fs, isofs, dmmapper, fslvm, fsnolvm, scsi_debug, sysfs, tirpc, selInux tests to runalltests. Fix Diskio test. Remove rpc tests from tirpc tests to runalltests. Signed-Off-By: Subrata Modak <>.





LTP Changes during NOVEMBER 2008

Task Title

Task Description

librttest fix

librttest.c: enhancement and fixes for options handling. - simplified check for duplicate options,- better handling of unknown options and missing args: report missing args and exit, - exit if any option is wrong, - indent fix, Verified on all rt tests. Signed-off-by: Gilles Carry>, Acked-by: Darren Hart <>.

matrix_mult.c fix

matrix_mult.c: set_affinity to work when there are offline cpus: Syscall sched_setaffinity fails if choosen cpu is not online. In set_affinity, thread_id value is used as cpuid when calling sched_setaffinity. This fails when disabling cpus because threads ids and online cpu ids don't necessarly match. This patch simply increments cpuid (max. 8192) until it finds an online cpu. This guaranties that no more than one thread is assigned to one cpu. If set_affinity is called more times than there are online cpus then matrix_mult.c fails. Signed-off-by: Gilles Carry <>, Acked-by: Darren Hart <>,

matrix_mult.c fix

matrix_mult.c: dynamic iterations configuration. Dimension (128) of statistics arrays must be a multiple of number of cpu. This is a hassle as you have to recompile every time your arch changes or if you want to disable cpus. Failing to do so causes segfault when requiring statistics if 128 modulo nr_cpus != 0. This patch adds option -i to specify how many iterations are wanted (still defaulting to 128). It rounds up iterations to the nearest multiple of online cpus. Signed-off-by: Gilles Carry <>, Acked-by: Darren Hart <

matrix_mult.c fix

matrix_mult.c: thread synchronisation simplification: In concurrent calculations: - use a single pthread_barrier to start all threads together instead of a combination of barrier/mutex/condvar. - main thread no longer participates to concurrent calculations and simply performs rt_gettime(s) for global time spent evaluation. Signed-off-by: Gilles Carry <>, Acked-by: Darren Hart <>.

matrix_mult.c fix

matrix_mult.c: concurrent calculation stats fix: Array size for stats was iterations/numcpus. Concurrent threads used to write their stats in the same rows, overwriting each other's results. This patch makes array size = iterations and threads not overlapping their results by shifting their index. Signed-off-by: Gilles Carry <>, Acked-by: Darren Hart <>.

spawn_ptrace_child.h fix

use feedback from Jan Kratochvil so we wait for the child to be stopped before we attempt to ptrace it

ptrace06.c fix

base {PEEK,POKE}USER on sizeof(user) rather than sizeof(pt_regs) and add a few more corner cases

Rpc-tirpc fix

drop backup file configure~

.gitignore file added

start a .gitignore fix

This patch fixes what I believe is a wrong logic in test 3 of this script right after the last "crontab -l ..." command. In my system the cron table is empty; this command will return false and the else clause will never be executed. If the command returns true (0) then the cron table is not empty as it was supposed to be and the script must indicate an error. Signed-Off-By: Elder Costa <>.

NUMA fix

Stop building numa test in cross environment: None of the tests for the existence of numa prereqs work in a cross build environment. This is a patch to skip erroneously checking for these prereqs on a host system if the $CROSS_COMPILER variable is set per the runltp script. Without this patch, the existing script checks for the existence of aheader file on the /usr/include, but our compiler only looks within the include directories of the target system, and stops cross building of the entire ltp suite, if the target does not have numa.h/no numa support. Signed-Off-By: Henry Yei <>.


The following are errors while compiling ltp-full-20081031 with ARM architecture: Here I am attaching the patch to resolve above error. Signed-Off-By: naresh kamboju <>.

PTEM01 fix

Alan Cox [] wrote: The test changes the window size using the slave-fd and expects that it won't affect the window-size on master-fd. With this change, we return the slave's window size and test fails. I've no idea why anyone would have thought the existing behaviour was correct. The pty/tty pair code tries to share the size and other information at all times and the old test was I think verifying a bug existed. Sukadev <> wrote: We are referring to the last window size check in test2() of testcases/kernel/pty/ptem01.c. This check will cause the test to fail when some of the planned ttydev changes are merged. Would you happen to know if the check is really required or if it should be dropped ? Subrata Modak <> wrote: I would want the test to remain there, but introduce some checkings before running the test. As test2() is valid under present circumstances, we should retain it as people will keep using LTP on lower kernels. Having said that, i would like to come with a solution where test2() of testcases/kernel/pty/ptem01.c is not run after the planned ttydev changes are merged. Something compile/run time checking to either not to build that part of code and run it. Can we do something like that by checking some glibc/kernel exported definitions ? Sukadev <> wrote: Just to be clear, the entire test2() is not broken. Only the last part (see patch below) Other parts of test2() should be fine even with new changes. Other than the kernel version when the changes are merged, I am not sure there is a way. Besides, it is not clear which assertion that part of test2() is testing and if it is even needed for older kernels. Here is the part of test2() I am referring to: Signed-Off-By: Sukadev <>.


Enable Kernel with the Option during build to test filecaps support. Subrata. fix

check input files and abort if broken line is found

kernel/include/ fix

remove bogus line

HTML file generation fix

The attached Patch defines more about the keywords:i) TPASS - Indicates that the test case had the expected result and passed. ii) TFAIL - Indicates that the test case had an unexpected result and failed. iii) TBROK - Indicates that the remaining test cases are broken and will not execute correctly, because some precondition not met, such as a resource not being available. iv) TCONF - Indicates that the test case was not written to run on the current harware or software configuration such as machine type, or, kernel version. v) TRETR - Indicates that the test cases has been retired and should not be executed any longer. vi) TWARN - Indicates that the test case experienced an unexpected or undesirable event that should not affect the test itself such as being unable to cleanup resources after the test finished. vii) TINFO - Specifies useful information about the status of the test that does not affect the result and does not indicate a problem. in the HTML file generated after test run. I believe it will be very useful for deciphering results better: Signed-Off-By: Subrata Modak <>.

checking cpuidle sysfs files tests added for Power Management

Added test case for checking cpuidle sysfs files. Signed-Off-By: Nageswara R Sastry <>.

linux-2.6.27-gcov.patch fix

gcov-kernel: change comment to recommend CONFIG_GCOV_HAMMER=n. Background: CONFIG_GCOV_HAMMER indicates a modified gcc version which is not the majority of cases: Some Linux distributions ship a modified version of GCC 3.3.x that produces GCOV data incompatible with the format of the standard GCC 3.3.x. If you are using such a distribution, you need to enable this option for the GCOV kernel support to work correctly. Signed-Off-By: Peter Oberparleiter <>.

23 syscalls tests Addition for _16 & _64 bits

Following the footsteps of Masatake Yamato, i have decided to enable building, installing & running of some _16 & _64 bit syscalls tests in LTP. I have taken this trivial ones, and, would leave other porting to you. Signed-Off-By: Subrata Modak <>.

FILECAPS run addition to

The following Patch adds the option to run filecaps tests from and also provisions for installation of required libraries not present in the system. Also systematic execution of all tests run through is added. Signed-Of-By: Subrata Modak <>.


Submitting the testcase, which would try to kill the parent namespace pid from the container init. Also this tests a scenario of killing non existent pid from the container. Signed-off-by: Veerendra C <>. Acked-by: Sukadev Bhattiprolu <>.

Kernel Build options for SELinux

Added Kernel .config options for building LTP SECURITY TESTS. Signed-Off-By: Subrata Modak <>. Reviewd-By: Stephen Smalley <>.


This patch fixes an issue with the sort command in netns testcases. Because of this all network namespace testcases were failing. Signed-off-by: Sudhir Kumar <>.

Aio-runtest file modification

(previous mail got accidentally line-wrapped, sorry.). Attachted patch changes the location of the test-binaries of aio-stress and aiodio runtest-files. Instead of the relative-build location just the binary get called,which is in the PATH of testcases/bin/ anyway when called by "pan". This patch should have no impact on testing inside ltp-build-tree. The idea of this patch is to allow easier packaging of LTP. (No runtest-file modification required when installting into the system environment). Signed-off-by: Daniel Gollub <>.

Aio Makefile modification

Subrata and Daniel, moving from ia64 to x86_64 arch I have got this at linking time: so , if you could have a look to the suggested following patch. Signed-Off-By: Jacky Malcles <>.


on SLES10 SP2 NR_get_robust_list is not defined and cause following compiler warning: Attached patch avoids "random"/43 return value. Signed-off-by: Daniel Gollub <>.

TIMERFD01 Warning Fix

This patch fixes a compilation warning: timerfd01.c: In function main': timerfd01.c:128: warning: unused variable tfd2' Signed-off-by: CAI Qian <>.


Hello, these are some little fixes I've created for ltp. They are typos, fixes for compiler warning, bashisms in the makefiles etc. Signed-off-by: Jiri Palecek <>.


when building Debian ltp package on alpha, the package failed to build, because alpha lacks some of the syscalls (the xxx_16 ones). See: I have created some patches, which fix this behaviour (ie. the build doesn't fail then). They work like this: 1. Syscalls which are potentially missing on some architectures are listed in the stub-list, 2. If a syscall(x) is called and x is 0 (a value of undefined stub syscalls), the test is aborted by tst_brk(). This is accomplished by a macro wrapper over the syscall() function (this almost eliminates the need of changing the tests in question, and allows the compiler to eliminate parts of tests of nonexistent syscalls as dead code). The attached patches implement this. Some remarks: - the syscalls added to the stub list are the ones which appear in the kernel sources as IGNORE_name-of-syscall, - the macro is for gcc only. The test using this mechanism (ie. #including linux_syscall_numbers.h and calling syscall()) must define static function void cleanup(void) to be called when the syscall is missing (the patch also handles this for tests that lack it). Signed-off-by: Jiri Palecek <>.

EXECVE04 Fixes

Fix success detection in execve04 test: The execve04 test works like this: It sets up the environment, calls execve() and expects failure. However, this has two bad consequences if the call actually succeeds: 1. The failure (ie. success of the call) is unnoticed, 2. The test leaves loads of files in the temporary directory. all of them being caused by the fact that the test no longer runs after a succesful exec(). This patch fixes the situation by calling exec in a child only. The failure (or success) is gathered from the child's exit value. Signed-off-by: Jiri Palecek <>. This patch fixes the error, that code exhausting the file descriptor table in execve04 test actually doesn't exhaust the fd table at all. Signed-off-by: Jiri Palecek <>.


Don't break chown tests on non-catastrophic failures. Signed-off-by: Jiri Palecek <>.

tst_brkm Fixes

Do not call tst_brkm from the cleanup function in some tests: It is bad for the cleanup function to abort by calling tst_brkm, because in that case, further cleanup will not be performed. This patch fixes it in some chmod*, chown*, fchmod* and fchown* tests by substituting tst_resm for tst_brkm. Signed-off-by: Jiri Palecek <>.


Call cleanup() at the right places to prevent fallocate tests leaving files in the temporary directory. Signed-off-by: Jiri Palecek <>.

AUTOCONF introduced for SIGNALFD test


Use the SO_REUSEADDR option in sctp tests to prevent bind error shortly after another test ended: I've noticed a bunch of errors in the SCTP tests, all of them being for the same reason, "bind: address already in use". I tried using the SO_REUSEADDR option on the socket, as if it was TCP, and it helped. However, I know almost nothing about SCTP, and don't know whether the same situation (applications binding to the same port quickly one after another) has the same problems and solution, or if it is just a kernel bug/misconfiguration/whatever else. Signed-off-by: Jiri Palecek <>.


Quick and dirty fix to overflow in pipeio when computing the number of writes: the computation of the number of writes in pipeio can overflow, eg. if you want to run more than 4 GB through the pipe. The attached patch fixes that. Signed-off-by: Jiri Palecek <>.

linux_syscall_numbers.h fix

regen linux_syscall_numbers.h whenever changes fix

make syscall() wrapper a bit more readable

linux_syscall_numbers.h fix

only create symlink if it doesnt exist already fix

generate stub list on the fly based on *.in files


cleanup style with Lindent fix

fill out AC_INIT()

ltp-signalfd.m4 fix


ltp/Makefile fix

make autotools optional and start a sane config.h by default

.gitignore fix

add some compiled objects to the ignore list

UNZIP tests Integration

Integrate unzip tests to runtest/commands file. Signed-Off-By: Subrata Modak <>.

TPM_TOOLS Integration

Integrate tpm_tools into Signed-Off-By: Subrata Modak <>.

GZIP tests Integration

Integrate gzip tests to runtest/commands file. Signed-Off-By: Subrata Modak <>.

FILEUTILS tests Integration

Integrate fileutils tests to runtest/commands file. Signed-Off-By: Subrata Modak <>.

runtest/commands Integration to ltp/runltp

Add ltp/runtest/commands file to ltp/runltp. Signed-Off-By: Subrata Modak <>.

hugemmap02 Segmentation fix

Adam Litke <> Replied: Unfortunately, when you mmap using the MAP_FIXED flag, you can overwrite an existing mmap in the address space. Please do the following to check if this has happened: 1. Insert a 'getchar();' call above line 155 in the test source code above and recompile the test. 2. Run the test. When it pauses (waiting for input at the getchar() call), hit <ctrl>-z to background the test. 3. Determine the pid of the test case using ps. 4. Collect the /proc/<pid>/maps for the appropriate pid. 5. Paste that output here in this bug. My suspicion is confirmed. This is a LTP test case bug. All of the above mappings will have been overwritten by the mmap call on the hugetlbfs file at address 0. This will most certainly cause your program to crash and burn. To fix the test case, I would recommend removing the MAP_FIXED flag from that mmap call and checking the address you get from mmap. If it's zero, you'll know a mapping could be created at the bottom of the address space. If it's -1, the mmaping failed. But if it's >0, you'll have to decide how to handle the case where the mapping could not be placed in the spot you requested. This case would not be a failure, just a failure to test the scenario you wanted to test. I assume the LTP test harness has a way to represent an insignificant test result. You might just treat this case in the same way you handle mmap() == 0. Signed-Off-By: Cijurajan Kollanoor <>,

CREAT07 fix for running in a private directory

This test case requires write permission for the dummy program. It would fail for those who put LTP on an read-only environment. So this patch copies the dummy test program to and performs the test in a private directory. p.s. this patch copy the one Renaud Lottiaux sent for execve02.c. Signed-Off-By: Roy Lee <>.

SIGNALFD01 fix for build error

Only define signalfd() when it actually gets used -- i.e. when !USE_STUB. Mike Frysinger <>. fix

require autoconf-2.61+. Mike Frysinger <>.

LCOV Updates

lcov: preparations for release 1.7. Mike Frysinger <>.

LCOV Updates

lcov: update error and warning messages. Peter Oberparleiter <>.

LCOV Updates

lcov: fix spec file bug. Peter Oberparleiter <>.

LCOV Updates

lcov: version + date updates. Peter Oberparleiter <>.

LCOV Updates

lcov: updated CVS version to 1.8. Peter Oberparleiter <>.


I've introduced autoconf to modify_ldt test cases. The modification is very similar to the modification to signalfd. Signed-off-by: Masatake YAMATO<>.


Please accept the patch for running the pidns tests for the containers. Also modified, to run all the testcases even when other testcase's fails. This patch contains the patches to run new tests pidns05 and pidns06. Also this patch will run all the pidns tests. And return back the exit code of the test, which failed first. Signed-off-by: Veerendra C <>. Acked-by: Serge Hallyn <>.

FCNTL17 fix

[Bug # 2305878] fcntl17: fix short pid problem. Process ids (pids) are not necessary in "short" range, they might be larger (and are in SLES 10 e.g.). Signed_off-By: Marcus Meissner <>.


Change "Buffer size is not positive" testcase readlink03 to use 0 as non-positive buffer size, instead of -1. To avoid a fortify-check-fail when using glibc and _FORTIFY_SOURCE=2. See discussion: Signed-off-by: Daniel Gollub <>.

LCOV-1.7 Release


Andrew Vagin Replied <>: Thanks. I found error for help valgrind. I use valgrind first time. Thanks for this possibility:). see the attached patch. test passed and valgrind don't report errors after my patch Thread [34]: allocate_free() returned 0, succeeded. Thread exiting. main(): test passed. Signed-Off-By: "" <>.

ACCEPT4() syscall test addition

Initial Porting of accept4() syscall test to LTP by Subrata Modak <>. Originally written by Michael Kerrisk <>. Later modified to suite compilation on different systems by Jiri Palecek <>, who wrote the following:I have some nitpicks, in decreasing severity: First, the syscall, I believe, is not targeted at i386 and x86-64 only. Therefore, it is not wise to have these explicitly mentioned in the code. Also, it would be better not to "#error" if the arch isn't one of those fortunate, because ltp should build on others too. This should be fixed by patch 1. Disclaimer: This patch should make it compile (and fail at runtime with TCONF) on all kernels that don't have the syscall, and actually run the test on all kernels that do, depending on kernel headers version. However, I didn't test this (especially the selection of the syscall), so it needs to be checked. Second, if any of the syscalls vital for the test fails, it's preferable to output the error message too, and call tst_brk() for cleanup (patch 2). Third, there it would probably be better to use TFAIL/TPASS for recording success and failure instead of manual boolean flags (patch 3). Last, I think a successful test should print as little as possible and multiline messages like "calling syscall..." are really not that useful. Patch 4 disables them.


I guess you want ">/dev/null 2>&1" to eliminate both STDERR and STDOUT. Attaching a small patch with the above change. Signed-Off-By: Nageswara R Sastry <>.

SIGNALFD01 fix for autoconf

A small Fix. Signed-off-by: Masatake YAMATO<>.

SIGNALFD01 fix for compilation error

- Type definitions defined in header files included from sys/signalfd.h and type definitions defined in sys/signalfd.h are conflicted. - s/SIGNALFD_REFIX/SIGNALFD_PREFIX/ - if HAVE_SIGNALFD is not defined, use stub. - if HAVE_LINUX_TYPES_H is defined, use our own implemention to call signalfd syscall. Signed-of-by: Masatake YAMATO<>.

Update to OpenHPI 2.13.1

README update

Add Kernel Config Info for compiling KDUMP/KEXEC kernel. Signed-Off-By: Subrata Modak <>.

RT Tests update

This patch ensures that prio-preempt uses the librt debug mechanism. Tested: Running the test: ./prio_preempt ./prio_preempt -v3 ./run_auto Signed-Off-By: Chirag <>. Acked-by: Darren Hart <>.

RT Tests update

This patch adds librt debug support for prio-wake. The log level selected is 0, as it necessary to print all the buffered information. Tested: ./prio-wake ./run_auto. Signed-Off-By: Chirag <>. Acked-by: Darren Hart <>.

PIPEIO stack overflow fix

OK. I have implemented such a patch which does not overflow anymore. However, I could not test it, because: pipeio -s 5000 -i 2000000000 -c 5. just runs too long. Signed-off-by: Jiri Palecek <>.

RT Tests update

The test case gtod_latency in realtime causes soft lockups on some machines. This is because the test hogs the cpus for a long time, because it's main loop runs at SCHED_FIFO, 99. We have seen soft lockups mainly on LS20 machines (x86_64, Opterons). The following patch introduces a sleep after some iterations of the test. This ensures that the test doesn't hog the cpu completely and hence avoids soft lockups. Testing done: Compiled with the patch and observed that the soft lockups are gone. Also observed that the latencies are not affected. In fact latencies improve with this patch on most hardware. Changelog: * Introduce periodic sleeps in the busy loop of gtod_latency to avoid soft lockups. Signed-off-by: Sripathi Kodi <>. Acked-by: John Stultz <>.

NETNS fixes

Here is a patch to fix the error below. /root/ltp-full-20081031/testcases/kernel/containers/netns/ 42: source: not found Some shells are not having the cmd 'source' which inturn are failing the tests for netns in containers. I found few other ltp scripts are using the source cmd. Have others reported the same issue ? Just curious to know this. The below patch would replace the 'source with .' for containers in netns.Signed-Off-By: Veerendra <>. fix

The file testcases/kernel/include/stub-list was recently removed. It contained the list of syscall numbers which, if not present in the kernel headers or in one of the architecture-specific lists, should be defined as 0 (a stub value). Now, this list is automatically generated as union of the architecture-specific lists. However, some syscalls only appeared in stub-list, which means they are not stubbed now, so architectures lacking them will probably fail to build (alpha...). To overcome this, I have added these syscalls to the i386 list, which means they will be defined whenever they are defined in the kernel sources, on i386, and stubbed otherwise. See the attached patch. BTW, the list of syscalls is not exhaustive. In the attachment filtered-syscalls, there is a list of syscalls which appear as IGNORE_syscall-nr in the kernel sources (which means they are missing on some architecture), but are not used in ltp or their use is guarded by an #ifdef. They would have to be added too, if some test explicitely mentions them (eg. getresgid16). Signed-off-by: Jiri Palecek <>.


umount can return error if /etc/mtab link to /proc/mounts. My patch fixed testcase fs_bind/regression/test02, that execute all umount commands with target directories. Signed-Off-By: Andrew Vagin <>.

RT Tests Fixes

Fix busy loop in realtime: The routine busy_work_us(), which is the busy work loop function in realtime test suite is supposed run for as many microseconds as requested for. However, I have observed that it runs too fast on some hardware. I looked at the code and saw that we are statically setting the loop counters, which means the duration of the busy loop varies with the cpu speed. Further, the busy loop is affected by compiler optimizations. On some hardware it provides only 50% of requested delay, whereas with -O3, it finishes even faster. What we need is a method to dynamically tune the delay loop based on the machine where the test is being run. It should not be affected by compiler optimizations as well. The following patch does that. It applies on the latest cvs. Signed-off-by: Sripathi Kodi <>, Acked-by: Chirag <chirag at>.


I've added new Makefile target to run both autoconf and autoheader. Signed-off-by: Masatake YAMATO <>.


CONTROLLERS: Patches to modify the existing cpu controller testcases

TI-RPC Fixes

Re-enablement of TI-RPC tests to build/install/run in LTP: Le Rouzic <> wrote: I get a first patch to deliver which improves the Sun-RPC and TIRPC Test Suite. The Sun-RPC tests part works quite well. About the TIRPC I still have some FAILED I am working on that I will fix in a second patch. There is no much time now for the November delivery so let me know if you want me to deliver right now the first patch. Subrata Modak <> replied: I am not worried if the test case(s) of TI-RPC fails. The point is they should be able to build, install and run - irrespective of whether many of the tests fail. The issue(s) like linking to proper libraries while building and finding those libraries to run should be properly resolved. If they require specific libraries to to build/run, that should be properly documented. Users should be able to find those libraries and install them (if it does not come with the system in first place), so that they can start using those tests. If people can start using those tests, then there will be more people who can help fix issues related to tests themselves. It would be nice if you can send a patch (against latest CVS) which would re-enable the TI-RPC tests to build/install/run in LTP properly. We can see the test fails later. Le Rouzic <> replied: OK. Here is the patch I tested against ltp-full-20081031.tgz. Signed-Off-By: Le Rouzic <>.

New PIDNS test addition

Please find the testcase for the below assertion. Assertions 1: Steps: a) Create a container . b) Create many levels of child containers inside this container. c) Now do kill -9 init , outside of the contaier. d) This should kill all the child containers . (containers created at the level below ). Signed-Off-By: Veerendra <>.

Typo Fix runtest/syscalls

Fix typo in pselect01_64 testcase: pselect0_64->pselect01_64. Signed-Off-By: Dmitry Guryanov <>.

Remove libjvmsim in RT Tests

Remove references of jvmsim from the tests: Most of the testcases, have an option (-j) which runsthe jvmsim as a background load so as to simulate the behavior of the JVM.This patch removes the references of jvmsim from all the testcases. Signed-Off-By: Chirag <>, Acked-by: Sripathi Kodi <>.

Remove libjvmsim in RT Tests

Remove libjvmsim: This patch removes the libjvmsim itself. Hence no testcase can use it anymore. Signed-Off-By: Chirag <>, Acked-By: Sripathi Kodi <>.

IPTABLES fix for Network tests

ltp iptables testcase failed: Manas Kumar Nayak <> reported: While executing iptables testcases from ltp ,it failed to list iptables chain rules. iptables test case gets failed with following errors: Vinay Sridhar <> replied: I looked through the iptables test. It fails because of mismatch in the number of chains after firewall is enabled. Under RH, enabling firewall adds a new chain to the "filter" table and under SLES, 3 new chains are added. This patch can change this test accordingly. Signed-Off-By: Vinay Sridhar <>.

LTP Changes during OCTOBER 2008

Task Title

Task Description

Io-controller fix

Here is one fix for io-controller testcase. It might not have run when kernel supports io-controller. Description: Instead of block io testcases, memory controller testcase will run. Signed-off By: Rishikesh K Rajak <>.

test_ioctl fix

test_ioctl produces a 'Syntax error: Bad substitution: 28' under Ubuntu (and much probably Debian). The following patch solves this issue. I tested it with sh (aka dash) and bash. Signed-Off-By: Elder Costa <>.

Add support of kernel syscall test to Renesas. Signed-off-by: Nobuhiro Iwamatsu <>.

RT Test fix

The clock source used in the gtod_infinite test should be CLOCK_MONOTONIC instead of CLOCK_REALTIME. This is to avoid plausible inconsistencies caused by NTP time adjustments. Tested: running gtod_infinite and then killing it. Signed-Off-By: Chirag <>, Acked-by: Darren Hart <>.

IO-Throttle fix

Hi Andrea, As you are using in your script, it will simply replace the installed in $LTP_ROOT/testcase/bin which is written by Sudhir. And if you will run this testcase from ./runltp sudhir's memory controller tetscase will refer your script. So i am just renaming this script to some other name and correspondingly changing the Makefile & . Attached is the patch. I might require your acknowledgement for this. Signed-Off-By: "Rishikesh K. Rajak" <>, Acked-by: Andrea Righi <>.

Bashism Fix

dont use == or [[, and fix -z test

Network Scripts bashism fixes

convert all "source" commands in scripts to "." ... hopefully my sed-foo doesnt break anything ...

Network Scripts typo fixes

fix typo pointed out by Elder Costa: dulation -> duration

Lcov geninfo fix

lcov: geninfo chokes on spaces in the directory name

Release of 2.6.27 GCOV kernel to LTP community


If we unshare pidns without unsharing mounts namespace, and then do a mount -t proc none /proc, then the new proc sits over the original proc for the whole system. Since pidns03 wasn't using CLONE_NEWNS, when it exited /proc showed zero tasks. This can be fixed by doing 'umount -l /proc', but 'umount /proc' is insufficient. More to the point, pidns03 wasn't trying to clean up /proc at all. So make it use CLONE_NEWNS so its private procfs will be automatically cleaned up. Signed-off-by: Serge E. Hallyn <>.


netns: fix restoration of original /proc values (ip_forward...). This small patches make the restoration of /proc/sys/net/ipv4/ip_forward /proc/sys/net/ipv4/conf/$netdev/proxy_arp works as expected in netns/ Also removed some unneeded /dev/null redirections. Signed-off-by: Benjamin Thery <>.

SEMAPHORE test fix

The script run_semaphore_test_01 fails the first time it is run as the semaphore id is zero (subsequent runs are successful as the ids are nonzero.) The attached patch fixes this behavior. Signed-Off-By: Elder Costa <>.

PTRACE06 fix

On ppc/ppc64, PTRACE_GETREGS and PTRACE_SETREGS don't be defined in /usr/include/sys/ptrace.h. So add checks before use them. Signed-off-by: Jin Bing Guo <>.

GETCPU01 fix

Simple bug in logic that defines when to run the test makes it run exclusively when support is NOT implemented. Tested on mips64 system running Cavium Networks Octeon chip, Linux 2.6.27. Signed-Off-By: "Malov, Vlad" <>.

PTRACE06 fix

The new ltp-full-20080930.tgz seems to include some new ptrace tests (ptrace04 and ptrace06) that do a #include for spawn_ptrace_child.c. Now I find that if I do a "make clean" it removes this spawn_ptrace_child.c ... is this expected and desired? Also is there supposed to be a way to generate the spawn_ptrace_child.c and any other files removed after "make clean" ? Thanks, - Mark Ver. Yes, I believe it's an error. The spawn_ptrace_child.c file is necessary to ptrace04 and ptrace06. To do a #include *.c file is not a good coding style. The simplest solution is to rename the spawn_ptrace_child.c to spawn_ptrace_child.h. Also you can add inline as the prefix of functions, then the spawn_ptrace_child.h file looks more like a header file. Thanks, - Jin Bing Guo.


With Exec-Shield in place, the Kernel automatically adjusts the stack downward by a random amount of bytes. This will cause the test failed occasionally on IA-32, because the 11th requested chunk of address space (bfe00000-bff00000) has already been used by the stack. For example, stack could be at bfe0b000-bfe20000, and then, shmat(2) failed, mykey to uniquely identify the shared memory segment 0x451005ae. Get shared memory segment (1048576 bytes). Attach shared memory segment to process: ERROR [line: 205] shmat failed - return: 0xffffffff: Invalid argument. It looks like the stack adjustment has a range that it could be chosen, so I changed the start of 11th address space to a lower address. Tests showed that the stack will not go downward that much. In addition, there are a few minor fixes, - keep the width of comments within 72 characters. - remove unnecessary 0x prefix. Signed-off-by: CAI Qian <>.

PROFIL01 fix

Adding support for mips64. Use 64 bit variable to store the 64 bit address. Tested on mips64 system running Cavium Networks Octeon chip, Linux 2.6.27. Signed-Off-By: "Malov, Vlad" <>.


Remap_file_pages01 and remap_file_pages02 tests always failed on IA-64 with Kernel 2.6.9 as below. So, I added a check to the existing Kernel version checking (< 2.6.12). If anybody happens to know the exactly version it has started to be implemented, I'll be happy to re-send the revised patch. Signed-off-by: CAI Qian <>.

TIMERFD support for ARM architecture

I'm using an embedded arm processor (Xscale) and I get the following compile error: timerfd01.c:90: error: 'NR_timerfd_settime' undeclared (first use in this function). I have dug through past patches for this exact problem and have seen it come up with other processors and I have put together a patch that *should* address the issue. I tested it on my system and everything seems to work. I based the macro info off of: Here is the patch. Signed-Off-By: Shane Volpe <>.

Better Debug support for SHMEM_TEST_06

This patch adds some debug messages when shmat(2) failed, so we could tell if the failure was because the requested address space has been used. In addition, it fixes the output of failed error code to a more meaningful form. This patch should be applied on the top of another patch I sent earlier with title "shmem_test_06 Failed with Stack Randomization". Tested successfully on a x86_64 machine. Signed-off-by: CAI Qian <>.


When I tested the inotify02 on ppc64, it passed all tests and returned 1 with an unnecessary event. After looking into the code, there were 9 tests in sum in inotify02. So I think the unnecessary event should not be regarded as a failure when the 9 tests all passed. Same problem was in inotify01. The patches fixed them. Signed-off-by: Jin Bing Guo <>.

PIDNS fixes

Attaching the patch for the testcase on PIDNS. Assertion: 1. kill -9 1 from inside a container does not kill container, Steps: a) create container, b) kill -9 1, c) Should not kill the containers. Signed-Off-By: Veerendra <>.


This patch fixes build failures seen on RHEL 4 (2.6.9 based Kernel), and several warnings. The build failures are caused by pec_listener.c and then ptrace06.c, It because the Kernel version checking code is incorrect from it, as you can see from the error message above, "/bin/sh: ../../bin/tst_kvercmp: No such file or directory". I solve it by querying an entry in proc file system instead. For ptrace06.c case, PTRACE_GETSIGINFO and PTRACE_SETSIGINFO are unavailable in this version of Kernel, Given that this test also fails to compile for IA-64 entirely (please see more details on one of my previous emails sent not long ago), I disable this test temperately until those problems have been fixed. In addition, it fixed the following unnecessary compiling warnings. Finally, check_for_unshare.c:21: warning: implicit declaration of function `tst_kvercmp'. Signed-off-by: CAI Qian <>.


The gethostid01 test fails when the host id is not set on a system. The gethostid() call retrieves "00000000" as the host id. Added a check to compare the return value with "000000" (omitted 1st two 0's as they could also be 0x on some systems; needs confirmation). Signed-off by : Vinay Sridhar <>.


This patch cleans code a little bit by removing leftovers. Signed-off-by: CAI Qian <>.

BASH fixes

Hello. I had two errors when compiling the CVS version with Ubuntu. The one in might have to do with some dash limitation (it complains about not supporting more than 32 shifts.) The one with the Makefile has to do with the version of lex I have here (lex 2.5.33) complaining about -l not accepting an extra argument (I believe it interprets the w as such). I did a quick check after applying the changes and they seem not to break anything. Signed-Off-By: Elder Costa <>.


Fixing the in containers/pidns, to handle the return code properly. Also remove the obsolete file, which is no longer required. Signed-Off-By: Veerendra <>.


After tested the latest LTP cases, the connector cases failed on RHEL5.2. Test fails with following error: <<<test_output>>> incrementing stop /home/ltp/cvs_ltp.orig/testcases/bin/ line 9: /home/ltp/cvs_ltp.orig/testcases/bin/run_pec_test: No such file or directory <<execution_status>>> Post Patching: <<<test_output>>> incrementing stop Connectors 0 CONF : system doesn't support execution of the test <<<execution_status>>> Signed-off-by: Jin Bing Guo <>.

ltpstress.part3 fix

Disabling this till TIRPC is built, installed and run properly. Subrata Modak <>.

INODE01 fix

Avoid buffer overflow when PID exceeds to 4-digit limit. char array root has to contain at least 'A' + pid + '\0', which only works pid of testprcess is a 4-digit PID. PID_MAX_DEFAULT in kernel (when CONFIG_BASE_SMALL is NOT set) is set up to 4 million, which requires at least 7-digit pid. Author: Frank Seidel <>. Signed-off-by: Frank Seidel <>. Signed-off-by: Daniel Gollub <>.

INODE01 fix

Array size of path_list_string gets exceeded and cause an buffer overflow, when building with -D_FORTIFY_SOURCE=2. Array size of path_list_string needs to be increased to handle PIDs which exceed 4-digits. Signed-off-by: Daniel Gollub <>.


When compiling with -D_FORTIFY_SOURCE=2 following buffer-overflow gets detected. Variable full_path exceeds PATH_MAX limit in creat_path_max(), to avoid a buffer overflow the size of full_path needs to be incremented by one. Signed-off-by: Daniel Gollub <>.


Now that fsx-linux is the same for fs, nfs and ios (I'm working with ltp-full-20080831.tgz) we have to adapt the runtest/ltp-aiodio.part3 file: (-A and -Z options are no more supported by fsx-linux). Signed-Off-By: Jacky Malcles <>.


Introduced PREFIX and LIBSUFFIX variables. DESTDIR is often used within packaging scripts/spec files. Use PREFIX variable instead to manipulate the installation destination directory. Introduced LIBSUFFIX to allow to manipulate library directory to lib64 e.g. for distribution packaging for x86_64 or others architectures. Signed-off-by: Daniel Gollub <>.


Dont install ltp.pc and libltp.a with excutable flags. Signed-off-by: Daniel Gollub <>.

CFLAGS fixes

Apply CFLAGS to compiler to ballista, kernel/syscalls/utimestat. Compile everything with (user-defined) CFLAGS. Signed-off-by: Daniel Gollub <>.

CFLAGS fixes

Avoid overwriting of compiler specific flags in open posix testsuite. Instead of overwriting CFLAGS, append custom flags. Don't append debugging info, optimizing or warning related compiler flags. This would "overwrite" the user definied CFLAGS again. Signed-off-by: Daniel Gollub <>.

LOGFILES Corruption fixes

Logfiles of the ltp testdriver "runltp" can get corrupted due to "unsafe" temporary directories and not failing when temporary already exist. The temp directory is /tmp/ltp-$$ which can cause logfile corruption once the PID overflows, since "mkdir -p" will NOT fail, and runltp starts writing into an already existing log directory. This patch creates a temporary directory by using "mktemp", which replaces the "mkdir -p" call. runltp will fail once "mktemp" runs out of combinations (instead of corrupting logfiles silently). Patch is based on the idea from Erik Hamera to create more "safe" temp directories. Various patch improvements/fixes got contributed by Klaus Wagner as well. Signed-off-by: Daniel Gollub <>.

Multiple WARNINGS fixes

This patch fixes most of warnings and badness including the following. Compiled successfully on Fedora 10 Beta x86_64. Signed-off-by: CAI Qian <>.

builtin_memset_chk overflow warning fix for pec_listener.c

fix builtin_memset_chk overflow warning for kernel/connectors/pec/pec_listener.c. with GCC 4.3 and with LTP CVS snapshot from today i got following warning when using the GCC Object Checking Builtins: Signed-off-by: Daniel Gollub <>. It's not a correct fix, the patch initializes the message header only. Below is a correct one: Allocate a buffer large enough to hold NLMSG_SPACE(MAX_MSG_SIZE). Signed-off-by: Li Zefan <>.

Nfsv4 acl1.c warning fix

This patch fixes most of warnings and badness including the following. Compiled successfully on Fedora 10 Beta x86_64.Signed-off-by: CAI Qian <>. Compiled the latest CVS tree on a x86_64 machine yelling a warning, "acl1.c: In function ‘do_file_op’: acl1.c:62: warning: not enough variable arguments to fit a sentinel" Signed-off-by: CAI Qian <>.


CAI Qian <> reported that Setgroups01_16 test always fails for x86_64: setgroups01_16 1 FAIL : setgroups(65536, list) Failed, errno=14 : Bad address, Seen it on both of those Kernels, 2.6.27-0.392.rc8.git7.fc10.x86_64, 2.6.18-92.el5. Any idea on if it is a test code issue or OS bug? Daniel Gollub <> replied that I just sent some patches for setgroups02_16 - looks like it's a similar problem for setgroups01_16 (for some reason setgroups01_16 didn't failed for me, only setgroups02_16). Anyway, i guess the reason is the use of the uninitialized groups list and passing the _full_ length to the syscalls. Could you try attached patch? Signed-Off-By: Daniel Gollub <>.


Change argument list of GETGROUPS/SETGROUPS to represent the argument list of the syscalls. getgroups() first argument is a signed int!. Signed-off-by: Daniel Gollub <>. Also, setgroups02(_16) is working with an uninitialized list, expect the first GID field. setgroups() and getgroups() additionally get called with the full length of the uninitialized list. The uninitialized values cause setgroups02_16 to fail: === setgroups02_16 1 BROK : gid returned from getgroups is too large for testing setgroups32 === Since the uninitialized values could be greater then 0xffff. Signed-off-by: Daniel Gollub <>.


Hi. Here I am getting the following error (with Ubuntu 7.04): elder@Yosemite:/tmp/ltp/testcases/ballista$ LANG= make -f Makefile WARNING: No perl detected; skipping ballista tests This is caused by a bashism in the makefile (see patch 1). I've compiled & ran ballista on Debian lenny, and found out some patches are needed to make it work. Patches 1 and 2 are fix bashisms causing failures when using Debian's dash. Signed-off-by: Jiri Palecek <>.


This fixes a problem when generated the test executable source, which causes the last argument of the tested syscall to be repeated (eg. call chdir(char*) would end up as chdir(char*, char*)). Signed-off-by: Jiri Palecek <>.


Adds using declarations to generated sources, where needed. Added using namespace std; directives to files that use unqualified names from std:: Signed-off-by: Jiri Palecek <>.


Fixed some bashisms. Jiri Palecek <>.


Typo in Signed-off-by: Jiri Palecek <>.


Fix bashisms in This includes two atypical cases: a lexicographical comparison of two strings, which has been emulated by "sort", and some strange bash-array-ism, which has been emulated through "eval". Signed-off-by: Jiri Palecek <>.


Fix bashisms (function keyword in Signed-off-by: Jiri Palecek <>.


When building ltp on 2.6.24 kernel, the timerfd test failed to build. This is caused by NR_timerfd being defined without NR_timerfd_create, because the test checks for NR_timerfd, but uses NR_timerfd_create. The attached patch should fix that. Correct the condition of compiling the timerfd test; should fix FTBFS with some kernel versions. Signed-off-by: Jiri Palecek <>.

ADE fix

The file_test detects MSB architectures by grepping for "power" or "ppc" in /proc/cpuinfo. This is unfortunate if, on a LSB architecture, /proc/cpuinfo contains the word "power_management". The attached patch should fix it. Implement a (hopefully) proper way of getting machine endiannes in The old way tested if cpuinfo contained the word "power" for big endian machine; this was easily confused by "power_management". Signed-off-by: Jiri Palecek <>.


Running hugemmap02 test case on IA-32 generated SIGSEGV. It also gives warnings when compiling: cc -I../../../../../include -g -Wall hugemmap02.c -L../../../../../lib -lltp -o hugemmap02 hugemmap02.c: In function ‘main’: hugemmap02.c:149: warning: integer constant is too large for ‘long’ type hugemmap02.c:156: warning: integer constant is too large for ‘long’ type The following patch fixes it by making low memory addresses falling in a 2G - 3G range. Signed-off-by: CAI Qian <>


The mc_cmds script under ltp network test returns "fail" when /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts is set to 1. This just means that this feature is disabled. Added a check to report this message and exit. Vinay Sridhar <>. fix for s390x

This patch fixes file_test failure on s390(x). Signed-off-by: Jeff Burke <>. Signed-off-by: CAI Qian <>.


The runltp has the parameter "-d" to identify the temporary directory by user. But in the latest runltp, there're two problem: 1> Always use "/tmp" as the temporary directory and never use the one that user defined. 2> It will be in error if the parameter "TMPDIR" is a relative path. This patch fixes those issues. Signed-off-by: Jin Bing Guo <>

LD01 -fPIC fix

This patch fixes the ld01 test failure on x86_64. Signed-off-by: Jeff Burke <>. Signed-off-by: CAI Qian <>.

SYSCALLS tests Integration

I found no reason why they should not be run: Signed-Off-By: Subrata Modak <>.

LOCALS introduced in

Re-introduce locals. The issue I was solving when making this patch was checkbashisms ( complaining about it, so I had to patch it to get rid of lintian warnings. I've checked that: - the variables are always initialised before use in the testXX functions, - the testXX functions don't recurse nor call each other, - the variables are not used outside testXX functions, so IIUC, the transformation should be safe. However, if you're seriously worried about it, you can reintroduce the locals by applying the attached patch, it wouldn't matter to me. Signed-Off-By: Jiri Palecek <>. Mike Frysinger <> wanted them back.

FORK09 fix

The current fork09 test case breaks if there is an FD (with a higher number) opened for the testcase. This would fail as the test is not able to detect the fact that it has already opened 1024 files ! This situation is quite possible in an automated environment where people could run the LTP tests from. The patch attached fixes the issue. Please apply ! This will make the test more robust and free from assumptions ! ;). Signed-off-by: Suzuki K P <>.

GETSID02 fix

This patch fixes the following compilation warning seen on PPC64. Signed-off-by: CAI Qian <>.


I tested the connectors case on SLES11 beta2 for ppc. Some tests fail. It's the getopt() error in connectors/pec/event_generator.c file. The type of return value in getopt() is "int", not "char". This Patch solves the problem. Signed-off-by: Jin Bing Guo <>.


I've understood the explanation and I've confirmed the correctness. But I think the behavior of io_submit(ctx, 0, (void*)-1 ) on ppc64 is interesting. So I don't like to throw io_submit(ctx, 0, (void*)-1 ) test case away <A>. Also I'd like to dig the kernel more <B>. For <B> I'd like to submit following patch to lkml in the future: For <A> I've revised the patch. Signed-off-by: Sridhar Vinay <>, Signed-off-by: Jin Bing Guo <>, Signed-off-by: Masatake YAMATO <>.

Addition of GCOV-KDUMP tool to LTP

SYSCALLS tests Integration

I found no reason why they should not be run: Signed-Off-By: Subrata Modak <>.

SIGNALFD01 Compilation Fix

Thanks. Attached page is based on your advise. Signed-off-by: Masatake YAMATO <>. However, the page tells *older* version of 2.6.23 uses signo instead of ssi_signo as a field name. Subrata, could you try the patch on your 2.6.27 first.

CONNECTORS Compilation Fix

Subrata <> wrote: I found some compilation errors for the connectors at today´s CVS snapshot on the following machine. Can you please look into this: 1) uname -a, Linux 2.6.27-autokern1 #1 SMP Mon Oct 20 00:45:37 PDT 2008 i686 GNU/Linux. How about: check if NETLINK_CONNECTOR is defined (in netlink.h). If not, we can't include connector.h, so we break the test. If yes, we check if CN_IDX_PROC is defined. Subrata, can you try the following patch? Signed-off-by: Li Zefan <>.


The getcpu() test-function returns the current scheduled CPU id of the test-process for archiectures expect i386, which is not the intended return value of a syscall test. Attached patch returns instead 0, for non-i386 ARCH and GLIBC_PREREQ(2,6). Tested on x86_64. Signed-off-by: Daniel Gollub <>.


openposix testsuite is skipping PPC64 builds due to different location of the "main" function symbol on PPC64. Author: Erik Hamera <>, Signed-off-by: Daniel Gollub <>.


please find attached a fix for potential overflows in sched_tc4 and sched_driver. sched_tc4: RAWDEV could be much large then 16 chars - e.g. /dev/cciss/c0d0p6 (18) (only use of RAWDEV in entire sched_stress module). sched_driver: pathname could be much large then 50 - increased to PATH_MAX. Problem observed and original fixed by Yi Xu. Patch got slightly cleaned-up/modified. Reviewed-by: Daniel Gollub <>, Signed-off-by: Daniel Gollub <>.


Again, the patch deals with _NR_fstatat64 and NR_newfstatat stubs when builds the test. We do not really want to test stubs when a good definition is available. See attached patch file, copy here. Tested with _fstatat64 or NR_newfstatat defined, not tested when both stubbed. Signed-off by : Vlad Malov <>.

SELINUX BOUNDS tests addition

Replacement of deprecated interfaces: The fixes some of deprecated interfaces and inject an interface to kick test script from unconfined domain. So, I can run the testsuite which includs bounds test without any problems on Rawhide. However, I got some warnings for deprecated interfaces/macros like r_dir_perms, userdom_sysadm_bin_spec_domtrans_to or userdom_use_sysadm_ptys. The attached patch is a new test case of the boundary feature, which contains six tests, as follows: test01: It tries to invoke setcon() with bounded domain in a multi-threaded process. The expected result is success. test02: It tries to invoke setcon() with unrelated domain in a multi-threaded process. The expected result is fail. test03: It makes a bounded domain try to read a file, when its bounds domain can read the file. The expected result is success. test04: It makes a bounded domain try to write a file, when its bounds domain cannot write the file. The expected result is fail, because write permission is boundary violated. test05: It tries to write a bounded type, even if the domain cannot write to its bounds type. The expected result is fail. test06: It makes a bounded domain try to set an attribute of bounded type. Thanks, Signed-Off-By: KaiGai Kohei <>.

EPOLL() test integration

Integrate execution of epoll() syscall testcase. Signed-Off-By: Subrata Modak <>.

TIMERS tests Integration

Integrated TIMERS tests ( to default LTP run: runltp. Signed-Off-By: Subrata Modak <>.

SCHED CLISERV tests addition

Integrated SCHEDULER Client Server Tests to default LTP run ./runltp. Signed-Off-By: Subrata Modak <>.

SCHED_STRESS tests addition

Integrated the sched_stress to default LTP run for 2 minutes. Signed-Off-By: Subrata Modak <>.

Addition of Initial Set of POWER MANAGEMENT Testcases to LTP. Signed-Off-By: Nageswara R Sastry <>.

GET_ROBUST_LIST01 & SET_ROBUST_LIST01 build error fix for s390x

Fixed Build errors on s390x. Signed-Off-By: Ramon de Carvalho Valle <>.

2.6.27 GCOV Patch Modification

Added the Kernel Options that need to be set after applying the Patch and for successfull loading of the GCOV kernel during usage of lcov. Signed-Off-By: Subrata Modak <>.


I wanted to have all the special configuration parameters needed in the kernel .config file for enabling some features, for which test cases are there in LTP, but those tests will not run until the running kernel was enabled. I wanted the consolidated list in the ltp/README itself. I have generated a small patch for this. I would request others also to add to this when they find out such scenarios in LTP. Please feel free to add. We do not want situations where test cases are available in LTP, but they cannot be tested just because that the kernel was not built with configuration(s) set. Signed-Off-By: Subrata Modak <>.


The result of alloc_mem thread could be either NULL, ptr to some allocated memory or (void*)-1. The code reading this result actually handled cases 1 & 2 only, and even case "NULL" was mishandled, causing a segfault. This patch fixes it, by: - removing the case when alloc_mem would return -1, change it to the "allocated memory" case, - not checking for *th_status, if th_status might be null, Signed-off-by: Jiri Palecek <>.

SEGMENTATION fault fix Network/lib6/in6_02

In the i2ntest1 testcase, the call if_nametoindex(TEST_RETURN) was segfaulting, because TEST_RETURN was actually result of comparison (ifname==if_indextoname(...)). The fix is to call it with real ifname. Signed-off-by: Jiri Palecek <>.

SEGMENTATION fault ipv6/perf_lan6/pingpong6

Fix segfaults on getaddrinfo failures in pingpong6.c. pingpong6.c would segfault if getaddrinfo fails, because it would go on after the failure and read invalid data (ie. the hp pointer). The fix is to exit immediately on getaddrinfo errors. Signed-off-by: Jiri Palecek <>.

Double Escaping Error fix for tst_res

Fix double unescaping error in tst_resm. when calling tst_resm (and several other tst_* functions) with a string containinig "%%", tst_resm would not output a percent sign, but formats some data instead (eg. "%%fs" in fork05 test ends up as "0.00000s". This is because once the escapes have been processed by tst_resm, they are processed again by tst_res called by tst_resm. The attached patch fixes this behaviour. Signed-off-by: Jiri Palecek <>.

GETCPU01 #ifdef cleanups

clean up nested #ifdef mess

Warning fix on PPC64 for endian_switch01

The following hack fixes the "endian_switch01.c:115: warning: ‘main’ takes only zero or two arguments" warning. Signed-off-by: CAI Qian <>.

Epoll Makefile Fix

Compilation problem with latest cvs: epoll test. Hello. I had a problem when compiling today's version with Ubuntu. The following patch fixed the issue (I guess it is a bashism). Signed-Off-By: Elder Costa <>.

mips64 support for resvmsg01 and sendmsg01

Add mips64 support to resvmsg01 and sendmsg01 tests. wo rivial patches to add yet another 64-bit architecture. Tested on mips64 Octeon, Linux 2.6.27. Signed-off by : Vlad Malov

shmem_test_06 fix

Shmem_test_06: Let System Choose Suitable Addresses at Which to Attach the Segments. Shmem_test_06 still fail occasionally because it tries to attach segments to fixed addresses. It is still possible that one of those addresses has been used due to address space randomization or whatever reason. This is because the chosen address starting from 80000000 has already been used. This patch fixes the problem by letting system choose suitable addresses at which to attach the segments, and still satisfy the purpose of the test - simultaneous attachment of more than ten shared memory regions to a process. Using segment registers 0x3 to 0xC and 0xE. Now, the test works fine. Tested successfully on i386 and s390x machines. Signed-off-by: CAI Qian <>. fix

This patch fixes a bash specific comparison in script. Signed-Off-By: Elder Costa <>.

Segmentation Fault Fix for PAN

Fix segfault of "pan" on signal action. pan segfaults when receiving various signal registered by sigaction. Valgrind reports various uninitalied bytes of the sigaction struct: Initializing the sigaction struct as empty avoids a segfault of "pan". Signed-off-by: Daniel Gollub <>. Acked-by: Nate Straz <>.


Fix the shared memory getting and removing in madvise03. <Bug 1>: In madvise03 case, it would apply a large size shared memory. But in some system, it was greater than the shmmax. So it would be failed. <Bug 2>: It would not remove the shared memory when it exited. Signed-off-by: Jin Bing Guo <>.


Fix the exit value in inotify cases on RHEL4.7. The RHEL4.7 (kernel-2.6.9-78.EL) does not support inotify system calls. So it should send out an information and return 0. In addition, tha patch also fixed a compile warning: Signed-off-by: Jin Bing Guo <>.

LTP Information gets added to linux-mm/Maintainers file Fix

The attached patch fixes some errors when running with Ubuntu due to some bash specific syntax. It also has some minor cosmetic and indentation changes. CAVEATS: 1- The comparisons failed because the script was generating empty files and the comparisons in line 181 failed. However the test proceeded as if the comparisons were successful. There is still room for improvement. 2- I had to change Ubuntu default configuration (enable cron log file and rename it from cron.log to cron) for the test to succeed. Signed-Off-By: Elder Costa <> Fix

Fix Cron Test Fails to Compare. This patch fixes a comparison failure spotted by Elder Costa because the script was generating empty files. Signed-off-by: CAI Qian <>.

at_allow01 & at_deny01 fixes

At_allow01 and at_deny01 test cases always fail, because the result code handing is incorrect. This patch fixes it, and also tidy up code a little bit. In addition, looks like there is a bug for at utility with a non-login shell, so I suppose it does not hurt to work around this particular bug by using a login shell. Tested successfully on a x86-64 and s390x machines. Signed-off-by: CAI Qian <>.

NUMA tests default Integration

I hope the numa infrastructure will handle stuff non-numa systems. Signed-Off-By: Subrata Modak <>.

HUGETLB tests default Integration

Integrate hugetlb tests into runltp. Also modify the way hugemmap02 is run. Signed-Off-By: Subrata Modak <>.

MTEST06 tests default Integration

The following patch Integrates the remaining MTEST06 into runltp. Signed-Off-By: Subrata Modak <>.

MMAPSTRESS tests default Integration

The following patch Integrates the remaining MMAPSTRESS into runltp. Signed-Off-By: Subrata Modak <>.

mm_core_apis compilation warning fix

Following warnings are generated when compiling mm_core_apis.c. Attached patch fixes them. Signed-Off-By: Subrata Modak<>.

mm_core_apis tests default Integration

The following patch integrates build/install/run of mm_core_apis to Signed-Off-By: Subrata Modak<>.

io_aio tests default Integration

The following patch integrates running of aio tests to Signed-Off-By: Subrata Modak<>.

FSX-LINUX duplication cleanup

This patch drops the redudant copies (in total three copies of fsx-linux.c from:- testcases/kernel/io/ltp-aiodio/- testcases/network/nfs/fsx-linux. The only copy of fsx-linux.c will stay in: - testcases/kernel/fs/fsx-linux/fsx-linux.c. Attached patch adapt the TCbin= variable of the runtests file to the install target "$LTPROOT/testcases/bin" to find the (shared) build of fsx-linux. Signed-off-by: Daniel Gollub <>. Acked-by: CAI Qian <>. fixes

The following patch complements previous ones to fix/improve the behaviour of script. Some fixes inspired in CAI Qian's previous posts. Changes: 1- Added LANG= in the script executed by cron to avoid issues with internationalization. 2- Reordered some tests so that one checks if one of the variables TS_MIN is empty (in case there was some problem to create the file tst1_cron.out). 3- Eliminated the \t\n from the output strings that caused the problem reported by Subrata. 4- Fixed the order the expected x received values are printed out to the output log. This version fixes an error in the previous patch that prevented it from applying correctly and added minor cosmetic changes. Signed-Off-By: Elder Costa <>.

LTP Changes during SEPTEMBER 2008

Task Title

Task Description

libclone.c fix

Fix build error for libclone.c. Signed-off-by: Veerendra Chandrappa <>.

netpipe Makefile fix

Set executable flag for without which just performs an santiy check if the user is root to run chmod 755, which doesn't require root priviliges. Signed-off-by: Daniel Gollub <>.

libtestsuite fix

sync_pipe_close() returns an uninitialized value when it is passed an already closed pipe. Signed-off-by: Roy Lee <>.

GETEGID16 syscall test cases addition

sync_pipe_close() returns an uninitialized value when it is passed an already closed pipe. Signed-off-by: Roy Lee <>.

SWITCH syscall test cases addition

This can only be tested on a POWER6 machine. A program to test it is attached. --Paul Mackerras. Thanks for sharing the test case with LTP. I have ported it to bare minimum LTP requirement and ran it on various architectures and kernel versions to test out the behaviour of the test on these machines. Yamato, When you find time, kindly add more specific stuff that we have specially for the LTP syscall tests, things like running in a loop, running concurrently, etc. And here goes the Patch. Paul, you can propose more modification to this if you wish to: Signed-off-by: Paul Mackerras <>, Signed-off-by: Subrata Modak <>.


I have seen that in some of my systems, utimensat fails to build because of some definitions missing in system headers. Do, you think we can apply the following patch: Signed-Off-By: Subrata Modak <>.

SWITCH01 fix

Looks OK as far as I can see, except that I wonder why you check for being root: since there is no restriction by the kernel on which processes can use this system call. A process can't do anything to any other process using this system call, so there's no reason to restrict it. Also you might like to call it "endian_switch()" rather than just "switch()". Paul Mackerras <>.

AWK replacing GAWK fix

The following two scripts cannot execute correctly on my box, which doesn’t equip gawk but awk (busybox). This patch makes them, as well as other scripts( see the patch), to not explicitly using gawk but awk.

tst_tmpdir() cleanups

This patch does the following: 1. These test cases failed with "open returned unexpected errno 2" because the child process falls through to execute redundant cleanup(), 2. Added code to use the tst_tmpdir()/tst_rmdir() APIs. Signed-Off-By: <>


Remove redundant bits from the container test script. Keep the nicer/self-consistent info. Add proper dependencies on check_for_unshare rather than shoehorning it in as a MAKE command in *only* the 'all' target. Signed-off-by: Matt Helsley <>,Acked-by: Serge Hallyn <>,


Make these rules a tiny bit more generic using the automatic $@ variable. This means anyone copying this line is less likely to make copy/paste errors. Signed-off-by: Matt Helsley <>, Acked-By: Serge Hallyn <>.


When it comes to this program, why should we care what the arch is? Shouldn't the SYS_ and NR numbers alone tell us if unshare() is relevant here? Signed-off-by: Matt Helsley <>, Acked-by: Serge Hallyn <>,


Now that we have proper dependencies on check_for_unshare we take explicit tests for unshare out of the top-level make file and distribute to each subdir Makefile as ifeq...endif sections which control which targets to build. While it doesn't avoid descending into subdirs it's easier to read and check the make code when most of the build rules don't have shell flow control. Even better if we could change the contents of SUBDIRS based on the results of running check_for_unshare. Also note the use of := and not =. info Make is our friend. Signed-off-by: Matt Helsley <>, Acked-by: Serge Hallyn>,


Now that they are in it's best to drop the noltp junk leftover from the LTP port of the container tests. Signed-off-by: Matt Helsley <>, Acked-by: Serge Hallyn <>.


Use non-recursive assignment. This means, for example, that: SRCS $(wildcard *.c) will call the wildcard function, substitute the output, and assign it to SRCS. Recursive assignment (plain) would use the output and continue performing substitutions until no further substitutions could be made. Signed-off-by: Matt Helsley <>, Acked-by: Serge Hallyn <>.

NETWORK script(s) fixes

The operator for string unequivalent check is not '-ne' but '!='. Signed-off-by: Mitsuru Chinen <>.

NETWORK script(s) fixes

The state of finger service is not got correctly as an option for netstat is lacked. Signed-off-by: Mitsuru Chinen <>.

NETWORK script(s) fixes

Although ping6 doesn't have -R option, it is specified. It should be removed. Signed-off-by: Mitsuru Chinen <>.

SWITCH01 build error fixes

Fix the build error for some systax error. Also fix some warnings. Signed-off-by: Jin Bing Guo <>.


Part of these tests are pretty much enough to invoke an oom-killer. Let the test do the functional testing part, and, we can do stress testing with hackbench seperately. Signed-Off-By: Subrata Modak <>.

time-schedule Memory Leak Fix

Fix memory leak in time-schedule. Signed-off-by: Jin Bing Guo <>

trace_sched Memory Leak Fix

Fix memory leak in trace_sched. Signed-off-by: Jin Bing Guo <>

message_queue_test_01 Memory Leak Fix

Fix memory leak in message_queue_test_01. Signed-off-by: Jin Bing Guo <>

semaphore_test_02 Memory Leak Fix

Fix memory leak in semaphore_test_02. Signed-off-by: Jin Bing Guo <>

Foo* syscalls test cases Macro Definition file

I worked on 2 test cases for foogid16 system calls; and I will do 5 more. All these test cases have the same macro. So I'd like to introduce compat_gid.h; and put the macro to the file. Could you add compat_gid.h to testcases/kernel/syscalls/utils/ and apply patches for existing test cases? Here after I'd like to use the compat_gid.h in newly ported test cases. Signed-off-by: Masatake YAMATO <>,

Containers Makefile fix

Add $(CFLAGS). From: Roy Lee <>.

switch01 renamed to endian_switch01

Paul <> wanted the name to be endian_switch. Michael Kerrisk <> seconded his suggestion.

Enable CONNECTORS run by default

Don't warn that TCID, TST_TOTAL and TST_COUNT is not set when using tst_kvercmp. And. Check /proc/net/connector to see if process event connector is supported or not. Also merged some cleanups done by Matt Helsley. Signed-off-by: Li Zefan <>.

semaphore_test_03 Memory Leak Fix

Fix memory leak in semaphore_test_03. Signed-off-by: Jin Bing Guo <>

Compat_16 & fix

I think TST_NEWER_64_SYSCALL is better than TST_NEWER_64 because is local to testcases/kernel/syscalls. This rule is applicable to Signed-off-by: Roy Lee <>. Signed-off-by: Masatake YAMATO <>.

SIGNALFD syscall test cases addition

Addition of signalfd() syscall test case(s) to LTP. Signed-Off-By: Masatake YAMATO <>.

RT Tests cleanup

This patch removes outdated (or irrelevant) parts of the existing documentation and updates its. Also incorporated are suggestions made by Darren. Signed-Off-By: Chirag <>.

RT Tests cleanup

This patch fixes a few minor issues in 1. Adds list option to the usage() command. 2. Remove java from "all" tests to be run. 3. It fix the output of usage (./ or ./ -h) Tested: Running "./ -t func", "./ -t all" , "./", "./ -h" Signed-Off-By: Chirag <>

RT Tests cleanup

This patch ensures that the python scripts support utf encoding. Prior to the patch, the python scripts would exit with this error: File "", line 3 SyntaxError: Non-ASCII character '\xc2' in file on line 3, but no encoding declared; see for details This patch fixes it. Tested: Running all the python scripts. Signed-Off-By: Chirag <>.

GETCPU01 fix

This patch fixes the getcpu patch for parisc (and probably other platforms as well). The check for "GLIBC >= 2 && GLIBC_MINOR >= 6" is wrong. It breaks as soon as a glibc 3.0 would be published. Replace it with GLIBC_PREREQ(2,6). Tested on parisc and i386. Signed-off-by: Helge Deller <>.


Garrett, thank you for input. I think my patch works as you wrote. My patch tries sys/signalfd.h then linux/signalfd.h. So I can say my patch tries "whatever's the newest standard"(glibc header file) then "deprecated version"(no glibc header but kernel header file). It is important point. Thank you. CROSS_CFLAGS should be considered when checking the existance of header file. I update the last patch. It does 1. If sys/signalfd.h is not available, use syscall to invoke signalfd. 2. CFLAGS is considered when checking the existance of signalfd.h. 3. Checking the existance of signalfd.h in addition to checking sys/signalfd.h and linux/signalfd.h. Signed-off-by: Masatake YAMATO <>.

CONTAINERS compilation error fix

When I built and installed the latest LTP cases, some errors broke the install process. And the system didn't support "unshare". The patches modified these files. Signed-off-by: Jin Bing Guo <>. Based on a cursory glance and memory of Matt's patches, this looks good.Serge E. Hallyn" <>.

HUGETLB test run fix

I got this failure because of the typo in the testcase. # ./hugemmap01 -H/huge hugemmap01 1 FAIL : open() on /huge/1602mmapfile Failed, errno=2 : No such file or directory This failure needs to be /huge directory present inside the / directory. I don't think mkdir /huge is a good idea so i modified as : Signed-off By: Rishikesh K Rajak <>.


Here is some small correction in memory map stress testcases. Result before applying patch: # ./mmapstress01 -h ./mmapstress01: invalid option -- h usage: ./mmapstress01 -p nprocs [-t minutes -f filesize -S sparseoffset -r -o -m -l -d] mmapstress01 1 FAIL : Test failed Result after applying patch: # ./mmapstress01 -h ./mmapstress01: invalid option -- h usage: ./mmapstress01 -p nprocs [-t minutes -f filesize -S sparseoffset -r -o -m -l -d] Signed-off By: Rishikesh K Rajak <>


The Makefile in the mqueues- and semaphores directory of the open_posix_testsuite try incorrectly to overwrite the compiler and have no clue about the fact that there could be a cross compilation scenario, so it tries to search libs in /usr/lib. This results in the following command line: make[2]: Entering directory `<somewhere>/ltp-full-20080831/testcases/open_posix_testsuite/stress/mqueues' gcc -Wall -O2 -g -I -L/usr/lib -lpthread -I../../include multi_send_rev_1.c -o multi_send_rev_1.test -lmqueue which is obviously wrong for cross compilation. With this change the right compiler and the right libs from the toolchain are being used. Signed-off-by: Robert Schwebel <>.


The Makefile in the mqueues directory of the open_posix_testsuite wants to link the mq_open testcase against libmqueue. POSIX.1-2001 states: "Link with -lrt". So this is definitely wrong, and we do what the standard recommends. Signed-off-by: Robert Schwebel <>.


The semaphores tests of the open_posix_testsuite want to link again libposix1b, but I don't have any idea why it tries to do so. However, it results in: gcc -Wall -O2 -g -I -L/usr/lib -I../../include multi_con_pro.c -o multi_con_pro.test -lposix1b -lpthread /usr/bin/ld: cannot find -lposix1b. This patch removes the bogus library. Signed-off-by: Robert Schwebel <>.

NETWORK lib6 fixes

To make POSIX namespace clear, glibc-2.8 requires people to define _GNU_SOURCE when they use Advanced Socket APIs. Signed-off-by: Mitsuru Chinen <>.

NETWORK lib6 fixes

The definitions, ICMP6_RR_PCOUSE_DECRVLTIME and ICMP6_RR_PCOUSE_DECRPLTIME are wrong. According to RFC3542, they should be CMP6_RR_PCOUSE_FLAGS_DECRVLTIME, ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME. Signed-off-by: Mitsuru Chinen <>.

NETWORK lib6 fixes

"man 3 cmsg" says "Ancillary data should only be accessed using the CMSG macros and never directly." Indeed, when we handles cmsghdr mamber directly, this test falls into the infinite loop on a x86_64 environment. Signed-off-by: Mitsuru Chinen <>.

NETWORK lib6 fixes

When we compile the test codes with -Wall option, lots of warning appear. It is better to remove them for the future debbuging. Signed-off-by: Mitsuru Chinen <>.

GETGID16 syscall test cases addition

Addition of getgid16() test cases. Signed-off-by: Masatake YAMATO <>.

ipc_stress fix

In testcases/kernel/ipc/ipc_stress/cleanup file, it uses the command "ipcrm " to delete the ipc resources. But usage is deprecated and noneffective in some cases. Signed-off-by: Jin Bing Guo <>.

float segmentation fix

Segmentation fault error: When I ran runtest/math with runltp, the float cases worked well. But they would drop into segmentation fault when they were called directly in command line. The reason is to input "NULL" to strlen() which caused Segmentation fault. The patch also fixed a large number of memory leaks in math/float cases.Signed-off-by: Jin Bing Guo <>.

mem02 memory leak fix

Fix memory leaks in mem02. Signed-off-by: Jin Bing Guo <>.

pipeio memory leak fix

Fix memory leaks in pipeio. Signed-off-by: Jin Bing Guo <>.

mallocstress memory leak fixes

Fix memory leaks in mallocstress. Signed-off-by: Jin Bing Guo <>.

confstr01 memory leak fixes

Fix the error in freeing memory on confstr01. In confstr01.c, it's wrong that it reset the buffer contents to NULL before freeing the memory allocated. Signed-off-by: Jin Bing Guo <>.

NETWORK NAME SPACE tests addition

Addition of Initial Set of Network Name Space test cases. Signed-Off-By: Veerendra <>.

getegid02 movement

The attached patch moves getgid02.c to getegid02.c. Signed-off-by: Masatake YAMATO <>. modification

Added Default LTP run, Ballista & Open Posix Suite run to More such tests are to follow. Signed-Off-By: Subrata Modak <>.

ADMIN_TOOLS addition to default run

I am not sure why runtest/admin_tools was kept outside the perview of LTP default run. I found no issues in running it as normally as other LTP tests. Please let me know if some of you have some problem running it as default. Also included are some changes for running fs_acls tests. Signed-Off-By: Subrata Modak <>.

RT fix

-t test-arguments fix. Signed-Off-By: Chirag <>

Include fixes for <dirent.h> & <page.h>

Daniel Gollub <> wrote: With 2.6.27-rc* linux/dirent.h got removed Kbuild headers_install targe and dirent struct got removed. Instead use #include <dirent.h> instead of #include <linux/dirent.h>. Garrett Cooper <> wrote: It appears that asm/page.h isn't packaged with sources anymore as of 2.6.25, according to some folks on #fedora-devel. I was just wondering a) if that's the case, b) whether or not those affected test compiles have been identified and removed / modified? If both questions are true and no one has pointed out this issue before now, I've found all of the items which don't follow this behavior: According to the folks in #fedora-devel (airlied, jwb), we shouldn't be using asm/page.h directly, but instead should be accessing everything in page.h via sysconf(2), like so: PAGE_SIZE => sysconf(_SC_PAGE_SIZE). This method is POSIX compatible as per: Yes, it is. There are numerous test cases in LTP which use: struct dirent, by including /usr/include/dirent.h. The interesting part is, this guy (/usr/include/dirent.h) in turn includes /usr/include/bits/dirent.h, where the definition of struct resides. Following is the patch which solves this issue along with page.h header file removal from 2.6.25 onwards, reported by Garret earlier. Signed-of-by: Subrata Modak <>.

IOCTL() addition to default LTP run

Adding ioctl() testing of all /dev/tty* devices into the default LTP run. Signed-Of-By: Subrata Modak <>

Genload Makefile

Simplify genload Makefile. It turns out most of these options aren't needed to build stress. Signed-off-by: Nate Straz <>.

EVENTFD Makefile fix

This patch introduces new check_header defined in utils/ to Makefile for eventfd test cases. Signed-off-by: Masatake YAMATO <>.

INOTIFY Makefile fix

This patch introduces new check_header defined in utils/ to Makefile for inotify test cases. Signed-off-by: Masatake YAMATO <>.

SIGNALFD run fix

Added runtest/syscalls entry for signalfd. Signed-off-by: Masatake YAMATO <>.

MODIFY_LDT Makefile fix

This patch introduces new check_header defined in utils/ to Makefile for modify_ldt test cases. Signed-off-by: Masatake YAMATO <>.

IO_* Makefile(s) fixes

In io_cancel01 , io_destroy01, io_getevents01, io_setup01, io_submit01, if the libaio-devel package didn't been installed on the system, some errors would be occured. To fix it, the each Makefile would be modified. Signed-off-by: Jin Bing Guo <>.


When the libcap-2.11 or newer didn't been installed on the sysytem, the filecaps testcase would return a message instead of an error. Signed-off-by: Jin Bing Guo <>.

MODIFY_LDT Makefile & switch01 fix

On ppc64, the modify_ldt cases would not been compiled. So it should be return the message: "System doesn't support execution of the test" instead of an error message. In addition, the Fix_runtest_syscalls.patch also resolved the switch01 running error. Signed-off-by: Jin Bing Guo <>. fix fails to detect the group nobody does not exist and exits with 0 status. This patch fixes this behavior. I have added a small cosmetic change to indicate No is the default response to the question asked by the script. Signed-Off-By: Elder Costa>. fix

The following patch is for script testcases/kernel/ipc/ipc_stress/ It fixes a test error (line 72) and a bash specific test extension. (lines 72 and 102) that fail to run under Ubuntu (and probably Debian) as /bin/sh points to dash instead of bash (as in Redhat/Fedora). This script would also benefit of a reformatting as it lacks indentation but I wanted to keep the patch simple and I am not familiar with script format style of LTP.Signed-Off-by: Elder Costa <>.

Creat08 fix

The following patch fixes testcases/kernel/syscalls/creat/creat08.c just like the previous one for open10.c. Signed-Off-By: Elder Costa <>.

open10 fix

The following patch is for testcases/kernel/syscalls/open/open10.c. Ubuntu (and I believe, Debian) does not have a nobody group and the program fails to run. I added some lines instead to test for "nogroup" instead which I believe is Debian's equivalent and must do what the program is intended to. Signed-Off-By: Elder Costa <>.

verify_caps_exec fix

Trivial patch to remove an unused local var. Signed-off-by: Serge Hallyn <>. fix

I needed the following patch in order for file capabilities to correctly install. If there is a better way to do this, that's fine with me, but CC was undefined and this was the easiest way to get past this. Signed-off-by: Serge Hallyn <>.

LTP Changes during AUGUST 2008

Task Title

Task Description


Compile error message occured on ia64 box. You should get a gcc warning on x86: "PAGE_SIZE" redefined. We can avoid the warning: #ifndef PAGE_SIZE #define PAGE_SIZE getpagesize() #endif But normally upper-case macros means constants, but the above macro is not a constant. Shi Weihua <> & Li Zefan <>.

fs_inod fix

This patch fixes the fs_inod script. On error-condition it was not setting up proper error values and used to throw up error. Also, it was referring to a non-existent function 'error()'. Now it returns 0 on Success or non-zero value on Failure. I have verified this script on ReadWrite dir and ReadOnly-dir where the tests fail. Signed-Off-By: Veerendra Chandrappa <>.

SETGID16 syscall test addition

Addition of setgid16 syscall tests. I've tried this task. Please put compat_16.h to testcases/kernel/syscalls/setgid. And apply following patch before rebuilding tests. In addition I removed one getgid() invocation in testcases/kernel/syscalls/setgid/setgid02.c because the returned value is not used anywhere in the program. Signed-off-by: Masatake YAMATO <>.

Io-throttle fix

As reported by Li Zefan, normally upper-case macros means constants, but the above macros are not constants: Use lower-case names instead. Signed-off-by: Andrea Righi <>. Signed-off-by: Li Zefan <>.

Io-throttle fix

It is surely better to support the old blockio.bandwidth and the new blockio.bandwidth-max interface for now. So, just ignore the previous patch. Support both blockio.bandwidth and the new interface blockio.bandwidth-max, to set i/o limiting rules according to the new userspace->kernel interface (io-throttle v8). In perspective we would like to have also blockio. and width-min and implement a mechanism to guarantee minimum performance levels as well. Signed-off-by: Andrea Righi <>.

utimensat01 fix

utimensat01 give a build error when NR_utimensat is not set because test.h is not included. It also gives a link error because TCID is not defined. This patch fixes these issues. =Signed-off-by: Martin Habets <>.

FTRUNCATE64 syscall tests addition

Addition of ftruncate64 syscall test support. Signed-off-by: Masatake YAMATO <>.

TRUNCATE64 syscall tests addition

Addition of truncate64 syscall test support. Signed-off-by: Masatake YAMATO <>.

RO Bind Mount tests addition

Here is the RO Bind mount updated testcase. This script consists of 3 files. - This is the basis testcase which setups the infrastructure for the ROBind mount fs_ro_test - Which has the different tests to be executed. Readme_ROBind - Explains the different testcases executed. This testcase addresses the earlier comments and has been made more generic. Also will be adding few ioctl syscalls testcases to the fs_ro_test flatfile. As we can append more tests to the flat file fs_ro_test. Signed-Off-By: Veerendra <>.

EVENTFD() syscall tests addition

Added basic testcases for eventfd() syscall. Signed-off-by: Vijay Kumar <>.

GET_ROBUST_LIST() & SET_ROBUST_LIST() syscall tests addition

Addition of get_robust_list() & set_robust_list() syscalls. Signed-Off-By: Ramon de Carvalho Valle <>.


In hugemmap01, huge page size was defined as a macro-definition. #define page_sz ((1UL) << 24) /* Huge page size */ However different architecture may has different huge page size in kernel. Such as : 1. #define HPAGE_SHIFT 22 #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) // the size is 4M 2. #define HPAGE_SHIFT 22 /* 4MB (is this fixed?) */ #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) 3. PPC: 16M. So read the huge page size for the kernel parameters is reasonable. The solution is to get the huge page size from the /proc/meminfo. Signed-off-by: Jin Bing Guo <>. fix

Now this script returns proper exit code , in the event of failure/success. I have verified this. Signed-Off-By: Veerendra <>.

message_queue_test_05 fix

In message_queue_test_05, it planned to allocate 100 message queues for stress testing. But if the system resource of message queue couldn't meet it, it would exit without deleting the allocated message queues. In addition, other test cases couldn't allocate a new message queue any more. This patch addresses this by: 1> Add a cleanup() to remove the created message queues at premature exit. 2> Change the default number of message queues from 100 to 10. Because the maxium on RHEL/SLES/Ubuntu is 16. Signed-Off-By: Jin Bing Guo <>.

2.6.16-gcov.patch fix

gcov-kernel: updated patch for 2.6.16 to include CONSTRUCTORS for ppc


When compiling hackbench.c , I got the warning message: $ ./testcases/kernel/sched/cfs-scheduler$ make cc -I../../../../include -Wall hackbench.c -L../../../../lib -lltp -lpthread -o hackbench hackbench.c: In function ‘main’: hackbench.c:350: warning: control reaches end of non-void function. That means the hackbench would return a random number. I tested it on some different versions of GCC and got the non-zero return value. This simple patch can avoid this problem. Signed-off-by: Jin Bing Guo <>.


lcov: integrated function coverage patch by Tom Zoernen + sorting function


In semaphore_test_01 case, it wanted to create a semaphore and printed out the semaphore ID for comparison with the output of the 'ipcs -s' command. So it didn't remove the semaphore when exited. Since the resource of semaphore is limited. It's better to write a shell script to perform the comparison and remove the semaphore. I wrote the bash script "testcases/kernel/ipc/ipc_stress/", and patched the "Makefile" and "runtest/ipc" to run the script. Please clean the semaphore up post patching and before executing tests. Signed-Off-By: Jin Bing Guo <>.


lcov: several changes - update download link - unify webpage links - provide --sort and --function-coverage switch + documentation


lcov: change sorting order to low-to-high coverage

SYNC_FILE_RANGE() syscall tests addition

Intial Addition of sync_file_range() syscall test to LTP. I have developed test cases for sync_file_range() system call which will do the basic sanity (error) checking for the system call. These tests have to be run on 2.6.17 kernel and above. The test cases have been currently tested only on x86 and x86_64 architecture. Also, I have hard coded the system call number in the test case for review purposes and will be later on moving it to linux_syscall_numbers.h file in the LTP framework. The support for PowerPC was provided from 2.6.22 kernel onwards. I had not taken care of it in my previous patch. Now this is addressed. Signed-Off-By: "B. N. Poornima" <>.

message_queue_test_02 fix

Changed the way by which message_queue_test_02 should be run properly. Signed-Off-By: Jin Bing Guo <>.

REALTIME Tests fix

This is a patch from John, written a few months back. I have fixed up a few cosmetic whitespace bits, and have refreshed it so it should apply cleanly to LTP today. Will Schmidt <>. Comments originally by John Stultz: So I've been trying to go through and review our test cases to make sure we're getting sane data and the tests are really testing what we want. Looking at gtod_latency and gtod_infinite, I was always struck that gtod_infinite always came up with much larger latencies while gtod_latency usually seemed to miss them. Main issues: 1) gtod_latency was not running for long enough, I've upped the iterations by 10x to make sure we get more solid results. 2) gtod_latency was doing too much computation between gtod calls. This means it could miss latencies that occur while it was running. I reworked the data collection loop so the un-measured window is smaller. 3) gtod_infinite was accidentally measuring its own computation in its delay, inflating its values. I cut that logic out. 4) both gtod_latency and gtod_infinite were not running mlocked. this caused background SCHED_OTHER disk access to inject delays, making the results less reliable. Those four issues have been fixed, and I also converted gtod_latency to use clock_gettime() just to be consistent and to give slightly better resolution. Signed-off-by: John Stultz <>, Acked-by: Darren Hart <>, Acked-by: Will Schmidt <>

16 & 64 bit syscalls fixes

How about introducing TCID_DEFINE? I'm not sure puttint TCID_DEFINE macro to test.h. I'm not sure using a symbol as an argument for TCID_DEFINE macro is better than using a string. (I had strong lisp backgroud:-). If this acceptable, I'll update related documents and test cases I worked. Signed-off-by: Masatake YAMATO <>.

setfsuid04, setresuid04, setreuid07 & setuid04 tests addition for syscalls setuid, setfsuid, setreuid & setresuid

I propose this new test setuid04, setfsuid04, setreuid07 & setresuid04 for the setuid, setfsuid, setreuid & setresuid syscall. The goal if this test is to check the fsuid is correctly handled by the setuid syscall. To do so, the test create a testfile as root with permission 0644, then do a setuid and try to open the file RDWR. This last open must fail since the process with new UID is not allowed to open the file on write. In a second step, the test does a fork to check the fsuid is correctly passed to a son and the son behaves correctly regarding files, i.e. it cannot open on write the test file. Signed-Off-By: Renaud Lottiaux <>, Signed-Off-By: Subrata Modak <>.

runltp -D fix

I was experimenting with using runltp along with disk stress (-D option). It does not parse the arguments properly. It only uses the last parameter in the comma separated list. With this patch it properly parses the arguments to the -D option. Signed-off-by: Doug Chapman <>.

16 & 64 bit syscall fixes

I've done on the other test cases. In addition, I've cleaned up Makefiles related to _64 and _16 testcases as suggested by Garrett Cooper <>. Signed-off-by: Masatake YAMATO <>. Garret suggested: You can avoid situations like the above by doing something like this in your Makefiles: SRC := $(patsubst %.c,%,$(wildcard *.c)) MAKE_TARGETS := $(SRCS) $(addsuffix _16,$(SRCS)) all: $(MAKE_TARGETS) %_16: %.c %_16: CFLAGS += -DUSE_COMPAT16_SYSCALL=1 -DTST_USE_COMPAT16_SYSCALL=1


This patch adds eventfd counter overflow test cases. I have cleaned up this patch - separated the test cases into its own functions and fixed a few typos. Please ignore the previous patch, and use this cleaned up patch. After the patch is applied, a "make clean" and a "make" should result in a clean build. It works perfectly for me. Anyways I am providing an updated patch with the other linux_syscall_numbers.h removed. As noted in my previous mail, there are two instances of the generated file in the CVS repo now, "include/linux_syscall_numbers.h" and "testcases/kernel/include/linux_syscall_numbers.h". The first is supposed to be a link to the second, and both are generated during the build process, and should be removed. The new patch removes both the files. Signed-off-by: Vijay Kumar <>.

Default build/install integration of BSD Secure Levels LSM

Integrating build/install of (BSD Secure Levels LSM) to default LTP build environment. Was just browsing through and found that this piece of code is not built/installed by default. I did not find any issue to do so. So, just added up to the Makefile(s). I am however investigating the best possible way to run them. Signed-Off-By: Subrata Modak <>.

ARM specific fixes

I am attaching a patch fs.patch for fixing some testcases failing on arm. fs.patch:- For arm architecture some system calls has been removed like time, utime etc. Since fs testcases include time system call, it should be replaced with gettimeofday system call. It wouldn't effect other architectures and thus works for arm also. Also testcases like utime should be made architecture specific. sasa sasa <>.

NUMA Version2 fix

The LTP numa testcases were initially designed for libnuma API in version 1. Building latest LTP (intermediate 20080820) against latest version of libnuma (2.0.2) requires -DNUMA_VERSION1_COMPATIBILITY in the CFLAGS - to switch to to the compatibility interface of libnuma API version 1. There are no libnuma testcases for API version 2 in ltp yet. Currently -DNUMA_VERSION1_COMPATIBILITY will not help for the LTP numa testcase, since the compability interface is missing some interface from version 1: Fix for the VERSION1 compatibility interface got already send to linux-numa list. I hope the libnuma fix got accepted and attached can be applied to LTP soon to fix the build of the LTP numa testcases, when building against libnuma 2.0.2 or greater. Signed-off-by: Daniel Gollub <>.

BSD Secure Levels LSM ( cases removal

Was just browsing through and found that this piece of code is not built/installed by default. I did not find any issue to do so. So, just added up to the Makefile(s). I am however investigating the best possible way to run them. Signed-Off-By: Subrata Modak>. Heh, seclvl hasn't been in the kernel in quite some time. Should it be dropped? BTW, Mike, I'd expect you to consider re-implementing some of seclvl using capability bounding sets. "Serge E. Hallyn" <>. I do not anticipate that anyone will ever try to get seclvl back into the kernel, so I vote that the test be dropped from LTP. Michael Halcrow <>.

GETCPU() syscall test cases addition

Addition of getcpu() syscall to LTP. I have fixed the problem noticed earlier. Hope it will be fine this time. More over I wanted to mention that I have dropped getcpu2.c as it was found to be less relevant for getcpu() testing. Andi had made some suggestions to improve the test, I am submitting this before making all those changes. If possible I will sit and work on Andi's suggestion. Signed-Off-By: Sharyathi Nagesh <>.

sync_file_range() build error fix

Build Error fix. I too had prepared the same patch, but there were some more issues on a different kernel. Hence, have put more checks in the newly attached patch. Subrata, I have tested it on ppc64 and x86_64 and is working fine. Please test and let me know. Signed-Off-By: "B. N. Poornima" <>, Signed-Off-By: Jin Bing Guo <>.

Inotify01 & inotify02 build error fix

inotify01 build error fix for x86_64. Signed-Off-By: Andrew Vagin <>.

move_pages() build error fix

move_pages() failed to compile on the following machine. Subrata <>. Jin Bing Guo <> wrote: I also met this problem on ppc machine with SLES 10.2. I checked the numactl package and found the problem was due to the unmatch of the version of numa. The numa_move_pages was supported from numactl-2.0.0. See the change log of it. Vijay Kumar <> wrote: Hi Subrata, as pointed out by Jin Bing Guo, only recent versions of libnuma have support for move_pages(). It is necessary to check if move_pages() support is available before compiling the test cases. Check if move_pages() support is available in libnuma. Signed-off-by: Vijay Kumar <>.

_16 & _64 syscalls porting fix

I've rearranged Makefile for setgid test case. I've put _16 related macros to file. The original Makefile includes it. So when I work on more _16 test cases, I just have to do the same. I'll do the same on _64. I choose utils as its directory name. Please put attached files and to ltp/testcases/kernel/syscalls/utils. Signed-off-by: Masatake YAMATO <>.


When we execute ./growfiles -h command then it gives the result as: growfiles 1 PASS : Test passed, Which is just confusing the user that some testcase has been executed, whether it just ran the help/usage command. So here is the small patch for fixing this issue. Signed-Off-By: "Rishikesh K. Rajak" <>.

PROC01 fix

The following patch adds two known issues seen on some versions of Kernels, and also modifies the copyright information. Signed-off-by: CAI Qian <>.


Conformance/interfaces/timer_getoverrun/2-2 has failed on tests with some distros running on ppc64 machines. As far as I could realize, it happens due to these machines are running kernel with timer frequency configured to 100 Hz, which represents a clock precision smaller than the defined INTERVALNSEC. This patch sets the interval equals to the clock precision (retrieved via function clock_getres()), in order to avoid to use a interval smaller than the resolution of the clock. However, with these changes, this testcase becomes very similar to the test 2-3. Is this a valid modification? If not, any thought what should be done in this case?. Signed-off-by: Edjunior Barbosa Machado <>.

Serious compiler warning fixes spotted by GCC4.1 (SLES10SP2), & GCC4.3 (openSUSE Factory)

Find attached patchset which address some serious compiler warning fixes spotted by GCC4.1 (SLES10 SP2) and GCC4.3 (openSUSE Factory). Fix potential overflow in umount01.c, spotted by _FORTIFY_SOURCE=2. Unintended truncating of string length could cause potential overflow, which got spotted by GCC with _FORTIFY_SOURCE=2. Note the difference: malloc(strlen(fstype + 1)) != alloc(strlen(fstype) + 1). I guess this was not intended? Also valgrind detected this issue. Replaced wrong use of malloc/strncpy with simple strdup(). Signed-off-by: Daniel Gollub <>.

Add missing/correct Shebang to exectuable

When packaging LTP with rpmlinit, rpmlinit complains about several scripts which don't have Shebang on the head of the file. Some files didn't have a Shebang at all. Signed-off-by: Daniel Gollub <>.

SETGROUPS16() syscall test cases addition

I've extended setgroup test cases can test setgroups16 old system calls. To test, please put attached compat_16.h to ltp/testcases/kernel/syscalls/setgroups; and apply the patch. Signed-off-by: Masatake YAMATO <>.

Time-schedule test fix

In testcases/kernel/sched/tool/time-schedule, it used kill(0, SIGTERM) to terminate the all the processes in the group. However, the progress group leader might be different regarding the different call methods. In interactive call such as pan, it called time-schedule by exec() and setpgrp() as a child process. The time-schedule process would be the process group leader and all the child processes created by it had the same PGID. So the SIGTERM was sent to process group and the exit code got by pan was 0. In non-inactive call such as STAF/STAX, one shell script called the time-schedule directly. The shell script would be the process group leader. So the SIGTERM was also sent to the shell script and the exit code got by STAF/STAX was 143 (128+15). This patch can resolve this Problem. Signed-off-by: Lin Feng Shen <>, Signed-off-by: Jin Bing Guo <>. fix

Sorry, I found one typo in my code. Please apply following patch. Signed-off-by: Masatake YAMATO <>.

Runltp fix

I tried to run runltp with the arguments suggested in the scripts help and I get the error: ./runltp: 783: arith: syntax error: "2,4,10240,1" I have checked out the latest intermediate (August 20th) and noticed there was a change that fixed one of the sources of this error but still one remained. I am attaching the patch (to July stable version) which fixed the issue in my case. I am running Ubuntu 7.04 (Feisty) on a Core 2 Duo based machine. Also may I suggest you update the maintainers info in the script too? :) I hope this can be helpful. Signed-Off-By: "elder.costa" <>.

HACKBENCH Memory Leak fix

I didn't see the oom-killer in my test machines. But I found large memory leak of the Hackbench with valgrind tool. From that we can get that it will lose 73,800 bytes with running "hackbench 150 process 1000" once. This patch fixed the memory leak problem. Signed-Off-By: Jin Bing Guo <>.

RT Test fix

While the synchronization in the sched_football testcase under the realtime test suite is not erroneous, it can be enahnced and made more reliable by making use of pthread_barriers, like in other testcases. This patch adds the same. Testing done: Infinite iterations of the testcase run with this patch. Signed-off-by: Ankita Garg <>, Acked-by: Vernon Mauery <>.

INOTIFY syscall fix

We can add a check for the header in the Makefile, so that we don't break builds. I think test should report fail in this case if a version of kernel more then 2.6.13. The Patch is for the reason that we don't break builds. Signed-Off-By: Andrew Vagin <>

SHMAT01 fix

On centos-5 2.6.18 kernel, I get a failure with shmat01. In the setup() function at the end: /* some architectures (e.g. parisc) are strange, so better always align to * next SHMLBA address. */ base_addr = (void *)( ((unsigned long)(base_addr) & ~(SHMLBA-1)) + SHMLBA ); This bumps up the address if it's already aligned. Signed-off-by: Bob Hepple <>. fix

Under Ubuntu (tested with both 7.04 and 8.04) IDCheck shows the message [: 100: 0: unexpected operator. That happens because the variable EUID is not defined. I guess dash (Ubuntu's sh) is not as tolerant as Fedora's (which shows no message). Bellow a small patch for it. Signed-Off-By: Elder <>.

LTP Changes during JULY 2008

Task Title

Task Description

Fix for creation mode of file/directory

I've tried LTP and found some wrong mode at creating file/dir in LTP source files. Here is a patch. Junjiro Okajima<>.


Every once in a while, pselect01 fails with the following output: FAIL : Sleep time was incorrect:5 != 6 This is because we expect our sleeps of slightly more than 5 seconds to last at most 5 seconds (if we're uninterrupted, integer truncation will mean this only comes up about 1% of the time). To fix this, we should instead expect our sleeps to last between 5 and 6 seconds, as in the patch inlined below. Signed-off-by: Craig Meier <>.

SELinux Makefile fix

Fix a bug in the selinux testsuite makefile, pointed out by David Howells. Signed-off-by: Stephen Smalley <>.


TEST_RETURN should not be inverted when logging. Signed-off-by: Masatake YAMATO <>.


gcov-kernel: refreshed 2.6.16 patch, adding CONFIG_MODVER compatbility. Peter Oberparleiter <>

SE-Linux fix

Fixes the following issues: The LTP selinux-testsuite does not work out of the box on Red Hat Enterprise Linux 4. The testscripts/ script does not detect if refpolicy should be used or not. The LTP selinux-testsuite test policy uses the can_setcon macro which is not defined in lobal macros of Red Hat Enterprise Linux 4 selinux policy targeted sources. Some Makefile needs minor fixes and enhancements. Ramon de Carvalho Valle <>.

MEM02 fix

I've attached some patches that I created for LTP at work. Most of them simply add command line options to specify the amount of memory/pages to use for tests. However, there's one fix that works around a bug in uClibc's pthread implementation. Allow the amount of memory to be used to be passed as a command-line argument. Matt Fleming <>.

MMAP1 fix

It can be unsafe to call exit(3) from a signal handler. Call _exit(2) instead. Matt Fleming <>.


Allow the number of pages to use for the test to be specified on the command-line. Fix a memory leak. Also, call _exit(2) from child processes which avoids the child calling the atexit functions that the pthread library setup. This fixes an issue where the pthread manager thread would begin exiting at the same time as a child thread. The child thread would run the atexit functions which cause it to wait for a signal to be sent from the thread manager. As the thread manager was trying to exit that signal would never be sent. Calling _exit(2) from the child avoids this whole mess.Matt Fleming <>.


Don't place an upper limit on the amount of time a nanosleep(2) call should take. The nanosleep(2) call will suspend execution for _at least_ the specified time, no upper limit is guaranteed. Matt Fleming <>.

NPTL01 fix

Allow the number of iterations to be specified on the command line. Matt Fleming <>.


Check for SYS_getuid32 and SYS_getgid32, these are the versions provided by some architectures. Matt Fleming <>.

FILE/DIR Creation fix

There were some mistakes in my previous patch. - wrong mode 0644 for mkdir(). - unnecessary to add 0644 for open() since the flag doesn't include O_CREAT (while it does no harm). By this new patch, they are fixed. Junjiro Okajima <>.


This patch uses strcpy() instead of strcat(). strcat() should only be used when the 'dest' argument is NULL terminated. In this case, path_buffer is not initialised and so may not contain a NULL character. strcpy() will do the right thing and copy the string to the beginning of path_buffer. Matt Fleming <>.


It eliminates the potential for many false negatives. 1. Use cap_compare to compare capability sets instead of comparing the far less reliable text representations. 2. pI' tests were failing bc I started with empty pI. Fill pI before those tests. 3. Check for libcap-2.11 or later (by checking for cap_compare()). Signed-off-by: Serge Hallyn <>

io_destroy(), io_getevents(), io_setup() & io_submit() tests add,

Porting of io_destroy(), io_getevents(), io_setup() & io_submit() syscall tests from Crackerjack to LTP, by Masatake YAMATO <>.


According to the manpages io_submit() can return the value: EAGAIN Insufficient resources are available to queue any iocbs. We should handle this opportunely trying to re-submit the AIO request again. Maybe an even better approach could be to just sleep a bit before trying to re-submit the request. In any case this would resolve a never-ending loop in aio01.c, where io_getevents() can be continuously called without having issued any actual request if io_submit() failed with -EAGAIN. Signed-off-by: Andrea Righi <>.

TIMERFD build fix for IA64

Error occured, when i tried to compile ltp on ia64 box. There is a patch to fix it. similar patch on i386/x86_64 has been applied. ( Signed-off-by: Shi Weihua <>.

IO Controllers test add

Add the block device I/O bandwidth controller (io-throttle) testcase. See testcase documentation for design and implementation details. See also: Signed-off-by: Andrea Righi <>.


The attached patch fixes the following issue: The selinux-testsuite file sigiotask testcase (run as test_fileop_t) needs rw permission to terminals to proceed its execution, which is not allowed by the non refpolicies provided in the testsuite. Ramon de Carvalho Valle <>.

GCOV Patches for Kernel 2.6.26

UTIMENSAT01 build fix

The following problem i found: 1, utimensat01.c still has not been compiled when check_for_utimensat_support return success. 2, utimensat01 works on only i386 arch. Signed-off-by: Shi Weihua <>

IO_SETUP01 & IO_SUBMIT01 fixes

Sorry, I took mistake in giving value to TST_* in io_setup01.c and io_submit01.c. Signed-off-by: Masatake YAMATO <>.


I found some typos. I cannot remember but maybe I introduced. Signed-off-by: Masatake YAMATO<>.

HACKBENCH compilation fix

I get compile error in hackbench. With the following patch, the compiler error is gone. Signed-off-by: Masatake YAMATO <>.

HACKBENCH failure fix

In fact, the case "hackbench02 hackbench 150 thread 1000" failed when i tested the latest ltp. the following error message occured: Creating fdpair (error: Too many open files). The default open files is 1024 (ulimit -n), but hackbench does not close these all opened files in group() when thread mode (process_mode=0). I think we should to limit the num_groups's value. 20 is a suitable value, it works well on my ia64 and i386 machine. what do you think? Signed-off-by: Shi Weihua <>. fix

It replaces nested arithmetic operations following example from Open Group specifications, in order to avoid issues with different shells, like dash from Ubuntu Gutsy. Signed-off-by: Edjunior Barbosa Machado <>.

RT test cases fix for 64-bit LTP forPPC

When compiling powerpc binaries, gcc defaults to 32 bit. To do some tests I needed to have a 64 bit binary. Since I'm using realtime, I modified as below. My questions: is there any official way to turn LTP in 64bit? If not, what shall we do then? Should LTP default to 32 or native-arch bit? Shall we use something like: "if (uname -m) ..." or use a command line option? Any comment? Gilles. According to man gcc: -m64 Generate code for a 2-bit or 64-bit environment. The 32-bit environment sets int, long and pointer to 32 bits and generates code that runs on any i386 system. The 64-bit environment sets int to 32 bits and long and pointer to 64 bits and generates code for AMD's x86-64 architecture. For darwin only the -m64 option turns off the -fno-pic and -mdynamic-no-pic options. This seems like the right thing to do to me. Gilles, have you confirmed that this doesn't break things on the x86_64 platforms? No Objection from me. --Darren. I've also run the involved tests on an x86_64 machine and it was OK. Gilles Carry <>.

RT test cases fix for TSC reading cleanup and enhancements

First patch regroups TSC functions and macros definition into librttest. Second patch is to have an atomic reading of the 64-bit timebase register of powerpc64. This new function is only valid if -m64 is used when compiling the whole testcase suite with a Powerpc64. This patch is a fix to avoid spurious tsc_minus warning. These patches been tested on a ppc64 machine either with 32 or 64 bit binaries. (-m64). The same TSC read (rdtscll) macros and tsc_minus where implemented in three different tests. This patch put all this into librttest.*. Signed-off-by: Gilles Carry <>. Cc: Tim Chavez <>. Acked-by: Darren Hart <>.

RT test cases fix for TSC reading cleanup and enhancements

This macro reads atomically the 64-bit TSC register. Reading the 64-bit register using two 32-bit instructions sometimes causes wrapping when a clock update appears in between. A single 64-bit read fixes this. Signed-off-by: Gilles Carry <>. Cc: Tim Chavez <>. I suppose the right thing to do in the long run would be to rename this function to something more generic: read_hw_clock() or something like that. But I think this patch performs the first step in getting it working on ppc64. Acked-by: Darren Hart <>.

RT test cases fix for TSC reading cleanup and enhancements

In tsc_minus, changed test (tsc_begin < tsc_end) by (tsc_begin <= tsc_end) since values can be equal as read operations are sometimes very close. Signed-off-by: Gilles Carry <>. Cc: Tim Chavez <>. Acked-by: Darren Hart <>.

Update to OpenHPI 2.12.0 (see for more info)

move_pages() test add

Addition of move_pages() syscall tests. The updated patch fixes the warning messages and removes the print_bitmask function (it's not used) which causes build errors on powerpc. Signed-off-by: Vijay Kumar B. <>. fix

The new patch addresses the other error conditions. Like if its not able to create any dir/files in a ReadOnly dir. Also this patch returns the proper return code on success/failure . I have tested this script on ReadWrite dir and ReadOnly dir. Veerendra Chandrappa <>.

LTP Changes during JUNE 2008

Task Title

Task Description

TIMERFD() tests add

These tests were contributed by the timerfd() syscall developer Davide Libenzi <>.


CPU and MEMORY HOTPLUG test cases picked up from


This patch fix a concurrency issue in mremap04. The tmp directory the IPC key was build with was destroyed before we destroy the IPC ressource attached to the key. In case of concurency, the same inode id can be reused for another process tmp dir, leading to the generation of the same key. Renaud Lottiaux <>.


I spent some time looking at the sched_latency test trying to see why it took so long to start the thread. The java version of the test takes a comparable amount of time to start the thread as it does for each period. The rt-test version was taking an order of magnitude longer. After digging through the java documentation, I found that the RealtimeThread does not actually start executing until the RealtimeThread.waitForNextPeriod() fulfills the time specified in the PeriodicParameters parameter included in its constructor. So all the tests are scheduled to run about 1 second after the threads are created. This gives the system plenty of time to create the thread (a non-realtime code path), set the scheduling parameters and then sleep until the specified run time. The start latency as measured by the test goes something like this:As you can see, the start_latency is a very different measurement in these two cases. In the first, it is basically the initial starting latency as measured by the remainder of the loops. In the second, the execution path of creating the pthread is also counted in the latency. While this might be an important number for us to keep low in our testing, this is not what the java test is measuring. This patch puts the rt-test version in line with the java version. I also think this is reasonable since the rt-wiki says that we should _NEVER_ create threads on the real-time stage. Signed-off-by: Vernon Mauery <>.


The following patches fix execve05 for error reporting when execve() succeeds, and exit synchronization in loaded systems. The last two patches are minor cleanups. execve05 checks that execve() fails if a process has opened the file with write access. However, in case the test fails and execve() succeeds, the default binary (test3) has return code 0, which is interpreted as test success. We get output like that: <output>Hello World</output>with return code 0 (success) instead of:<output>execve05 1 FAIL : Failures reported above</output>with return code matching FAIL. This patch simply changes the success return code from 0 to 3, so that execve() success, and thus test failure, can be properly reported. Signed-off-by: Louis Rilling<>.


The following patches fix execve05 for error reporting when execve() succeeds, and exit synchronization in loaded systems. The last two patches are minor cleanups. In execve05, the first child must keep a file open at least until the second child tries to execve() this file. However the test achieves this with a sleep of 10s, which may fail on loaded systems. This patch replaces this (arbitrary) sleep with a pipe-based synchronization, where the parent notifies the first child once the second child has terminated. Signed-off-by: Louis Rilling <>.


The following patches fix execve05 for error reporting when execve() succeeds, and exit synchronization in loaded systems. The last two patches are minor cleanups. In a child, calling waitpid() to wait for the death of sibling child is simply non-sense. Moreover in execve05, the second child does not need such synchronization. Remove it. Signed-off-by: Louis Rilling <>.


The following patches fix execve05 for error reporting when execve() succeeds, and exit synchronization in loaded systems. The last two patches are minor cleanups. cleanup() is reserved for the main test process. In children, call exit() instead. Signed-off-by: Louis Rilling <>.

SYNC_PIPE fix for lib/libtestsuite.c

This patch fix an issue in the sync_pipe implementation. The problem is the following : after the creation of a pipe we do not close any file descriptor until the end of a test. Let's imagine the following execution :- Process A calls sync_pipe_create - Process A do a fork (creation of process B) - Process A calls sync_pipe_wait ---> Process A blocks on sync_pipe_wait - Process B starts - Process B exits because of an early error. In this case, process A never exits. Since it has not closed its write descriptor to the pipe, the pipe is not considered as broken, thus process A is not notified its son is dead. Thus it will wait forever. Renaud Lottiaux <>.

COMPILATION fix for include/libtestsuite.h

This patch fixes a compilation warning due to the function "sync_pipe_close" which was not exported. Renaud Lottiaux <>.

duplicated libtestsuite code removal

After the patch from Roy moveing the libtestsuite code from /testcases/kernel/syscalls/lib to /lib, the code in the old directory has not been removed. Moreover, include PATH in some makefile was still pointing to this old directory. This patch remove libtestsuite code from the old directory and remove deprecated references to this old dir in some Makefiles. Renaud Lottiaux <>.

Time-schedule01 fix

time-schedule01 failed, because it sent SIGTERM to itself before program exited, so the return value is not 0. This patch makes the main process ignore SIGTERM. Li Zefan <>.

FS_BIND Makefile fix

This patch fix the make file of fs_bin test case so that it can be cross-built. Roy Lee <>.


Add syscall numbers for timerfd syscalls under i386 and x86_64. Roy Lee <>.


Currently, timerfd01 test case blocks building process for architectures that haven’t prepared for it. This patch modify it to be more generic for all architectures. Roy Lee <>.


It looks like the only thing that didn't apply was the function declaration. It builds (with a warning) and runs just fine. But here is a patch to fix the warning. Signed-off-by: Vernon Mauery <>.

UTIMENSAT() tests addition, testing 99 different scenarios

utimensat() syscall was introduced from linux-2.6.22 onwards. Michael wrote the initial testcases,and, the same is being contributed to LTP under GPLv2. I worked out a patch for this. Though this is not using LTP specific libraries at the moment. But the tests run well and tests 99 separate variations. Michael has written it through itś length and breadth. I generated the code coverage (9.2%) over 2.6.25-gcov kernel, which however was not built with <make allmodconfig> option. Please see it attached along with a draft man page of utimensat(), created by Michael. Let us know how do you feel about this test. We can then go ahead and add this to LTP. Signed-off-by Michael Kerrisk <>. Signed-off-by: Subrata Modak<>.

FS_BIND fix for ia64

On ia64, clone2() is used instead of clone(). Signed-off-by: Li Zefan <>.

FORK12 fix

I execute fork12 test and OMM killer begin send SIGKILL to its children and fork return success always. fork12 hang up in this case, so I create the patch (see attach), which check whether someone child killed and if it occur, return number of forked processes. Andrew Vagin <>.


This patch fixes the writetest.c to return proper status on Failure/Success. At present the return code of the writest.c is 'zero' for both Success and Failure. As per norms non-zero value should be returned for error , so fixing this testcase. Signed off : Veerendra C <>.


mallocstress stresses the VMM and C library by spawning N threads which malloc blocks of increasing size until malloc returns NULL. It occur because test doesn't wait for all thread started. already started threads begin allocate memory, so pthread_create can return ENOMEM. my patch added this synchronizing. I use semaphore, because it can wait-for-zero unlike pthread_mutex. sorry, forgot set permission in semget, new patch attached. Andrew Vagin <>.

NFSv4-locks fix

Reverting back the changes done to fcntl-lock tests in May 2008 release, as this would have canceled the operation Revision *1.1 *done on the /Mon Sep 11 20:40:52 2006 UTC/ by /mreed10 /which added "A patch that added new functionality into the NFSvf lock tests. -fixes bugs -adds the capability to stress a server with multiple clients" So it is possible to get back to what 's in ltp-full-20080430 and add my fix: You can fix it by replacing in the locktests.c file buf=(char *)malloc(clnt*maxClients); by buf=(char *)malloc(clnt*(maxClients+1)); Signed-off-by: Le Rouzic <>.

LTP-Manpage fix

In the manpage for tst_res(3) in the April snapshot it says... tst_brk - Print result message and break remaining test cases tst_brkm -Print result message, including file contents, and break remaining test cases ... at the top of the page. The prototypes and the logic is backwards for the summaries. A patched manpage is provided. Garrett Cooper <>.

ns-mcast_join fix

Force the catch_sighup to be volatile in order to overcome an issue due to the compiler optimization. In fact, compiling the test with -Os the catch_sighup variable is not set to 1 into the signal handler. At runtime, the test remain in a loop. No problem compiling without Os or O2. Signed-off-by: Giuseppe Cavallaro <>, Signed-off-by: Carmelo Amoroso <>.

SE-Linux fix

Fix a bug in the sigiotask test and enable the test_fdreceive policy to build against the latest refpolicy headers. Signed-off-by: Stephen Smalley <>.

HOTPLUG lincense update

Included the statement: These tests are OSDL/LF and imported into LTP under GPLv2.

RT-Linux update

This patch ensures that async_handler and async_handler_jk runs by default. Also the profile default is updated to reflect the same. Signed-Off-By: Chirag <>.


Looks like the else is missing since in both the cases where flag is set to one or not we get the test broken print. Signed-off-by: Max Stirling <>.


we have some truble with mapping api functions (such as tst_exit) in bash (./tools/apicmds/ltpapicmd.c). Now this problem may be fixed if added "exit" after tst_exit, but it's temporary. We should redesign this system and describe it in documentation. Andrew Vaggin <>.

signal_test_01 fix

signal_test_01 failed on ia64, the following message outputed: ERROR line: 146 sigaltstack failed: Cannot allocate memory : Cannot allocate memory signal_test_01: IPC Signals TestSuite program And, i found the defined macro STACKSIZE is short on ia64. This patch fix it. Signed-off-by: Shi Weihua <>.

signal_test_05 fix

signal_test_05 failed on ia64 and x86_64, the following message outputed: ERROR line: 145 child process= exited abnormally Some signals which are ignored in ignore_signals() are not ignored in child(). e.g., 32, 33. (SIGRTMIN is 34). So we should reuse ignore_signals()'s signal ignoring code in child(). Signed-off-by: Shi Weihua <>.

README.ltp-devel fix

Updating to include info about all other LTP man pages. Subrata Modak <>

GETTID() tests add

I've ported a testcase for gettid() from crackerjack to ltp. I've added a directory ltp/testcases/kernel/syscalls/gettid. Signed-off-by: Masatake YAMATO <>

Exit02 fix

I found wrong format string usage in ltp/testcases/kernel/syscalls/exit/exit02.c: returned value from strerror is not used. Signed-off-by: Masatake YAMATO <>.

SEMCTL06 fix

This patch fix a concurrency issue in semctl06. The IPC keys used for this test could conflict with keys from another task. Signed-off-by: Matthieu Fertré <>.

lib_Makefile fix

The attached patch was necessary in order to get LTP to build for our embedded system at work. Without this patch testcases that use the my_getpwnam() library function suffer from redeclaration errors. Signed-off-by: Matt Fleming <>.

check_netem fix

Fixed the way how to run the "tc" command on the remote machine. Otherwise, we always get the following message on the local side: The remote host does not have netem functionality. Signed-off-by: Giuseppe

udp4-multi-diffip01 fix

Running the UDP network stress tests on my SH4 target I have had to modify the following scripts: killall_udp_traffic and udp4-multi-diffip01. It deletes the address before setting it to avoid the following error: RTNETLINK answers: File exists; it implies that the test fails. Signed-off-by: Giuseppe Cavallaro <>.

killall_udp_traffic fix

This modifies the command sent to the remote host just to kill the ns-udpclient script. Indeed, it seems that the previous string always returns 1. Moreover, it adds a new check to verify if the return value is not empty. It could happen, for example, if the RSH returns sometime the following error: poll: protocol failure in circuit setup. Signed-off-by: Giuseppe Cavallaro <>.


Attached a new patch just to add the same fixes I provided you for icpm and tcp network stress as well. On SH4 STB with STLinux distribution we are able to run all the network stress tests without any failures. Due to configuration issues we do not run the multi-diffnic tests (because they require plural Network cards for host). It modifies the command sent to the remote host to kill tcp/icmp clients. It also deletes the address before setting it to avoid the following error: "RTNETLINK answers: File exists". This implies that the test fails. Signed-off-by: Giuseppe Cavallaro <>.

Process Event Connector tests add

Addition of Initial set of Process Event Connectors by Li Zefan. Process event connector is a netlink connector that reports process events to userspace, and currently we have 5 kinds of process events, i.e. fork, exit, exec, uid, gid. There are total 5 test cases to test its functionality. But the test is not run by default, because I don't find a way to decide whether the underlying kernel supports this feather or not. Signed-off-by: Li Zefan <>.

Process Event Connector tests modify

Here it is. Based on my last patch. - building failure on 2.6.16 should be fixed - fix "make install" if kernel version<2.6.15 - abort tests if kernel version < 2.6.15 Signed-off-by: Li Zefan <>.

io_cancel() tests add

This was ported from the Crackerjack Project by Masatake YAMATO <>.

io_cancel() tests Modify

I'd like to use the mechanism you introduced in io_* testcases. So I've made 'io_cancel' string in the script and Makefile a variable to avoid mistake. I made the patch from testcases/kernel/syscalls/io_cancel/Makefile, not from ltp/testcases/kernel/syscalls/io_cancel/Makefile. Is this acceptable. CVS reports like testcases/kernel/syscalls/io_cancel/Makefile. Signed-off-by: Masatake YAMATO <>.

hackbench tests add

hackbench tests the Linux scheduler. Initial test was written by Rusty Russell <>. Later modified by Pierre Peiffer <>, Ingo Molnar <>, Arjan van de Ven <>, "Zhang, Yanmin" <>, Nathan Lynch <> and others. Included in LTP by Subrata Modak<>, after Signed-off-by: Rusty Russell <>.


I am proposing with the joined patch to allow the suite to be able the run the previous rpc tests (called now basic_tests). It needs to resolve some issues in the new "tirpc part" before allowing the suite to launch it again. Le Rouzic <>


Few Changes to ttype value.


Changes to fix Build, Install and run on non-supported architectures.


Fixing the run on supported kernels.

LTP Changes during MAY 2008

Task Title

Task Description


Following patch makes ballista test suite compile with gcc-4.3, without this it completely fails because of C++ cleanups introduced with gcc-4.3. By Caglar Onur <>

MMAP01 & SHMT09 update

The fixed address passed to mmap() should be aligned to the value of SHMLBA as defined in sys/shm.h. See Documentation/cachetlb.txt in the kernel for the explanation behind this. On most architectures this value is the page size, but not on all. Signed-off-by: Martin Habets <>

NFS Fix for the following: fcntl14, fcntl23, fcntl24, fcntl25, fcntl26, splice01 ,tee01, utime01, utime02, utime03, nfs01

These test cases fail on the NFS environment due to NFS relates issue(s). Hence abondon these tests when NFS is detected. By, Sridhar Vinay <>.

Update to OpenHPI 2.10.2

RT Linux Test update

This series of patches allows the pass/fail criteria to be defined in a command line argument.(-c) librttest.c declares a global variable pass_criteria which is defined as extern in librttest.h The parsing is done as usual in function rt_init. To be as comprehensive as possible, pass_criteria is declared as a double so some tests need to cast it to integer before use. The below tests have been modified to use this new feature: sched_latency.c, tc-2.c, hrtimer-prio.c, pi_perf.c, async_handler.c and async_handler_jk.c, matrix_mult.c, pthread_kill_latency.c, prio-preempt.c, Notes: - default values have not been changed, - it is always tests' responsibility to handle default values, - to have a consistent interface, periodic_cpu_load_single.c's arg "-c howmanyloops" was changed to -l. This patch series also features a minor fix in librttest.c in args parsing switch case. In a next series, I will provide a feature that parses a single config file including the pass/fail criteria for all tests. This will make life easier for people wanting to define test profiles. Gilles Carry <>.

HUGETLB update

It seems that hugeshmctl01 doesn't free some hugetlb pages when it fails. ps shows that there is still an instance of hugeshmctl01 left even if hugeshmctl01 is not running which may attach some hugetlb pages. The problem is due to the arbitrary usleep time in hugeshmctl01 which results in incorrect execution order. The intention of the sleep time is to ensure the children call shmat() and pause() before the parent checks shm status and calls stat_cleanup(). But there is no absolute assurance that this sleep always works. In the failure above, the last child process forked by the parent may not run and call shmat() immediately after it's created. When the parent checks shm status, it finds only 3 child attaching the shm instead of 4, so it reports the failure. And then it calls stat_cleanup() to send SIGUSR1 to all children, but since the last child hasn't called pause() yet, SIGUSR1 is handled before pause(). When the last child calls pause(), since there is no further signal to wake it up, it sleeps forever. patch to ensure children can receive and handle SIGUSR1 from parent in pause(). The patch is not to change the arbitrary usleep time since any time is arbitrary though a large time is more acceptable. The patch is to use sigprocmask() to block SIGUSR1 before children sleep for SIGUSR1 from parent, and then call sigsuspend() to unblock SIGUSR1 and sleep for SIGUSR1. By doing so, we may avoid the infinite sleep and keeping attached shm forever so that affect other hugetlb test. In parent process, aonther sigprocmask() is called before usleep(). This has the same effect of sleep more time. By, shenlinf <>

HUGETLB update

I am testing ltp-full-20080430. When I execute hugemmap04, hugemmap01 is shown in the output which makes the output confusing. patch to fix the bad name. By, shenlinf <>

LTP-LIB update

punt useless local prototype for fdopen() -- stdio.h already provides this

LTP-LIB update

cleanup CFLAGS handling


tst_require_root(): unify root checking with this function

LTP-LIB update

tst_require_root(): unify root checking with this function

FS_PERMS update

fix error in previous commit: compare result to expected result, not 0

FS_PERMS update

normalize exit values as expected: 0 means PASS and non-0 means FAIL

LCOV update

lcov: --norecursion becomes --no-recursion + added docs, by, Peter Oberparleiter <>


Attached is a fixed patch to be applied over 1.8 in cvs. Previous patch mistook the return of mknod() for a file descriptor and after the first iteration, test was using the wrong (closed) file descriptor. This patch uses the correct file descriptor. Thanks Rishikesh for catching my error. By, Henry Yei <>

RT Linux Test update

The problem is because some of the realtime tests can't be compiled on older distros. We will have to fix this 'properly', taking into account the kernel and glibc versions, as well as the architecture. Until we do that, can we disable compiling realtime tests by default? Below is a patch that can do it. Signed-off-by: Sripathi Kodi <>


Fix for some failures by Anoop V Chakkalakkal <>.

Addition of FILESYSTEM BIND MOUNT tests or SHAREDSUBTREE test cases to LTP


The fixed address passed to mmap() should be aligned to the value of SHMLBA as defined in sys/shm.h (The same fix can be found in the mmap01 case earlier sent from Martin Habets). By, Roy Lee <>.

SHMT fixes

This patch modifies testcases to attach their shm segment to addresses chosen by system instead of arch-dependent ones. I looked into the history of these testcases, but couldn't find the reason why they specified arch-dependent addresses in the first place. If it has something to do with the page coloring issue, SHMLBA should be in some manners instead of defining arch-dependent addresses. Tested successfully on ia64, ppc64, x86_64, s390x & i386 by Subrata Modak <>, and by Martin Habets <> on sparc32. Signed-off-by: Roy Lee <>.

RT Linux Test update

These patches will allow for the plotting of the max over time in discrete segments, rather than as a monotonically increasing value, while maintaining the original behavior by default. Cleanup some whitespace issues here. Signed-off-by: Darren Hart <>. Acked-by: John Stultz <>.

RT Linux Test update

These patches will allow for the plotting of the max over time in discrete segments, rather than as a monotonically increasing value, while maintaining the original behavior by default. The existing test has an infinite window and report the new max each time it is increased. The patch maintains the default behavior and adds a -w option, allowing the user to specify a window (iteration count) for which the max of that window is reported ever w iterations. Signed-off-by: Darren Hart <>. Acked-by: John Stultz <>.

SHMT05 fix

I see Roy's patch was already checked in. In principle I agree with the patch, but a few things are wrong now and IMHO does not fulfill what it should test any longer. shm05.c -> see my (untested!!!) patch below. Some architectures can only map at specific offsets. Current version "sucessfully" fails, because e.g. hppa can't map at cp+4096. So, it's not failing because the memory regions overlap, although that was intended to be tested...shm06.c now does basically the same test as shm04.c ?!? Doesn't make sense... I would revert the patch for shm06, but maybe others think different???? Other patches seem ok, although I haven't looked too deep into them yet... Helge Deller <>.

SHMT06 fix

Roy Lee <> wrote: Your patch looks good to me. It does what I'm intended but failed to do; eliminating explicit arch-dependent code without breaking logics. How about merge the scenario of shm06 into shm04, and then eliminate shm06? Modify shm04 to attach the same segment _twice_ to the child's address space. In this case, the first returned address should be the same as where the parent attaches its segment to while the second returned address should be different. Helge Deller <> wrote: Yes, this is probably the best idea. Alternatively, just leave shm04 as-is, and do the twice- mapping you mentioned above in shm06. This way we'd keep two simple tests. Roy Lee <> wrote back: Here's the patch for the shmt06 according to Helge's recommandation, please help review it.

Added Default Log File generation capability for LTP

SHMAT01 & SHMAT02 fix

Both of the above test cases has similar issue to shmt/mmap series. This patch removes the non-aligned addresses explicitly coded for different architectures by: 1) probing an available address by a pair of shmat/shmdt calls, and, 2) replaceing the addr with offset in the struct test_case_t. By, Roy Lee <>

PAN/PAN.c fix

The "pan/pan" would failed in segmentation fault with a wrong option "-f command-file". Among the options, the "/tmp/test" does not exist. The solution is to add condition judgements before use the pointer. To execute pan/pan with option "-p" will occurs Segmentation fault. The reason is that it not appends the "-l" option to pan to open the "logfile" for writing log. Just add a condition judgement to fix it. Signed-off-by: Jin Bing Guo <>.

sync_pipes API fix

Make-sync_pipe-API-more-generic-and-update-related.patch. Put-libtestsuite-to-a-more-common-place.patch. Roy Lee <> noted: Referring to the sync_pipes API, create_sync_pipes(), wait_son_startup(), notify_startup(), which is defined in the: testcases/kernel/syscalls/lib/libtestsuite.[ch], I found the new sync_pipes API very convenient to synchronize processes. However the naming might pose some semantic restrictions on their usages. Since it can be used for making parent to wait child, and vice versa, perhaps a better naming should be used. For example: sync_pipes_create (), sync_pipes_wait (), sync_pipes_notify(), other names will be good as long as they don't assume the caller is child or parent. Furthermore, since it is also suitable for being used in common test cases, moving it outside the syscalls's directory to a more common place might be a good idea. Renaud Lottiaux <> noted: I fully agree with your remarks. But if you want to make these functions more generic, it should be possible to call sync_pipe_wait / notify several times, which is not possible in the current code since I close file descriptors in these functions. A quite simple solution is to keep these file descriptors opened, and to add a function to close them or simply let these file descriptors being closed by libC or kernel at process end. Signed-off-by: Roy Lee <>.

SHMAT01 & SHMAT02 fix

The earlier patch broke parisc (which has really some strange requirements). Attached patch fixes it. If it's OK for you, please apply. By, Helge Deller <>.


Currently ltp-devel install man pages in /opt/ltp/share/man/; however, they should be installed in /usr/share/man/. By, George Kraft <>


Included all of /include and /lib and /doc in the ltp-devel RPMs. By George Kraft <>.


Preparing for the next Stable release of ltp-devel Packages, which will have: 1) All files under ltp/include in the package, 2) Install ltp man pages in system man directory.

Stable Release of LTP-DEVEL- RPM Packages for i386,ia64,ppc64,x86_64 & s390x

RT Linux Test update

Profiled Tests: Basically this was done to enhance the pass/fail criteria usage and allow the user to setup tests configurations according to specific needs. Imagine a test series that may validate a hardware for some latencies (case #1) while another series would validate other criteria (case #2). The same test used in situation #1 will not have the same configuration (arguments) in situation #2. Scripting has to be done for this to achieve. The profile system does this for you. You just have to configure. Not only pass/fail criteria can be set since the profile system simply runs command lines defined in profiles. So any argument can be choosen. ie: a profile can define criteria for tests with or without saving statistics (-s) or simulate jvm (-j). A profile comes as a single file so it is easy to copy from a test machine to another. With this patch, profiles can be used either for test global run (./ or for an individual directory (./ For more information, read doc/AUTOMATED_RUN. This patch is intentionnally global as splitting changes would not make sense. This includes: - changes of scripts for automated tests to feature profiles, - individual changes for tests using automation, - a default profile (to be used as an example), - documentation writing/modifying. Signed-off-by: Gilles Carry <>, Reviewed-by: Ankita Garg <>.

CONCURRENCY Fix for msgctl06

This patch fix a concurrency issue in msgctl06. The tmp directory the IPC key was build with was destroyed before we destroy the IPC ressource attached to the key. In case of concurency, the same inode id can be reused for another process tmp dir, leading to the generation of the same key. Regards Renaud Lottiaux <>.


I got failures on ptrace03 because the latest kernel allows init process to be traced. Commit is:;a=commitdiff; h=00cd5c37afd5f431ac186dd131705048c0a11fdb, See the discussion in LKML: So we should not execute this test case if the kernel version is above 2.6.25. Signed-off-by: Li Zefan>.

CONCURRENCY Fix for execve02

execve02 checks that execve() fails if the caller does not have executable permission on the file. However, in case the test fails and execve() succeeds, the default binary (test3) has return code 0, which is interpreted as test success. We get output like that: <output> Hello World </output> with return code 0 (success) instead of: <output> execve02 1 FAIL : Failures reported above </output> with return code matching FAIL. This patch simply changes the success return code from 0 to 3, so that execve() success, and thus test failure, can be properly reported. Signed-off-by: Louis Rilling <>

RT Linux Test Cleanup

Profiled tests - cleanup. I forgot some useless code in the scripts. These patches do the cleanup. Signed-off-by: Gilles Carry <>.

adjtimex02 Fix for kernel above 2.6.25

I got the following failure: adjtimex02 4 FAIL : Test Failed, adjtimex()returned 5, errno = 0 : Success,= adjtimex02 5 FAIL : Test Failed, adjtimex()returned 5, errno = 0 : Success. This is because the latest kernel normalizes buf.offset value if it is outside the acceptable range. The commit is: linux-2.6.git;a=commitdiff;h=eea83d896e318bda54be2d2770d2c5d6668d11db. So we should not execute this test case if the kernel version is above 2.6.25. Here is the test result after patching (linux 2.6.26-rc2): adjtimex02 4 CONF : this kernel normalizes buf.offset value if it is outside the acceptable range. adjtimex02 5 CONF : this kernel normalizes buf.offset value if it is outside the acceptable range. Signed-off-by: Miao Xie <>


Manas K Nayak <> updated the fnctl lock tests from I have retained some info like the deploy_info, etc from the older release as well. The old tests were failing. After updates, the test passes.

PROC01 Fix

This patch adds a list for all known issues which are probably subtle to be fixed in kernel to the test, so the test could continue. Also, it will print out those expected failures as INFO or WARN to the test result. Signed-off-by: Cai Qian <>.

PROC01 Fix

This patch fixes the output of the test, so all fatal errors to cause the final failure of the test will be printed out as FAIL instead of INFO, and all verbose and debug output will be moved to STDERR instead of STDOUT for easy output processing. Signed-off-by: Cai Qian <>.

Addition of 2nd Set of Memory Controller Test Cases in LTP

Mem Cont. Documentation

This patch adds the documentation for memory controller. Signed-off-by: Sudhir Kumar>.

signal_test_01 fix

According to man sigpause : int sigpause(int sigmask); /* BSD */, int sigpause(int sig); /* System V / Unix95 */ [...] Linux Notes On Linux, this routine is a system call only on the Sparc (sparc64) architecture. Libc4 and libc5 only know about the BSD version. Glibc uses the BSD version if the _BSD_SOURCE feature test macro is defined and none of _POSIX_SOURCE, _POSIX_C_SOURCE, _XOPEN_SOURCE, _GNU_SOURCE, or _SVID_SOURCE is defined. The System V version is used if _XOPEN_SOURCE is defined. Since the _BSD_SOURCE_ is not defined for LTP testcases, rather they define _XOPEN_SOURCE_, the behaviour is System V, where they expect a signal number instead of signal mask. Signed-off-by: Suzuki KP <>.

RT Test Fix

Ankita Proposed that: We have been seeing failures in the prio-wake testcase for a while now. Digged closer into the testcase to find if there was an error lurking in the testcase itself. Did hit a few, which this patch aims to fix. But the failures persist, indicating that something is amiss in the kernel. This patch does the following: o Make the output of the test more readable. It is now time ordered. o Bases the pass/fail not only on the order in which the waking up threads update the 'wakeup.arr' but also on the time they woke up. This reduced chances of error. o Remove an extra lock and unlock on mutex when updating wakeup.arr. Chirag Jog <> commented: I am not convinced that adding a check for wake up time is going to reduce the chances for error. Whichever thread wakes up first, takes the lock,updates priority and time fields. Hence the time field will always be updated in wakeup order. So this is not really adding another useful check. I am ready to be conviced otherwise :) Ankita Replied: Yep I agree that now it would not make any difference. But before this patch, we were unlocking the mutex after only updating the running_threads and noting down the wakeup time and try and acquire the lock again to update the wakeup order in wakeup.arr So, there were chances the wakeup time did not match the order in which the wakeup.arr was updated. But yes, with the lock changes, this change would not be required. Shall send the patch again. Thanks for the review :-). So here is the updated patch which takes Chirag's comments into account. Signed-off-by: Ankita Garg <> Signed-off-by: Chandan Kumar B V <>

MEMORY Controller Documentation updates

This patch addresses the review comments for recently accepted memory controller testcases (failcnt test and stat_check test). Signed-off-by: Sudhir Kumar <>.

LTP Changes during APRIL 2008

Task Title

Task Description


Addition of SPEC File for creation of LTP-DEVEL RPMs on various Architectures for Standalone development of LTP Unit Testcase. Contributed by George Kraft <>

RT Linux Test update

This patch should solve the problem of RT Linux Compilation Failure on various Architectures. It just avoids the compilation of realtime tests on a non (x86,ppc) arch. Assumption: uname -m doesn't contain 86/ppc on any arch except the x86 and ppc. Signed-Off-By: Chirag <>

Se-linux Test suite Update

Previously I was under the impression that selinux test was not cleaning up properly. I don't believe that to be the case. I must have been mistaken. Here is a patch for the allow_domain_fd_use boolean issue in 5.2, by, Jeff Burke <>

Se-linux Test suite Update

This patch, which is independent of Jeff's patch, updates the selinux testsuite to run under Fedora 9, and does no harm on Fedora 8. While creating this, I noticed two other things that ultimately need fixing: 1) The sbin_deprecated.patch adds domain_dyntrans_type() to all the test domains. If that was truly desired, we should just put it into unconfined_runs_test(). But it shouldn't be necessary -only the test_dyntrans.te and test_dyntrace.te domains should require permissions for dynamic transitions. I'll let Serge confirm that. 2) The test scripts are presently relabeling /tmp to test_file_t for the duration of the test. That's insane - it could break any other running process that tries to access /tmp during the test. That was not part of our original selinux testsuite and seems to have been introduced when IBM ported it to LTP. If you are worried about lacking search permission to /tmp in the test domains, then create your own private /test directory or something. Or just give all test domains permission to search tmp either via unconfined_runs_test() or in test_global.te using the testdomain attribute. Those don't need to be fixed though for this patch to be merged. Also, I noticed some new failures in the tests due to latest Fedora policies giving all domains search permission to all directories. Not sure if that was intentional - sent a separate note to Dan about that.

Se-linux Test suite Update

Ok here is a first small patch to stop relabeling /tmp as Stephen suggested. It should be no more complicated to get rid of the unneeded dyntrans_types, but I messed up somewhere generating the patch and subsequent test bombed. So I'll just do that next week or whenever this patch hits cvs (for simplicity). Subject: selinux testsuite: don't relabel /tmp. There's no need for the selinux testsuite to relabel /tmp for the duration of the test. It uses /tmp/selinux anyway. Just need to be sure to have search perms to tmp_t. Signed-off-by: Serge Hallyn <>


dont build things statically, by, Mike Frysinger <>


anal fix: add whitespace between arguments, by, Mike Frysinger <>

CONCURRENCY Fix for getipckey()

This patch remove the useless random function used in getipckey. This random value has been replaced by a static int incremented at each call. This allow to remove the ugly whiles around the getipckey calls when we need several keys, by, Renaud Lottiaux>

CONCURRENCY Fix for msgget02()

This patch fixes a concurrency issue in msgget02. The second key used for this test was sometime conflicting with the key from another task due to a bad way of creating keys. This patch generate a valid second key through getipckey to avoid conflicts. Signed-off-by: Renaud Lottiaux <>

CONCURRENCY Fix for msgget03()

These patch removes a IPC leak in case of test failure. When the msgget function succeed instead of returning ENOSPC, the returned IPC was not released, by, Renaud Lottiaux <>

CONCURRENCY Fix for shmctl01()

This patch fixes a concurrency issue un shmctl01. Synchronization between processes was done using sleeps, which is not enough when multiple instances of the test are running or when we are running on loaded CPUs, by, Renaud Lottiaux <>

CONCURRENCY Fix for msgctl04

Fix concurrency issue in msgctl04. The second key used for this test could conflict with the key from another task. Signed-off-by: Matthieu Fertré <>

CONCURRENCY Fix for msgctl06

Fix concurrency issue in msgctl06. Signed-off-by: Matthieu Fertré <>

CONCURRENCY Fix for msgctl07

This patch fix a concurrency issue in msgctl07, by, Renaud Lottiaux <>

CONCURRENCY Fix for msgrcv02

Fix concurrency issue. The second key used for this test could conflict with the key from another task. Signed-off-by: Matthieu Fertré <>

CONCURRENCY Fix for msgrcv05

Fix concurrency issue in msgrcv05. Due to the use of usleep function to synchronize processes, synchronization issues can occur on a loaded system. Fix this by using pipes to synchronize processes. Signed-off-by: Matthieu Fertré <>

CONCURRENCY Fix for msgrcv06

Fix concurrency issue in msgrcv06. Due to the use of usleep function to synchronize processes, synchronization issues can occur on a loaded system. Fix this by using pipes to synchronize processes. Signed-off-by: Matthieu Fertré <>

CONCURRENCY Fix for msgsnd05

Fix concurrency issue in msgsnd05. Due to the use of usleep function to synchronize processes, synchronization issues can occur on a loaded system. Fix this by using pipes to synchronize processes. Signed-off-by: Matthieu Fertré <>

CONCURRENCY Fix for msgsnd06

Fix concurrency issue in msgsnd06. Due to the use of usleep function to synchronize processes, synchronization issues can occur on a loaded system. Fix this by using pipes to synchronize processes. Signed-off-by: Matthieu Fertré <>

CONCURRENCY Fix for semget05

Fix concurrency issue in semget05. Create private semaphores to avoid conflict with concurrent processes. Signed-off-by:Matthieu Fertré <>

CONCURRENCY Fix for semop05

Fix concurrency issue in semop05. Due to the use of usleep function to synchronize processes, synchronization issues can occur on a loaded system. Fix this by using pipes to synchronize processes. Signed-off-by: Matthieu Fertré <> Fix

This patch reviews the script and adds a menu to select the network stress tests. Hoping that could be useful, by, Giuseppe Cavallaro <>


Updated the test case as per the man page *********** RETURN VALUE If name is invalid, -1 is returned, and errno is set to EINVAL. Otherwise, the value returned is the value of the system resource and errno is not changed. In the case of options, a positive value is returned if a queried option is available, and -1 if it is not. In the case of limits, -1 means that there is no definite limit. *********** Return value of sysconf needs to be checked as well and not only depend on errno value. Have made the changes by looking at the code from Max Stirling <>


A patch to include all the headers for the ltp-devel package, by, George Kraft <>


Fix from Vivi Li for stack overflows on no-mmu systems: declare large buffers in .bss rather than on the stack

Se-linux Test suite Update

Here is the patch to remove the unneeded dyntrans lines. Causes no new failures on my f8 test image. Subject: selinux testsuite: don't give away dyntrans domain_dyntrans_type() only needs to be used for domains actually needing to do dynamic transitions. Don't grant it to most domains. Signed-off-by: Serge Hallyn <>

DEFAULT Run Update

Making these tests run as default with LTP run, by, Subrata Modak <>

RT Linux Build Fix

split CFLAGS/CPPFLAGS properly and remove inappropriate flags, by, Mike Frysinger <>

RT Linux Build Fix

dont stick ar flags into AR, and dont set AR/RANLIB by default, by, Mike Frysinger <>

RT Linux Build Fix

setup default RANLIB, by, Mike Frysinger <>

RT Linux Fix

checks return values of asprintf calls else gcc-4.3.0 fails like following; ... libstats.c:308: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result libstats.c:312: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result ... Signed-off-by: S.Çağlar Onur <>, Acked-by: Chirag <>

faccessat01 and fchmodat01 fixes

faccessat01 and fchmodat01 did not test the AT_FDCWD, following patch makes them test AT_FDCWD and pass. Signed-off-by: S.Çağlar Onur <>

times02 removal

According to Ulrich Drepper, times02 test is bogus (at least for archs which report return value and error in the same value) and times has no reserved error code. So following patch removes times02 from testsuite and moves times03 test to times02. For more information please see ttp:// and Signed-off-by: S.Çağlar Onur <>


This turned out to be a test case problem, where it fails to identify the correct backbone network interface to use for the test. But there is an option already provided for the interface to be specified while invoking the test. Here, eth1 is the backbone interface and hence if the test is invoked like 'IFNAME=eth1 ./tcpdump01' it will pass. But it relies on DNS lookup and requires the IP to be configured accordingly. Signed-off-by: Anoop Vijayan <>

RT Linux Update

Now that the realtime tests are part of the LTP, there is no need to have any longer specific compilation directives comments in the source files. And in most cases they are incorrect. Signed-off-by: Sebastien Dugue <>. Cc: Darren Hart <>

RT Linux Update

pi_perf is not built by default, so add it to SUBDIRS in testcases/realtime/Makefile. Signed-off-by: Sebastien Dugue>. Acked-by: Chirag <>

RT Linux Update

The rttest, stats and jvmsim library archives used by the realtime tests only contain a single object file each. Therefore we can skip the "ar" and "ranlib" steps and directly link with the objects. Signed-off-by: Sebastien Dugue <>. Acked-by: Chirag <>.

RT Linux Update

periodic_cpu_load has a '-i iterations' command line argument without it being listed in the help. Add its description to the usage() function. Signed-off-by: Sebastien Dugue <>. Acked-by: Chirag <>.

RT Linux Update

Some tests have a configurable number of iterations. However those same tests which do calculate quantiles need a number of iterations higher than 100. Signed-off-by: Sebastien Dugue <>. Acked-by: Chirag <>.

RT Linux Update

Remove the last 2 files missed in the migration,namely:testcases/realtime/stress/pi-tests/,testcases/realtime/stress/pi-tests/, Signed-off-by: Sebastien Dugue<>

execve05 concurrency fix

In the expected scenario, it attempts to execve(2) a file which is being opened by another process for writing fails with ETXTBS. On a loaded system, however, the child which does execve might get access to the file before the other child which opens it and result in a unexpected opening fail. By Roy Lee <>

SGI Common Criteria CAPP/LSPP EAL4+ certification test suite Release

Release of gcov-kernel patches for Linux 2.6.25 to LTP and LKML

execve05 concurrency fix

I think there is a problem with the previous patch. Since you call the wait_son_startup() function after the fork() and before the test on the PID variable, the father AND the son will wait on the pipe, leading to a dead-lock. I suggest to move the wait_son_startup() calls after the pid test. Renaud Lottiaux <>. Changes by Roy Lee <>.

Execve02 concurrency fix

This patch fix a concurrency issue in execve02. In case of concurrent executions, all tasks was using the same file, changing its mode and leading to invalid mode for some of them. This patch creates a private tmp directory for each task, copies the test file in it and performs all the tests using this private file. Regards Renaud Lottiaux <>

Ftruncate04 concurrency fix

This patch fixes a concurrency issue in ftruncate04. In the expected scenario, child should hold the lock of the file before parent access it. On a loaded system, however, the parent might access the file before the child, hence resulting in a unexpected 'open fail'. By, Roy Lee <>.


The following patch and all others that were submitted in Feb, 2008 pertaining to "NR_fadvise64" seem to break ARM builds of ltp as the arm does not have NR_fadvise64 defined. I suspect there should be #ifndef NR_fadvise64 #define NR_fadvise64 0 in each of the files that the patches were added. By, Shane Volpe <>


The Linux port I run on LTP has a minimal set of system calls. It currently does not implement the sysfs system call so I'd like to disable the tests for this system call - at the moment they will fail to compile because NR_sysfs is undefined. Is there an idiomatic way of doing this? I can either prevent the test compiling completely somehow in the Makefile (e.g. as modify_ldt does) or make the test compile but return BROK perhaps. Attached is a patch to implement a strategy like this one. By Will Newton <>

F00f fix

Executing f00f testcase in x86 Xeon machines, it failed returning SIGSEGV: # ./f00f f00f 0 INFO : Testing for proper f00f instruction handling. Segmentation fault. Searching for this issue, I found an old thread in ltp-list discussing broken test-cases, where Jeff Burke raise this problem with f00f failing on systems that have the NX bit. But, according to the flags reported in /proc/cpuinfo, the machines where i'm running this testcase seems not to have this NX bit enabled. On /proc/cpuinfo, we also have this line "f00f_bug: no". Would it be useful to select if this testcase should be executed or not? These machines are running a kernel compiled with processor family "Pentium-Pro" (CONFIG_M686=y), which, in according to the kernel config help, "disables the init-time guard against the f00f bug found in earlier Pentiums". Here i have created a patch that seems to fix the testcase using an inline assembly. By, Edjunior Barbosa Machado <>

Nptl01 fix

nptl01 looks to have an operator precedence bug in it that prevents the output being done at appropriate times. With this patch you should get 10 lines of output, one every 10000 loops, rather than 10 lines of output, one for each of the first 10 loops. By, Will Newton <>.

RT Linux Update

I believe we had written this test to debug the other test with a lower overhead clocksource. Unfortunately, the tsc is x86 specific, isn't consistent across CPUs on certain systems, and can have it's frequency changed depending on by power states. For all those reasons this test can simply be removed from the LTP. Raied by Daniel Gollub <>, endorsed by Sebastien Dugue <>, seconded by Darren Hart <>.

Sockioctl Update

This patch removes the dependency of existing tty* devices for this test to pass, and also ups the invalid file descriptor value from 400 to 1025 which is used to confirm the EBADF errno. By, Henry Yei <>

LTP-LIB-Makefile Update

Attached is a patch to ltp/lib/Makefile that fixes Solaris cross-building. For some reason the variable CC was overridden with gcc -Wall which caused it to use the system compiler. By Henry Yei <> Update

overhaul script to make things much easier to manage by Garrett Cooper <>

fs_perms Update

simplify targets, by, Mike Frysinger <>

fs_perms Update

cleanup code and add error checking, by, Mike Frysinger <>

Filecaps Update

Attached is a patch to ltp/lib/Makefile that fixes Solaris cross-building. For some reason the variable CC was overridden with gcc -Wall which caused it to use the system compiler. Also fixes cross-building for the filecaps tests. By, Henry Yei <>.


The float_bessel testcases, as a matter of fact, all float_* testcases seem to fail when multiple instances are run concurrently. The failures occur because file sizes don't match or because the number of bytes read don't match the file size. This can be attributed to the parallel instance reading a file before the write to it (by another instance) has completed. In such situations, either the file size has not been updated in the inode header or the file size has been updated but the file's write operation has not been updated completely. To fix this concurrency problem, my suggestion is to check for an existing instance and wait for it to finish before beginning the current instance. Any other concurrency resolution technique may complicate matters. A message to the console indicating such a decision might be added. By Sridhar Vinay <> & Renaud Lottiaux <>.

CPU Controllers Update

Some Cleanups for CPU Controller Test Cases by Sudhir Kumar. Signed-off-by: Sudhir Kumar <>, Acked-by: Dhaval Giani <>.

Addition of Initial Set of Memory Controller Test Cases in LTP

LTP Changes during MARCH 2008

Task Title

Task Description


Fix the following NFS warning: ioctl01 0 WARN : tst_rmdir(): rmobj(/tmp/iocfNl8Bi) failed: remove(/tmp/iocfNl8Bi) failed; errno=39: Directory not empty, by, Renaud Lottiaux <>


I ran the latest LTP(ltp-20080131) on SLES10SP1 and found a failure on the syslog testcases because of getting SIGSEGV at line 79 of testcases/kernel/syscalls/syslog/syslogtst.c. it is caused by accessing to the second argument when only one argument is provided for syslogtst, by, &


Cleanup build system a bit


A few POSIX fixes from Dustin Kirkland in [Bug ID: 1908313]


When CREATE is not set there is no default, so it is possible to run into the test(1) statement in line 116 with an undefined CREATE, which lets test break. Signed-off-by: Robert Schwebel <>


Update file capabilities tests to work on 64-bit kernels. It switches from manually setting file xattrs to making use of libcap, by, Serge E. Hallyn <>

RT Linux Test Cleanups

1. Minor fixes: Added -i to have the number of iterations configurable. However, this number cannot be less than 100 else a calloc fails in init_stat* function, causing sigsegv afterward. The patch also adds the return code checking for these init_stat functions. Added -m args is to have the PASS/FAIL criteria configurable. 2. Bug fix: disk write access deadlock High prio busy thread hogged cpus forbidding kjournald and pdflush daemons to release filesystem locks. This caused timer_thread to hang waiting for the lock. Signed-off-by: Gilles Carry <>

RT Linux Test Cleanups

1. Whitespaces cleanup 2. Error checks when initializing stat containers Signed-off-by: Gilles Carry <>

RT Linux Test Cleanups

In a lot of cases, we do not really care about the samples and histogram files and their associated gnuplot command files or do not want to save them for example on embedded platforms with limited or no storage. This patch disables generating those files by default and introduce a new parameter to the tests, namely '-s', for when we really want to. Signed-off-by: Sebastien Dugue <>


1) This patch fixes a concurrency issue in shmctl02. Same issue as in shmat02, 2) Fix return value check from shmat. In case of error, this wrong check was leading to a seg-fault. Same problem as in kill05, 3) Fixes a concurrency issue in shmget02. Same issue as in shmat02 : second key can conflict with the key from another process, 4) Fix a NFS warning when running rename14 concurrently. In this case, due to the large number of running processes and scheduler decisions, the father task can exit before its sons. Thus, leading to the removal of a file still opened by a son... NFS don't like that, Signed-off-by: Renaud Loittiaux <>


Fixing a concurrency issue in semctl07.c. This test was using a key hard coded in the source code, leading to conflicts with other instances of the same test. This patch also add a cleanup of the semid in case of failure during the test, by, Renaud Lottiaux <>


Fixing a concurrency issue in semop02.c. The now, well known issue due to a second key badly created, by, Renaud Lottiaux <>


Fixes a concurrency issue in semctl01. This test was using usleep to synchronize tasks. On a heavily loaded system, this synchronization is not enough to ensure execution correctness. This patch is a bit more intrusive than my previous ones. Patch content : * Define 2 new functions in kernel/syscalls/lib/libtestsuite.c, used to synchronize a father and a son using pipes. - create_sync_pipes: create a pair of pipes used for the synchronization,- wait_son_startup: function used in the father to wait for its son to start ts execution, - notify_startup: function used in the son to notify it has started its execution, * Add a kernel/syscalls/lib/libtestsuite.h file to cleanly export newly defines functions, * Fix the semctl01test. The idea used to synchronize :- For each task created, the father waits for the son to start its execution using the newly define functions, - After the last son has been created, the father do a sleep(1) to give time to the sons to execute the semop function, The final sleep does not guaranty the sons will have time to do the semop. On a REALLY heavily loaded system, this will still fail... The only solution I see to be sure the son is really blocked on the semop before the father continue its execution it to use the wchan info from /proc/<pid>/wchan file..., by, Renaud Lottiaux <>


Fixing some NFS issue(s), by, Renaud Lottiaux <>


Fix directory remove issue on NFS. On NFS unlinking AND closing all files in a directory is mandaroty before unlinking this directory. This also fix a write in a invalid array entry. fds[5] does not exist since we only defines 5 tests., by, Renaud Lottiaux <>

Makefile Insonsistency Fix

LTP is failing to compile with GCC 3.3.3 due to Makefile's inconsistency. SLES9.X distros are affected by this problem. This patch fixes how /lib/ipcmsg.h header file is referenced. It works fine with GCC 3.4.X, however, compiling headers doesn't make any sense to me. Signed-off-by: Rafael Folco <>

DUP203 Fix

Fixes the hardcoded file descriptor in the second testcase within dup203.c . Instead of assuming file descriptor 10 is closed, the fix explicitly opens and closes a file descriptor before using it as the second argument of dup2(). We saw issues on some environments where dup2(10,10) was being called, which this fixes, by, Henry Wei <>

RT Linux Test Update

We have seen that prio_preempt testcase that is part of realtime tests occasionally hangs. This can be easily recreated on a 8-cpu system, but can be recreated on a 4-cpu system as well when run for a number of iterations. The problem occurs because the first worker thread sometimes fails to call cond_wait on the condvar through which the master thread signals it to start. Since the first thread needs to start the chain of signalling from then on, all other threads just sit in a cond_wait without ever being woken up. The fix is to have a barrier to ensure that the first worker thread doesn't miss the cond_signal. I have tested this patch by running 10s of thousands of iterations of the testcase. Without the patch I can recreate the problem fairly easily, by, Sripathi Kodi <>


Fixing Build Failures on Fedora Machine, by,

RT Linux Test Update

Whitespaces cleanup and added -i argument for iterations, by, Gilles Carry <>

KILL06 update

Test does: .. pid1 = fork(); if (pid1 == 0) { /* child */ kill(-pid1, SIGKILL); ... which is wrong, since pid1 is zero. By, Anton Gladkov <>

CLONE06 update

Provide it with CHILD_STACK_SIZE, by, Anton Gladkov <>

DIOTEST04 update

Fix 'reading beyond file size' testcase in diotest4. Something goes wrong if we are allowed to read, or, we are not allowed to read, but we've got unexpected errno, by, Anton Gladkov <>

TI-RPC Tests Addittion

Initial Set of TI-RPC test Cases addition to LTP, by, Aurélien Charbon <>

LTP Intermediate Release for MARCH 2008

MISC updates

The idea of the patch is "to make things that should be extern, extern". The means to do this are: 1. Explicitly declaring variables extern in some places. 2. Defining _USC_LIB_ where appropriate. by, Will Newton <>

RT Linux Test Update

Add 2 scripts for detecting features used by some tests, namely: - support for pthread_mutexattr_setprotocol(..., PTHREAD_PRIO_INHERIT) - support for pthread_mutexattr_setrobust_np() Signed-off-by: Sebastien Dugue <>

RT Linux Test Update

Add Makefiles to all the realtime testcases without any autotools dependencies. Signed-off-by: Sebastien Dugue <>

RT Linux Test Update

Remove autotools stuff: - - - configure - aclocal.m4 - config/* - all the - all the Also adapt testscripts/ to the new build system. Signed-off-by: Sebastien Dugue <>

'RT Linux Test Update

Forgot to remove include/ in the previous patch. Signed-off-by: Sebastien Dugue <>

'RT Linux Test Update

Fix by Michael Olbrich <>, as, Sebastien´s Patch [[PATCH 3/3] [Realtime] Remove autotools specific stuff] applied on 24/03/2008 breaks this script.

RT Linux Test Update

Usually the cross compiler is set from the toplevel directory by setting the CROSS_COMPILER variable. This makefile tries to overwrite it, but wrong. It is also possible to push in CFLAGS from the toplevel by using CROSS_CFLAGS. We should use these here as well. Finally, LDFLAGS are set here but not used by the makefiles. Moving the posix libs to LDLIBS makes it build. Signed-off-by: Robert Schwebel <>

RT Linux Test Update

This patch updates the matrix_mult testcase to closely follow the JVM in the concurrent case. So in the concurrent case we have 'numcpus-1' concurrent threads that are handed out work by the main thread and once we run out of concurrent threads, the main thread does the work itself. Signed-off-by: Dinakar Guniguntala <>

MMAP1 update

mmap1.c:524: warning: format '%ld' expects type 'long int', but argument 3 has type 'double' which actually prints as: WARNING: bad argument. Using default 1125899906842624


Fix disktest printf format warnings (on Linux; no idea about Windows): childmain.c:443: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' childmain.c:443: warning: format '%X' expects type 'unsigned int', but argument 5 has type 'size_t' childmain.c:445: warning: format '%d' expects type 'int', but argument 6 has type 'size_t' childmain.c:448: warning: format '%d' expects type 'int', but argument 6 has type 'size_t' childmain.c:451: warning: format '%d' expects type 'int', but argument 6 has type 'size_t' Signed-off-by: Randy Dunlap <>


All the syslog test cases in ltp-full-20080131 are failing for RHEL4U5 on x3850 M2 architecture. The syslogtst is failing because when only 1 argument is passed to syslogtst the condition in the test case fails to deal with it. I have tested the failed tests cases after applying the patch on the same architecture(x3850M2) and found its passing. Signed-off-by : Vinay Sridhar <>


The filename arguments in some output messages are wrong. Signed-off-by: Li Zefan <>

RT Linux Test Update

Fixes a minor issue with pi_perf testcase (testcases/realtime/func/). The wait_dat is intended to measure the amount of time it took for the high priority thread to actually obtain the lock from the time it was released by the low priority thread. The patch fixes this computation to measure it more accurately. The PASS/FAIL computation is unaffected. Signed-off-by: Ankita Garg <>, Acked-by: Sripathi Kodi <>


The vmsplice01 testcase in LTP failed when run over machines with NFS mount. However after I examined the test case I found that the testcase performs vmsplice() and splice() system calls and it was only splice() that caused the failure. After discussing with Subrata, we had decided that the fact that vmsplice() succeeds must be displayed before checking if the testcase is running over NFS and exiting. Hence I have prepared a patch with the above details taken care of. Signed-off-by : Vinay Sridhar <>


faccessat01 and fchmodat01 did not test the AT_FDCWD tests, but assigned fds[5]. I made them work, patch attached. btw, readlinkat01 is also buggy, but I have not yet come around to fixing it. By, Marcus Meissner <>

NFTW64 fix

Some newer glibcs do not like sprintf() printing a string into itself and loop. By, Marcus Meissner <>


some more "variable is used uninitialized" warnings fixed with this patch, by, Marcus Meissner <>DECLARATION fixes


This patch fixes some compiler warnings spit out by newer GCCs and fortify source (mostly some initialisations and return value checking),by, Marcus Meissner <>


Various waitpid tests print the PID of the wrong array. fork_kid_pid[j] is accessed just past the end of the fork_kid_pid array, so it is better to use wait_kid_pid[i] instead, by, Marcus Meissner <>


When I was compiling ltp-full-20080229/kernel/module/, error occured. The error like this: ... scripts/ *** CFLAGS was changed in "ltp-full-20080229/testcases/kernel/module/delete_module/Makefile". Fix it to use EXTRA_CFLAGS. Stop. The reason is: When we build an External module, we should use EXTRA_CFLAGS, not CFLAGS. In detail please refer to Documentation/kbuild/modules.txt. In addition,there are some trashy "include" such as: "#include <asm/atomic.h>" in delete_module01.c "#include <linux/config.h>" in dummy_del_mod.c The following patch solves these problems: Signed-off-by: Wang Fang <>


The ltp-full-20080229/testcases/kernel/module/delete_module/Makefile will do this: @set -e; for i in $(MODULES); do ln -f $$i /tmp/$$i ;done If the ltp directory and /tmp are not in the same device, an error occurs: ln: creating hard link /tmp/xxx' => xxx': Invalid cross-device link I suffer from this. The patch as follows: Signed-off-by: Wang Fang <>


The memsize is specified by the user in Mb, but it is converted to Kb in the script, so we should convert it to Mb in the output. The following patch solves this problem: Signed-off-by: Wang Fang <>

INOTIFY02 fixes

The 9th testcase of inotify02 failed due to event coalescence. We fix this by moving the IN_DELETE test in between of the 2 IN_MOVE_SELF events. Also add the test for =event coalescence. Signed-off-by: Li Zefan <>

LTP Changes during FEBRUARY 2008

Task Title

Task Description

Made default LTP Error-free for s390x

LCOV Update

lcov: adding support for gzipped html based on patch by

Se-linux Update

Fix for Don´t call Domain type on test create, by, "Serge Hallyn" <>

PID & SYSVIPC Namespace Update

Some code cleanup in PID & SYSVIPC namespace testcases, by, "Rishikesh K. Rajak" <>


Some Cleanups and running hugetlb independantly

Initiated Discussion with Community Distros for including LTP KDUMP Testing


Give Execute Permission to, by, Pradeep K Surisetty <>

Se-linux Update

Let tests send sigchld to unconfined_t. Without this, the selinux testsuite on Fedora 8 hangs at, by, "Serge E. Hallyn" <>


str_echo function expects a file descriptor & not an address, by, Craig Meier <>


Build Error Fix by checking for installation of setcap or xattr headers, by, "Serge E. Hallyn" <>


Build Error Fix by checking for installation of setcap or xattr headers, by, "Serge E. Hallyn" <>

LTP Library Update

mark test_exit as noreturn #1891129 by Marcus Meissner, by, Mike Frysinger <>

LTP Disktest Update

Disktest application update to version 1.4.2, by, Brent Yardley <>

PID Namespace Update

Pid Namespace were getting segmentation fault while running on -mm kernel. After debugging by container development team they found the exact root cause. The Page_Size was reset, by, "Rishikesh K. Rajak" <>

remap_file_pages02 update

Based on the discussion at LKML (, Ricardo Salveti de Araujo <> removed the test case that verifies if the pgoff is "valid"

Mprotect02 fix

The problem was the position of the parenthesis, which made "fd" receive the result of the < (lower than) operation, instead of the actual return value from open. This implicates a lot of trouble in any subsequent reference to fd, used in write and mmap. Because of this, mmap was returning an error number (ENODEV), instead of a valid memory address, which created the mprotect trouble. Fix by Jose Otavio Rizzatti Ferreira <>

Sysconf01 fix

Patrick Kirsch <> personally thinks, it would be better to print out the "actual" return code from sysconf call instead of the errno, which may lead to confusion, because the actual return code from the failing sysconf is probably not 0 (as errno is defined in previous context).

RT Linux Update

Do not store cache files, by, Mike Frysinger <>

Pcllib (syscall) Update

Remove compiled files, by, Mike Frysinger <>

Pcllib (syscall) Update

punt compiled files, by, Mike Frysinger <>


This will address the problem until distros update with latest glibc which has fallocate implementation. This is not extensively tested and built with some assumption like o we are testing on x86* and ppc* archs o on 64 bit machine we will always see 64 bit kernel running by, Nagesh Sharyathi <>


Since msgmni now scales to the memory size, it may reach big values. To avoid forking 2*msgmni processes and create msgmni msg queues, do not take msgmni from procfs anymore. Just define it as 16 (which is the MSGMNI constant value in linux/msg.h) Also fixed the Makefiles in ipc/lib and ipc/msgctl: there was no dependency on the lib/ipc*.h header files. Signed-off-by: Nadia Derbey <>

RT Linux Update

To avoid forking 2*msgmni processes and create msgmni msg queues,Signed-off-by: Sebastien Dugue <>


lcov: fixed problem with pre gcc-3.3 versions. read_gcov_headers does not return valid results for pre gcc-3.3 versions. Due to an unnecessary check, parsing of gcov files was aborted. Fix by removing check, by, Peter Oberparleiter <>


lcov: fix error when trying to use genhtml -b genhtml fails when the data file contains an entry which is not found in the base file, by, Peter Oberparleiter <>

RT Linux Update file for realtime/func/pthread_kill_latency/ testcase got missed out in first release of realtime tests. This patch adds for testcase which is required to run this particular test through top-level run script, by, sudhanshu <>

msgctl10 & msgctl11 Test Cases Addition

Since msgmni now scales to the memory size, it may reach big values. To avoid forking 2*msgmni processes and create msgmni msg queues, take the min between the procfs value and MSGMNI (as found in linux/msg.h). Also integrated the following in libipc.a: . get_max_msgqueues(). get_used_msgqueues() Signed-off-by: Nadia Derbey <>

waitpid06 Fix

waitpid06.c uses a flag to detect whether something went wrong during the test. The issue is that this flag is not initialized, and I get random failure reports. Other tests might suffer from the same bug, but I did not observe it yet. The enclosed patch fixes this in a trivial way for waitpid06. Surprisingly, with my debian package I never got the error, but when I compiled myself, by, Louis Rilling <>

3rd Round of RT Linux Test Update

There are numerous cleanups, fixes and features went into our locally maintained version of realtime tests, since its Intergration in LTP december last year. This patch merges those changes into LTP tree. The patch majorly contains : - All features, cleanups and fixes done by IBM realtime team over last two month or so. - Change in copyrights( year, symbil and limiting columns to 80 chars) - Other few cleanups to ltp-realtime tests. Signed-off-by : Sudhanshu Singh<>

Waitpid07 Fix

waitpid07.c uses a flag to detect whether something went wrong during the test. The issue is that this flag is not initialized, and I get random failure reports, by, Louis Rilling <>

Waitpid Fix

waitpid tests: Fix failure detection flag initialization. On a similar pattern as waitpid06 and waitpid07, waitpid08-13 use a failure detection flag (called 'fail' instead of 'flag'). However except in waitpid09, this flag may be used uninitialized, which causes the test to randomly report failure. This patch ensures that the flag is reset at the beginning of each loop. Signed-off-by: Louis Rilling <>

Waitpid Fix

waitpid03/04: Fix condition numbers displayed when reporting errors. The condition numbers displayed while reporting errors in waitpid03 and waitpid04 are used initialized and are not consistently updated, which may lead to useless reports. Signed-off-by: Louis Rilling <>

Waitpid Fix

waitpid02-05: remove unused defines related to failure handling. Signed-off-by: Louis Rilling <>

Kernel/Makefile Fix

Adding option to build TIMER test cases as well, by, Subrata Modak <>


Removing these files as they get automatically generated during build, by, Max Stirling <>


Many tests cannot be executed concurrently. I have a few patches to make it possible to execute some tests in parallel/concurrency, to check SMP safeness, by, Renaud Lottiaux <>


Fix NFS issues in tst_rmdir (directory non empty) due to an unmapped file, by, Renaud Lottiaux <>


Fix a concurrency issue due to the (false) sharing of file /dev/shm/cache. This patch just create a different file for each process and unlink the file before exiting, by, Renaud Lottiaux <>

doio/rwtest fix

The variable dfOpts (in #324) is seting to NULL even if the df is not a symbolic link. (It has to be "-P" itself to get the output portable).And so the "df $dfOpts $dir" (line #326) command is not giving a result expected by the succeeding statements. I have tested this patch both in lvm and fdisk partitions and found its working fine, by, Sudeesh John <>

MEM03 Update

This patch -try- to cleanup the mem03 test and fix a concurrency problem. Mainly, the test creates and removes files in the current directory. Since the tst_tmpdir() function was not used, several instances of the test was creating and removing files from each others !, by, Renaud Lottiaux <> fix

MREMAP04 Update

Here is a patch fixing concurrency issue in mremap04. Just use a shm key returned from the getipckey() function instead of a fixed hardcoded value, by, Renaud Lottiaux <>

KILL05 Update

Paranoia concurrency fix. I have not encounter any real issue, but it is probably safer to be sure each process is using a different segment.-> use tst_tmpdir, to make getipckey generating a different key for each running process, by, Renaud Lottiaux <>

4th Round of RT Linux Update

1) The pi-tests don't use the librttest infrastructure and simply duplicate code. 2) The thread-clock test doesn't use the librttest infrastructure. 3) Adds missing headers to the following files, Signed-Off-By: Chirag <>, Acked-By: Dinakar Guniguntala <>,Acked-By: Sebastien Dugue <>


Fixes a concurrency issue in shmat02. The second IPC key used in this test was generated doing a ++ on the first key. By doing this, it makes possible to get a conflict with a key generated by another process. To fix this, I just do a new call to getipckey() and check if the key is different from the previously generated one, by, Renaud Lottiaux <>


RT Linux Fix

This patch fixes the testcases mismerge due to the patch "There are numerous cleanup fixes and features went into our ..." from Sudhanshu Singh. Turned out there was less damage than I thought. Hopefully, it should restore the fixes and cleanups which were reverted before the February Release. Signed-off-by: Sebastien Dugue <> Cc: Sudhanshu Singh <> Cc: Chirag <> Cc: Subrata Modak <>

LTP Changes during January 2008

Task Title

Task Description

Se-linux Test suite Update

Some more updates to Reference Policy Checks by "Serge E. Hallyn" <>

Mlockall02 update

This solves the configuration issue reported by Santwan <>, and, fixed by Amit Arora <>

Ltpapicmd update

Fix various printf strings to correct formatting and remove spaces, by, Randy Dunlap <>

GCOV Patches for 2.6.23

gcov-kernel patch for linux 2.6.23 by Peter Oberparleiter <>

linux_syscall_numbers.h update

Add dependency information for linux_syscall_numbers.h, by Mike Frysinger <>

Fallocate testcases addition

Testcases contributed by Sharyathi Nagesh <>

NUMA updates

Fix for situations when it fails even on NUMA node, enabling proper identification of nodes, by psuriset <>

Fadvise fix

Terminates the tests if NR_fadvise64 is 0, by Masatake YAMATO <>

Syslogtst fix

Randomly generating a no. to avoid the test case to fail, by Sridhar Vinay <>

Released Code Coverage Data on gcov-kernel-2.6.23 for UTS & SYSVIPC Namespace Test Cases

Pounder21 fix

Jeff Burke <> wanted this unnecessary file to be removed


Some fixes for log directory and execute permission to the script, by Sudhanshu Singh <> and Jeff Burke>

Syslogtst fix

Still more fix for Randomly generating a no. to avoid the test case to fail, by Sridhar Vinay <>

open_posix_testsuite fix

"hp_func" should be protected through pthread_mutex or similar, by, Yi Xu <>

KDUMP upgrade

Huge Changes from Cai Qian <>. Please see the Description below:

RT Linux Update

A huge Update to the RT Linux Tree by Sebastien Dugu <>

remap_file_pages update

Fix for remap_file_pages(01/02) failing on 31(s390) bit linux guest running RHEL4.6, by,

Open() fix for lot of test cases

Fixing missing argument for open() function when O_CREAT is in the flag, by, Yi Xu <>

Fixed the -q Issue of runltp when used along with -g option

Fixed the Issue of Generation of HTML output when absolute Path is mentioned for either the OUTPUT file or the HTML file

FILECAPS Test cases addition

Initial set of Filecaps testcases from Serge, "Serge E. Hallyn" <>


testcase ballista gcc 4.3 conformance, by, Patrick Kirsch <>

Added Sequential Run capability to LTP

Times03 test case update

Adding volatile to avoid the compiler optimization to produce an infinite, by, Carmelo AMOROSO <>,Haavard Skinnemoen <>

Submitted Abstract for OLS 2008 paper

Se-linux Test suite Update

Extend the unconfined_runs_test interface in the selinux testsuite policy to allow the test programs to properly report back to the caller, by, Stephen Smalley <>

Added gcov-kernel patches for linux-2.6.24, linux-2.6.24-gcov-arm-eabi.patch, linux-2.6.24-gcov-arm-hack.patch, and, linux-2.6.24-gcov.patch

NUMA fix

Fix for Build Error issues on NUMA Machine in absence of important RPMs, by, psuriset <>

LTP Changes during December 2007

Task Title

Task Description

libclone fix

Update CLONE_NEWPID as value changed in 2.6.23-rc3-mm2, submitted by Sukadev Bhattiprolu <>

New Sendfile Test cases

New Test Cases sendfile05 sendfile06 and sendfile07 for sendfile and sendfile64 syscall, by Masatake YAMATO <>

diotest4 fix

Fixing the problem of the resolution for ADDRESS_OF_MAIN, by Mark Ver <>

linux_syscall_numbers.h fix

use caps in "generated warning" since people dont read comments, by Mike Frysinger <>

Se-linux updates

Se-linux Reference Policy Updates by Stephen Smalley <>

New NUMA test cases addition

New NUMA Testcases by Pradeep <>

mincore01 fix

Fixing mincore the way it generates -EFAULT on s390 by setting a stack limit by "ulimit -s <value>" before its execution, by Anoop <>

linux_syscall_numbers.h fix

add syscall list for arm from Riaz Ur Rahaman

posix_fadvise04 update

Test isn't supported in kernel versions before 2.6.16, by Marco Antonio Fernandes Junior <>

Se-linux updates

Reverting Back Stephenś Patch and Applying Jeffś Patch for controlling the tty issue. Also a minor change for the ia64 compile failure

Pounder21 fix

A Trivial Fix from Roger Mach <>

LTP Makefile Fix

tweak comment to reflect reality, by Mike Frysinger

REAL TIME Test Cases Addition

Initial Set of Real Time Linux Test Cases, by Nivedita Singhvi <> & sudhanshu Singh <>

REAL TIME Test Cases Updates

Updates for Some Copyright and License Declarations

PIDNAMESPACE Test Cases Addition

Initial set of PID Namespace testcase contributed by "Rishikesh K. Rajak" <>

PIDNAMESPACE Test Cases Updates

Changed the way Copyrights and License agreements are declared

LTP Changes during November 2007

Task Title

Task Description

lcov fix

lcov: fix for problem resulting in lcov aborting with "ERROR: reading string" by Peter Oberparleiter (

OpenHPI Update

Update to OpenHPI 2.10.1 (see for more info)

Open_posix_testsuite Update

This patch by Jeff Mahoney <> changes the test to use the read-only end of the pipe with PROT_READ permissions, which passes the FMODE_READ check on the file descriptor and returns -ENODEV

ext2/ext3 updates

Yi Yang <> fixed some anomalies for ext2/ext3 and creat system call

GPLv2 License Updates

Removing Propreitary and Confidential Information to Suit to GPLv2 License

doio update

Make the test working on busybox system, where 'df' command doesn't support -P option, neither accept a directory as input, Submitted by Carmelo AMOROSO <>

Network Update

This patch allows network stress tests to be run on different subnet configuration by using some macros for IP addresses configuration. It doesn't affect default values. Submitted by Carmelo AMOROSO <>

FS Test Update

Patch to check file permission first, and then skip write-only files,and report them as INFO. Submitted by Cai Qian <>

FS Test Update

Patch to skip read of all /proc/<pid> directories except /proc/self. Therefore, it make sure that at least one /proc/<pid> has been read, and also the directory will stay as long as the life time of the test. Submitted by Cai Qian <>

Configuration Update

Create testfile in tmpdir to be consistent with other tests by Kumar Gala <>

NFS Update

Close the fd's we open when running on NFS to avoid warnings, submitted by Kumar Gala <>

NFS Update

Close fd's to make running on NFS work, submitted by Kumar Gala <>

NFS Update

Add a lib routine to tell us if we are running on NFS Submitted by Kumar Gala <>

Architecture Specific Update

Adds arm to the architectures where SHMBLA != PAGESIZE, submitted by Khem Raj <>

New posix_fadvise & fadvise64 Test Cases

New posix_fadvise and fadvise64 Testcases contributed by Masatake YAMATO <>

KDUMP Automation

Existing code in LTP Kdump has been enhanced to test dump on network and different partitions, by Poornima <>

KDUMP Update

Fix endless loop hit messages for kdump test case, by Cai Qian <>

KDUMP Update

Fix for vmcore generation and vmcore verification are at different hours, by Cai Qian <> Update

Changes that allows adp to run top on batch mode instead of interactively, submitted by Rafael Folco <>

fcntl14 Update

Changes to prevent fcntl14 test case to crash on uclinux on blackfin board, submitted by Vivi <>

LTP Infrastructure Enhancement

New HTML format for LTP Output

KDUMP Update

Add IA64 support to kdump test case, submitted by Cai Qian <>

KDUMP Update

Patch to fix summary script of LTP kdump (can't retrieve LOG correctly), submitted by Lin Feng Shen (

KDUMP Update

Fix for master script of LTP kdump (Which tries to copy /proc/config.gz though it's not available), submitted by Cijurajan Kollanoor (

LTP Log Library Updates

Report TCONF for swapon/off test when run on tmpfs or nfs, submitted by Kumar Gala <>

madvise03 Test Case Addtition

This does testing for the missing functionalities of MADV_REMOVE, MADV_DONTFORK & MADV_DOFORK, submitted by Pavan,

LTP Infrastructure Enhancement

Added an Option to mail-back LTP reports, by Subrata Modak <>

Sendfile64 Support

Added sendfile64 support and new testcase sendfile04.c in this regard, by Masatake YAMATO <>

KDUMP Update

Proper Inputs for Memory Reservation for Crask Kernel on various architectures, by Poornima Nayak <>

LTP Changes during October 2007

Task Title

Task Description

lcov 1.6 with gcov/gcc 4.1.0

lcov: workaround for gcc 4.1.0 .gcno file oddness by Peter Oberparleiter (

OPEN_MAX macro

Carmelo ( fixed OPEN_MAX macro issue, from kernel 2.6.23 onwards

remap_file_pages01 test case addition

Ported this to LTP Format


Open Posix Test suite updation by Patrick Kirsch <>

creat08 test case fix

Olof Johansson <> corrected the message when there are no entries in /etc/group for 'nobody' and 'bin'


Andi Kleen <> changed the way IN_MOVE_SELF works with old kernel

remap_file_pages02 test case addition

Ricardo ( added another testcase for remap_file_pages() syscall for better error checking

LTP Infrastructure inprovement

Better Ways to Integrate "ltp/tools/genload/stress" with "ltp/runltp" by Ricardo and Subrata

Fix for NFS test case run

Breno Leitao ( fixed these for running on NFS mounted systems

LTP Changes during September 2007

Task Title

Task Description

acct01 testcase problem

Seebs ( wanted to fix some anomalies in "acct01" testcase


Rishikesh ( made modifications to check whether the Kernel is UTSNAMESPACE or SYSVIPC_NAMSPACE enabled

inotify01 and inotify02 testcase fix

Ricardo ( fixed exit code for inotify01 and inotify02 when running with kernel < 2.6.13

ioperm02 fix

Fixing ioperm02 testcase for kernel comparisns

NUMA Patch

Sivakumar ( induced time for Statistics collection in RHEL

Removal of CONNECTATHON Testcases

Removing these Testcases as they do not satisfy GPLv2 License Agreement

New Location README for CONNECTATHON Testcases

This guides you to the new location of CTHON04, as, these Testcases has been removed from LTP for want of GPLv2 License Agreement


Ciju ( fixed some Script errors while configuring ltp-kdump

Some fix for KDUMP

KDUMP Scripts must be made executable before testing (Initial CVS Checkin error)

Some fix for POSIX Standard

Dont use the optional POSIX postfix operator as some crappy shells actually omit it, by Mike Frysinger (

Mandatory FAILED file generation

Included Mandatory Failed file generation and creation of both outout and failed files even if absolute path is not an option to runltp

Mandatory FAILED file generation cleanup

Ricardo cleaned up duplicate code for enhancements in output and failed files generation

Inclusion of new Members in the ltp/CREDITS file

Updating ltp/DREDITS to include new contributions from members

Fix for mem02 testcase

Jeff Burke wanted additional INFO when the test fails in the calloc portion of the test

Fix for blatant %d, %f generation during LTP output

Randy temporarily fixed the var_args expander in lib/tst_res.c


Patrick fixed the too chort char array

ping01 testcase fix

Ricardo Fixed the way by which tst_resm should be called from Shell Test Script

Fix for Handling Temporary Directory Creation

James Puderer fixed -d option in LTP for better handling of temporary directory

fcntl testcases fix

issue a warning if unable to actually test if F_SETLEASE is not defined

fcntl testcases fix

add -D_GNU_SOURCE since we have tests in here that test GNU-specific features (like F_SETLEASE)

Open HPI upgrade

Update to OpenHPI 2.10.0 (see for more info)

LTP Changes during August 2007

Task Title

Task Description


Release of Containers Testcases Plan to LTP


Release of LTP-KDUMP Test-Case Plan to LTP


2 Releases of RHEL5 LSPP Test suite to LTP


Release of GCOV & LCOV Packages to LTP


Integration of OPEN_HPI_TESTSUITE-2.9.3 to LTP


Integration of NUMA testcases to LTP

write05 test case problem fixed write05 that failed with LTP 20070331 on Fedora 7 GA

data_space test case problem corrected fail message in data_space testcase

mmap1 enhancement made mmap1 to be terminated by Ctrl-C

times03 test case problem fixed times03, where it failed to generate report on user time on RHEl5.1 early build(2.6.18-32.el5)

gcov patch problem

gcov-kernel: added eabi-compatibility patch, renamed .diff to .patch by

lcov spec file problem

lcov: fixed spec file

FAQ in gcov-kernel

gcov-kernel: removed outdated FAQ entry

Makefile additionl

gcov-kernel: added Makefile

Makefile for lcov release 1.6

lcov: Makefile for release 1.6

Makefile for post release

lcov: Makefile for post-release

lcov option addition

lcov: add experimental option --norecursion

numa anomaly

Changes to make testcases/kernel/numa/ executable

stack_space test case problem changed the Default values for MAXSIZE and csize

mkdir03, mmap09, open07 and sendfile03 testcase problem wanted to handle file descriptors properly

Addition of swapon03 test case says that this version can handle when the distro has MAX_SWAPFILES as 30 or 32

LTP Changes during July 2007

Task Title

Task Description

KDUMP Patch for fixing definition of probe point has fixed a probe point definition from ll_rw_lock to ll_rw_block

shmt09 fix fixed the anomaly when SHLBA != getpagesize(), like in SH architecture

lseek09 testcase fix fixed unitialized variable useage in lseek09 testcase

syslog testcases Problem with Suse pointed out that syslog_cmd=/etc/init.d/syslog should be used irrespective of any Distro

LTP Bug No. 1750683 fixed reported build errors in coverage, clarified the same and fixed the error

Upgrading fsx-linux testcase pointed out to have same fsx-linux testcase for fs, ltp-aiodio and nfs

Fix for ns-igmp_querier.c,ns-mcast_join.c,ns-mcast_receiver.c and ns-tcpserver.c

Randy Dunlap writes: Fix printf format warnings

Fix for ns-tcpclient.c, ns-tcpserver.c and ns-udpserver.c

getsockopt() takes a socklen_t, not an int, as its optlen

Fix for gethostid01.c

cleanup file

Fix for gethostid01.c

back out uclinux changes to something that doesnt spit warnings as reported by Randy Dunlap

Fix for mmap1.c, mmap2.c, mmap3.c and shmat1.c

fixup gcc warnings by removing silly pieces of code

Fix for mmap1.c

Randy Dunlap writes: Convert mmap1 to use standard test results output format. Correct several typos

Addition of linux-2.6.22-gcov-arm-hack.patch and linux-2.6.22-gcov.patch

gcov-kernel: adding gcov-kernel patch for 2.6.22

LTP Patch No. 1754301 for mmap03.c

Helge Deller writes: mark hppa/parisc as expecting a segv as well

Fix for

Randy Dunlap writes: convert output to match the standard LTP output

Fix for dummy.c

close stdout to remove noise

Fix for mmstress.c

Randy Dunlap writes: Convert mmstress to use the standard results format

Fix for ltp-howto.txt and ltp-howto.lyx updated the contact information at ltp-howto doc

Fix for fsstress.c wants to update this with kernel/fs/fsstress/fsstress.c

Fix for mmap1.c added SIGNAL and Address Fault handling capability for all architectures

Fix for pan.c, pan.1 and runltp

"" added more options to 'runltp'

Fix for ltp/testcases/open_posix_testsuite

Upgrade to Posix Testsuite 1.5.2

Fix for ltp/tools/genload/stress.c

Fixing Proper Freeing of Memory Chunks

LTP Changes during June 2007

Task Title

Task Description


Upgrade to version 2.9.2 from 0.5.0

“mmap1” testcase problem

"" pointed out the wrong usage of the option -s (submitted a patch)

“shmat1” testcase problem

"" pointed out that id (returned by shmget) has to be used for all shm operations (submitted a patch)

“inotify” testcase problem

"" fixed the way "inotify" should compile in kernels below 2.6.13 (submitted a patch)

“alarm04” testcase call removal

Removing 'alarm04' testcase call from different calling scripts, as alarm04 has been removed to be no-more-valid

“KDUMP” Patch

"" rectified kdump lkdtm tests for powerpc architecture with RedHat distribution(submitted a patch)


"" fixed some Thread Handling Anomaly(submitted a patch)


"" fixed ways by which OPEN POSIX displays warnings(submitted a patch)

pthread_exit() issue

"" corrected the way by which pthread_exit() handles pointer argument(submitted a patch)

mtest06/mmap1 issue for running once/24 hours

"" fixed the problem reported at bug [1732287] mtest06/mmap1.c missing run_once check in do loop

Addition of “writev06” Testcase

"" added this test case to check for "fault in pages readable" functionality(submitted a patch)

Addition of “sysvipc namespace” Testcase

"" added sysvipc (containers) namespace testcases(submitted a patch)

“mmstress” cleanup

"" did "mmstress" cleanups to make output unbuffered so that it is not produced repetitively and erroneously(submitted a patch)

“mount03” segmentation fault on SLES10

"" wants to solve segfault problem with "mount03" on SLES10(submitted a patch)

Updating “fsx-linux” testcase

"Andreas Dilger" updated "fsx-linux" testcase to include new feature(s) including distributed filesystem coherency(submitted a patch)

Cleanup of “mem01”,”mtest01” and “float”

Fix from "" to use standard test results output(submitted a patch)

CVS URLs broken in documentation

"Adreas Dilger" reported that, CVS URLs broken in documentation (Documentation bug fixed)

Build failure of utsname tests

"Will Newton" reported build failure of utsname tests is happening beacuse of non-support for "unshare" system call ( submitted a patch in this regard)

tar file is not multiplatform

Fix for Bug no "1736357",tar file is not multiplatform, pointed out by "Neil Brewitt"(Bug Fixed)

LTP Changes during May 2007

Task Title

Task Description

KDUMP submitted a patch which removes unwanted config files from 'setup' script

mmap1 testcase has reported problems in 'mmap1' testcase and submitted a patch so that it works fine on both glibc and uClibc


Amit Arora has submitted a patch for 'libclone.h' as compilation for containers are failing on 32 bit Z-series machines

Improper condition decision of mmap()

Fixed the Integer problem in 32-bit and 64-bit machines as reported in testcase shmem_test_02.c

Doesn't handle the special Signal 34

Fixed LTP Bug No. 1537169

Test case to verify Native Posix Threading Library - Fails

Fixed LTP Bug No. 1240739

gethostid01 problem has submitted a patch for this testcase as it was not behaving consistently on 32-bit and 64-bit machines,

shm_test.c testcase bug reported that there are bugs in 'shm_test.c', (patch submitted and fixed)

Removal of alarm04 testcase

Sharyathi Nagesh reported the invalidity of alarm04 testcase, the same has been removed

Default value of param x doesn't work for mmap1

Fixed LTP Bug No. 1542453

Wrong usage of pthread_exit in testcases make_tree.c / mmstress.c / threading.h reported wrong use of pthread_exit(), patch submitted and fixed

Utsname tests should use clone2 on ia64 feels that clone2 should be used in case of IA64 for the Utsnamespace testcases, and submitted a patch in this regard

shmem_test_02,shmem_test_03 checksum problems

Nadia Derbey corrected the checksums, patch submitted and fixed

swapon02 fix submitted a patch which fixes test description and added a new test case (EBUSY error)

pthread_exit input argument and the related pthread_join fixed wrong use of these thread utilities

shamt1 testcase fixed the use of shmid, exit(0) and readable fixed wrong use of exit_value, shared memory region and pthread_join

shm_test testcase fixed some ways by which Threads are handled

mmap1 testcase fixed -v option, thread handling, usage of OPT_MISSING macro, etc

KDUMP modified to run kdump tests on non RH and SUSE machines

UTSNamespace TEST not reverting to Original Host Name

Restoring Hostname to Original after UTSTEST, fix by

Addition of inotify system call Testcases submitted new Testcases for inotify syscall on both file(s) and folder(s)

KDUMP added summary file for printing results table,and, added reboot command to test script

su01 Test Case fixed problem with expect in su01 testcase

KDUMP removed unnecessary info from summary script

LTP Changes during April 2007

Task Title

Task Description

Integration of KDUMP test cases into LTP

Integrated all KDUMP Testcases in to LTP submitted by submitted a patch to solve a problem here

Change in runltp submitted a patch to solve a problem here too

semop01 testcase reported problem in this testacses for different behaviours in 32-bit and 64-bit machines, patch submitted and applied

Change in lib/parse_opts.c

Compile error of lib/parse_opts.c raised by eliot_lee, patch submitted and Fixed

Fixing KDUMP Testcases

KDUMP was not building/running properly on SLES 10 SP1. Investigation found that we need to patch the KERNEL 2.6.16-5.43-0 with some gtt patch. Patch also removed some unnecessary files, submitted a patch in this regard

read04 calls strcmp() on unterminated string

Fixed LTP Bug no 1608492

pipe10 calls strcmp() on unterminated string

Fixed LTP Bug no 1608461

exit02 uses strcmp() on unterminated string

Fixed LTP Bug no 1607899

KDUMP submitted a patch which removes the lkdtt code and adds lkdtm code fails on CentOS 4.4

Fixed LTP Bug No 1701305

rusers01 problem submitted a patch to fix a bug

Patch to remove warning while building LTP

Fixed the warning issues

Wrong Display of LTP Version reported that LTP is displaying wrong version no., fixed

Addition of UTSNAMESPACE testcases submitted patch to include these testcases

Bug in mincore syscall

bdubbs reported that mincore01 test 3 is not valid and the others may not be either. submitted a patch for the same.

Bug in fork12 testcase

Vagin Andrey reported that fork12 isn't completed. He feels that process gets stuck at wait(). Fixed the same

shmat() problem in process.c

Yi Xu reported problems in the way shmat() functions in process.c, submitted a patch in this regard, issue fixed

Race condition in fork12 testcase

Fixed LTP Bug No 1221744

Patch for

genload error in LTP workload

close() in child process in exit02 testcase should not be there

Fixed LTP Bug No 1607881

Check return codes everywhere

Fixed LTP Bug No 1671695

Incorrect testcase diotest4-4

Fixed LTP Bug No 1592647

sysfs01 testcase to call proc file system instead of ext2 file system reported that Recent kernels have ext2 and ext3 support in separate modules. On a typical installation this means that ext2 support often is not loaded which will cause the sysfs01 test to fail when it asks for the filesystem index of ext2. This patch changes the test to ask for "proc" instead of "ext2" since that should always be compiled in.  Last modified on: February 01, 2010 - 10:35:21 UTC.