[Lsb-messages] /var/www/bzr/lsb/4.1/olver-core-tests r96: Backport a number of fixes from devel.

Jeff Licquia licquia at linuxfoundation.org
Tue Aug 13 20:09:47 UTC 2013


------------------------------------------------------------
revno: 96
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: olver-core-tests
timestamp: Tue 2013-08-13 16:09:47 -0400
message:
  Backport a number of fixes from devel.
  
  Bugs fixed: 3397, 3762, 2914.
modified:
  src/model/util/crypt/crypt_model.sec
  src/model/util/crypt/tests/crypt_scenario.sec
  src/olverterm/memterm.c
  src/testdata/util.format.time/strptime_testdata.list
-------------- next part --------------
=== modified file 'src/model/util/crypt/crypt_model.sec'
--- a/src/model/util/crypt/crypt_model.sec	2008-09-05 17:30:58 +0000
+++ b/src/model/util/crypt/crypt_model.sec	2013-08-13 20:09:47 +0000
@@ -125,6 +125,17 @@
             "The salt argument is a string chosen from the set", 
             checkSalt(salt));
 
+
+       /* 
+        * Since LSB 5.0 crypt() specification refers to POSIX-2008, that states:
+        * "The salt argument shall be a string of at least two bytes in length 
+        *  not including the null character."
+        * Meanwhile, glibc implementation never supported salt size < 2.
+        */
+        REQ("", 
+            "salt size must be greater 1",
+            length_CString(salt) > 1 );
+
         return true;
     }
     coverage C

=== modified file 'src/model/util/crypt/tests/crypt_scenario.sec'
--- a/src/model/util/crypt/tests/crypt_scenario.sec	2009-08-25 16:37:01 +0000
+++ b/src/model/util/crypt/tests/crypt_scenario.sec	2013-08-13 20:09:47 +0000
@@ -124,7 +124,7 @@
 scenario
 bool crypt_scen()
 {
-    CString* key=create_CString("Key"), *salt=create_CString(""), *res;
+    CString* key=create_CString("Key"), *salt=create_CString("salt"), *res;
 
     res = crypt_spec(context, key, salt, requestErrorCode());
 

=== modified file 'src/olverterm/memterm.c'
--- a/src/olverterm/memterm.c	2010-09-22 17:56:47 +0000
+++ b/src/olverterm/memterm.c	2013-08-13 20:09:47 +0000
@@ -111,7 +111,7 @@
   int  read_bytes;
   int  accepted_sockfd;
   struct sockaddr_un accepted_addr;
-  socklen_t accepted_addr_len;
+  socklen_t accepted_addr_len = sizeof (struct sockaddr_un);
 
   accepted_sockfd = accept (listen_sockfd,
     (struct sockaddr *)&accepted_addr, &accepted_addr_len);

=== modified file 'src/testdata/util.format.time/strptime_testdata.list'
--- a/src/testdata/util.format.time/strptime_testdata.list	2010-01-14 16:50:38 +0000
+++ b/src/testdata/util.format.time/strptime_testdata.list	2013-08-13 20:09:47 +0000
@@ -2099,8 +2099,8 @@
     }
 },
 {
-    // The week number of year. %U
-    .query = "0 Mon 2007",
+    // The week number of year. %W
+    .query = "1 Mon 2007", //%W: The first Monday of January is the first day of week 1.
     .locale = "C",
     .format = "%W %a %Y",
     .answ =
@@ -2112,7 +2112,7 @@
 },
 {
     // The week number of year. %U
-    .query = "0 Sun 2006",
+    .query = "1 Sun 2006",  //%U: The first Sunday of January is the first day of week 1.
     .locale = "C",
     .format = "%U %a %Y",
     .answ =
@@ -2121,19 +2121,25 @@
         .tm_yday = 0,   .bYDay = true,
         .reqs = ";strptime.06.23;strptime.06.01;strptime.06.29;"
     }
-},
-{
-    // The week number of year. %U
-    .query = "0 Mon 2009",
-    .locale = "C",
-    .format = "%U %a %Y",
-    .answ =
-    {
-        .Error = 1,
-        .reqs = ""
-    }
 }
-
+    /* 
+     * 1st of January 2009 is Thursday, so there is no Monday on the 0th week of 2009.
+     * POSIX does not specify expected behaviour in this case.
+     * Currently glibc succeeds and fills tm structure with some values.
+     * So the next test was disabled.
+     * See discussion at: https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=2914
+     *{
+     *    // The week number of year. %U
+     *    .query = "0 Mon 2009",
+     *    .locale = "C",
+     *    .format = "%U %a %Y",
+     *    .answ =
+     *    {
+     *        .Error = 1,
+     *        .reqs = ""
+     *    }
+     *}
+     */
 // =============================== FOR Olver_Locale ===========================
 
 ,



More information about the lsb-messages mailing list