<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 17, 2013 at 11:25 AM, Ayush Chaudhary <span dir="ltr"><<a href="mailto:ayushchd@gmail.com" target="_blank">ayushchd@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                <div>
                    Hi</div><div><div class="h5"><div><div><br></div></div>
                 
                <p style="color:rgb(160,160,168)">On Monday, 17 June 2013 at 1:16 AM, Dieter Adriaenssens wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px">
                    <span><div><div><div>2013/6/16 Marc Delisle <<a href="mailto:marc@infomarc.info" target="_blank">marc@infomarc.info</a>>:</div><blockquote type="cite"><div><div>Le 2013-06-16 12:27, Madhura Jayaratne a écrit :</div>
<blockquote type="cite"><div><div><br></div><div><br></div><div><br></div><div>On Sat, Jun 15, 2013 at 9:04 PM, Marc Delisle <<a href="mailto:marc@infomarc.info" target="_blank">marc@infomarc.info</a></div><div><<a href="mailto:marc@infomarc.info" target="_blank">mailto:marc@infomarc.info</a>>> wrote:</div>
<div><br></div><div>    Le 2013-06-15 11:20, Marc Delisle a écrit :</div><div>     > Le 2013-06-15 10:36, Ayush Chaudhary a écrit :</div><div>     >> Hi,</div><div>     >></div><div>     >> I recently merged with upstream. However, a lot of unit tests</div>
<div>    seem to be</div><div>     >> failing on my machine. All of the failures seem to be related to</div><div>     >> database. I do have a database named 'pma_test'. It seems I need to</div><div>     >> import some SQL and also, set me database authentication details</div>
<div>    somewhere.</div><div>     >></div><div>     >> It would be great if someone could point out those settings</div><div>    (phpunit.xml?)</div><div>     ></div><div>     > Hi Ayush,</div><div>     > with current master, I also see failures (15) here.</div>
<div>     ></div><div>     > A while ago, I also reported tests failures (some of them seemingly</div><div>     > pointing to database not connecting) and I remember that someone</div><div>     > (Madhura?) replied that the tests should be able to run without</div>
<div>    any db</div><div>     > connection. It was another test failing that gave this impression.</div><div>     ></div><div><br></div><div>    Git bisect tells me that this commit is the one that produced 12</div>
<div>    failures:</div><div><br></div><div>    <a href="https://github.com/phpmyadmin/phpmyadmin/commit/0f4e573b1e0bcb743334e4818102b428bd023d2e" target="_blank">https://github.com/phpmyadmin/phpmyadmin/commit/0f4e573b1e0bcb743334e4818102b428bd023d2e</a></div>
<div><br></div><div>    Note that when bisecting, I marked as good other commits that were</div><div>    producing a smaller number of failures.</div><div><br></div><div>Looks like the failures are due to some problems in backing up globals.</div>
<div>I made the commit 0f4e573b1e</div><div><<a href="https://github.com/phpmyadmin/phpmyadmin/commit/0f4e573b1e0bcb743334e4818102b428bd023d2e" target="_blank">https://github.com/phpmyadmin/phpmyadmin/commit/0f4e573b1e0bcb743334e4818102b428bd023d2e</a>> as</div>
<div>there should not be any need to manually backup and restore</div><div>GLOBALS['dbi'] as backupGlobals directive is now active. Somehow failing</div><div>to restore the GLOBALS['dbi'] would result in other tests using the</div>
<div>mocked database interface leading to test failures related to database</div><div>interface.</div><div><br></div><div>I will revert the commit until the cause of this is properly investigated.</div></div></blockquote>
<div><br></div><div>Thanks Madhura,</div><div>I am now down to three failures (with PHP 5.4.10). Am I alone?</div></div></blockquote><div><br></div><div>I've included the errors (3) and failures (1) I get with PHP 5.3.5 and</div>
<div>PHPUnit (3.7.13) below.</div><div>But when running the unit tests I also get 3 PHP Notices that variable</div><div>$cfg is not defined in libraries/charset_conversion.lib.php (lines 18,</div><div>32, 39)</div><div><br>
</div><div>     [exec] There were 3 errors:</div><div>     [exec]</div><div>     [exec] 1) PMA_Charset_Conversion_Test::testCharsetConversion</div><div>     [exec] iconv(): Detected an illegal character in input string</div>
<div>     [exec]</div><div>     [exec] /var/www/phpmyadmin/libraries/iconv_wrapper.lib.php:101</div><div>     [exec] /var/www/phpmyadmin/libraries/charset_conversion.lib.php:91</div><div>     [exec] /var/www/phpmyadmin/test/libraries/PMA_charset_conversion_test.php:68</div>
<div>     [exec]</div><div>     [exec] 2) PMA_Iconv_Wrapper_Test::testIconvWrapper with data set</div><div>#0 ('UTF-8', 'ISO-8859-1//IGNORE', 'UTF-8', 'ISO-8859-1//IGNORE',</div><div>'Euro Symbol: €')</div>
<div>     [exec] iconv(): Detected an illegal character in input string</div><div>     [exec]</div><div>     [exec] /var/www/phpmyadmin/test/libraries/PMA_iconv_wrapper_test.php:39</div><div>     [exec]</div><div>     [exec] 3) PMA_Iconv_Wrapper_Test::testIconvWrapper with data set</div>
<div>#1 ('UTF-8', 'ISO-8859-1//IGNORE//TRANSLIT', 'UTF-8',</div><div>'ISO-8859-1//IGNORE', 'Euro Symbol: €')</div><div>     [exec] iconv(): Detected an illegal character in input string</div>
<div>     [exec]</div><div>     [exec] /var/www/phpmyadmin/test/libraries/PMA_iconv_wrapper_test.php:39</div><div>     [exec]</div><div>     [exec] --</div><div>     [exec]</div><div>     [exec] There was 1 failure:</div>
<div>     [exec]</div><div>     [exec] 1) ImportShp_Test::testGetProperties</div><div>     [exec] Failed asserting that null matches expected 'text/plain'.</div><div>     [exec]</div><div>     [exec] /var/www/phpmyadmin/test/classes/plugin/import/ImportShp_test.php:75</div>
<div><br></div><div><br></div><div><br></div><div><br></div><div>--</div><div>Kind regards,</div><div><br></div><div>Dieter Adriaenssens</div><div><br></div><div>------------------------------------------------------------------------------</div>
<div>This <a href="http://SF.net" target="_blank">SF.net</a> email is sponsored by Windows:</div><div><br></div><div>Build for Windows Store.</div><div><br></div><div><a href="http://p.sf.net/sfu/windows-dev2dev" target="_blank">http://p.sf.net/sfu/windows-dev2dev</a></div>
<div>_______________________________________________</div><div>Phpmyadmin-devel mailing list</div><div><a href="mailto:Phpmyadmin-devel@lists.sourceforge.net" target="_blank">Phpmyadmin-devel@lists.sourceforge.net</a></div>
<div><a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                </div></div><div>
                    Two of those tests, which are throwing the iconv error were written by me. I tested them on OS X and they seem to work fine here. I am wondering what could be the issue. 
                </div><div><br></div></blockquote></div>It looks like IBM AIX is using some different charset names and setting $GLOBALS['PMA_recoding_engine'] to PMA_CHARSET_ICONV_AIX in testCharsetConversion() would result in the character set names being mapped to IBM AIX compliant formats. So it's possible that those names would fail in some other environment.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Same applies for PMA_aix_iconv_wrapper function. However to test the logic in there is suggest to split the charset name mapping part to some other function.<br clear="all">
<div><br></div>-- <br>Thanks and Regards,<div><br></div><div>Madhura Jayaratne<br><div><br></div></div>
</div></div>