Linux Test Project



LTP Changes during JUNE 2008

Task Title

Task Description

TIMERFD() tests add

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

CPU & MEMORY HOTPLUG add

CPU and MEMORY HOTPLUG test cases picked up from http://devresources.linux-foundation.org/dev/hotplug/.

CONCURRENCY fix for MREMAP04

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 <Renaud.Lottiaux@kerlabs.com>.

RT fix for START_LATENCY

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 <vernux@us.ibm.com>.

CONCURRENCY fix for EXECVE05

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<Louis.Rilling@kerlabs.com>.

CONCURRENCY fix for EXECVE05

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 <Louis.Rilling@kerlabs.com>.

CONCURRENCY fix for EXECVE05

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 <Louis.Rilling@kerlabs.com>.

CONCURRENCY fix for EXECVE05

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 <Louis.Rilling@kerlabs.com>.

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 <Renaud.Lottiaux@kerlabs.com>.

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 <Renaud.Lottiaux@kerlabs.com>.

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 <Renaud.Lottiaux@kerlabs.com>.

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 <lizf@cn.fujitsu.com>.

FS_BIND Makefile fix

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

TIMERFD Updates

Add syscall numbers for timerfd syscalls under i386 and x86_64. Roy Lee <roylee@andestech.com>.

TIMERFD Updates

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 <roylee@andestech.com>.

RT fix for START_LATENCY

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 <vernux@us.ibm.com>.

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 <mtk.manpages@googlemail.com>. Signed-off-by: Subrata Modak<subrata@linux.vnet.ibm.com>.

FS_BIND fix for ia64

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

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 <avagin@gmail.com>.

WRITETEST fix

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 <vechandr@in.ibm.com>.

MALLOCSTRESS fix

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 <avagin@gmail.com>.

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 <aime.le-rouzic@bull.net>.

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 <yanegomi@gmail.com>.

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 <peppe.cavallaro@st.com>, Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>.

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 <sds@tycho.nsa.gov>.

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 <chirag@linux.vnet.ibm.com>.

VMSPLICE01 fix

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 <vickyirobot@gmail.com>.

FS_BIND fix

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 <avagin@parallels.com>.

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 <shiwh@cn.fujitsu.com>.

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 <shiwh@cn.fujitsu.com>.

README.ltp-devel fix

Updating to include info about all other LTP man pages. Subrata Modak <subrata@linux.vnet.ibm.com>

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 <yamato@redhat.com>

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 <yamato@redhat.com>.

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é <mfertre@irisa.fr>.

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 <mjf@gentoo.org>.

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 Cavallaro@st.com.

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 <peppe.cavallaro@st.com>.

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 <peppe.cavallaro@st.com>.

RTNETLINK fix

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 <peppe.cavallaro@st.com>.

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 <lizf@cn.fujitsu.com>.

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 <lizf@cn.fujitsu.com>.

io_cancel() tests add

This was ported from the Crackerjack Project by Masatake YAMATO <yamato@redhat.com>.

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 <yamato@redhat.com>.

hackbench tests add

hackbench tests the Linux scheduler. Initial test was written by Rusty Russell <rusty@rustcorp.com.au>. Later modified by Pierre Peiffer <pierre.peiffer@bull.net>, Ingo Molnar <mingo@elte.hu>, Arjan van de Ven <arjan@infradead.org>, "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>, Nathan Lynch <ntl@pobox.com> and others. Included in LTP by Subrata Modak<subrata@linux.vnet.ibm.com>, after Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>.

BASIC_RPC fix

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 <aime.le-rouzic@bull.net>

TIMERFD Fix

Few Changes to ttype value.

UTIMENSAT Fix

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

FS_BIND fix

Fixing the run on supported kernels.



LTP Changes during MAY 2008

Task Title

Task Description

