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: 993478 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="luUs0fJL"; 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 42pqFK4B0Qz9sMp for ; Tue, 6 Nov 2018 10:50:58 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 743EB3E783B for ; Tue, 6 Nov 2018 00:50:55 +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-Google-Smtp-Source: AJdET5f7hxlgRhdvbBZ6qF9sOJP9wVGFTVL7UkvAG3QE7mOluGIQy9p79N9q2HH0gKlFQY3wVDx4tg== 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+incoming=patchwork.ozlabs.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(); }