Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1457A106F2 for ; Fri, 4 Apr 2014 21:27:31 +0000 (UTC) Received: (qmail 50276 invoked by uid 500); 4 Apr 2014 21:27:29 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 49814 invoked by uid 500); 4 Apr 2014 21:27:26 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 49788 invoked by uid 99); 4 Apr 2014 21:27:25 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Apr 2014 21:27:25 +0000 Date: Fri, 4 Apr 2014 21:27:25 +0000 (UTC) From: "Brandon Williams (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CASSANDRA-6983) DirectoriesTest fails when run as root MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Brandon Williams created CASSANDRA-6983: ------------------------------------------- Summary: DirectoriesTest fails when run as root Key: CASSANDRA-6983 URL: https://issues.apache.org/jira/browse/CASSANDRA-6983 Project: Cassandra Issue Type: Bug Components: Tests Reporter: Brandon Williams Assignee: Yuki Morishita Fix For: 2.0.7 When you run the DirectoriesTest as a normal user, it passes because it fails to create the 'bad' directory: {noformat} [junit] ------------- Standard Error ----------------- [junit] ERROR 16:16:18,111 Failed to create /tmp/cassandra4119802552776680052unittest/ks/bad directory [junit] WARN 16:16:18,112 Blacklisting /tmp/cassandra4119802552776680052unittest/ks/bad for writes [junit] ------------- ---------------- --------------- {noformat} But when you run the test as root, it succeeds in making the directory, causing an assertion failure that it's unwritable: {noformat} [junit] Testcase: testDiskFailurePolicy_best_effort(org.apache.cassandra.db.DirectoriesTest): FAILED [junit] [junit] junit.framework.AssertionFailedError: [junit] at org.apache.cassandra.db.DirectoriesTest.testDiskFailurePolicy_best_effort(DirectoriesTest.java:199) {noformat} It seems to me that we shouldn't be relying on failing the make the directory. If we're just going to test a nonexistent dir, why try to make one at all? And if that is supposed to succeed, then we have a problem with either the test or blacklisting. -- This message was sent by Atlassian JIRA (v6.2#6252)