BALLISTA update

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 <caglar@pardus.org.tr>

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 <errandir_news@mph.eclipse.co.uk>

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 <vinaysridhar@in.ibm.com>.

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 <gilles.carry@bull.net>.

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 <shenlinf@cn.ibm.com>

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 <shenlinf@cn.ibm.com>

LTP-LIB update

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

LTP-LIB update

cleanup CFLAGS handling

LTP-INCLUDE update

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 <oberpapr@users.sourceforge.net>

SOCKIOCTL update

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 <hyei@mvista.com>

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 <sripathik@in.ibm.com>

MALLOCSTRESS fix

Fix for some failures by Anoop V Chakkalakkal <anoop.vijayan@in.ibm.com>.

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

DIOTEST4 fix

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 <roylee17@gmail.com>.

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 <subrata@linux.vnet.ibm.com>, and by Martin Habets <errandir_news@mph.eclipse.co.uk> on sparc32. Signed-off-by: Roy Lee <roylee17@gmail.com>.

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 <dvhltc@us.ibm.com>. Acked-by: John Stultz <johnstul@us.ibm.com>.

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 <dvhltc@us.ibm.com>. Acked-by: John Stultz <johnstul@us.ibm.com>.

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 <deller@gmx.de>.

SHMT06 fix

Roy Lee <roylee17@gmail.com> 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 <deller@gmx.de> 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 <roylee17@gmail.com> 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 <roylee17@gmail.com>

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 <guojb@cn.ibm.com>.

sync_pipes API fix

Make-sync_pipe-API-more-generic-and-update-related.patch. Put-libtestsuite-to-a-more-common-place.patch. Roy Lee <roylee17@gmail.com> 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 <Renaud.Lottiaux@kerlabs.com> 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 <roylee17@gmail.com>.

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 <deller@gmx.de>.

LTP-DEVEL RPM update

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

LTP-DEVEL RPM update

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

LTP-DEVEL RPM update

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-2.0.0.0 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 (./run.sh) or for an individual directory (./run_auto.sh). 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 <gilles.carry@bull.net>, Reviewed-by: Ankita Garg <ankita@in.ibm.com>.

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 <Renaud.Lottiaux@kerlabs.com>.

PTRACE03 Fix

I got failures on ptrace03 because the latest kernel allows init process to be traced. Commit is: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff; h=00cd5c37afd5f431ac186dd131705048c0a11fdb, See the discussion in LKML: http://marc.info/?t=120628018600001. So we should not execute this test case if the kernel version is above 2.6.25. Signed-off-by: Li Zefan lizf@cn.fujitsu.com>.

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 <Louis.Rilling@kerlabs.com>

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 <gilles.carry@bull.net>.

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: http://git.kernel.org/?p=linux/kernel/git/torvalds/ 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 <miaox@cn.fujitsu.com>

FCNTL LOCKTESTS Latest Updates

Manas K Nayak <maknayak@in.ibm.com> updated the fnctl lock tests from http://nfsv4.bullopensource.org/tools/tests/locktest.php. 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 <qcai@redhat.com>.

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 <qcai@redhat.com>.

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 skumar@linux.vnet.ibm.com>.

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 <suzuki@in.ibm.com>.

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 <chirag@linux.vnet.ibm.com> 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 <ankita@in.ibm.com> Signed-off-by: Chandan Kumar B V <cbhuvana@in.ibm.com>

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 <skumar@linux.vnet.ibm.com>.



LTP Changes during APRIL 2008



Task Title

Task Description

LTP-DEVEL RPM

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

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 <chirag@linux.vnet.ibm.com>

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 <jburke@redhat.com>

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 <serue@us.ibm.com>

INOTIFY Fix

dont build things statically, by, Mike Frysinger <vapier@users.sourceforge.net>

FCNTL Fix

anal fix: add whitespace between arguments, by, Mike Frysinger <vapier@users.sourceforge.net>

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 Renaud.Lottiaux@kerlabs.com>

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 <Renaud.Lottiaux@kerlabs.com>

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 <Renaud.Lottiaux@kerlabs.com>

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 <Renaud.Lottiaux@kerlabs.com>

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é <mfertre@irisa.fr>

