From patchwork Mon Nov 5 23:50:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandeep Patil X-Patchwork-Id: 150229 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3231097ljp; Mon, 5 Nov 2018 15:50:57 -0800 (PST) X-Google-Smtp-Source: AJdET5ffWmNYZGYLjMlKVT+ersuHAxQOuKT9qQocA8ZQT02T5qLUFLyqmMRLVID9Ymbiv1X2NOF8 X-Received: by 2002:a17:906:94c3:: with SMTP id d3-v6mr15625869ejy.104.1541461857789; Mon, 05 Nov 2018 15:50:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541461857; cv=none; d=google.com; s=arc-20160816; b=sBYRrPc0de5MqDJaPTd+1NKEBiM2qe/p+YnJIzNHdSY+jcdVrxM3IS4FzDm8IKHYdg rtArhFtHtTJ47AW5dPXV5CsbeixX0dCXJiF/A10HUX3nDmQ6bJh58H2EyR8O6uDkmnc2 AsXiGMXWxXLKLtIKq/T9/VB1432Wb1VqPO5hKLcY7uMGpRENrSni00DRDl26nyAbwSYl J27wLI0D2V1bFy9uM2Pat0T4RZj7GDrTEJ3tnMWW5gXW/ket7NNbkiwuB5I5kFDEmh0Q hR9bWVThyOAiplhrUBaKXcbIukiEtmmXGT1szzM17f4gN701+tu32OOF6OatTp3ifSGc 9rAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=BU1Abu6UE5N2QzcdKRJghRFU0BrUy26nGDQSyyWi2wg=; b=QHdGgnItpufuCz5BtpW6SUj2M+0mTxBNbeyDqae/MD54affFHcNTRwU0E3diOu7CNu HyDQxz08geLZaJBqM6foLl+FNM+f2SvbXRT1IlSO9diO+1rivtYIDgUevXhbwwK/MmSd wuS1YsWZz84mOv9P7yzRLzYU+q50xvlIFyJ+Y/UAO5JNC666+bHCT3JDDn/TGteECZhA IHQMGnUAiJwZtXCwqnRDCIkNUXlZ2u8gYGNbf7PWC8axrzj7v034OkWdUT+vD4Z0LRGV BJ+ErFqsWInoB39b4LzWQAoJ2JucyCMFFJD8qE5Gt64TmO6rkYge31PWiPK0mjlJEzPE 8cfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20161025 header.b=luUs0fJL; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=REJECT sp=REJECT dis=QUARANTINE) header.from=google.com Return-Path: Received: from picard.linux.it (picard.linux.it. [213.254.12.146]) by mx.google.com with ESMTPS id d6-v6si783955edl.8.2018.11.05.15.50.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 15:50:57 -0800 (PST) Received-SPF: pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) client-ip=213.254.12.146; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20161025 header.b=luUs0fJL; spf=pass (google.com: domain of ltp-bounces+patch=linaro.org@lists.linux.it designates 213.254.12.146 as permitted sender) smtp.mailfrom="ltp-bounces+patch=linaro.org@lists.linux.it"; dmarc=fail (p=REJECT sp=REJECT dis=QUARANTINE) header.from=google.com Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 713183E6377 for ; Tue, 6 Nov 2018 00:50:57 +0100 (CET) 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 [IPv6:2001:4b78:1:20::5]) by picard.linux.it (Postfix) with ESMTP id 30D943E6377 for ; Tue, 6 Nov 2018 00:50:49 +0100 (CET) Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (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 4E9E6600864 for ; Tue, 6 Nov 2018 00:50:49 +0100 (CET) Received: by mail-pf1-x444.google.com with SMTP id g7-v6so2927469pfo.10 for ; Mon, 05 Nov 2018 15:50:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kJx4gECE6XdbT+XGmmQoxoToWPqPtSL5LatA3vczjiQ=; b=luUs0fJLCnApVtE1jH7E9+OeR0kNTeDkXq4rhcNUhR6Yku2ajcbvvcX3QhVxafb3SS gq31OPVMT+a0dN/tV8C0X1yJo9XPbbg4eISfY3twb1oyHyr3jWFhBGmi1cIa6tO+Lsks KaYF50nVcz96ksWTrlGoEC3o/eKfVKsogWIupiHsyu+CXmexnCf3vLumZYSPT4UAocBL 269ShUObtQQWdwPLx8eyDsvj6+8LL6Dh4M7V1iHbqWS8ka+XZ+cpZA2v8BizCAWAvxhF oKd7FTiUZbckIjVQA02fWqOB50H40kI2yC7lPysU2gZUsMNyzh+uo0LWIrecItFlwRfU MSgg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=kJx4gECE6XdbT+XGmmQoxoToWPqPtSL5LatA3vczjiQ=; b=MO8zASFWwCfLxhkJz8FM30kAUvAIYZDpAYLv/tfUOfIaSLXHBHw91YlTFKOgndwd/s UPAAlJ/dki06+Gn7Q9g1jMJEwF4W8zitC9goXPHBbZ/oYHGf3ZDQonNtI7XR1geGWZNc 6a/a5XnAqS/ml5qSp0p6fWLMMPTjgwdlQgR+jC4bqXv3RruY3Bfjm+hImCdPClWCpVhA qj4MQUJSTrRKakSBYrigxQckrD7O2yFQuqWy5b6qBun4TmdPGk3HQjh4OgdiB5YVuvn0 12IKoYcUa2j0gsj6ZQCTsukKkkYYQOVszxBPk9FO/GMs4mWeOxyKEkCVY/XFsXdnb36/ nvyA== X-Gm-Message-State: AGRZ1gJcyBWijX5XZtUBr5XGGmcURowjuKOlg11Kr9EjC1oPFAANEeJN Mc6zfCK42K018/tTgPuuh43wNAowj4xzAg== X-Received: by 2002:a62:198c:: with SMTP id 134-v6mr16910027pfz.33.1541461847156; Mon, 05 Nov 2018 15:50:47 -0800 (PST) Received: from sspatil-workstation.mtv.corp.google.com ([2620:0:1000:1601:1a43:e60e:c432:d19c]) by smtp.gmail.com with ESMTPSA id c70-v6sm27133925pfg.97.2018.11.05.15.50.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 15:50:45 -0800 (PST) From: Sandeep Patil To: ltp@lists.linux.it Date: Mon, 5 Nov 2018 15:50:15 -0800 Message-Id: <20181105235019.254846-2-sspatil@google.com> X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog In-Reply-To: <20181105235019.254846-1-sspatil@google.com> References: <20181105235019.254846-1-sspatil@google.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-14.9 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,SPF_PASS,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-5.smtp.seeweb.it Cc: kernel-team@android.com, rpalethorpe@suse.com Subject: [LTP] [PATCH 1/5] chroot01: Use the 'tmpdir' we create. 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+patch=linaro.org@lists.linux.it Sender: "ltp" Remove hard coded use of /tmp that breaks this test for Android and use the tmpdir() we create in the setup() instead. Signed-off-by: Sandeep Patil --- testcases/kernel/syscalls/chroot/chroot01.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testcases/kernel/syscalls/chroot/chroot01.c b/testcases/kernel/syscalls/chroot/chroot01.c index 9b0c30cf1..a1db5e157 100644 --- a/testcases/kernel/syscalls/chroot/chroot01.c +++ b/testcases/kernel/syscalls/chroot/chroot01.c @@ -54,7 +54,7 @@ char *TCID = "chroot01"; int TST_TOTAL = 1; int fail; -char path[] = "/tmp"; +char *path; char nobody_uid[] = "nobody"; struct passwd *ltpuser; @@ -94,6 +94,7 @@ void setup(void) tst_require_root(); tst_tmpdir(); + path = tst_get_tmpdir(); if ((ltpuser = getpwnam(nobody_uid)) == NULL) tst_brkm(TBROK | TERRNO, cleanup, @@ -110,5 +111,6 @@ void cleanup(void) { SAFE_SETEUID(NULL, 0); + free(path); tst_rmdir(); }