Hello community,

here is the log from the commit of package sysbench for openSUSE:Factory 
checked in at 2016-06-14 23:08:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sysbench (Old)
 and      /work/SRC/openSUSE:Factory/.sysbench.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sysbench"

Changes:
--------
--- /work/SRC/openSUSE:Factory/sysbench/sysbench.changes        2016-04-28 
16:57:15.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.sysbench.new/sysbench.changes   2016-06-14 
23:08:02.000000000 +0200
@@ -1,0 +2,11 @@
+Sun Jun 12 09:31:03 UTC 2016 - [email protected]
+
+- Update to version 0.5.0+git.20160610:
+  * Fixes #44: seqwr deleting test files
+  * Duplicate line
+  * added locking to get_request in lua scripting
+  * Don't lock thread mutex unnecessarily in script_lua.c and sb_cpu.c.
+  * Fix crash introduced by commit 9244fcf.
+  * Adding volatile modifier to tmp variable in memory test
+
+-------------------------------------------------------------------

Old:
----
  sysbench-0.5.0+git.20160414.tar.xz

New:
----
  sysbench-0.5.0+git.20160610.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sysbench.spec ++++++
--- /var/tmp/diff_new_pack.HDpWet/_old  2016-06-14 23:08:03.000000000 +0200
+++ /var/tmp/diff_new_pack.HDpWet/_new  2016-06-14 23:08:03.000000000 +0200
@@ -16,9 +16,9 @@
 #
 
 
-%define version_unconverted 0.5.0+git.20160414
+%define version_unconverted 0.5.0+git.20160610
 Name:           sysbench
-Version:        0.5.0+git.20160414
+Version:        0.5.0+git.20160610
 Release:        0
 Summary:        A MySQL benchmarking tool
 License:        GPL-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.HDpWet/_old  2016-06-14 23:08:03.000000000 +0200
+++ /var/tmp/diff_new_pack.HDpWet/_new  2016-06-14 23:08:03.000000000 +0200
@@ -1,15 +1,15 @@
 <services>
-  <service mode="localonly" name="tar_scm">
+  <service mode="disabled" name="tar_scm">
     <param name="url">git://github.com/akopytov/sysbench</param>
     <param name="scm">git</param>
     <param name="filename">sysbench</param>
     <param name="changesgenerate">enable</param>
-    <param name="revision">64aaf37aa4fa87201ff551b997cdfa8064555348</param>
+    <param name="revision">refs/heads/0.5</param>
     <param name="versionformat">0.5.0+git.%cd</param>
   </service>
-  <service mode="localonly" name="recompress">
+  <service mode="disabled" name="recompress">
     <param name="file">*.tar</param>
     <param name="compression">xz</param>
   </service>
-  <service mode="localonly" name="set_version"/>
+  <service mode="disabled" name="set_version"/>
 </services>

++++++ sysbench-0.5.0+git.20160414.tar.xz -> sysbench-0.5.0+git.20160610.tar.xz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sysbench-0.5.0+git.20160414/README.md 
new/sysbench-0.5.0+git.20160610/README.md
--- old/sysbench-0.5.0+git.20160414/README.md   2016-04-16 18:18:45.000000000 
+0200
+++ new/sysbench-0.5.0+git.20160610/README.md   2016-06-12 11:31:03.000000000 
+0200
@@ -81,7 +81,6 @@
 | `--help`              | Print help on general syntax or on a test mode 
specified with --test, and exit                                                 
                                                                                
                                                                                
                                                                                
                                                                                
         | off             |
 | `--verbosity`         | Verbosity level (0 - only critical messages, 5 - 
debug)                                                                          
                                                                                
                                                                                
                                                                                
                                                                                
       | 4               |
 | `--percentile`        | SysBench measures execution times for all processed 
requests to display statistical information like minimal, average and maximum 
execution time. For most benchmarks it is also useful to know a request 
execution time value matching some percentile (e.g. 95% percentile means we 
should drop 5% of the most long requests and choose the maximal value from the 
remaining ones). This option allows to specify a percentile rank of query 
execution times to count | 95              |
-| `--validate`          | Perform validation of test results where possible    
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
   | off             |
 
 Note that numerical values for all *size* options (like `--thread-stack-size` 
in this table) may be specified by appending the corresponding multiplicative 
suffix (K for kilobytes, M for megabytes, G for gigabytes and T for terabytes).
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sysbench-0.5.0+git.20160414/sysbench/scripting/script_lua.c 
new/sysbench-0.5.0+git.20160610/sysbench/scripting/script_lua.c
--- old/sysbench-0.5.0+git.20160414/sysbench/scripting/script_lua.c     
2016-04-16 18:18:45.000000000 +0200
+++ new/sysbench-0.5.0+git.20160610/sysbench/scripting/script_lua.c     
2016-06-12 11:31:03.000000000 +0200
@@ -241,15 +241,21 @@
 
   (void) thread_id; /* unused */
 
-  if (sb_globals.max_requests != 0 && nevents >= sb_globals.max_requests)
+  if (sb_globals.max_requests > 0)
   {
-    req.type = SB_REQ_TYPE_NULL;
-    return req;
+    SB_THREAD_MUTEX_LOCK();
+    if (nevents >= sb_globals.max_requests)
+    {
+      req.type = SB_REQ_TYPE_NULL;
+      SB_THREAD_MUTEX_UNLOCK();
+      return req;
+    }
+    nevents++;
+    SB_THREAD_MUTEX_UNLOCK();
   }
 
   req.type = SB_REQ_TYPE_SCRIPT;
