Mailinglist Archive: yast-commit (502 mails)

< Previous Next >
[yast-commit] r64421 - in /branches/SuSE-Code-11-SP1-Branch/yast2: library/network/src/ library/network/testsuite/tests/ package/
Author: locilka
Date: Thu Jun 16 14:59:35 2011
New Revision: 64421

URL: http://svn.opensuse.org/viewcvs/yast?rev=64421&view=rev
Log:
- Fixed regexp in Custom broadcast definition in
SuSEFirewallExpertRules (BNC #676972).


Added:

branches/SuSE-Code-11-SP1-Branch/yast2/library/network/testsuite/tests/SuSEFirewallExpertRules.err

branches/SuSE-Code-11-SP1-Branch/yast2/library/network/testsuite/tests/SuSEFirewallExpertRules.out

branches/SuSE-Code-11-SP1-Branch/yast2/library/network/testsuite/tests/SuSEFirewallExpertRules.ycp
Modified:

branches/SuSE-Code-11-SP1-Branch/yast2/library/network/src/SuSEFirewallExpertRules.ycp
branches/SuSE-Code-11-SP1-Branch/yast2/package/yast2.changes

Modified:
branches/SuSE-Code-11-SP1-Branch/yast2/library/network/src/SuSEFirewallExpertRules.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yast2/library/network/src/SuSEFirewallExpertRules.ycp?rev=64421&r1=64420&r2=64421&view=diff
==============================================================================
---
branches/SuSE-Code-11-SP1-Branch/yast2/library/network/src/SuSEFirewallExpertRules.ycp
(original)
+++
branches/SuSE-Code-11-SP1-Branch/yast2/library/network/src/SuSEFirewallExpertRules.ycp
Thu Jun 16 14:59:35 2011
@@ -83,7 +83,7 @@
// A.B.C.D/1 - A.B.C.D/32 (IP with a numeric netmask)
else if (regexpmatch(network, "^" + type_ip4 + "/[01234567890]+$")) {
string part_ip = regexpsub (network, "^(" + type_ip4 +
")/[01234567890]+$", "\\1");
- string part_bits = regexpsub (network, "^" + type_ip4 +
"(/[01234567890])+$", "\\1");
+ string part_bits = regexpsub (network, "^" + type_ip4 +
"/([01234567890])+$", "\\1");

return (IP::Check4(part_ip) &&
ValidNetmaskBits(tointeger(part_bits)));
}

Added:
branches/SuSE-Code-11-SP1-Branch/yast2/library/network/testsuite/tests/SuSEFirewallExpertRules.err
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yast2/library/network/testsuite/tests/SuSEFirewallExpertRules.err?rev=64421&view=auto
==============================================================================
(empty)

Added:
branches/SuSE-Code-11-SP1-Branch/yast2/library/network/testsuite/tests/SuSEFirewallExpertRules.out
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yast2/library/network/testsuite/tests/SuSEFirewallExpertRules.out?rev=64421&view=auto
==============================================================================
---
branches/SuSE-Code-11-SP1-Branch/yast2/library/network/testsuite/tests/SuSEFirewallExpertRules.out
(added)
+++
branches/SuSE-Code-11-SP1-Branch/yast2/library/network/testsuite/tests/SuSEFirewallExpertRules.out
Thu Jun 16 14:59:35 2011
@@ -0,0 +1,13 @@
+Dump == IsValidNetwork ==
+Dump All these should be *valid* (true):
+Return true
+Return true
+Return true
+Return true
+Return true
+Return true
+Dump All these should be *invalid* (false):
+Return false
+Return false
+Return false
+Dump == Done ==

Added:
branches/SuSE-Code-11-SP1-Branch/yast2/library/network/testsuite/tests/SuSEFirewallExpertRules.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yast2/library/network/testsuite/tests/SuSEFirewallExpertRules.ycp?rev=64421&view=auto
==============================================================================
---
branches/SuSE-Code-11-SP1-Branch/yast2/library/network/testsuite/tests/SuSEFirewallExpertRules.ycp
(added)
+++
branches/SuSE-Code-11-SP1-Branch/yast2/library/network/testsuite/tests/SuSEFirewallExpertRules.ycp
Thu Jun 16 14:59:35 2011
@@ -0,0 +1,30 @@
+{
+
+ include "testsuite.ycp";
+ // testedfiles: SuSEFirewallExpertRules
+
+ import "SuSEFirewallExpertRules";
+
+ DUMP("== IsValidNetwork ==");
+
+ list <string> valid_network_definitions = [
+ "192.168.0.1", "192.168.0.0/24", "192.168.0.1/32",
"192.168.0.0/255.255.0.0",
+ "192.168.0.0/255.255.224.0", "0/0",
+ ];
+
+ list <string> invalid_network_definitions = [
+ "192.168.0.355", "192.168.0.1/0", "192.168.0.0/255.255.333.0",
+ ];
+
+ DUMP("All these should be *valid* (true):");
+ foreach (string check_this, valid_network_definitions, {
+ TEST(``(SuSEFirewallExpertRules::IsValidNetwork (check_this)), [], nil);
+ });
+
+ DUMP("All these should be *invalid* (false):");
+ foreach (string check_this, invalid_network_definitions, {
+ TEST(``(SuSEFirewallExpertRules::IsValidNetwork (check_this)), [], nil);
+ });
+
+ DUMP("== Done ==");
+}

Modified: branches/SuSE-Code-11-SP1-Branch/yast2/package/yast2.changes
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/yast2/package/yast2.changes?rev=64421&r1=64420&r2=64421&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/yast2/package/yast2.changes (original)
+++ branches/SuSE-Code-11-SP1-Branch/yast2/package/yast2.changes Thu Jun 16
14:59:35 2011
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Jun 16 14:55:22 CEST 2011 - locilka@xxxxxxx
+
+- Fixed regexp in Custom broadcast definition in
+ SuSEFirewallExpertRules (BNC #676972).
+
+-------------------------------------------------------------------
Mon Mar 29 15:12:35 CEST 2010 - ug@xxxxxxx

- fixed a bug with *.desktop file translations

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages