diff options
author | Stan Cox <scox@redhat.com> | 2008-05-29 14:46:38 -0400 |
---|---|---|
committer | Stan Cox <scox@redhat.com> | 2008-05-29 14:46:38 -0400 |
commit | c39d889155d4c9365bd27691d22a92c447ced976 (patch) | |
tree | 64b56069b0435ac09564ba983bea154a9747bcbe /runtime/tests/string | |
parent | ef63732e82dd7979dcf608ba6ed4528e150b47ac (diff) | |
download | systemtap-steved-c39d889155d4c9365bd27691d22a92c447ced976.tar.gz systemtap-steved-c39d889155d4c9365bd27691d22a92c447ced976.tar.xz systemtap-steved-c39d889155d4c9365bd27691d22a92c447ced976.zip |
SW5106 Remove old map and histogram formatting code
Diffstat (limited to 'runtime/tests/string')
-rw-r--r-- | runtime/tests/string/Makefile | 5 | ||||
-rw-r--r-- | runtime/tests/string/all.tcl | 4 | ||||
-rw-r--r-- | runtime/tests/string/print_cstr.c | 56 | ||||
-rw-r--r-- | runtime/tests/string/printf_A.c | 56 | ||||
-rw-r--r-- | runtime/tests/string/printf_B.c | 37 | ||||
-rw-r--r-- | runtime/tests/string/string.test | 89 | ||||
-rw-r--r-- | runtime/tests/string/string1.c | 44 | ||||
-rw-r--r-- | runtime/tests/string/string2.c | 68 | ||||
-rw-r--r-- | runtime/tests/string/string3.c | 45 |
9 files changed, 0 insertions, 404 deletions
diff --git a/runtime/tests/string/Makefile b/runtime/tests/string/Makefile deleted file mode 100644 index c396c132..00000000 --- a/runtime/tests/string/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -default: tests - -tests: - tclsh all.tcl - diff --git a/runtime/tests/string/all.tcl b/runtime/tests/string/all.tcl deleted file mode 100644 index 23757202..00000000 --- a/runtime/tests/string/all.tcl +++ /dev/null @@ -1,4 +0,0 @@ -package require tcltest -namespace import -force tcltest::* -tcltest::testsDirectory [file dir [info script]] -tcltest::runAllTests diff --git a/runtime/tests/string/print_cstr.c b/runtime/tests/string/print_cstr.c deleted file mode 100644 index 2de0f592..00000000 --- a/runtime/tests/string/print_cstr.c +++ /dev/null @@ -1,56 +0,0 @@ -/* test of _stp_print_cstr() */ - -/* use very small buffer size for testing */ -#define STP_PRINT_BUF_LEN 20 -#include "runtime.h" - -int main () -{ - /* can we see output? */ - _stp_print_cstr("ABCDE\n"); - _stp_print_flush(); - - - /* overflow */ - _stp_print_cstr("1234567890123456789012345\n"); - _stp_print_cstr("XYZZY\n"); - _stp_print_flush(); - - /* small string then overflow string */ - _stp_print_cstr("XYZZY\n"); - _stp_print_cstr("1234567890123456789012345"); - _stp_print_cstr("\n"); - _stp_print_flush(); - - /* two small string that overflow */ - _stp_print_cstr("abcdefghij"); - _stp_print_cstr("1234567890"); - _stp_print_cstr("\n"); - _stp_print_flush(); - - /* two small string that overflow */ - _stp_print_cstr("abcdefghij"); - _stp_print_cstr("1234567890X"); - _stp_print_cstr("\n"); - _stp_print_flush(); - - _stp_print_cstr("12345\n"); - _stp_print_cstr("67890\n"); - _stp_print_cstr("abcde\n"); - _stp_print_flush(); - _stp_print_flush(); - _stp_print_cstr("12345"); - _stp_print_cstr("67890"); - _stp_print_cstr("abcde"); - _stp_print_cstr("fghij"); - _stp_print_cstr("\n"); - _stp_print_flush(); - - /* null string */ - _stp_print_cstr(""); - _stp_print_flush(); - _stp_print_cstr(""); - _stp_print_cstr("Q\n"); - _stp_print_flush(); - return 0; -} diff --git a/runtime/tests/string/printf_A.c b/runtime/tests/string/printf_A.c deleted file mode 100644 index e6c1a93f..00000000 --- a/runtime/tests/string/printf_A.c +++ /dev/null @@ -1,56 +0,0 @@ -/* basic printf tests */ - -/* use very small buffer size for testing */ -#define STP_PRINT_BUF_LEN 20 -#include "runtime.h" - -int main () -{ - /* can we see output? */ - _stp_printf("ABCDE\n"); - _stp_print_flush(); - - - /* overflow */ - _stp_printf("1234567890123456789012345\n"); - _stp_printf("XYZZY\n"); - _stp_print_flush(); - - /* small string then overflow string */ - _stp_printf("XYZZY\n"); - _stp_printf("1234567890123456789012345"); - _stp_printf("\n"); - _stp_print_flush(); - - /* two small string that overflow */ - _stp_printf("abcdefghij"); - _stp_printf("1234567890"); - _stp_printf("\n"); - _stp_print_flush(); - - /* two small string that overflow */ - _stp_printf("abcdefghij"); - _stp_printf("1234567890X"); - _stp_printf("\n"); - _stp_print_flush(); - - _stp_printf("12345\n"); - _stp_printf("67890\n"); - _stp_printf("abcde\n"); - _stp_print_flush(); - _stp_print_flush(); - _stp_printf("12345"); - _stp_printf("67890"); - _stp_printf("abcde"); - _stp_printf("fghij"); - _stp_printf("\n"); - _stp_print_flush(); - - /* null string */ - _stp_printf(""); - _stp_print_flush(); - _stp_printf(""); - _stp_printf("Q\n"); - _stp_print_flush(); - return 0; -} diff --git a/runtime/tests/string/printf_B.c b/runtime/tests/string/printf_B.c deleted file mode 100644 index b9bbe170..00000000 --- a/runtime/tests/string/printf_B.c +++ /dev/null @@ -1,37 +0,0 @@ -/* more printf tests */ - -/* use very small buffer size for testing */ -#define STP_PRINT_BUF_LEN 20 -#include "runtime.h" - -#define LLONG_MAX 9223372036854775807LL -#define LLONG_MIN (-LLONG_MAX - 1LL) - - -int main () -{ - int i; - - /* a couple of loops showing continuous output */ - for (i = 0; i < 20; i++) - _stp_sprintf(_stp_stdout, "i=%d ", i); - _stp_printf("\n"); - _stp_print_flush(); - - for (i = 0; i < 5; i++) - _stp_printf("[%d %d %d] ", i, i*i, i*i*i); - _stp_printf("\n"); - _stp_print_flush(); - - int64_t x,y; - x = LLONG_MAX; - y = LLONG_MIN; - - _stp_printf("%lld ",x); - _stp_printf("(%llx) ", x); - _stp_printf("%lld ",y); - _stp_printf("(%llx) ", y); - _stp_printf("\n"); - _stp_print_flush(); - return 0; -} diff --git a/runtime/tests/string/string.test b/runtime/tests/string/string.test deleted file mode 100644 index 348b6b1f..00000000 --- a/runtime/tests/string/string.test +++ /dev/null @@ -1,89 +0,0 @@ -package require tcltest -namespace import -force tcltest::* - -cd $tcltest::testsDirectory - -set CFLAGS "-Os" -set KPATH "/lib/modules/[exec uname -r]/build/include" -set MPATH "/lib/modules/[exec uname -r]/build/include/asm/mach-default" -set PATH "../../user" - -test printf_A {Basic printf test} -setup { - exec gcc $CFLAGS -I $KPATH -I $PATH -I $MPATH -o test printf_A.c -} -body { - exec ./test -} -result {ABCDE -12345678901234567890XYZZY -XYZZY -12345678901234567890 -abcdefghij1234567890 -abcdefghij1234567890X -12345 -67890 -abcde -1234567890abcdefghij -Q} - -test printf_B {More printf test} -setup { - exec gcc $CFLAGS -I $KPATH -I $PATH -I $MPATH -o test printf_B.c -} -body { - exec ./test -} -result {i=0 i=1 i=2 i=3 i=4 i=5 i=6 i=7 i=8 i=9 i=10 i=11 i=12 i=13 i=14 i=15 i=16 i=17 i=18 i=19 -[0 0 0] [1 1 1] [2 4 8] [3 9 27] [4 16 64] -9223372036854775807 (7fffffffffffffff) -9223372036854775808(8000000000000000) } - -test print_cstr {Test of _stp_print_cstr()} -setup { - exec gcc $CFLAGS -I $KPATH -I $PATH -I $MPATH -o test print_cstr.c -} -body { - exec ./test -} -result {ABCDE -12345678901234567890XYZZY -XYZZY -12345678901234567890 -abcdefghij1234567890 -abcdefghij1234567890X -12345 -67890 -abcde -1234567890abcdefghij -Q} - -test string1 {Basic String test} -setup { - exec gcc $CFLAGS -I $KPATH -I $PATH -I $MPATH -o test string1.c -} -body { - exec ./test -} -result {Hello worldRed HatIntelIBM -Hello world / Red Hat / Intel / IBM / -Red Hat Inc. -Hello world Red Hat -IntelIBM} - -test string2 {More String tests} -setup { - exec gcc $CFLAGS -I $KPATH -I $PATH -I $MPATH -o test string2.c -} -body { - exec ./test -} -result {ABCDE -1234567890123456789 -XYZZY -1234567890123 -abcdefghij123456789 -abcdefghij123456789 -12345 -67890 -abcde -1234567890abcdefghi -Q} -test string3 {Even More String tests} -setup { - exec gcc $CFLAGS -I $KPATH -I $PATH -I $MPATH -o test string3.c -} -body { - exec ./test -} -result {1234567890abcABCDEvwxyz -abcde -1234567890abcde -1234567890abcdeABCD -1234567890abcdeABCD -ABCDEvwxyz} - -exec rm test - -cleanupTests diff --git a/runtime/tests/string/string1.c b/runtime/tests/string/string1.c deleted file mode 100644 index 48773e5f..00000000 --- a/runtime/tests/string/string1.c +++ /dev/null @@ -1,44 +0,0 @@ -/* test of Strings */ - -/* use very small buffer size for testing */ -#define STP_PRINT_BUF_LEN 20 -#define STP_NUM_STRINGS 4 -#include "runtime.h" - -int main () -{ - String str[4]; - int i; - - for (i = 0; i < 4; i++) - str[i] = _stp_string_init (i); - - _stp_sprintf(str[0], "Hello world"); - _stp_sprintf(str[1], "Red Hat"); - _stp_sprintf(str[2], "Intel"); - _stp_sprintf(str[3], "IBM"); - - for (i = 0; i < 4; i++) - _stp_print(str[i]); - _stp_print_cstr("\n"); - - for (i = 0; i < 4; i++) { - _stp_print(str[i]); - _stp_print(" / "); - } - _stp_print_cstr("\n"); - - _stp_string_cat_cstr (str[1], " Inc."); - _stp_print(str[1]); - _stp_print("\n"); - - _stp_string_cat_cstr (str[0], " "); - _stp_string_cat_string (str[0], str[1]); - _stp_print(str[0]); - _stp_print("\n"); - - _stp_sprintf(str[2], "%s\n", _stp_string_ptr(str[3])); - _stp_print(str[2]); - _stp_print_flush(); - return 0; -} diff --git a/runtime/tests/string/string2.c b/runtime/tests/string/string2.c deleted file mode 100644 index ccf3997a..00000000 --- a/runtime/tests/string/string2.c +++ /dev/null @@ -1,68 +0,0 @@ -/* test of Strings */ - -/* use very small buffer size for testing */ -#define STP_STRING_SIZE 20 -#define STP_NUM_STRINGS 1 -#include "runtime.h" - -int main () -{ - String str = _stp_string_init (0); - - /* can we see output? */ - _stp_sprintf(str, "ABCDE\n"); - _stp_print(str); - - - /* overflow */ - str = _stp_string_init (0); - _stp_sprintf(str, "1234567890123456789012345\n"); - _stp_sprintf(str, "XYZZY\n"); - _stp_print(str); - _stp_printf("\n"); - - /* small string then overflow string */ - str = _stp_string_init (0); - _stp_sprintf(str,"XYZZY\n"); - _stp_sprintf(str,"1234567890123456789012345"); - _stp_print(str); - _stp_printf("\n"); - - /* two small string that overflow */ - str = _stp_string_init (0); - _stp_sprintf(str,"abcdefghij"); - _stp_sprintf(str,"123456789"); - _stp_print(str); - _stp_printf("\n"); - - /* two small string that overflow */ - str = _stp_string_init (0); - _stp_sprintf(str,"abcdefghij"); - _stp_sprintf(str,"1234567890X"); - _stp_print(str); - _stp_printf("\n"); - - str = _stp_string_init (0); - _stp_sprintf(str,"12345\n"); - _stp_sprintf(str,"67890\n"); - _stp_sprintf(str,"abcde\n"); - _stp_print(str); - - str = _stp_string_init (0); - _stp_sprintf(str,"12345"); - _stp_sprintf(str,"67890"); - _stp_sprintf(str,"abcde"); - _stp_sprintf(str,"fghij"); - _stp_print(str); - _stp_printf("\n"); - - /* null string */ - str = _stp_string_init (0); - _stp_sprintf(str,""); - _stp_sprintf(str,""); - _stp_sprintf(str,"Q\n"); - _stp_print(str); - - _stp_print_flush(); - return 0; -} diff --git a/runtime/tests/string/string3.c b/runtime/tests/string/string3.c deleted file mode 100644 index 3982a8e1..00000000 --- a/runtime/tests/string/string3.c +++ /dev/null @@ -1,45 +0,0 @@ -/* test of Strings */ - -/* use very small buffer size for testing */ -#define STP_STRING_SIZE 20 -#define STP_NUM_STRINGS 4 -#include "runtime.h" - -int main () -{ - String str[4]; - int i; - - for (i = 0; i < 4; i++) - str[i] = _stp_string_init (i); - - _stp_string_cat(str[0], "1234567890"); - _stp_string_cat(str[1], "abc"); - _stp_string_cat(str[2], "ABCDE"); - _stp_string_cat(str[3], "vwxyz"); - - for (i = 0; i < 4; i++) - _stp_print(str[i]); - _stp_print("\n"); - - _stp_string_cat (str[1], "de"); - _stp_print(str[1]); - _stp_print("\n"); - - _stp_string_cat(str[0], str[1]); - _stp_print(str[0]); - _stp_print("\n"); - - _stp_string_cat(str[0], str[2]); - _stp_print(str[0]); - _stp_print("\n"); - - _stp_string_cat(str[0], str[2]); - _stp_print(str[0]); - _stp_print("\n"); - - _stp_sprintf(str[2], "%s\n", _stp_string_ptr(str[3])); - _stp_print(str[2]); - _stp_print_flush(); - return 0; -} |