Git Log


Commit Date  
[b4a62c] (20120401) by shubham shubham

LTP 20120401

2012-04-01 10:39:13 Tree
[4f267b] by Zhouping Liu Zhouping Liu , pushed by Caspar Zhang Caspar Zhang

mm/tunable: fix unexpected error log in min_free_kbytes

when overcommit_memory=0, mmap() will be destroyed in two below scenario:
1) MAP_FAILED with ENOMEM,
2) oom_killer kill it.
without the patch, it just catched oom_killer scenario,
the patch fixed it.

Signed-off-by: Zhouping Liu <zliu@redhat.com>

2012-03-30 14:29:58 Tree
[4611a5] by lidan lidan , pushed by Wanlong Gao Wanlong Gao

pthread_join:4-1.c:ignore detached thread

Case pthread_join/4-1.c aims to check the following assertion
"If the thread calling pthread_join is canceled, the joined
thread remains joinable."
It uses array scenarii defined in "threads_scenarii.c" which
sets attribute of some threads as detached.
This patch ignores the detached threads since once
a thread has been detached, it can't be joined with
pthread_join(3) or be made joinable again.

Signed-off-by: DAN LI <li.dan@cn.fujitsu.com>

2012-03-29 01:40:06 Tree
[9bdcec] by Wanlong Gao Wanlong Gao

pthread_join: code cleanups

cleanup the code

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

2012-03-30 06:40:08 Tree
[33341a] by Peng Haitao Peng Haitao , pushed by Wanlong Gao Wanlong Gao

cron02: fix a bug of /etc/init.d/crond is nonexistent

/etc/init.d/crond is nonexistent in fedora16, so should use systemctl.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Reviewed-by: Garrett Cooper <yanegomi@gmail.com>

2012-03-30 01:05:15 Tree
[177cee] by lidan lidan , pushed by Wanlong Gao Wanlong Gao

pthread_join:4-1.c: clean up code

sorry for using old version checkpatch.pl.

code cleanup for pthread_join/4-1.c

Reviewed-by: Caspar Zhang <caspar@casparzhang.com>
Signed-off-by: DAN LI <li.dan@cn.fujitsu.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

2012-03-28 07:31:51 Tree
[177a98] by Wanlong Gao Wanlong Gao

hugeshmget02: limit the shm_size to shmmax

If shm_size bigger than shmmax, shmget() will fail with
EINTVAL. So, limit the value of shm_size.

Below is the test result:
[root@gaowanlong hugeshmget]# ./hugeshmget02
hugeshmget02 0 TINFO : set nr_hugepages to 128
hugeshmget02 1 TBROK : shmget #setup: errno=EINVAL(22): Invalid argument
hugeshmget02 2 TBROK : Remaining cases broken
hugeshmget02 0 TINFO : set nr_hugepages to 0
[root@gaowanlong hugeshmget]# cat /proc/sys/kernel/shmmax
33554432

After patched,

[root@gaowanlong hugeshmget]# ./hugeshmget02
hugeshmget02 0 TINFO : set nr_hugepages to 128
hugeshmget02 1 TPASS : shmget failed as expected: TEST_ERRNO=EINVAL(22): Invalid argument
hugeshmget02 2 TPASS : shmget failed as expected: TEST_ERRNO=EINVAL(22): Invalid argument
hugeshmget02 3 TPASS : shmget failed as expected: TEST_ERRNO=EEXIST(17): File exists
hugeshmget02 4 TPASS : shmget failed as expected: TEST_ERRNO=ENOENT(2): No such file or directory
hugeshmget02 0 TINFO : set nr_hugepages to 0
[root@gaowanlong hugeshmget]# cat /proc/sys/kernel/shmall
2097152
[root@gaowanlong hugeshmget]# cat /proc/sys/kernel/shmmax
33554432

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Acked-by: Caspar Zhang <caspar@casparzhang.com>

2012-03-27 02:30:49 Tree
[bab395] by Jan Stancek Jan Stancek , pushed by Wanlong Gao Wanlong Gao

mremap: fix dependency on ipc subdir

We need to use MAKE_DEPS to declare the ipc subdir depend otherwise
attempting to do `make mremap01` without building in the ipc subdir
will fail, and we can hit race conditions in the overall `make`.

This is same change as in commit:
commit 7103d3e8e0f9dc1804ba06ee66ee02753e8ce50e
Author: Mike Frysinger <vapier@gentoo.org>
Date: Fri Mar 23 12:27:13 2012 -0400
kill: fix dependency on ipc subdir

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Caspar Zhang <caspar@casparzhang.com>

2012-03-26 14:21:05 Tree
[8b7cc6] by Zhouping Liu Zhouping Liu , pushed by Wanlong Gao Wanlong Gao