CONCURRENCY Fix for msgctl06

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

CONCURRENCY Fix for msgctl07

This patch fix a concurrency issue in msgctl07, by, Renaud Lottiaux <Renaud.Lottiaux@kerlabs.com>

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é <mfertre@irisa.fr>

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é <mfertre@irisa.fr>

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é <mfertre@irisa.fr>

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é <mfertre@irisa.fr>

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é <mfertre@irisa.fr>

CONCURRENCY Fix for semget05

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

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é <mfertre@irisa.fr>

networkstress.sh Fix

This patch reviews the networkstress.sh script and adds a menu to select the network stress tests. Hoping that could be useful, by, Giuseppe Cavallaro <peppe.cavallaro@gmail.com>

SYSCONF01 Fix

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 http://www.comptechdoc.org/os/linux/programming/c/linux_pgcpostest.html. Max Stirling <vicky.irobot@gmail.com>

LTP-DEVEL RPM update

A patch to include all the headers for the ltp-devel package, by, George Kraft <gk4@austin.ibm.com>

INOTIFY Fix

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 <serue@us.ibm.com>

DEFAULT Run Update

Making these tests run as default with LTP run, by, Subrata Modak <subrata@linux.vnet.ibm.com>

RT Linux Build Fix

split CFLAGS/CPPFLAGS properly and remove inappropriate flags, by, Mike Frysinger <vapier@users.sourceforge.net>

RT Linux Build Fix

dont stick ar flags into AR, and dont set AR/RANLIB by default, by, Mike Frysinger <vapier@users.sourceforge.net>

RT Linux Build Fix

setup default RANLIB, by, Mike Frysinger <vapier@users.sourceforge.net>

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 <caglar@pardus.org.tr>, Acked-by: Chirag <chirag@linux.vnet.ibm.com>

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 <caglar@pardus.org.tr>

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://sources.redhat.com/ml/libc-alpha/2008-04/msg00054.html and http://sources.redhat.com/ml/libc-alpha/2008-04/msg00055.html. Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>

TCPDUMP01 Fix

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 <anoop.vijayan@in.ibm.com>

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 <sebastien.dugue@bull.net>. Cc: Darren Hart <dvhltc@us.ibm.com>

RT Linux Update

pi_perf is not built by default, so add it to SUBDIRS in testcases/realtime/Makefile. Signed-off-by: Sebastien Dugue sebastien.dugue@bull.net>. Acked-by: Chirag <chirag@linux.vnet.ibm.com>

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 <sebastien.dugue@bull.net>. Acked-by: Chirag <chirag@linux.vnet.ibm.com>.

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 <sebastien.dugue@bull.net>. Acked-by: Chirag <chirag@linux.vnet.ibm.com>.

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 <sebastien.dugue@bull.net>. Acked-by: Chirag <chirag@linux.vnet.ibm.com>.

RT Linux Update

Remove the last 2 files missed in the migration,namely:testcases/realtime/stress/pi-tests/GNUmakefile.am,testcases/realtime/stress/pi-tests/GNUmakefile.in, Signed-off-by: Sebastien Dugue<sebastien.dugue@bull.net>

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 <roylee17@gmail.com>

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 <Renaud.Lottiaux@kerlabs.com>. Changes by Roy Lee <roylee17@gmail.com>.

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 <Renaud.Lottiaux@kerlabs.com>

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 <roylee17@gmail.com>.

POSIXFADVISE fix

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 <shanevolpe@gmail.com>

SYSFS fix

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 <will.newton@gmail.com>

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 <emachado@linux.vnet.ibm.com>

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 <will.newton@gmail.com>.

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 <dgollub@suse.de>, endorsed by Sebastien Dugue <sebastien.dugue@bull.net>, seconded by Darren Hart <dvhltc@us.ibm.com>.

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 <hyei@mvista.com>

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 <hyei@mvista.com>

