From patchwork Thu Aug 20 20:14:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 7046981 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6ADD8C05AC for ; Thu, 20 Aug 2015 20:14:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AA0E20456 for ; Thu, 20 Aug 2015 20:14:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A23020444 for ; Thu, 20 Aug 2015 20:14:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752561AbbHTUOd (ORCPT ); Thu, 20 Aug 2015 16:14:33 -0400 Received: from sandeen.net ([63.231.237.45]:56292 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751842AbbHTUOc (ORCPT ); Thu, 20 Aug 2015 16:14:32 -0400 Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.4]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTPSA id 87A1365476E1 for ; Thu, 20 Aug 2015 15:14:31 -0500 (CDT) Message-ID: <55D63527.2050404@sandeen.net> Date: Thu, 20 Aug 2015 15:14:31 -0500 From: Eric Sandeen MIME-Version: 1.0 To: "fstests@vger.kernel.org" Subject: [PATCH] xfs/077: fix test for userspace meta_uuid support Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The current _require_meta_uuid() test looks for a failure return code from xfs_db -x -c "uuid generate" but in fact this exits with success. (In fact uuid_f always exits with success; perhaps this needs fixing, but that's in the wild now). So grep for the string(s) stating that it failed, instead. Signed-off-by: Eric Sandeen --- -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/common/rc b/common/rc index 70d2fa8..737a701 100644 --- a/common/rc +++ b/common/rc @@ -2720,8 +2720,11 @@ _require_meta_uuid() # This will create a crc fs on $SCRATCH_DEV _require_xfs_crc - $XFS_DB_PROG -x -c "uuid generate" $SCRATCH_DEV >/dev/null 2>&1 \ - || _notrun "Userspace doesn't support meta_uuid feature" + $XFS_DB_PROG -x -c "uuid restore" $SCRATCH_DEV 2>&1 \ + | grep -q "invalid UUID\|supported on V5 fs" \ + && _notrun "Userspace doesn't support meta_uuid feature" + + $XFS_DB_PROG -x -c "uuid generate" $SCRATCH_DEV >/dev/null 2>&1 _scratch_mount >/dev/null 2>&1 \ || _notrun "Kernel doesn't support meta_uuid feature"