From patchwork Sat Sep 21 21:17:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Whitney X-Patchwork-Id: 276914 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BDE582C01AB for ; Sun, 22 Sep 2013 07:17:49 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751500Ab3IUVRk (ORCPT ); Sat, 21 Sep 2013 17:17:40 -0400 Received: from mail-qc0-f173.google.com ([209.85.216.173]:54154 "EHLO mail-qc0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751470Ab3IUVRj (ORCPT ); Sat, 21 Sep 2013 17:17:39 -0400 Received: by mail-qc0-f173.google.com with SMTP id c3so1119326qcv.4 for ; Sat, 21 Sep 2013 14:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=Xbs3rBaqzFxeQXDIEohIagGuXi9YRRuiEqSahzki6yo=; b=t47h0z49oYUCbTb4V32BTfIN5aNsGNTH14TFLqj+akoWUKkZH+Ev/LdiwAo9Fuk2gg wT6IlnTx1vUFkrmOOWiaX1hgfGoSdrpyXOfNzt4nb6I5qJAPR+c7FWdeoU+PPtwxmjk1 Hh281ekAU2O7DJDn7K18mEwrM1lgcQDnfbv4rip7xQN0fjZv6E5uVzf5UcOAdk8b4Bql a0Y/xbWDIbYCl3+4P4rRKlyhZ0Pqo2zaL6aNbdw2R2JXhJhLyt/wfqUifOL9ossAWvRf 47nIm2kbMms1U4ugDBxtrgmAhbWlJZHkWR3mbcLg9GqAEV6rUNGMzMuLf3OM0jW/cxDK sH1g== X-Received: by 10.224.92.81 with SMTP id q17mr32759qam.92.1379798259029; Sat, 21 Sep 2013 14:17:39 -0700 (PDT) Received: from wallace (c-75-68-62-236.hsd1.nh.comcast.net. [75.68.62.236]) by mx.google.com with ESMTPSA id a7sm29681883qew.2.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 21 Sep 2013 14:17:38 -0700 (PDT) Date: Sat, 21 Sep 2013 17:17:35 -0400 From: Eric Whitney To: xfs@oss.sgi.com Cc: linux-ext4@vger.kernel.org Subject: [PATCH] xfstests: set umask to avoid spurious generic/314 test failures Message-ID: <20130921211735.GC7855@wallace> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Generic/314 can fail when the group write file mode bit for "subdir" does not match that found in the golden output, as has been seen in ext4 regression testing. It appears that the golden output for generic/314 was taken on a system where the $qa_user's umask cleared that mode bit - most likely, where the umask was 022. Depending upon the distro, it's not uncommon for a user's default umask to have a different value, such as 002. When that's the case, we get a false negative failure when the group write mode bit for "subdir" is not cleared. This failure is unrelated to the value of the SGID mode bit that is the object of this test. We could either require that $qa_user's account be configured in advance with a umask of 022, or explicitly set a umask value compatible with the golden output when creating "subdir". The latter option is more robust. Signed-off-by: Eric Whitney Reviewed-by: Christoph Hellwig --- tests/generic/314 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 tests/generic/314 diff --git a/tests/generic/314 b/tests/generic/314 old mode 100644 new mode 100755 index 0dd98a3..f430b82 --- a/tests/generic/314 +++ b/tests/generic/314 @@ -57,7 +57,7 @@ chown $qa_user:12345 $TEST_DIR/$seq-dir chmod 2775 $TEST_DIR/$seq-dir # Make subdirs before & after acl set -su $qa_user -c "mkdir $TEST_DIR/$seq-dir/subdir" +su $qa_user -c "umask 022; mkdir $TEST_DIR/$seq-dir/subdir" su $qa_user -c "setfacl -m u:$qa_user:rwx,d:u:$qa_user:rwx $TEST_DIR/$seq-dir" su $qa_user -c "mkdir $TEST_DIR/$seq-dir/subdir2"