Idcheck.sh Update

overhaul script to make things much easier to manage by Garrett Cooper <yanegomi@gmail.com>

fs_perms Update

simplify targets, by, Mike Frysinger <vapier@users.sourceforge.net>

fs_perms Update

cleanup code and add error checking, by, Mike Frysinger <vapier@users.sourceforge.net>

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 <hyei@mvista.com>.

FLOAT_BESSEL Update

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 <vinaysridhar@in.ibm.com> & Renaud Lottiaux <Renaud.Lottiaux@kerlabs.com>.

CPU Controllers Update

Some Cleanups for CPU Controller Test Cases by Sudhir Kumar. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>, Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>.

Addition of Initial Set of Memory Controller Test Cases in LTP



LTP Changes during MARCH 2008



Task Title

Task Description

IOCTL01 Fix

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 <Renaud.Lottiaux@kerlabs.com>

SYSLOGTST Fix

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, jburke@redhat.com & a-tsuji@bk.jp.nec.com

FILECAPS Cleanup

Cleanup build system a bit

POSIX Fixes

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

GENERAL BUILD Fixes

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 <r.schwebel@pengutronix.de>

FILECAPS Updates

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 <serue@us.ibm.com>

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 <gilles.carry@bull.net>

RT Linux Test Cleanups

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

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 <sebastien.dugue@bull.net>

CONCURRENCY Fixes

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 <Renaud.Lottiaux@kerlabs.com>

CONCURRENCY Fixes

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 <Renaud.Lottiaux@kerlabs.com>

CONCURRENCY Fixes

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

CONCURRENCY Fixes

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 <Renaud.Lottiaux@kerlabs.com>

NFX ISSUE Fix

Fixing some NFS issue(s), by, Renaud Lottiaux <Renaud.Lottiaux@kerlabs.com>

NFX ISSUE Fix

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 <Renaud.Lottiaux@kerlabs.com>

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 <rfolco@linux.vnet.ibm.com>

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 <hyei@mvista.com>

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 <sripathik@in.ibm.com>

NUMA Fix

Fixing Build Failures on Fedora Machine, by, psuriset@linux.vnet.ibm.com

RT Linux Test Update

Whitespaces cleanup and added -i argument for iterations, by, Gilles Carry <gilles.carry@bull.net>

KILL06 update

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

CLONE06 update

Provide it with CHILD_STACK_SIZE, by, Anton Gladkov <agladkov@parallels.com>

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 <agladkov@parallels.com>

TI-RPC Tests Addittion

Initial Set of TI-RPC test Cases addition to LTP, by, Aurélien Charbon <aurelien.charbon@ext.bull.net>

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 <will.newton@gmail.com>

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 <sebastien.dugue@bull.net>

RT Linux Test Update

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

RT Linux Test Update