mm/tunable: add a new testcase min_free_kbytes

The tune is used to control free memory, and system always
reserve > min_free_kbytes memory at least.

Since the tune is not too large or too little, which will
lead to the system hang, so I choose two cases, and test them
on all overcommit_memory policy (0, 1, 2), at the same time,
compare the current free memory with the tunable value
repeatedly.

a) default min_free_kbytes with all overcommit memory policy
b) half of mem_free with all overcommit memory policy

Signed-off-by: Zhouping Liu <zliu@redhat.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

2012-03-23 14:12:38 Tree
[7103d3] by Mike Frysinger Mike Frysinger

kill: fix dependency on ipc subdir

We need to use MAKE_DEPS to declare the ipc subdir depend otherwise
attempting to do `make kill01` without building in the ipc subdir
will fail, and we can hit race conditions in the overall `make`.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

2012-03-23 16:27:13 Tree
[8cd840] by Wanlong Gao Wanlong Gao

mq_timedreceive: fix the bad coding style

code cleanups

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

2012-03-22 15:41:45 Tree
[781a61] by Peng Haitao Peng Haitao , pushed by Wanlong Gao Wanlong Gao

aio_read:8-1.c: Forget initializing struct aiocb before using it

There are 2 changes in this patch.
1. Initialize the aiocb struct before using it.
2. If Prioritized Input and Output option is supported, submit the
aiocb with invalid aio_reqprio, else return untested.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

2012-03-21 08:43:28 Tree
[33d74b] by lidan lidan , pushed by Wanlong Gao Wanlong Gao

testfrmw:disable thread cancelability while output is running

Function output can be canceled by pthread_cancel(), which,
maybe, leads to a deadlock as it calls pthread_mutex_lock().
That's catched in case "pthread_join/4-1.c".

So,disable thread cancelability until output finishes.

Signed-off-by: DAN LI <li.dan@cn.fujitsu.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

2012-03-22 03:56:31 Tree
[d6748f] by Akira Takeuchi Akira Takeuchi , pushed by Wanlong Gao Wanlong Gao

mq_timedreceive: 10-2.c: check timeout error rather than invalid parameter error

10-2.c now passes the invalid parameter to mq_timedreceive by specifying
a negative value to nanoseconds field, and checks whether EINVAL is not
returned when a message can be removed from the queue immediately.

However, this may not be a appropriate testing of mq_timedreceive.
POSIX spec of mq_timedreceive says:
The validity of the abstime parameter need not be checked
if a message can be removed from the message queue immediately.

This is open for interpretation of POSIX spec, and it was argued about in LKML.
https://lkml.org/lkml/2012/3/14/589

The conclusion in LKML was that what POSIX spec says is "you don't *have*
to check validity". That is, it is allowed to check the validity.

On the other hand, actually, timeout error should not be returned when message
can be performed immediately.

Therefore, I modify the testcase to check timeout error rather than invalid
parameter error.

Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com>
Signed-off-by: Kiyoshi Owada <owada.kiyoshi@jp.panasonic.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

2012-03-22 04:23:54 Tree
[3f8c00] by Zhouping Liu Zhouping Liu , pushed by Caspar Zhang Caspar Zhang

mem/oom: avoid unexpected error when no memcg swap accounting

Since commit http://git.kernel.org/linus/a42c390cfa0c,
which added an option to control memcg swap, when kernel
neither set CGROUP_MEM_RES_CTLR_SWAP_ENABLED nor add
'swapaccount=1' kernel parameter, that indicates memcg swap
accounting is disabled, it will have no such file:
memory.memsw.*, then oom03 & oom04 cases will fail.

The patch fixed it: removed memsw cases when memcg swap
accounting is disabled, and added a TCONF:
tst_resm(TCONF,"memcg swap accounting is disabled");

Signed-off-by: Zhouping Liu <zliu@redhat.com>
Reviewed-by: Caspar Zhang <czhang@redhat.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

2012-03-19 10:28:15 Tree
[cf7c6a] by Caspar Zhang Caspar Zhang

Revert "mm/oom: add oom control check for memcg"

This reverts commit 071a94b4baf498a4c9d334c4022aa5e1bfad0d29.

OOM control is not stable on every platform, read() might be blocked due
to not receiving oom notification from eventfd. revert this patch for
now.

Signed-off-by: Caspar Zhang <caspar@casparzhang.com>

2012-03-16 13:26:59 Tree
[f550b6] by Caspar Zhang Caspar Zhang

tunable/max_map_count: set a safer upper limit

oom-killer's behavior is worse than expected, so we have to set a safer
upper limit for max_map_count file. In this patch we set it to:
min{65536, available_memory}.

