

15-Oct-2013: New tracer features for software testing
source link: https://yurichev.com/blog/75/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

15-Oct-2013: New tracer features for software testing
For my software testers friends I added two features to my tracer.
* Pause
PAUSE:number: Make a pause in milliseconds. 1000 - one second. It is convinient for testing, for creating artifical delays. For example, it is important to know program's behaviour in very slow network environment:
tracer.exe -l:test1.exe bpf=WS2_32.dll!WSARecv,pause:1000
... or if it will read from some very slow storage:
tracer.exe -l:test1.exe bpf=kernel32.dll!ReadFile,pause:1000
* Probability
RT_PROBABILITY:number: Used with RT: option in pair, defines probability of RT triggering. For example, if RT:0 and RT_PROBABILITY:30% were set, 0 will be set instead of function's return value in 30% of cases. It's convenient for testing - good written program should handle errors correctly. For example, that's how we can simulate memory allocation errors, 1 malloc() call of 100 will return NULL:
tracer.exe -l:test1.exe bpf=msvcrt.dll!malloc,rt:0,rt_probability:1%
... in 10% of cases, the file will fail to open:
tracer.exe -l:test1.exe bpf=kernel32.dll!CreateFile,rt:0,rt_probability:10%
Probability may be set in usual manner, as a number in 0 (never) to 1 (always) interval. 10% is 0.1, 3% is 0.03, etc.
About ideas on errors also may be simulated, read here: Oracle RDBMS internal self-testing features.
Recommend
-
122
Using the Go execution tracer to speed up fractal renderingOriginally posted on campoy.cat
-
82
Introduction Ever wondered how are your goroutines being scheduled by the go runtime? Ever tried to understand why adding concurrency to your program has not given it better performance? The go execution tracer can help...
-
47
Introduction Sol-R is a CUDA/OpenCL-based realtime ray-tracer compatible with Oculus Rift DK1, Kinect, Razor Hydra and Leap Motion devices. Sol-R was used by the Interactive Molecular Visualiser project (
-
54
README.md ply Documentation and language reference is available at wkz.github.io/ply. A light-weight dyn...
-
55
C++17 constexpr Compile-time Ray Tracer Introduction This is a C++17 ray tracer using cons...
-
9
Add import to PE executable file16-Oct-2013: Add import to PE executable file Just wrote an utility I always missed: PE_add_import is a simple tool for adding symbol to PE executable import table Sometimes, you may n...
-
15
Using debugging features of DosBox29-Oct-2010: Using debugging features of DosBox DosBox is DOS emulator, one can say, it is a kind of virtual machine, mainly used for retrocomputing and retrogam...
-
6
Microsoft to debut new Surface devices on Oct. 12
-
4
Meet SmashingConf New York 🇺🇸 (Oct 10–13)SmashingConf NYC is back! A friendly, inclusive conference for designers and...
-
8
Stress-testing AI-imagined art — or “your mother is a tracer”I used machine learning to teach myself embroidery, and it helped me remember what humans are good at: editing....
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK