[cairo-commit] 2 commits - test/alpha-similar.c test/big-trap.c test/degenerate-dash.c test/degenerate-path.c test/device-offset-scale.c test/in-fill-empty-trapezoid.c test/long-lines.c test/Makefile.am test/README test/scale-offset-image.c test/self-copy-overlap.c
Uli Schlachter
psychon at kemper.freedesktop.org
Thu Oct 3 07:59:46 PDT 2013
test/Makefile.am | 73 -----------------------------------------
test/README | 19 +++++-----
test/alpha-similar.c | 4 ++
test/big-trap.c | 1
test/degenerate-dash.c | 5 ++
test/degenerate-path.c | 4 ++
test/device-offset-scale.c | 4 ++
test/in-fill-empty-trapezoid.c | 5 ++
test/long-lines.c | 1
test/scale-offset-image.c | 1
test/self-copy-overlap.c | 5 ++
11 files changed, 39 insertions(+), 83 deletions(-)
New commits:
commit 592e6a98031cccfae8551bcd86c1f5134726a4f6
Author: Uli Schlachter <psychon at znc.in>
Date: Sun Sep 15 14:05:42 2013 +0200
README: Don't mention XFAIL_TESTS anymore
The variable XFAIL_TESTS is not used anymore since commit e90073f7ddc.
Instead, we now have special reference images that show the wrong output and the
test suite fails a test if it does not match the expected, wrong output.
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/test/README b/test/README
index 3f19a5c..e8e7189 100644
--- a/test/README
+++ b/test/README
@@ -192,16 +192,16 @@ A new test case should be added by imitating the style of an existing
test. This means adding the following files:
new-bug.c
- new-bug-ref.png
+ reference/new-bug.ref.png
+ reference/new-bug.xfail.png
Where new-bug.c is a minimal program to demonstrate the bug, following
-the style of existing tests. The new-bug-ref.png image should contain
-the desired result of new-bug.c if the bug were fixed.
+the style of existing tests. The new-bug.ref.png image should contain
+the desired result of new-bug.c if the bug were fixed while
+new-bug.xfail.png contains the current results of the test.
-Makefile.am should be edited, adding new-bug.c to both the TESTS and
-XFAIL_TESTS lists and new-bug-ref.png to EXTRA_DIST. Add new-bug to
-.gitignore, and last but not least, don't forget to "git add" the new
-files.
+Makefile.sources should be edited by adding new-bug.c to test_sources.
+And last but not least, don't forget to "git add" the new files.
When a new feature is added
---------------------------
@@ -209,7 +209,7 @@ It's important for the regression suite to keep pace with development
of the library. So a new test should be added for each new feature.
The work involved is similar the work described above for new bugs.
The only distinction is that the test is expected to pass so it
-should not be added to the XFAIL_TESTS list.
+should not need a new-bug.xfail.png file.
While working on a test
-----------------------
@@ -223,8 +223,7 @@ When a bug is fixed
-------------------
The fix should be verified by running the test suite which should
result in an "unexpected pass" for the test of interest. Rejoice as
-appropriate, then remove the relevant file name from the XFAIL_TESTS
-variable in Makefile.am.
+appropriate, then remove the relevant xfail.png file from git.
Before releasing
----------------
commit bc89be2fff92968a1b585e75371ae2a8a26592e9
Author: Uli Schlachter <psychon at znc.in>
Date: Sun Sep 29 13:12:55 2013 +0200
Remove XFAIL_TESTS from Makefile.am
The variable XFAIL_TESTS is not used anymore since commit e90073f7ddc.
The description for the known failures are moved into the respective tests as
comments.
The following descriptions were dropped:
- surface-pattern-big: Didn't really explain the failure
- big-line: Test isn't failing any more
- self-intersecting: Only XFAIL on quartz, but description doesn't match this
The following tests don't have a xfail reference image and seem to fail just
because of not having a reference image at all (I kept their description for
now):
big-trap, long-lines, self-copy-overlap
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/test/Makefile.am b/test/Makefile.am
index a9495dc..547e5d2 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -142,79 +142,6 @@ surface-source.c \
testtable.js \
reference
-# Any test for which the code committed to CVS is expected to fail
-# should be listed here.
-#
-# This way, we can avoid being bothered by reports of bugs we are
-# aware of, but users can still report when tests start behaving in
-# unexpected ways on their system.
-#
-# Of course, before any "release" of cairo we should eliminate
-# everything from this list by fixing the bugs. (We don't necessarily
-# have to be that strict for "snapshots" though.)
-#
-# Analysis of XFAIL errors:
-# alpha-similar - discrepancy between backends in applying color
-# components of a pure alpha surface
-# big-line - range overflow of fixed-point
-# big-trap - range overflow of fixed-point
-# degenerate-dash - needs path editing in PS to convert degenerate
-# end-caps into the shapes as expected by cairo
-# (Or maybe PS is the correct behaviour?)
-# degenerate-path - undefined behaviour in PS, needs path editing to
-# convert degenerate segments into circles/rectangles
-# as expected by cairo
-# device-offset-scale - complication of pre-multiplying device_offset
-# into the pattern_matrix and then requiring further
-# manipulation for SVG
-# extend-pad - lacks implementation in pixman and consequently used
-# as an excuse for lack of support in other backends
-# fallback-resolution - The essential problem here is that the recording-surface
-# has recorded a sequence of operations with one device
-# transformation, and we attempt to replay it with
-# another (basically a scale-factor for the falback
-# resolution). Carl begun to look at this with his
-# chain-of-bugs, but the can of worms is much bigger.
-# It appears to be a design flaw in the recording-surface
-# that may spread further...
-# My solution would be to lock Behad and Adrian in a
-# room, with Carl as a moderator and not let them out
-# until they have come up with an interface and
-# semantics that actually work. :-)
-# in-fill-empty-trapezoid The cairo_in_fill () function can sometimes
-# produce false positives when the tessellator
-# produces empty trapezoids and the query
-# point lands exactly on a trapezoid edge.
-# long-lines - range overflow of fixed-point
-# scale-offset-image - loss of precision converting a cairo matrix to
-# scale-offset-similar pixman's fixed point format.
-# self-copy-overlap - vector surfaces take snapshot of patterns in contrast
-# to the raster backends which don't. One solution
-# would be to clone overlapping areas of dst/source, so
-# patterns were effectively snapshotted across all
-# backends.
-# self-intersecting - incremental trapezoidation of strokes can generate
-# overlapping traps. Needs self-intersection analysis
-# on cairo_traps_t after strokes.
-# Test case should also be expanded to hit special-case
-# tessellators as well.
-# surface-pattern-big...- Strange, unexplained results for SVG/PS.
-XFAIL_TESTS = \
-alpha-similar$(EXEEXT) \
-big-line$(EXEEXT) \
-big-trap$(EXEEXT) \
-degenerate-dash$(EXEEXT) \
-degenerate-path$(EXEEXT) \
-device-offset-scale$(EXEEXT) \
-extend-pad$(EXEEXT) \
-fallback-resolution$(EXEEXT) \
-in-fill-empty-trapezoid$(EXEEXT) \
-long-lines$(EXEEXT) \
-self-copy-overlap$(EXEEXT) \
-self-intersecting$(EXEEXT) \
-surface-pattern-big-scale-down$(EXEEXT) \
-$(NULL)
-
# Any test that doesn't generate a log file goes here
NOLOG_TESTS = \
fallback-resolution \
diff --git a/test/alpha-similar.c b/test/alpha-similar.c
index a9411d1..86c6ae3 100644
--- a/test/alpha-similar.c
+++ b/test/alpha-similar.c
@@ -60,6 +60,10 @@ draw (cairo_t *cr, int width, int height)
return CAIRO_TEST_SUCCESS;
}
+/*
+ * XFAIL: discrepancy between backends in applying color components of a pure
+ * alpha surface
+ */
CAIRO_TEST (alpha_similar,
"Tests creation of similar alpha surfaces"
"\nApplication of a pure-alpha similar source is inconsistent across backends.",
diff --git a/test/big-trap.c b/test/big-trap.c
index 507e0e5..5e11237 100644
--- a/test/big-trap.c
+++ b/test/big-trap.c
@@ -82,6 +82,7 @@ draw (cairo_t *cr, int width, int height)
return CAIRO_TEST_SUCCESS;
}
+/* XFAIL: range overflow of fixed-point */
CAIRO_TEST (big_trap,
"Test oversize trapezoid with a clip region"
"\nTest needs to be adjusted to trigger the original bug",
diff --git a/test/degenerate-dash.c b/test/degenerate-dash.c
index c13792f..12cd0c7 100644
--- a/test/degenerate-dash.c
+++ b/test/degenerate-dash.c
@@ -77,6 +77,11 @@ draw (cairo_t *cr, int width, int height)
return CAIRO_TEST_SUCCESS;
}
+/*
+ * XFAIL: needs path editing in PS to convert degenerate
+ * end-caps into the shapes as expected by cairo (Or maybe PS is the correct
+ * behaviour?)
+ */
CAIRO_TEST (degenerate_dash,
"Tests the behaviour of dashed segments that end on a off-on transition",
"dash, degenerate", /* keywords */
diff --git a/test/degenerate-path.c b/test/degenerate-path.c
index c690730..db53cbb 100644
--- a/test/degenerate-path.c
+++ b/test/degenerate-path.c
@@ -108,6 +108,10 @@ draw (cairo_t *cr, int width, int height)
return CAIRO_TEST_SUCCESS;
}
+/*
+ * XFAIL: undefined behaviour in PS, needs path editing to convert degenerate
+ * segments into circles/rectangles as expected by cairo
+ */
CAIRO_TEST (degenerate_path,
"Tests the behaviour of degenerate paths with different cap types",
"degenerate", /* keywords */
diff --git a/test/device-offset-scale.c b/test/device-offset-scale.c
index 3df3d38..33784fa 100644
--- a/test/device-offset-scale.c
+++ b/test/device-offset-scale.c
@@ -65,6 +65,10 @@ draw (cairo_t *cr, int width, int height)
return CAIRO_TEST_SUCCESS;
}
+/*
+ * XFAIL: complication of pre-multiplying device_offset into the pattern_matrix
+ * and then requiring further manipulation for SVG
+ */
CAIRO_TEST (device_offset_scale,
"Test that the device-offset transform is transformed by the ctm.",
"device-offset", /* keywords */
diff --git a/test/in-fill-empty-trapezoid.c b/test/in-fill-empty-trapezoid.c
index 2b345cb..0797399 100644
--- a/test/in-fill-empty-trapezoid.c
+++ b/test/in-fill-empty-trapezoid.c
@@ -96,6 +96,11 @@ preamble (cairo_test_context_t *ctx)
return ret;
}
+/*
+ * XFAIL: The cairo_in_fill () function can sometimes produce false positives
+ * when the tessellator produces empty trapezoids and the query point lands
+ * exactly on a trapezoid edge.
+ */
CAIRO_TEST (in_fill_empty_trapezoid,
"Test that the tessellator isn't producing obviously empty trapezoids",
"in, trap", /* keywords */
diff --git a/test/long-lines.c b/test/long-lines.c
index 79fc98f..69b64e9 100644
--- a/test/long-lines.c
+++ b/test/long-lines.c
@@ -74,6 +74,7 @@ draw (cairo_t *cr, int width, int height)
return CAIRO_TEST_SUCCESS;
}
+/* XFAIL: range overflow of fixed-point */
CAIRO_TEST (long_lines,
"Test long lines"
"\nLong lines are not drawn due to the limitations of the internal 16.16 fixed-point coordinates",
diff --git a/test/scale-offset-image.c b/test/scale-offset-image.c
index a6e575a..7243a06 100644
--- a/test/scale-offset-image.c
+++ b/test/scale-offset-image.c
@@ -133,6 +133,7 @@ draw (cairo_t *cr, int width, int height)
return CAIRO_TEST_SUCCESS;
}
+/* XFAIL: loss of precision converting a cairo matrix to */
CAIRO_TEST (scale_offset_image,
"Tests drawing surfaces under various scales and transforms",
"surface, scale-offset", /* keywords */
diff --git a/test/self-copy-overlap.c b/test/self-copy-overlap.c
index 2f49ab0..6e3b39c 100644
--- a/test/self-copy-overlap.c
+++ b/test/self-copy-overlap.c
@@ -40,6 +40,11 @@ draw (cairo_t *cr, int width, int height)
return CAIRO_TEST_SUCCESS;
}
+/*
+ * XFAIL: vector surfaces take snapshot of patterns in contrast to the raster
+ * backends which don't. One solution would be to clone overlapping areas of
+ * dst/source, so patterns were effectively snapshotted across all backends.
+ */
CAIRO_TEST (self_copy_overlap,
"Tests painting to itself using itself as the source"
"\nBackends treat this case inconsistently---vector backends are creating snapshots.",
More information about the cairo-commit
mailing list