Signed-off-by: Caspar Zhang <caspar@casparzhang.com>

2012-03-15 20:00:00 Tree
[07694a] by Jan Stancek Jan Stancek , pushed by Wanlong Gao Wanlong Gao

io_submit: uninitialized iocb may not return -EINVAL

Testcase 1.3 - EINVAL: uninitialized iocb
is about submitting uninitialized iocb structure.

Test is expecting to get -EINVAL, but other values are also
possible as uninitialized struct can contain any values.

For example following data fails with -EBADF:
--- snip ---
unsigned char bad_iocb[64] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x84, 0xa5,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0f, 0xff, 0xe0, 0x10, 0x0c, 0x30,
0x00, 0x00, 0x0f, 0xff, 0xe0, 0x10, 0x0c, 0x40,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
memcpy(&iocb, bad_iocb, sizeof(iocb));
iocbs[0] = &iocb;
TEST(io_submit(ctx, 1, iocbs));
check_result(-EINVAL, TEST_RETURN);
--- snip ---

This patch accepts also few other errno codes as valid return value.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Caspar Zhang <caspar@casparzhang.com>
Acked-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

2012-03-15 09:15:55 Tree
[dc9df8] by Wanlong Gao Wanlong Gao

readlink03: fix return value for the syscall readlink()

Since commit http://git.kernel.org/linus/65cfc672
which added O_PATH support to the *at() calls,
the error return for readlink/readlinkat
for the empty pathname has switched from
ENOENT to EINVAL. And this patch merged to linux v2.6.39,
So LTP commit https://github.com/linux-test-project/ltp/commit/0cc7514
fix this with the kernel version v2.6.39 compared.

But recently, commit http://git.kernel.org/linus/1fa1e7f6
which ensure we return ENOENT for the empty pathname
for normal lookups.

Now, the patch whitch switch the return value back again
is already queued for 3.0 and 3.1 stable release.

So, if the return value is EINVAL for empty pathname,
it may be a kernel bug, so we needn't to check the kernel
version but return the "kernel bug" warning to LTP the users.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Acked-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Caspar Zhang <caspar@casparzhang.com>

2011-11-07 03:55:31 Tree
[c7c3f7] by Caspar Zhang Caspar Zhang

tunable/max_map_count: avoid oom

This patch fixes the following issues in max_map_count:

1) add a workaround to avoid triggering oom-killer when testing. Since
oom-killer is not stable, it is expected to keep this workaround in this
testcase for long time.

2) move count map procedure to parent since the test might still
succeed if child fails.

Signed-off-by: Caspar Zhang <caspar@casparzhang.com>

2012-03-14 17:06:14 Tree
[ed5e6a] by Caspar Zhang Caspar Zhang

hugetlb/hugemmap02: remove hugemmap02

hugemmap02 testcase is broken. It is not implemented as designed, the
hugemmap succeeded in both 32bit and 64bit. Also the design is not clear
enough, so it's difficult to fix it. Remove it for now.

Signed-off-by: Caspar Zhang <caspar@casparzhang.com>
Acked-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

2012-03-14 05:50:42 Tree
[d295ac] by Caspar Zhang Caspar Zhang

hugetlb/hugeshmget03: fix broken testcase

hugeshmget03 often returns ENOMEM, so that causes test fails. This patch
fixes the problem by making the following changes:

1) reduce shm_size to minimum (1 hugepage);
2) reduce shmmni to 1/2 * nr_hugepages.

so that when all shmids taken, memory allocated ~=

1/2 * nr_hugepages * hugepagesize < free memory

Which means there will be no ENOMEM occurs, but ENOSPC as expected.

Signed-off-by: Caspar Zhang <caspar@casparzhang.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

2012-03-13 01:59:30 Tree
[566b6c] by Wanlong Gao Wanlong Gao

aio_read: code cleanups

Cleanup the code.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

2012-03-13 13:41:22 Tree
[879ae7] by Caspar Zhang Caspar Zhang

hugetlb/hugemmap03: fix broken test

hugemmap03 tries to do a hugemmap with only pagesize, which causes mmap
always fails with EINVAL. This patch fixes this behavior by changeing
map size to 1 hugepagesize and check whether errno is expected.

Also do some code clean-ups in the test.

Signed-off-by: Caspar Zhang <caspar@casparzhang.com>

2012-03-13 10:24:50 Tree
[51725f] by Caspar Zhang Caspar Zhang

libltp: remove system_specific_hugepages_info

system_specific_hugepages_info is not well-implemented and has been
deprecated, all functions in it can be replaced with libmem. So removing
it.

Signed-off-by: Caspar Zhang <caspar@casparzhang.com>

2012-03-13 03:02:55 Tree
Older >

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks