[From nobody Thu Jul 23 11:19:08 2026
Received: (at submit) by bugs.debian.org; 24 Jul 2015 18:00:44 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.0-bugs.debian.org_2005_01_02
 (2014-02-07) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-5.9 required=4.0 tests=BAYES_00, FOURLA,
 FROMDEVELOPER, 
 HEADER_FROM_DIFFERENT_DOMAINS,MURPHY_DRUGS_REL8 autolearn=ham
 autolearn_force=no version=3.4.0-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 22; hammy, 150; neutral, 99; spammy,
 0. spammytokens: hammytokens:0.000-+--H*u:2014-03-12,
 0.000-+--H*UA:2014-03-12, 0.000-+--H*UA:1.5.23, 0.000-+--H*u:1.5.23,
 0.000-+--00.000000000
Return-path: &lt;dannf@dannf.org&gt;
Received: from complete.lackof.org ([198.49.126.79])
 by buxtehude.debian.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84) (envelope-from &lt;dannf@dannf.org&gt;) id 1ZIhH2-0007sj-MW
 for submit@bugs.debian.org; Fri, 24 Jul 2015 18:00:44 +0000
Received: from localhost (c-107-2-141-92.hsd1.co.comcast.net [107.2.141.92])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client did not present a certificate)
 by complete.lackof.org (Postfix) with ESMTPSA id 46BCB33E0092
 for &lt;submit@bugs.debian.org&gt;; Fri, 24 Jul 2015 12:00:42 -0600 (MDT)
Date: Fri, 24 Jul 2015 12:00:41 -0600
From: dann frazier &lt;dannf@debian.org&gt;
To: submit@bugs.debian.org
Subject: sysbench dep8 test
Message-ID: &lt;20150724180041.GA8270@fluid.dannf&gt;
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=&quot;bg08WKrSYDhXBjb5&quot;
Content-Disposition: inline
User-Agent: Mutt/1.5.23 (2014-03-12)
Delivered-To: submit@bugs.debian.org


--bg08WKrSYDhXBjb5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Source: mysql-5.6
Version: 5.6.25-3
Severity: wishlist
Tags: patch

The attached patch adds a dep8 test that runs sysbench against the server
for 60s. This reproduces a data corruption issue on arm64 and ppc64el
on certain systems.

--bg08WKrSYDhXBjb5
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename=&quot;sysbench-dep8.patch&quot;

diff -urpN mysql-5.6-5.6.25.orig/debian/tests/control mysql-5.6-5.6.25/debian/tests/control
--- mysql-5.6-5.6.25.orig/debian/tests/control	2015-07-22 10:51:55.000000000 -0600
+++ mysql-5.6-5.6.25/debian/tests/control	2015-07-24 11:54:12.973732556 -0600
@@ -2,6 +2,10 @@ Tests: smoke
 Depends: mysql-server-5.6
 Restrictions: allow-stderr needs-root breaks-testbed
 
+Tests: sysbench
+Depends: mysql-server-5.6, sysbench
+Restrictions: allow-stderr needs-root breaks-testbed
+
 Tests: upstream
 Depends: mysql-testsuite-5.6
 Restrictions: allow-stderr breaks-testbed
diff -urpN mysql-5.6-5.6.25.orig/debian/tests/sysbench mysql-5.6-5.6.25/debian/tests/sysbench
--- mysql-5.6-5.6.25.orig/debian/tests/sysbench	1969-12-31 17:00:00.000000000 -0700
+++ mysql-5.6-5.6.25/debian/tests/sysbench	2015-07-24 11:55:22.526624572 -0600
@@ -0,0 +1,57 @@
+#!/bin/sh
+set -ex
+
+# dep8 sysbench test for mysql-server
+# Author: dann frazier &lt;dannf@debian.org&gt;
+#
+# This test should be declared in debian/tests/control with the
+# following restrictions:
+#
+# needs-root (needed to reset the root mysql password)
+# breaks-testbed (because it resets the root mysql password)
+# allow-stderr
+#
+# This test runs sysbench against a test database. The goal is to see if the
+# server is stable enough to deal with multiple threads of concurrent activity.
+# It serves as a regression test for LP: #1427406 (arm64/ppc64-specific).
+#
+
+debconf-set-selections &lt;&lt;EOT
+mysql-server-5.6 mysql-server/root_password password rootpassword
+mysql-server-5.6 mysql-server/root_password_again password rootpassword
+EOT
+
+DEBIAN_FRONTEND=noninteractive dpkg-reconfigure mysql-server-5.6
+
+cleanup() {
+    local ret=0
+    local mysqlclient=&quot;mysql --user=root --password=rootpassword&quot;
+
+    echo &quot;DROP DATABASE sbtest;&quot; | $mysqlclient || ret=1
+    echo &quot;DROP USER 'testuser'@'localhost';&quot; | $mysqlclient || ret=1
+
+    return $ret
+}
+
+do_sysbench() {
+    sysbench \
+	--test=oltp \
+	--num-threads=128 \
+	--max-time=60 \
+	--mysql-user=testuser \
+	--mysql-password=testpassword \
+	$1
+}
+
+cleanup || /bin/true # in case a previous run failed
+
+mysql --user=root --password=rootpassword &lt;&lt;EOT
+CREATE DATABASE sbtest;
+CREATE USER 'testuser'@'localhost' identified by 'testpassword';
+GRANT ALL ON sbtest.* TO 'testuser'@'localhost';
+EOT
+
+do_sysbench prepare
+do_sysbench run
+
+cleanup

--bg08WKrSYDhXBjb5--
]