From patchwork Mon May 6 15:38:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Lawrence X-Patchwork-Id: 1095901 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="ScyS7qdQ"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44yRjR0KBrz9s3l for ; Tue, 7 May 2019 01:38:50 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 370543EAE91 for ; Mon, 6 May 2019 17:38:46 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) by picard.linux.it (Postfix) with ESMTP id 1AAB83EA65F for ; Mon, 6 May 2019 17:38:44 +0200 (CEST) Received: from mail-pg1-x54a.google.com (mail-pg1-x54a.google.com [IPv6:2607:f8b0:4864:20::54a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id A90EE6005F7 for ; Mon, 6 May 2019 17:38:45 +0200 (CEST) Received: by mail-pg1-x54a.google.com with SMTP id 14so8236022pgo.14 for ; Mon, 06 May 2019 08:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=0fVpLGLqvCFks3wqu36nBLdEgm9uj0iD381sMLInOo8=; b=ScyS7qdQ2Qx1UthKQ0F/i7G+uch+uLJ78etxZArs4nkZusEw5lhcDKdKheLyGdhuXY Anfx+VwQSqeQEShQN56GvCvh/c+wHxxj6K9UlWvgu/esd7gCY5PM71GlqNc1BFhg/2SF D/De1bSfbdMrKeMJVfTsoiVzhEVGvgms/XrpCc+63wRUe/PtZVTJHmRKBmhwRWhBBIY6 zJWx2k/MoXQ+kdakf3KSlsGnVy72H0hN6NacfJVGjEpYLTBkU1hGxGU+rT6/d7gDqJ71 lr8eDuaj44JNm9rrvyFlqqafGAgDLRyGTQMmht9cQptucmIyL9P943zu2soRDOoGq72q tmFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=0fVpLGLqvCFks3wqu36nBLdEgm9uj0iD381sMLInOo8=; b=K3fRNjBU0nZ0LAiTwnUO72GfdwkGRpySB/d+r056ydmPk15Z0y3pl4H5/+VXXOlPej X1MILFxX/ABpYQemVz+0Rvc0Aa8gZofFGtPlBrOBiTPO/hDd+giTUWDY2A2yxsh7eV4h L1/eQBI7oXfJznoiDlTb2wZU7hmcxEmVx5gtfOO3QyqlMmpccRN+UjHzRJfgwafxqMto jFJGlee8+/Rdk7K8wglWzTFzFvPOQfa55qTAGyCmUE4WbOn3lNURvfZFfixPU3TmpT/V IHHJqqQkiHLCzgywr1+DYEZxtBcZJdKhHHDruOZzQ1AFFjSL9uTw+sia3ll0wvSK/xMi Jk4A== X-Gm-Message-State: APjAAAW8WpMtUSPXnZBitv87nV3yprsi7bPqZSs3SWOQ+DlEO8tBFx/M IFBgchbHFPvIPqit40bLT8Yrh50X0vDbkKIq/w5DyxOFeAxGYRDdTGH+goHwY/RebeRTm/dt7XQ zGjJtkkAsRggw38nWpDibvii3eBRz8SOCYtxLYbq1plQS84zvz5g3Y3e/9/oR//oWAw2K6sDW X-Google-Smtp-Source: APXvYqytDchNPqQqBfl/NmT/o6LvOZEyfLSnAHiyhq875KSP0q8ITIq5a0cyvNDxWG6RmPHMbCKVbJ2LYDL+dM/iMNg= X-Received: by 2002:a63:7141:: with SMTP id b1mr32672308pgn.331.1557157121527; Mon, 06 May 2019 08:38:41 -0700 (PDT) Date: Mon, 6 May 2019 08:38:36 -0700 Message-Id: <20190506153836.232148-1-paullawrence@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog From: Paul Lawrence To: ltp@lists.linux.it, kernel-team@android.com X-Virus-Scanned: clamav-milter 0.99.2 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-7.4 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH] ANDROID: Fix ioctl03 test for Android X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Android has tun file at /dev/tun not /dev/net/tun Signed-off-by: Paul Lawrence Reviewed-by: Steve Muckle Acked-by: Petr Vorel --- testcases/kernel/syscalls/ioctl/ioctl03.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testcases/kernel/syscalls/ioctl/ioctl03.c b/testcases/kernel/syscalls/ioctl/ioctl03.c index b1b50edb4..cc9a2edaf 100644 --- a/testcases/kernel/syscalls/ioctl/ioctl03.c +++ b/testcases/kernel/syscalls/ioctl/ioctl03.c @@ -79,6 +79,11 @@ static void verify_features(void) unsigned int features, i; int netfd = open("/dev/net/tun", O_RDWR); + + /* Android has tun at /dev/tun */ + if (netfd == -1 && (errno == ENODEV || errno == ENOENT)) + netfd = open("/dev/tun", O_RDWR); + if (netfd == -1) { if (errno == ENODEV || errno == ENOENT) tst_brk(TCONF, "TUN support is missing?");