-  nevents++;
-  
+
   return req;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sysbench-0.5.0+git.20160414/sysbench/tests/cpu/sb_cpu.c 
new/sysbench-0.5.0+git.20160610/sysbench/tests/cpu/sb_cpu.c
--- old/sysbench-0.5.0+git.20160414/sysbench/tests/cpu/sb_cpu.c 2016-04-16 
18:18:45.000000000 +0200
+++ new/sysbench-0.5.0+git.20160610/sysbench/tests/cpu/sb_cpu.c 2016-06-12 
11:31:03.000000000 +0200
@@ -70,8 +70,6 @@
 static unsigned int    max_prime;
 /* Request counter */
 static unsigned int    req_performed;
-/* Counter mutex */
-static pthread_mutex_t request_mutex;
 
 int register_test_cpu(sb_list_t * tests)
 {
@@ -92,8 +90,6 @@
 
   req_performed = 0;
 
-  pthread_mutex_init(&request_mutex, NULL);
-  
   return 0;
 }
 
@@ -104,15 +100,20 @@
 
   (void) thread_id; /* unused */
 
-  if (sb_globals.max_requests > 0 && req_performed >= sb_globals.max_requests)
+  if (sb_globals.max_requests > 0)
   {
-    req.type = SB_REQ_TYPE_NULL;
-    return req;
+    SB_THREAD_MUTEX_LOCK();
+    if (req_performed >= sb_globals.max_requests)
+    {
+      req.type = SB_REQ_TYPE_NULL;
+      SB_THREAD_MUTEX_UNLOCK();
+      return req;
+    }
+    req_performed++;
+    SB_THREAD_MUTEX_UNLOCK();
   }
+
   req.type = SB_REQ_TYPE_CPU;
-  pthread_mutex_lock(&request_mutex);
-  req_performed++;
-  pthread_mutex_unlock(&request_mutex);
 
   return req;
 }
@@ -158,7 +159,5 @@
 
 int cpu_done(void)
 {
-  pthread_mutex_destroy(&request_mutex);
-
   return 0;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sysbench-0.5.0+git.20160414/sysbench/tests/fileio/sb_fileio.c 
new/sysbench-0.5.0+git.20160610/sysbench/tests/fileio/sb_fileio.c
--- old/sysbench-0.5.0+git.20160414/sysbench/tests/fileio/sb_fileio.c   
2016-04-16 18:18:45.000000000 +0200
+++ new/sysbench-0.5.0+git.20160610/sysbench/tests/fileio/sb_fileio.c   
2016-06-12 11:31:03.000000000 +0200
@@ -308,7 +308,8 @@
 static unsigned long sb_get_allocation_granularity(void);
 static void *sb_memalign(size_t size);
 static void sb_free_memaligned(void *buf);
-static FILE_DESCRIPTOR sb_open(const char *name);
+static FILE_DESCRIPTOR sb_open(const char *);
+static FILE_DESCRIPTOR sb_create(const char *);
 
 int register_test_fileio(sb_list_t *tests)
 {
@@ -354,8 +355,15 @@
   {
     snprintf(file_name, sizeof(file_name), "test_file.%d",i);
     /* remove test files for creation test if they exist */
-    if (test_mode == MODE_WRITE)  
+    if (test_mode == MODE_WRITE)
+    {
       unlink(file_name);
+      if (sb_create(file_name))
+      {
+        log_errno(LOG_FATAL, "Cannot create file '%s'", file_name);
+        return 1;
+      }
+    }
 
     log_text(LOG_DEBUG, "Opening file: %s", file_name);
     files[i] = sb_open(file_name);
@@ -2075,6 +2083,30 @@
   return file;
 }
 
+/*
+  Create a file with a given path. Signal an error if the file already
+  exists. Return a non-zero value on error.
+*/
+
+static int sb_create(const char *path)
+{
+  FILE_DESCRIPTOR file;
+  int res;
+
+#ifndef _WIN32
+  file = open(path, O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+  res = !VALID_FILE(file);
+  close(file);
+#else
+  file = CreateFile(name, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW,
+                    flags, NULL);
+  res = !VALID_FILE(file);
+  CloseHandle(file);
+#endif
+
+  return res;
+}
+
 
 /* Fill buffer with random values and write checksum */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sysbench-0.5.0+git.20160414/sysbench/tests/memory/sb_memory.c 
new/sysbench-0.5.0+git.20160610/sysbench/tests/memory/sb_memory.c
--- old/sysbench-0.5.0+git.20160414/sysbench/tests/memory/sb_memory.c   
2016-04-16 18:18:45.000000000 +0200
+++ new/sysbench-0.5.0+git.20160610/sysbench/tests/memory/sb_memory.c   
2016-06-12 11:31:03.000000000 +0200
@@ -246,7 +246,7 @@
 int memory_execute_request(sb_request_t *sb_req, int thread_id)
 {
   sb_mem_request_t    *mem_req = &sb_req->u.mem_request;
-  int                 tmp = 0;
+  volatile int        tmp = 0;
   int                 idx; 
   int                 *buf, *end;
   log_msg_t           msg;


Reply via email to