Updating cerberus test suite module to use CTCS2
PATCH 1/1 Updating cerberus test suite module to use CTCS2
Instead of using the unmaintained original CTCS suite, use the CTCS2 project. Since it's not necessary to keep the old version around, just bump the source version and add patches to fix the build under 64 bit architectures
New features of the test:
* Using a newer version compared to the existed cerberus test.
* User can specifiy cerberus testcases by providing command line options in control file.
* Added a patch to fix the makefile to make cerberus run on x86_64 system.
Notes from Lucas
* I removed the binary diffs for brevity, this is just for the sake of documentation
* I was thinking about a good default time to let this test run, and I am tentatively setting the test to run for 1 hour and setting the timeout to 1 hour and 5 minutes, which seems long enough to get meaningful results out of it. If we come to the conclusion that this is too long I am going to change it at a later time. Obviously that's configurable on the test config file.
--- client/tests/cerberus/0001-fix-ctcs2-build.patch | 174 +++++++++++++++++++ client/tests/cerberus/0002-compile-on-64bit.patch | 175 ++++++++++++++++++++ client/tests/cerberus/cerberus.py | 57 ++++--- client/tests/cerberus/control | 14 +- client/tests/cerberus/ctcs-1.3.1pre1.tar.bz2 | Bin 115392 -> 0 bytes client/tests/cerberus/ctcs2.tar.bz2 | Bin 0 -> 2131977 bytes client/tests/cerberus/fix-ctcs-build.patch | 87 ---------- client/tests/kvm/autotest_control/cerberus.control | 20 +++ client/tests/kvm/kvm_tests.cfg.sample | 3 + 9 files changed, 415 insertions(+), 115 deletions(-) create mode 100644 client/tests/cerberus/0001-fix-ctcs2-build.patch create mode 100644 client/tests/cerberus/0002-compile-on-64bit.patch delete mode 100644 client/tests/cerberus/ctcs-1.3.1pre1.tar.bz2 create mode 100644 client/tests/cerberus/ctcs2.tar.bz2 delete mode 100644 client/tests/cerberus/fix-ctcs-build.patch create mode 100644 client/tests/kvm/autotest_control/cerberus.control
client/tests/cerberus/0001-fix-ctcs2-build.patch new file +174 -0
@@ -0,0 +1,174 @@ +diff --git a/runin/src/chartst.c b/runin/src/chartst.c +index 4a20b38..63b1a5a 100644 +--- a/runin/src/chartst.c ++++ b/runin/src/chartst.c +@@ -9,6 +9,7 @@ + #include <unistd.h> + #include <stdlib.h> + #include <signal.h> ++#include <string.h> + + void handler(int i) { + exit (0); +diff --git a/runin/src/memtst.src/maxalloc.c b/runin/src/memtst.src/maxalloc.c +index 5c48356..4863791 100755 +--- a/runin/src/memtst.src/maxalloc.c ++++ b/runin/src/memtst.src/maxalloc.c +@@ -10,9 +10,6 @@ + + #if defined(__BSD__) + static const size_t PAGE_SIZE = 4096; +-#else +-/* this is horribly architecture specific */ +- #include <asm/page.h> + #endif + + +diff --git a/runin/src/memtst.src/memtst.c b/runin/src/memtst.src/memtst.c +index f086f28..538f770 100755 +--- a/runin/src/memtst.src/memtst.c ++++ b/runin/src/memtst.src/memtst.c +@@ -10,8 +10,6 @@ + + #if defined(__BSD__) + static const size_t PAGE_SIZE = 4096; +-#else +- #include <asm/page.h> + #endif + + /* The verbose global from memtst_main.c */ +@@ -331,6 +329,12 @@ void kmemscan (int *nbuf, int block_size, int offset) { + int kmem_file; + int d; + ++ /* Newer linux distributions don't have asm/page.h therefore ++ * we are going to get the page size using the value of ++ * _SC_PAGESIZE instead. ++ */ ++ u_long page_size = sysconf(_SC_PAGESIZE); ++ + /* window manipulation, iterator, read retval, etc */ + int low, high, foo; + int rd; +@@ -353,7 +357,7 @@ void kmemscan (int *nbuf, int block_size, int offset) { + + /* Now compute the offset (in chars) of the error from the page + boundary. */ +- fail_page_offset = ((int) (&nbuf[offset])) % PAGE_SIZE; ++ fail_page_offset = ((int) (&nbuf[offset])) % page_size; + + kmem_file = open("/proc/kcore",0); + if (kmem_file < 0) { +@@ -370,7 +374,7 @@ void kmemscan (int *nbuf, int block_size, int offset) { + * window. + */ + fail_page_offset -= ((offset - low) * sizeof(int)); +- if (fail_page_offset < 0) fail_page_offset+=PAGE_SIZE; ++ if (fail_page_offset < 0) fail_page_offset+=page_size; + + printf("%d %x fail_page_offset\n",fail_page_offset,fail_page_offset); + +@@ -382,8 +386,8 @@ void kmemscan (int *nbuf, int block_size, int offset) { + */ #include <sys/types.h> + #include <sys/sysctl.h> + +- lseek(kmem_file,pages*PAGE_SIZE+fail_page_offset,SEEK_SET); +- phys_addr=pages*PAGE_SIZE+fail_page_offset; ++ lseek(kmem_file,pages*page_size+fail_page_offset,SEEK_SET); ++ phys_addr=pages*page_size+fail_page_offset; + + /* We now use lseeks to (hugely) improve the performance of this + thing. Large memory systems were extremely painful before. +@@ -396,8 +400,8 @@ void kmemscan (int *nbuf, int block_size, int offset) { + foo = low; + /* Every time we miss, skip to the next page. */ + ++pages; +- lseek(kmem_file,pages*PAGE_SIZE+fail_page_offset,SEEK_SET); +- phys_addr=pages*PAGE_SIZE+fail_page_offset; ++ lseek(kmem_file,pages*page_size+fail_page_offset,SEEK_SET); ++ phys_addr=pages*page_size+fail_page_offset; + continue; + } + /* If foo made it to high, we've found it. */ +@@ -410,7 +414,7 @@ void kmemscan (int *nbuf, int block_size, int offset) { + fprintf(stderr, "Possible location of memory failure: %p (%dM) on page %d\n", + (void *) failure, + (int) (failure/1024/1024), +- (int) (failure/PAGE_SIZE)); ++ (int) (failure/page_size)); + close(kmem_file); + return; + } +diff --git a/runin/src/memtst.src/sizeofint.c b/runin/src/memtst.src/sizeofint.c +index d1f9cfe..8d0404f 100755 +--- a/runin/src/memtst.src/sizeofint.c ++++ b/runin/src/memtst.src/sizeofint.c +@@ -1,6 +1,7 @@ + /* Jason continues to not use autoconf despite the fact he should. */ + + #include <stdio.h> ++#include <stdlib.h> + + main () + { +diff --git a/runin/src/pi_fftc6/Makefile_64bit b/runin/src/pi_fftc6/Makefile_64bit +index de06626..57fe30c 100644 +--- a/runin/src/pi_fftc6/Makefile_64bit ++++ b/runin/src/pi_fftc6/Makefile_64bit +@@ -1,7 +1,7 @@ + # ---- for GNU gcc ---- +-#CC = gcc +-#OFLAGS_FFT = -O6 -ffast-math +-#OFLAGS_PI = -O6 -ffast-math ++CC = gcc ++OFLAGS_FFT = -O6 -ffast-math ++OFLAGS_PI = -O6 -ffast-math + + # ---- for SUN WS cc ---- + #CC = cc +@@ -9,9 +9,9 @@ + #OFLAGS_PI = -fast -xO5 + + # ---- for DEC cc ---- +-CC = cc +-OFLAGS_FFT = -fast -O6 +-OFLAGS_PI = -fast -O6 ++#CC = cc ++#OFLAGS_FFT = -fast -O6 ++#OFLAGS_PI = -fast -O6 + + + # ---- use POSIX Thread ---- +diff --git a/runin/src/pi_fftc6/config.h b/runin/src/pi_fftc6/config.h +index ecdf0cb..5b4cb3c 100644 +--- a/runin/src/pi_fftc6/config.h ++++ b/runin/src/pi_fftc6/config.h +@@ -16,7 +16,7 @@ + #ifndef dgt_int + #ifdef USE_DGT_LONG_INT + #define dgt_int long long int /* 64 bit int */ +-#define DGT_INT_MAX LLONG_MAX /* 64 bit int max */ ++#define DGT_INT_MAX LONG_MAX /* 64 bit int max */ + #else + #ifdef USE_DGT_NORMAL_INT + #define dgt_int int /* 32 bit int */ +@@ -31,7 +31,7 @@ + #ifndef fft_int + #ifdef USE_FFT_LONG_INT + #define fft_int long long int /* 64 bit int */ +-#define FFT_INT_MAX LLONG_MAX /* 64 bit int max */ ++#define FFT_INT_MAX LONG_MAX /* 64 bit int max */ + #else + #define fft_int int /* 32 bit int */ + #define FFT_INT_MAX INT_MAX /* 32 bit int max */ +diff --git a/runin/src/sort.src/error.c b/runin/src/sort.src/error.c +index 9e23046..141e05d 100644 +--- a/runin/src/sort.src/error.c ++++ b/runin/src/sort.src/error.c +@@ -1,5 +1,6 @@ + /* Fatal error unrelated to system call + * Print message and terminate */ ++#include <string.h> + #include "sort.h" + #define MAXLINE 120 + #define LOG_ERR 120
client/tests/cerberus/0002-compile-on-64bit.patch new file +175 -0
175 lines not on this page · raw message
client/tests/cerberus/cerberus.py +35 -24
94 lines not on this page · raw message
client/tests/cerberus/control +9 -5
@@ -1,16 +1,20 @@ AUTHOR = """ Manas Kumar Nayak ([email protected]) (original code) Lucas Meneghel Rodrigues ([email protected]) (rewrite) +Cao, Chen <[email protected]> (use ctcs2 and port it to 64) """ NAME = "Cerberus test suite" -TEST_TYPE = "client" -TEST_CLASS = "Hardware" -TEST_CATEGORY = "Functional" +TEST_TYPE = "CLIENT" +TEST_CLASS = "HARDWARE" +TEST_CATEGORY = "BENCHMARK" TIME = "MEDIUM" DOC = """\ -Executes the cerberus VA manufacturing test for a period of time specified. You +Executes the cerberus2 test for a period of time specified. You can also provide a cerberus test control file of your own, trough the parameter tcf_contents. + +see http://sourceforge.net/projects/ctcs2 + and http://sourceforge.net/projects/va-ctcs """ -job.run_test(url='cerberus', length='4h') +job.run_test(url='cerberus', length='1h', tc_opt='-k -C -a')
client/tests/cerberus/fix-ctcs-build.patch deleted +0 -87
87 lines not on this page · raw message
client/tests/kvm/autotest_control/cerberus.control new file +20 -0
@@ -0,0 +1,20 @@ +AUTHOR = """ +Manas Kumar Nayak ([email protected]) (original code) +Lucas Meneghel Rodrigues ([email protected]) (rewrite) +Cao, Chen <[email protected]> (use ctcs2 and port it to 64) +""" +NAME = "Cerberus test suite" +TEST_TYPE = "CLIENT" +TEST_CLASS = "HARDWARE" +TEST_CATEGORY = "BENCHMARK" +TIME = "MEDIUM" +DOC = """\ +Executes the cerberus test for a period of time specified. You +can also provide a cerberus test control file of your own, trough the parameter +tcf_contents. + +see http://sourceforge.net/projects/ctcs2 + and http://sourceforge.net/projects/va-ctcs +""" + +job.run_test(url='cerberus', length='1h', tc_opt='-k -C -a')
client/tests/kvm/kvm_tests.cfg.sample +6 -0
@@ -90,6 +90,9 @@ variants: - disktest: test_name = disktest test_control_file = disktest.control + - ctcs2: + test_name = cerberus + # If you think this is too lengthy, please change the cerberus + # control file and set this timeout appropriately. + test_timeout = 3900 + test_control_file = cerberus.control
- linux_s3: install setup
type = linux_s3
Signature · 1 line
1.6.2.5