Remove autotools stuff: - autogen.sh - configure.ac - configure - aclocal.m4 - config/* - all the GNUmakefile.am - all the GNUmakefile.in Also adapt testscripts/test_realtime.sh to the new build system. Signed-off-by: Sebastien Dugue <sebastien.dugue@bull.net>

'RT Linux Test Update

Forgot to remove include/rttests_config.h.in in the previous patch. Signed-off-by: Sebastien Dugue <sebastien.dugue@bull.net>

'RT Linux Test Update

Fix by Michael Olbrich <m.olbrich@pengutronix.de>, 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 <r.schwebel@pengutronix.de>

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 <dino@in.ibm.com>

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

DISKTEST update

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 <randy.dunlap@oracle.com>

SYSLOGTST Update

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 <vinaysridhar@in.ibm.com>

INOTIFY02 Fix

The filename arguments in some output messages are wrong. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>

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 <ankita@in.ibm.com>, Acked-by: Sripathi Kodi <sripathik@in.ibm.com>

VMSPLICE01 Fix

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 <vinaysridhar@in.ibm.com>

FACCESSAT01 and FCHMODAT01 fixes

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 <marcusmeissner@users.sourceforge.net>

NFTW64 fix

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

MISSING DECLARATION fixes

some more "variable is used uninitialized" warnings fixed with this patch, by, Marcus Meissner <marcusmeissner@users.sourceforge.net>DECLARATION fixes

GCC WARNINGS 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 <marcusmeissner@users.sourceforge.net>

WAITPID fixes

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 <marcusmeissner@users.sourceforge.net>

COMPILE ERROR fixes

When I was compiling ltp-full-20080229/kernel/module/, error occured. The error like this: ... scripts/Makefile.build:46: *** 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 <wangf@cn.fujitsu.com>

LINK ERROR fixes

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 <wangf@cn.fujitsu.com>

DATA DISPLAY fixes

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 <wangf@cn.fujitsu.com>

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 <lizf@cn.fujitsu.com>



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 dnozay@vmware.com

Se-linux Update

Fix for Don´t call Domain type on test create, by, "Serge Hallyn" <serue@us.ibm.com>

PID & SYSVIPC Namespace Update

Some code cleanup in PID & SYSVIPC namespace testcases, by, "Rishikesh K. Rajak" <risrajak@linux.vnet.ibm.com>

HUGETLB Update

Some Cleanups and running hugetlb independantly

Initiated Discussion with Community Distros for including LTP KDUMP Testing

NUMA Fix

Give Execute Permission to numa01.sh, by, Pradeep K Surisetty <pradeepkumars@in.ibm.com>

Se-linux Update

Let tests send sigchld to unconfined_t. Without this, the selinux testsuite on Fedora 8 hangs at selinux_task_create.sh, by, "Serge E. Hallyn" <serue@us.ibm.com>

SCHEDULER Update

str_echo function expects a file descriptor & not an address, by, Craig Meier <crmeier@ghs.com>

FILECAPS Fix

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

FILECAPS Fix

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

LTP Library Update

mark test_exit as noreturn #1891129 by Marcus Meissner, by, Mike Frysinger <vapier@users.sourceforge.net>

LTP Disktest Update

Disktest application update to version 1.4.2, by, Brent Yardley <yardleyb@us.ibm.com>

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" <risrajak@linux.vnet.ibm.com>

remap_file_pages02 update

Based on the discussion at LKML (http://lkml.org/lkml/2007/11/29/325), Ricardo Salveti de Araujo <rsalveti@linux.vnet.ibm.com> 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 <joseferr@br.ibm.com>

Sysconf01 fix

Patrick Kirsch <pkirsch@suse.de> 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 <vapier@users.sourceforge.net>

Pcllib (syscall) Update

Remove compiled files, by, Mike Frysinger <vapier@users.sourceforge.net>

Pcllib (syscall) Update

punt compiled files, by, Mike Frysinger <vapier@users.sourceforge.net>

FALLOCATE fix

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 <sharyathi@in.ibm.com>

IPC-MSGCTL Fix

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 <Nadia.Derbey@bull.net>

RT Linux Update

To avoid forking 2*msgmni processes and create msgmni msg queues,Signed-off-by: Sebastien Dugue <sebastien.dugue@bull.net>

LCOV Fix

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 <oberpapr@users.sourceforge.net>

LCOV Fix

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 <oberpapr@users.sourceforge.net>

RT Linux Update

run_auto.sh file for realtime/func/pthread_kill_latency/ testcase got missed out in first release of realtime tests. This patch adds run_auto.sh for testcase which is required to run this particular test through top-level run script, by, sudhanshu <sudh@linux.vnet.ibm.com>

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 <Nadia.Derbey@bull.net>

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 <Louis.Rilling@kerlabs.com>

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<sudh@linux.vnet.ibm.com>

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 <Louis.Rilling@kerlabs.com>

Waitpid Fix

waitpid tests: Fix failure detection flag initialization. On a similar pattern as waitpid06 and waitpid07