diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-02-27 12:54:34 -0500 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-02-27 12:54:34 -0500 |
commit | ed1f47c32969a60eb074dc246c79ccda456ebf58 (patch) | |
tree | 65f8bc63b516fe525af1409fad83f44235d9e675 /testsuite/systemtap.printf/memory1.stp | |
parent | 781c25855e35a7b77e5794bd027ca0cf41e4a3a4 (diff) | |
parent | a2dc47ddef0dbed1b0dc912c876f5f57f97c1ede (diff) | |
download | systemtap-steved-ed1f47c32969a60eb074dc246c79ccda456ebf58.tar.gz systemtap-steved-ed1f47c32969a60eb074dc246c79ccda456ebf58.tar.xz systemtap-steved-ed1f47c32969a60eb074dc246c79ccda456ebf58.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite/systemtap.printf/memory1.stp')
-rw-r--r-- | testsuite/systemtap.printf/memory1.stp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/systemtap.printf/memory1.stp b/testsuite/systemtap.printf/memory1.stp new file mode 100644 index 00000000..3b4d6d5e --- /dev/null +++ b/testsuite/systemtap.printf/memory1.stp @@ -0,0 +1,27 @@ +probe begin { + five = 5; + nine = 9; + fifteen = 15; + s = "my string"; + + printf ("Memory default width and precision\t:%m:\n", s); + + printf ("Memory static precision smaller than input\t:%.5m:\n", s); + printf ("Memory dynamic precision smaller than input\t:%.*m:\n", five, s); + printf ("Memory static precision equal to input\t:%.9m:\n", s); + printf ("Memory dynamic precision equal to input\t:%.*m:\n", nine, s); + + printf ("Memory static width default precision\t:%5m:\n", s); + printf ("Memory dynamic width default precision\t:%*m:\n", five, s); + + printf ("Memory static width smaller than static precision\t:%5.9m:\n", s); + printf ("Memory static width larger than static precision\t:%15.9m:\n", s); + printf ("Memory dynamic width smaller than static precision\t:%*.9m:\n", five, s); + printf ("Memory dynamic width larger than static precision\t:%*.9m:\n", fifteen, s); + printf ("Memory static width smaller than dynamic precision\t:%5.*m:\n", nine, s); + printf ("Memory static width larger than dynamic precision\t:%15.*m:\n", nine, s); + printf ("Memory dynamic width smaller than dynamic precision\t:%*.*m:\n", five, nine, s); + printf ("Memory dynamic width larger than dynamic precision\t:%*.*m:\n", fifteen, nine, s); + + exit() +} |