patchGnash - The GNU Flash player - Patches: patch #9234, Patch for adding automated...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9234: Patch for adding automated slash-colon path checks on `GetVariable()` plugin function

Submitter:  Nutchanon Wetchasit <nachanon>
Submitted:  Mon 23 Jan 2017 04:35:56 PM UTC
   
 
Category:  testsuite Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  strk Open/Closed:  Closed

Jump to the original submission

Mon 30 Jan 2017 07:44:19 AM UTC, comment #12: 

Thank you. I agree it was good to open bug #50174

Sandro Santilli <strk>
Group Member
Sun 29 Jan 2017 10:20:27 AM UTC, comment #11: 

The unrelated `make check` error mentioned in comment 10 is now reported as bug #50174.

Nutchanon Wetchasit <nachanon>
Sat 28 Jan 2017 05:26:55 PM UTC, comment #10: 

As of Gnash 0.8.11dev git 36028f4, the newly-added GetVariable() test works as expected. This entry could now be marked as Done. (I don't have a privilege to do this on my own, though)

Test runs are summarized as follows:

  • Gnash, out of the box:
    • submoviegetvartest-runner: 34 PASSED, 1 XFAILED
    • submoviegetvar.html: 30 PASSED, 1 XFAILED
  • Gnash, with reverted commit 1d80521:
    • submoviegetvartest-runner: 6 PASSED, 1 XFAILED, 28 FAILED
    • submoviegetvar.html: 2 PASSED, 1 XFAILED, 28 FAILED
  • Flash Player:
    • submoviegetvar.html: 30 PASSED, 1 XPASSED


(These figures treats "There should be NN tests run" the same way as other checks)

Gnash: 0.8.11dev (git 36028f4 28-Jan-2016 07:09:30 GMT)
Ming: 0.4.4-1.1 (debian)
Adobe Flash Player: 11.2.203.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

P.S. Side note: `make check` on latest Gnash version didn't complete due to an unrelated compilation failure involving libming; I will file a separate report about it later.

Nutchanon Wetchasit <nachanon>
Sat 28 Jan 2017 07:10:56 AM UTC, comment #9: 

Thanks, 0006_add-slashcolon-getvariable-test-v3.patch pushed as commit 36028f40cc8fee39d411e13284f2d7334e84b9cc after amending to drop trailing blanks (git diff --check; git show --check)

Please close after final testing

Sandro Santilli <strk>
Group Member
Fri 27 Jan 2017 10:16:59 AM UTC, comment #8: 

See the attached `0006_add-slashcolon-getvariable-test-v3.patch`
for an updated version of the patch.

This version contains following changes:

  • There is now a note about proprietary player testing in `submoviegetvar.sc`.
  • HTML test runner is now included.
    • HTML test runner is now counting total tests run.
    • HTML test runner is now showing proper `ERROR:` lines about non-loading SWF or disabled JavaScript.
    • HTML test runner now contains comments briefly describing test procedure and troubleshooting instruction.


Note:
HTML test runner does not count tests run from SWF's side,
as doing so requires multiple changes in `Dejagnu.sc`;
but in this case, there are no real tests done inside the SWF
(apart from sanity checks), so they could be safely ignored.

Gnash: 0.8.11dev (patched against git f9db2f2 26-Jan-2017)
Flash Player: 11.2.202.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386


(file #39569)

Nutchanon Wetchasit <nachanon>
  Spam posted by karlab
Wed 25 Jan 2017 10:57:41 AM UTC, comment #6: 

Thanks, I can confirm things work now.

I think it would be useful to include the .html file in the sourcecode, for others to independently check the patch is correct, should I add the one you attached already or do you want to provide a clean patch, maybe with references to the .html from the .sc file ?

Sandro Santilli <strk>
Group Member
Wed 25 Jan 2017 10:35:13 AM UTC, comment #5: 

Side note (for the record):

Following warnings:

Warning: Reference to undeclared variable, 'undefined'


which are emitted from DejaGNU's `check()` function are SWFC's fault.
SWFC does not understand the Flash 5+'s `undefined` keyword,
so every reference to `undefined` got compiled as an access to
a variable named "undefined" rather than a special reserved value.

SWFC script like this will show the same error at run time:

.flash bbox=320x240 background=white version=7 fps=12
.frame 1
        .action:
                var x;
                x=undefined;
                trace("Hello "+x);
        .end
.end


This does not affect test results as variable named "undefined" does not exist,
so reading from it will (coincidentally) give the expected `undefined` value.

SWFC: SWFTools 0.9.2+git20130725-4 (debian)
Flash Player: 11.2.202.491 (standalone)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>
Wed 25 Jan 2017 10:30:29 AM UTC, comment #4: 

For the errors I mentioned about my patch:

  • I used DejaGNU's `check()` function incorrectly; it should be `check(true)` instead of plain `check()`.
  • I didn't track `Dejagnu.sc` and `check.sc` dependency of `submoviegetvar.sc` in `Makefile`.


Updated patch which fixes these issues, is attached as
`0006_add-slashcolon-getvariable-test-v2.patch`.

My compiled SWF from this patch is attached as `submoviegetvar-v2.zip`,
and can be used together with the previously-posted `submoviegetvar.html`
(file #39555); browser-shown test results should be the same.

Browser output of my `submoviegetvar.html` test run with updated patch
went like this (using Flash Player):

PASSED: GetVariable call on "movievar" path should return a correct value
XPASSED: GetVariable call on ":movievar" path should return a correct value
PASSED: GetVariable call on "/:movievar" path should return a correct value
PASSED: GetVariable call on "submovie:submovievar" path should return a correct value
PASSED: GetVariable call on "submovie/:submovievar" path should return a correct value
PASSED: GetVariable call on "submovie::submovievar" path should return a correct value
PASSED: GetVariable call on "/submovie:submovievar" path should return a correct value
PASSED: GetVariable call on "/submovie/:submovievar" path should return a correct value
PASSED: GetVariable call on "/submovie::submovievar" path should return a correct value
PASSED: GetVariable call on ":submovie:submovievar" path should return a correct value
PASSED: GetVariable call on ":submovie/:submovievar" path should return a correct value
PASSED: GetVariable call on ":submovie::submovievar" path should return a correct value
PASSED: GetVariable call on "submovie/nestedmovie:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "submovie/nestedmovie/:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "submovie/nestedmovie::nestedmovievar" path should return a correct value
PASSED: GetVariable call on "submovie:nestedmovie:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "submovie:nestedmovie/:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "submovie:nestedmovie::nestedmovievar" path should return a correct value
PASSED: GetVariable call on "/submovie/nestedmovie:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "/submovie/nestedmovie/:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "/submovie/nestedmovie::nestedmovievar" path should return a correct value
PASSED: GetVariable call on "/submovie:nestedmovie:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "/submovie:nestedmovie/:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "/submovie:nestedmovie::nestedmovievar" path should return a correct value
PASSED: GetVariable call on ":submovie/nestedmovie:nestedmovievar" path should return a correct value
PASSED: GetVariable call on ":submovie/nestedmovie/:nestedmovievar" path should return a correct value
PASSED: GetVariable call on ":submovie/nestedmovie::nestedmovievar" path should return a correct value
PASSED: GetVariable call on ":submovie:nestedmovie:nestedmovievar" path should return a correct value
PASSED: GetVariable call on ":submovie:nestedmovie/:nestedmovievar" path should return a correct value
PASSED: GetVariable call on ":submovie:nestedmovie::nestedmovievar" path should return a correct value


And this is Flash Player trace log from the run:

Warning: Reference to undeclared variable, 'undefined'
PASSED:  [submoviegetvar.sc:40]
Warning: Reference to undeclared variable, 'undefined'
PASSED:  [submoviegetvar.sc:46]
Warning: Reference to undeclared variable, 'undefined'
PASSED:  [submoviegetvar.sc:52]
ENDOFTEST


Gnash testsuite: 0.8.11dev (patched against git 2b3bded 21-Jul-2016)
Flash Player: 11.2.202.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386


(file #39556, file #39557)

Nutchanon Wetchasit <nachanon>
Wed 25 Jan 2017 10:14:35 AM UTC, comment #3: 

It is important to note that this test checks interaction
between Gnash and the external container.

So in order to run it against proprietary player,
a HTML-based test runner must be used instead of shell-based one;
similar to other emulated container-based tests like MTASC-based `extcomm.as`
or MakeSWF-based `extgetvariable.as`.

I have attached the HTML testrunner as `submoviegetvar.html`.
(It is a slightly-modified version of the one provided in
`getvariable-slashcolon.zip`)

Note: You might need to add the test directory as Flash player's
trusted location in order to run tests successfully.

Browser output of my test run went like this (using Flash Player):

PASSED: GetVariable call on "movievar" path should return a correct value
XPASSED: GetVariable call on ":movievar" path should return a correct value
PASSED: GetVariable call on "/:movievar" path should return a correct value
PASSED: GetVariable call on "submovie:submovievar" path should return a correct value
PASSED: GetVariable call on "submovie/:submovievar" path should return a correct value
PASSED: GetVariable call on "submovie::submovievar" path should return a correct value
PASSED: GetVariable call on "/submovie:submovievar" path should return a correct value
PASSED: GetVariable call on "/submovie/:submovievar" path should return a correct value
PASSED: GetVariable call on "/submovie::submovievar" path should return a correct value
PASSED: GetVariable call on ":submovie:submovievar" path should return a correct value
PASSED: GetVariable call on ":submovie/:submovievar" path should return a correct value
PASSED: GetVariable call on ":submovie::submovievar" path should return a correct value
PASSED: GetVariable call on "submovie/nestedmovie:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "submovie/nestedmovie/:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "submovie/nestedmovie::nestedmovievar" path should return a correct value
PASSED: GetVariable call on "submovie:nestedmovie:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "submovie:nestedmovie/:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "submovie:nestedmovie::nestedmovievar" path should return a correct value
PASSED: GetVariable call on "/submovie/nestedmovie:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "/submovie/nestedmovie/:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "/submovie/nestedmovie::nestedmovievar" path should return a correct value
PASSED: GetVariable call on "/submovie:nestedmovie:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "/submovie:nestedmovie/:nestedmovievar" path should return a correct value
PASSED: GetVariable call on "/submovie:nestedmovie::nestedmovievar" path should return a correct value
PASSED: GetVariable call on ":submovie/nestedmovie:nestedmovievar" path should return a correct value
PASSED: GetVariable call on ":submovie/nestedmovie/:nestedmovievar" path should return a correct value
PASSED: GetVariable call on ":submovie/nestedmovie::nestedmovievar" path should return a correct value
PASSED: GetVariable call on ":submovie:nestedmovie:nestedmovievar" path should return a correct value
PASSED: GetVariable call on ":submovie:nestedmovie/:nestedmovievar" path should return a correct value
PASSED: GetVariable call on ":submovie:nestedmovie::nestedmovievar" path should return a correct value


Gnash testsuite: 0.8.11dev (patched against git 2b3bded 21-Jul-2016)
Flash Player: 11.2.202.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386


(file #39555)

Nutchanon Wetchasit <nachanon>
Wed 25 Jan 2017 10:03:50 AM UTC, comment #2: 

There might be errors in my patch, but that should not prevent the relevant
tests from being run. The SWF by itself should emit three `PASSED` lines
followed by `ENDOFTEST` in Flash's trace output.

My compilation procedure is as follows:

$ git clean -xdf
$ git checkout -f
Your branch is ahead of 'origin/master' by 1 commit.
$ ./autogen.sh
Running libtoolize --force --copy ...
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `macros'.
libtoolize: copying file `macros/libtool.m4'
libtoolize: copying file `macros/ltoptions.m4'
libtoolize: copying file `macros/ltsugar.m4'
libtoolize: copying file `macros/ltversion.m4'
libtoolize: copying file `macros/lt~obsolete.m4'
processing .
Running aclocal -I cygnal -I macros  ...
Running autoheader...
Running automake --add-missing --copy  ...
configure.ac:35: installing `./compile'
configure.ac:25: installing `./config.guess'
configure.ac:25: installing `./config.sub'
Running autoconf ...
$ CC="ccache gcc" CXX="ccache g++" ./configure --enable-media=ffmpeg,gst --enable-renderer=agg,cairo,opengl --enable-gui=gtk,qt4,sdl,fb,dump --enable-docbook
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
.
.
(Output omitted)
.
.
        Building Cygnal media server disabled.
        Extension support disabled.
        Enabling security features:  localconnection
        Enabling statistics collecting for:  cache
        GUI toolkits supported: fb,qt4,gtk,sdl,dump
        Renderers supported:  agg cairo opengl
        Hardware Acceleration: RawFB
        Media handlers: ffmpeg gst
        Using sdl for sound handling
        DocBook document processing enabled (for "make html" and "make pdf")
        Docbook styles sheets in /usr/share/xml/docbook/stylesheet/nwalsh
        Using Input Devices, Touchscreen via Tslib for Input
        Using double buffering when rendering

$ cd testsuite/misc-swfc.all
$ make submoviegetvar.swf
ccache gcc -E -x c -P -undef -I. -DMEDIADIR="/home/window/prog/gnash.git/testsuite/media " submoviegetvar.sc > pp_submoviegetvar.sc
/usr/bin/swfc  -o submoviegetvar.swf pp_submoviegetvar.sc
$ file submoviegetvar.swf
submoviegetvar.swf: Macromedia Flash data (compressed), version 7
$


Trace output from Flash Player runnning `submoviegetvar.swf` is as follows:

Warning: Reference to undeclared variable, 'undefined'
PASSED:  [submoviegetvar.sc:40]
Warning: Reference to undeclared variable, 'undefined'
PASSED:  [submoviegetvar.sc:46]
Warning: Reference to undeclared variable, 'undefined'
PASSED:  [submoviegetvar.sc:52]
ENDOFTEST


I have attached my compiled version of SWF as `submoviegetvar.swf`.

Note: These `PASSED` lines are sanity checks. Real tests are done
by the external test runner.

Gnash testsuite: 0.8.11dev (patched against git 2b3bded 21-Jul-2016)
Flash Player: 11.2.202.491 (NPAPI binary)
Browser: Iceweasel 10.0.12 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386


(file #39554)

Nutchanon Wetchasit <nachanon>
Tue 24 Jan 2017 05:50:24 PM UTC, comment #1: 

I'm trying to run the .swf with the proprietary player to check it's correctness but failing, did you succeed ? Can you help with that ? I'd expect traces in output with "flashplayerdebug" but not getting any. Maybe I didn't build it correctly (make submoviegetvar.swf)

Sandro Santilli <strk>
Group Member
Mon 23 Jan 2017 04:35:56 PM UTC, original submission:  

See the attached `0006_add-slashcolon-getvariable-test.patch`.

This patch adds automated tests for Gnash's `GetVariable()` plugin function
to Gnash testsuite. These tests check for problem on slash-colon variable path
resolving, which is one of the issues tracked in bug #42395;
and fixed in patch #8908 (commit 1d80521).

Notes:

  • This test is an automated version of `getvariable-slashcolon.zip` originally provided in bug #42395.
  • This test uses emulated container approach with external termination, like the previously-added patch #8835.
  • This test is based on SWFC, as it supports sub-MovieClip.
  • Like the original version, coverage is not exactly thorough as it only tests slash-colon notation without dot.
  • This test runs solely with SWF version 7, like half of the tests currently provided in `misc-swfc.all` testsuite.
  • This test has 1 expected failure, as described in the first passing run.


Gnash: 0.8.11dev (patched against git 2b3bded 21-Jul-2016)
System: Debian GNU/Linux 7.0 Wheezy i386

Nutchanon Wetchasit <nachanon>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #39569:  0006_add-slashcolon-getvariable-test-v3.patch added by nachanon (21KiB - application/octet-stream - Second updated version of patch 1)
file #39556:  0006_add-slashcolon-getvariable-test-v2.patch added by nachanon (13KiB - text/x-diff - Updated version of patch 1, and its compiled SWF file)
file #39557:  submoviegetvar-v2.zip added by nachanon (1KiB - application/x-zip-compressed - Updated version of patch 1, and its compiled SWF file)
file #39555:  submoviegetvar.html added by nachanon (5KiB - text/html - HTML test runner for `submoviegetvar.swf`)
file #39554:  submoviegetvar.swf added by nachanon (1KiB - application/x-shockwave-flash - Compiled SWF file from `0006_add-slashcolon-getvariable-test.patch`)
file #39541:  0006_add-slashcolon-getvariable-test.patch added by nachanon (13KiB - text/x-diff - Patch adding automated slash-colon path checks for `GetVariable()` plugin function)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by karlab (Posted a comment)
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by nachanon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-01-30 strk StatusReady For Test Done
        Open/ClosedOpen Closed
    2017-01-28 strk StatusNeed Info Ready For Test
        Assigned toNone strk
    2017-01-27 nachanon Attached File- Added 0006_add-slashcolon-getvariable-test-v3.patch, #39569
    2017-01-25 nachanon Attached File- Added 0006_add-slashcolon-getvariable-test-v2.patch, #39556
        Attached File- Added submoviegetvar-v2.zip, #39557
    2017-01-25 nachanon Attached File- Added submoviegetvar.html, #39555
    2017-01-25 nachanon Attached File- Added submoviegetvar.swf, #39554
    2017-01-24 strk StatusNone Need Info
    2017-01-23 nachanon Attached File- Added 0006_add-slashcolon-getvariable-test.patch, #39541

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code