From: Cyril H. <su...@li...> - 2012-10-18 01:56:40
|
The branch, master, has been updated via 5708536275081c44a1e374474a1aae8debcf8109 (commit) via 6fde7df5592f20970e4514343cf248c98bfa6ecd (commit) via 49d3540b4c3922b47085ff45b1ea6e24f625a98c (commit) from 4cfd3efeb42222b7d072fa285496d135cc3f3b3c (commit) - Log ----------------------------------------------------------------- commit 5708536275081c44a1e374474a1aae8debcf8109 Author: Chris Dearman <ch...@mi...> Date: Wed Oct 17 12:15:49 2012 -0700 Add generated files to .gitignore Signed-off-by: Chris Dearman <ch...@mi...> Signed-off-by: Wanlong Gao <gao...@cn...> commit 6fde7df5592f20970e4514343cf248c98bfa6ecd Author: Chris Dearman <ch...@mi...> Date: Wed Oct 17 10:38:19 2012 -0700 pipe01 should only check the data actually received from the pipe The pipe write does not include the string terminator. The way the test is written it's valid for the writer to send less than the requested data and for the reader to read less than the number of written bytes, so just compare the actual bytes received. Signed-off-by: Chris Dearman <ch...@mi...> Acked-by: Cyril Hrubis <ch...@su...> Signed-off-by: Wanlong Gao <gao...@cn...> commit 49d3540b4c3922b47085ff45b1ea6e24f625a98c Author: Chris Dearman <ch...@mi...> Date: Wed Oct 17 10:35:35 2012 -0700 Avoid compiler optimisation of malloc calls clang understands the malloc library call and can optimise calls to it. In particular it will avoid calling malloc completely if it detects that the result is not used. Signed-off-by: Chris Dearman <ch...@mi...> Acked-by: Cyril Hrubis <ch...@su...> Signed-off-by: Wanlong Gao <gao...@cn...> ----------------------------------------------------------------------- Summary of changes: .gitignore | 2 ++ testcases/commands/.gitignore | 5 +++++ testcases/kernel/mem/.gitignore | 2 ++ testcases/kernel/syscalls/.gitignore | 8 ++++++++ testcases/kernel/syscalls/pipe/pipe01.c | 2 +- testcases/kernel/timers/leapsec/.gitignore | 1 + testcases/misc/tcore_patch_test_suites/.gitignore | 1 + .../conformance/interfaces/pthread_cond_init/4-1.c | 19 ++++++++++++------- 8 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 testcases/commands/.gitignore create mode 100644 testcases/kernel/timers/leapsec/.gitignore create mode 100644 testcases/misc/tcore_patch_test_suites/.gitignore diff --git a/.gitignore b/.gitignore index c723901..c9f5637 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,5 @@ patches/ logfile.* /utils/benchmark/ebizzy-0.3/ebizzy +/lib/tests/bytes_by_prefix_test +/lib/tests/tst_tmpdir_test diff --git a/testcases/commands/.gitignore b/testcases/commands/.gitignore new file mode 100644 index 0000000..01918ea --- /dev/null +++ b/testcases/commands/.gitignore @@ -0,0 +1,5 @@ +/ade/objdump/test_arch_debug +/ade/objdump/test_arch_stripped +/ade/size/test +/cron/cron_dirs_check +/eject/check_tray diff --git a/testcases/kernel/mem/.gitignore b/testcases/kernel/mem/.gitignore index 5a3a8e9..e60e458 100644 --- a/testcases/kernel/mem/.gitignore +++ b/testcases/kernel/mem/.gitignore @@ -57,9 +57,11 @@ /shmt/shmt08 /shmt/shmt09 /shmt/shmt10 +/swapping/swapping01 /thp/thp01 /thp/thp02 /tunable/max_map_count +/tunable/min_free_kbytes /tunable/overcommit_memory /vma/vma01 /vma/vma02 diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore index 0d2c3d8..7df28c2 100644 --- a/testcases/kernel/syscalls/.gitignore +++ b/testcases/kernel/syscalls/.gitignore @@ -68,6 +68,10 @@ /close/close01 /close/close02 /close/close08 +/cma/process_vm01 +/cma/process_vm_readv02 +/cma/process_vm_readv03 +/cma/process_vm_writev02 /confstr/confstr01 /connect/connect01 /creat/creat01 @@ -342,6 +346,7 @@ /inotify/inotify01 /inotify/inotify02 /inotify/inotify03 +/inotify/inotify04 /inotify_init/inotify_init1_01 /inotify_init/inotify_init1_02 /io_cancel/io_cancel01 @@ -460,6 +465,7 @@ /madvise/madvise01 /madvise/madvise02 /madvise/madvise03 +/madvise/madvise04 /mallopt/mallopt01 /mbind/mbind01 /memcmp/memcmp01 @@ -623,6 +629,8 @@ /read/read02 /read/read03 /read/read04 +/readahead/readahead01 +/readahead/readahead02 /readdir/readdir01 /readdir/readdir02 /readlink/creat_slink diff --git a/testcases/kernel/syscalls/pipe/pipe01.c b/testcases/kernel/syscalls/pipe/pipe01.c index 08cf612..f49d7f4 100644 --- a/testcases/kernel/syscalls/pipe/pipe01.c +++ b/testcases/kernel/syscalls/pipe/pipe01.c @@ -119,7 +119,7 @@ int main(int ac, char **av) } /* are the strings written and read equal */ - if ((greater = strcmp(rebuf, wrbuf)) != 0) { + if ((greater = strncmp(rebuf, wrbuf, red)) != 0) { tst_resm(TFAIL, "Condition #3 test failed"); continue; } diff --git a/testcases/kernel/timers/leapsec/.gitignore b/testcases/kernel/timers/leapsec/.gitignore new file mode 100644 index 0000000..58787e2 --- /dev/null +++ b/testcases/kernel/timers/leapsec/.gitignore @@ -0,0 +1 @@ +/leapsec_timer diff --git a/testcases/misc/tcore_patch_test_suites/.gitignore b/testcases/misc/tcore_patch_test_suites/.gitignore new file mode 100644 index 0000000..e47c402 --- /dev/null +++ b/testcases/misc/tcore_patch_test_suites/.gitignore @@ -0,0 +1 @@ +/tcore diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_init/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_init/4-1.c index 287fda1..06accd6 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_init/4-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_init/4-1.c @@ -50,7 +50,7 @@ #define ERR_MSG(f, rc) printf("Failed: func: %s rc: %s (%u)\n", \ f, strerror(rc), rc); -/* Max memory for child is 81B */ +/* Max memory for child is 1MB */ #define MAX_MEM ((1<<20)) /* @@ -59,8 +59,8 @@ */ static void child(void) { - char *curr; - char *prev = NULL; + void *curr; + void *prev = NULL; struct rlimit rl; pthread_cond_t cond; pthread_condattr_t attr; @@ -76,10 +76,15 @@ static void child(void) exit(PTS_UNRESOLVED); } - /* Consume all memory we can */ - do { - curr = malloc(1); - } while (curr); + /* + * Consume all memory we can + * It's importamt to use the malloc() return value in a + * meaningful way to bypass potential compiler optimisations. + */ + while ((curr = malloc(sizeof(void *)))) { + *(void **)curr = prev; + prev = curr; + } if (errno != ENOMEM) { ERR_MSG("malloc()", errno); exit(PTS_UNRESOLVED); hooks/post-receive -- ltp |