From 91c8487abb0cb919b20b3c6fb41cb654a4dbc20d Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 11 Apr 2013 12:07:10 -0700 Subject: [PATCH] Add --exact, --no-deps, or --no-prune to trim tests as needed By explicitly specifying --exact, --no-deps, or --no-prune these tests are now immune from any change in the default behavior of "apitrace trim". Whether --exact or --auto is the default, these tests will get exactly the behavior they want. --- cli/cli-trim-no-side-effects-prune.script | 2 +- cli/cli-trim-no-side-effects-trim.script | 2 +- traces/trim-frame-set.script | 2 +- traces/trim-frames-and-calls.script | 2 +- traces/trim-identity.script | 2 +- traces/trim-range.script | 2 +- traces/trim-thread.script | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cli/cli-trim-no-side-effects-prune.script b/cli/cli-trim-no-side-effects-prune.script index 9710f1c..658b578 100644 --- a/cli/cli-trim-no-side-effects-prune.script +++ b/cli/cli-trim-no-side-effects-prune.script @@ -1,7 +1,7 @@ # Verify that "trim --prune" drops calls with no side effects # Tell trim to trim to the entire trace, but pruning calls -apitrace trim --prune few-side-effects.trace +apitrace trim --no-deps --prune few-side-effects.trace # Verify that we actually trimmed what we wanted to (just calls with # no side effects) diff --git a/cli/cli-trim-no-side-effects-trim.script b/cli/cli-trim-no-side-effects-trim.script index 179df98..ecc5ec8 100644 --- a/cli/cli-trim-no-side-effects-trim.script +++ b/cli/cli-trim-no-side-effects-trim.script @@ -4,7 +4,7 @@ # Trim trace to frame 1, but dropping calls from first frame 0 with no # side effects. -apitrace trim --deps --trim-spec=no-side-effects --frames=1 few-side-effects.trace +apitrace trim --no-prune --deps --trim-spec=no-side-effects --frames=1 few-side-effects.trace # Verify that we actually trimmed what we wanted to (just calls with # no side effects) diff --git a/traces/trim-frame-set.script b/traces/trim-frame-set.script index 33293c3..2adade9 100644 --- a/traces/trim-frame-set.script +++ b/traces/trim-frame-set.script @@ -1,4 +1,4 @@ -trim --frames=0-5/draw,0-5/frame glxsimple.trace +trim --exact --frames=0-5/draw,0-5/frame glxsimple.trace dump --verbose glxsimple-trim.trace 0 glClear(mask = GL_COLOR_BUFFER_BIT) 1 glXSwapBuffers(dpy = 0x236a280, drawable = 41943041) diff --git a/traces/trim-frames-and-calls.script b/traces/trim-frames-and-calls.script index c9a0084..5133441 100644 --- a/traces/trim-frames-and-calls.script +++ b/traces/trim-frames-and-calls.script @@ -1,4 +1,4 @@ -trim -o trim-frames-and-calls-trim.trace --frames=5/frame --calls=2 glxsimple.trace +trim --exact -o trim-frames-and-calls-trim.trace --frames=5/frame --calls=2 glxsimple.trace dump --verbose trim-frames-and-calls-trim.trace 0 glXMakeCurrent(dpy = 0x236a280, drawable = 41943041, ctx = 0x2384330) = True 1 glXSwapBuffers(dpy = 0x236a280, drawable = 41943041) diff --git a/traces/trim-identity.script b/traces/trim-identity.script index 4370211..b3daca1 100644 --- a/traces/trim-identity.script +++ b/traces/trim-identity.script @@ -1,4 +1,4 @@ -trim -o trim-identity.src.trace tri.trace +trim --exact -o trim-identity.src.trace tri.trace dump --verbose trim-identity.src.trace 0 glXQueryExtension(dpy = 0xfc52b0, errorb = NULL, event = NULL) = True 1 glXChooseFBConfig(dpy = 0xfc52b0, screen = 0, attribList = {GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_ALPHA_SIZE, 1, GLX_DOUBLEBUFFER, 1, 0}, nitems = &12) = {0xfe3620, 0xfe3710, 0xfe53e0, 0xfe54d0, 0xfe38f0, 0xfe39e0, 0xfe3e90, 0xfe56b0, 0xfe57a0, 0xfe5c50, 0xfe3f80, 0xfe5d40} diff --git a/traces/trim-range.script b/traces/trim-range.script index 9b216d5..f605f45 100644 --- a/traces/trim-range.script +++ b/traces/trim-range.script @@ -1,4 +1,4 @@ -trim -o trim-range.src.trace --calls=3-5,7,4-6,2 tri.trace +trim --exact -o trim-range.src.trace --calls=3-5,7,4-6,2 tri.trace dump --verbose trim-range.src.trace 0 glXGetVisualFromFBConfig(dpy = 0xfc52b0, config = 0xfe3620) = &{visual = 0xfd00e8, visualid = 154, screen = 0, depth = 24, c_class = 4, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8} 1 glXCreateNewContext(dpy = 0xfc52b0, config = 0xfe3620, renderType = GLX_RGBA_TYPE, shareList = NULL, direct = True) = 0xfdd650 diff --git a/traces/trim-thread.script b/traces/trim-thread.script index 0d33ab1..d476f48 100644 --- a/traces/trim-thread.script +++ b/traces/trim-thread.script @@ -1,4 +1,4 @@ -trim -o trim-thread.src.trace --thread=1 glthreads.trace +trim --exact -o trim-thread.src.trace --thread=1 glthreads.trace dump --verbose --thread-ids --call-nos=no trim-thread.src.trace 1 glXMakeCurrent(dpy = 0x751280, drawable = 62914565, ctx = 0xa99be0) = True 1 glGetString(name = GL_RENDERER) = "Mesa DRI Mobile Intel\2\556 GM45 Express Chipset " -- 2.43.0