From mboxrd@z Thu Jan 1 00:00:00 1970 From: oscar.mateo@intel.com Subject: [PATCH 1/4] tests: Fix "-thrashing" and "-thrash-inactive" distinction Date: Mon, 4 Nov 2013 16:30:46 +0000 Message-ID: <1383582649-2841-1-git-send-email-oscar.mateo@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id C842DFA9A9 for ; Mon, 4 Nov 2013 08:35:34 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org From: Oscar Mateo A typo in the relocation tests made both sub-tests perform the same action: drop *all* caches. Signed-off-by: Oscar Mateo --- tests/gem_persistent_relocs.c | 2 +- tests/gem_reloc_vs_gpu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/gem_persistent_relocs.c b/tests/gem_persistent_relocs.c index 29b19ed..34d8492 100644 --- a/tests/gem_persistent_relocs.c +++ b/tests/gem_persistent_relocs.c @@ -289,7 +289,7 @@ static void do_forked_test(int fd, unsigned flags) if (flags & (THRASH | THRASH_INACTIVE)) { char fname[FILENAME_MAX]; int drop_caches_fd; - const char *data = THRASH_INACTIVE ? "0xf" : "0x7"; + const char *data = (flags & THRASH_INACTIVE) ? "0x7" : "0xf"; snprintf(fname, FILENAME_MAX, "%s/%i/%s", "/sys/kernel/debug/dri", drm_get_card(), diff --git a/tests/gem_reloc_vs_gpu.c b/tests/gem_reloc_vs_gpu.c index ae7b446..bbfdc3a 100644 --- a/tests/gem_reloc_vs_gpu.c +++ b/tests/gem_reloc_vs_gpu.c @@ -284,7 +284,7 @@ static void do_forked_test(int fd, unsigned flags) if (flags & (THRASH | THRASH_INACTIVE)) { char fname[FILENAME_MAX]; int drop_caches_fd; - const char *data = THRASH_INACTIVE ? "0xf" : "0x7"; + const char *data = (flags & THRASH_INACTIVE) ? "0x7" : "0xf"; snprintf(fname, FILENAME_MAX, "%s/%i/%s", "/sys/kernel/debug/dri", drm_get_card(), -- 1.7.9.5