From patchwork Sat Mar 11 00:56:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 9618289 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8797860415 for ; Sat, 11 Mar 2017 00:57:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CA29223A6 for ; Sat, 11 Mar 2017 00:57:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DC4326E8A; Sat, 11 Mar 2017 00:57:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C842223A6 for ; Sat, 11 Mar 2017 00:57:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933138AbdCKA5C (ORCPT ); Fri, 10 Mar 2017 19:57:02 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:35777 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932687AbdCKA5B (ORCPT ); Fri, 10 Mar 2017 19:57:01 -0500 Received: by mail-pg0-f65.google.com with SMTP id g2so7394045pge.2 for ; Fri, 10 Mar 2017 16:57:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=LGJzk/1eZrngIjUbMSDzJIEuSwBla2nxuy5Z4E2cz10=; b=SU5vFd+CVUcpzTpo8IvhTUYk/ghZFU1CnR+YgiYWPbZsao2G23v2yaitTPVVfn9DJb ytJqWRjag6AKrms5zkCe59glFJPz+mYEUv0yfpRZ5RualwDTVX1g+FIbwLeG3Avr8RV6 etKKxMaCyIyB4jiFz5hmESXoiYRn7SjxcIPbHSX3ImZmwiQjXsvggr8tWwqm3SYjdSsq ZtM/biol9roECkqg66zq4MYiyTmDB68H3A9QaWFu57lpxgC189/8EvD6m4VhPHGx6fBk p3q2RgmRPbhvPuXmZSn22ucSvc2g5UJqKEheyPFqznjGV3/pemxoO6fCduoUmtj0gnuq SVUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=LGJzk/1eZrngIjUbMSDzJIEuSwBla2nxuy5Z4E2cz10=; b=jSEqtiIrLgNy0dS5yWZQhvUnm59kWV37E/1p73POuL6xNBcIzIlglnzz0bxDAr6bXn Xf3qAsYhf4MmjeMfP6Kd9qDG+A8tw1591loVSno3yVNhY+aJSJoAZQ+bWRjYOyclvF9W C7YNkC7B1fWDPv3EVKXRT4VXn8oTzol8yZWMLuivkxeST3s+lCPaKyr53GhDGc4nXpzN Atz6ZxqTOceDZTRKOQhhWNBmxl01DsPQOIeB0K4dCBcfz3BXznMwrhNxDAwi8wogH4hc fSWgcdAGZ7Da6lCTXAjnhMOcSB+/ErRTAEKTEzpCpJSzS+jVYI8f01YH90ycJ4DucBFx tzDw== X-Gm-Message-State: AMke39mDQ72jwsgnxL7D/+cZuJKMaLGNwf4wcdD0UPoD0ognM8r5CPArjOtenGLTsyJiqA== X-Received: by 10.98.37.132 with SMTP id l126mr24387458pfl.45.1489193820463; Fri, 10 Mar 2017 16:57:00 -0800 (PST) Received: from ebiggers-linuxstation.kir.corp.google.com ([100.119.30.131]) by smtp.gmail.com with ESMTPSA id s13sm20753404pfk.26.2017.03.10.16.56.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Mar 2017 16:57:00 -0800 (PST) From: Eric Biggers To: Theodore Ts'o Cc: fstests@vger.kernel.org, Eric Biggers Subject: [PATCH] android-xfstests: create loopback device nodes in standard location Date: Fri, 10 Mar 2017 16:56:32 -0800 Message-Id: <20170311005632.130135-1-ebiggers3@gmail.com> X-Mailer: git-send-email 2.12.0.246.ga2ecc84866-goog Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers Android creates loopback device nodes in /dev/block/, where they can't be found by losetup. Create them in /dev/ too so that losetup can find them. This stops tests using loopback devices, e.g. generic/361 and shared/298, from failing. Signed-off-by: Eric Biggers --- kvm-xfstests/android-xfstests | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kvm-xfstests/android-xfstests b/kvm-xfstests/android-xfstests index e798c7e..3489bc2 100755 --- a/kvm-xfstests/android-xfstests +++ b/kvm-xfstests/android-xfstests @@ -94,6 +94,14 @@ if ! cut -d' ' -f2 /proc/mounts 2>/dev/null | grep -q '^$CHROOT_DIR/results$'; t mkdir -p $RESULTS_DIR mount --bind $RESULTS_DIR $CHROOT_DIR/results fi + +# Android puts loopback device nodes in /dev/block/ instead of /dev/. +# But losetup can only find them in /dev/, so create them there too. +for i in \`seq 0 7\`; do + if [ ! -e /dev/loop\$i ]; then + mknod /dev/loop\$i b 7 \$i + fi +done EOF }