From patchwork Wed Feb 26 06:15:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 183887 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp2709249ile; Tue, 25 Feb 2020 22:15:41 -0800 (PST) X-Received: by 2002:ab0:14ea:: with SMTP id f39mr3140392uae.40.1582697741310; Tue, 25 Feb 2020 22:15:41 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1582697741; cv=pass; d=google.com; s=arc-20160816; b=N9tsL/vyAPCY4jqgAeh4GahEQoBi+RRqxAq8aaP988DVkwaAe86zRb0qqEGpu/sEVJ 838c7vVEB1njXXDvMrCxe/l00LaICzuznRw8YVR6DlG32OwLSav47KqDH5jM9H80NFho JJl+TqzB0uNHID+B/jMbBJ3zgfl77dmcjZj3KC8FAGNdmaANhy4BGPU92TBl9qKIQDvp as1H3ePeh6eC4AVQkX7lDMfXzapA0OTJUbZDsPcHl3q2idlFToxqvP1m5awbJz3LQPG5 26u5xgv4P5kUUi4s1yvsdf64bHXk/Y7Fi36iKWTcSZi9vphlULztu4XyioYrrEFZkGSS +8fw== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature:dkim-signature; bh=UfCTUioA7ZNdzX+yJ0RcsAa31J/tw1//xPCyCKlOy+o=; b=iE2iVQNOhPmTZ3QAhoeAj7YUd6BGpOVeTZE83r32U2pQqQf9yzh/z63xvWDFXejLQ8 A/f5KdB0WfR4mzgosyI0RAjoFPoXFFgb075xwW0ZmbCGF7UJ/tvxAZbFRa/K+TcG9uhp /8FVoU2zjdpoakisp585dXZU1p0AyZVcGt2N2whycjL8bLrng0F2IQ44UQulyM6IBJVS CVaY/tSFLrrw1aUHR+9Pd7D0wn/mokJPUzom6797UCAxgMadAj/ai3XluSdgDSED24Tg yAE70tSuxJ4GDTg2RdMyAgo7riBdHK4xELHfzdyg0SD5lkJg7NXR3omyVXA7TTWyTjXu K3rg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=IWuRG0MR; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WI2fzGPf; arc=pass (i=2 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of libhugetlbfs+bncbctyrthe4edrbde23dzakgqevikcamq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=libhugetlbfs+bncBCTYRTHE4EDRBDE23DZAKGQEVIKCAMQ@googlegroups.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id j26sor1650256vsf.24.2020.02.25.22.15.41 (Google Transport Security); Tue, 25 Feb 2020 22:15:41 -0800 (PST) Received-SPF: pass (google.com: domain of libhugetlbfs+bncbctyrthe4edrbde23dzakgqevikcamq@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=IWuRG0MR; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WI2fzGPf; arc=pass (i=2 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of libhugetlbfs+bncbctyrthe4edrbde23dzakgqevikcamq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=libhugetlbfs+bncBCTYRTHE4EDRBDE23DZAKGQEVIKCAMQ@googlegroups.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com ARC-Seal: i=2; a=rsa-sha256; t=1582697741; cv=pass; d=google.com; s=arc-20160816; b=FpzBAD/je19ZEJhqsBhLnVrhthJjNEYIwE8tDv9w/VvLF8o8RthJtDj6oht6Qok9DW 81ezIz4a4c5ZgN8hWkQ3fboc8vJ6BGTdvsjtskrlLWaCc5hPpCyal67b5zJW0HH9DyiJ 4Q77HZNJkle2bB/UO0izG+D5A96tSSxxyxBmrp7rHRnD2RAxOiD+et9xStlRpwpRvt2U gPkzUUQ3oBoshRKWhn1XuhDMCSbtvrBy+oCqnfDwBPoVvjAPPEI2G4z1It/Iv3hFHDGN oLN0dA5Qw3MS+BcU/3s3XpgZjVKEB4GzGD7C+enaktDN4D2mzZ6i02HAW6cHT1K26BS4 gFgw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature:dkim-signature; bh=UfCTUioA7ZNdzX+yJ0RcsAa31J/tw1//xPCyCKlOy+o=; b=XWo2IjMjQ1Y30xywpLOwgIOBI5JuLTGr7r//RPouUTbuxmGU3ibZXJXKXfYKsySpH/ cjXGXV7g9FRQK+7Xj89YiTX6/CqbSxzydNmAr/ur64K9bIUGFVuOa93tUfTLF/yQPdTS r9BbQMXKK8kE5NH0urhBHSoW9EqBk3nBNSPphrcRTqcEGpmjvrX24HMLLkN2OH3hK9zI +Yc4ODmAaLIeKK+oajrRykmN9GB77FLzCu97Uq9Nz3dO6LuifPl9Cd5aaz0J1U4GrEbK g1IDzGldIm0YlfwVg12uDKJeK6phbiNMY3JR5/VRVFWX/e4FH+kw81wU7/JHEuiZ1CLw j/Zg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="EnBxr/Rt"; spf=pass (google.com: domain of raj.khem@gmail.com designates 2607:f8b0:4864:20::1043 as permitted sender) smtp.mailfrom=raj.khem@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=UfCTUioA7ZNdzX+yJ0RcsAa31J/tw1//xPCyCKlOy+o=; b=IWuRG0MRAQfUmjMislsh8J2FyzibWzbKSWeJ0/DMHBxAb6VWiQirjy1Bhg966KFgj9 V79+kC6QPz1phxEl1I21OcRB/hOtReRRMGgp30CeLQP7ZXEONXyEnoEMBAr2I1r4/x3P S4hF2uhTztqtcuFvua+8NpHGnCMfqMeSQX7UjBTNq46yRMpc0ZftGfetwAcsj4kOnz33 fmdDk1cqANq6M/x44pPjb+cj1qmEmUa9QRqErKoSyJazJFDIsd2O4zhajzO2sOaxbSAh gFs3E4yDnkV4geIw8s+5CMz12fBzO0aIQJUerMrtyBr4JFnK7ZH2rdnz1PO5d7EzXRYK 6C1g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=UfCTUioA7ZNdzX+yJ0RcsAa31J/tw1//xPCyCKlOy+o=; b=WI2fzGPf6KMysDfTW+TRsj14fj4n3Ha5hDi98xOXgt+PQIF6oi27nlzRf/CPKlKRWB ZFWMEiaLdA6SR/YJ8qxDFk4/OsDozbj/n3uay3DZNNV3jlaZOyNLQqVUkPlalBhkvtz5 KANc007Z5pXeN62GN0eFaRnwKg2ZrZatCOiUWJyLTUx26lYhFYegCv8vCcYUDgCNSUkt pmmrqJbJ/0s2nqVvLMb824FjHCAfh5uMfAQv8z5egvCo0qIGPbGpx/nCKr8/YCIEYjeL s7ZITaJzk4q4r4VxuTBUufglku8/Nx66QI7NjvALyUBhK7fZ4nSQd8SiB/j9CmaHzqaP MTRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=UfCTUioA7ZNdzX+yJ0RcsAa31J/tw1//xPCyCKlOy+o=; b=oNKeimhwpaUbYc2Q5KM2CLgGSDaVgZReO8ysW1FkFubAoaQN9wf+ZR5i1mssSbWpht R8GnQCw8zO0msOR5T3OlUy9bX8D9BkpI0YCEKWtx+nk5vDhTJEgCOYQiYLjnRsaoeheI 4vQmidQ+Z9nSpvkFf6a5EazRl1C/8dNb9mzDEBjHepsKRx0S3Gy/Kb25Op3+EsfQ1dlV qGmay/Pd+zgdvOpjRCn0TAc6/kwwSgDMwChwlhLV7ZLTv6ZKQlxfH9YbDpqWGufnZM6b NH+KRy7pVtYvcZyRgE5VAbXuXXlkWc3gBmoXTrbLPHYq0hGwKPw7MuSs8kW2ECags7rC L1UQ== Sender: libhugetlbfs@googlegroups.com X-Gm-Message-State: APjAAAX7AYZrwvjZz8GQa8806k2027+H2PuP427yIE8NeCS2GblUGYHL gjXjbxkFEKQxC5YcoXaJBug= X-Google-Smtp-Source: APXvYqyF8naV7GmXNZtBEiGEE8cWeExfVlM7ym3uc4hfsC6n2VzS+Mjri5wU1GdyPxK9WYA1ouPXvA== X-Received: by 2002:a67:de85:: with SMTP id r5mr3243825vsk.9.1582697741044; Tue, 25 Feb 2020 22:15:41 -0800 (PST) X-BeenThere: libhugetlbfs@googlegroups.com Received: by 2002:ab0:2005:: with SMTP id v5ls16uak.3.gmail; Tue, 25 Feb 2020 22:15:40 -0800 (PST) X-Received: by 2002:ab0:20a:: with SMTP id 10mr3111370uas.19.1582697740522; Tue, 25 Feb 2020 22:15:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582697740; cv=none; d=google.com; s=arc-20160816; b=n7ci3ipqxgQ5wTxjHlpWJiD9YHzZq/wrzWevrDnM47+qehQTMQ4oEFLe3DmkDKe/Qi PLSBoTgYFJBkZ8JyqX40av6mIyYsEZHJNiYgz7ostpF7zLr1xP1NK4jPNNjNnnkbonXt qJiaxfNaUALHoBAjQkHgOOJH5Bf8jo3bzeXx/TFv+/l0+1pEbmcJLwRmVQfN/blXEPlG vluFx+Rq3e1Z2DS8WuyCK5v9eUKo/joKHjAsOTFZtNSq4tmFldNMoSMAcIPfo6xoK4Th ktHyNWK9lFkYnssGEhLS2Wj+r8uIWfHupU5uo67MjbDfv0eF99L9dyjwkGysrT7gFEt5 aVMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=3TyE1dTA7YSIDm8NOyO8MkDiG0xf70OuxbazxGCzM4k=; b=O7p6GpGYzww/m31eSkF69IfjUjdY6VqQBLEhxlUdh/ar1uev+w/a4fX2B6Tr8FYkd0 Ppe1xBmhU06D5GUpwyXwVu6HYKD/CcEuZTg3qseen0VenraOeCxdJhiNVGChPQJS9ph7 5GR9cuebkRDYbK0SNFcCBsy07hQK264Y74Jjdpzem0h351EZWrsTrGlCLQZD9axahEOg mQ3ZnrWGKmLW+p0OKErk3Ie8kN7D6DNHYMe8gikexbgvgIG6xHWo02Dwm2/GgV7LMuon Kpcs7X+WGu+g7MI4mEd4KmQI3PIQ0e+CJTOvxxdPa1I+HH6Ftfos22MG/gFe+IvzjQ8G Esqw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="EnBxr/Rt"; spf=pass (google.com: domain of raj.khem@gmail.com designates 2607:f8b0:4864:20::1043 as permitted sender) smtp.mailfrom=raj.khem@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com. [2607:f8b0:4864:20::1043]) by gmr-mx.google.com with ESMTPS id x127si111560vkc.0.2020.02.25.22.15.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Feb 2020 22:15:40 -0800 (PST) Received-SPF: pass (google.com: domain of raj.khem@gmail.com designates 2607:f8b0:4864:20::1043 as permitted sender) client-ip=2607:f8b0:4864:20::1043; Received: by mail-pj1-x1043.google.com with SMTP id f2so1859803pjq.1 for ; Tue, 25 Feb 2020 22:15:40 -0800 (PST) X-Received: by 2002:a17:902:bd43:: with SMTP id b3mr2306439plx.230.1582697739127; Tue, 25 Feb 2020 22:15:39 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:4e0:923a:5c32:ada4:3e27]) by smtp.gmail.com with ESMTPSA id q187sm1191319pfq.185.2020.02.25.22.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 22:15:38 -0800 (PST) From: Khem Raj To: libhugetlbfs@googlegroups.com Cc: Khem Raj Subject: [libhugetlbfs] [PATCH] tests: add explicit permissions to open() call Date: Tue, 25 Feb 2020 22:15:50 -0800 Message-Id: <20200226061550.2561231-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: raj.khem@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="EnBxr/Rt"; spf=pass (google.com: domain of raj.khem@gmail.com designates 2607:f8b0:4864:20::1043 as permitted sender) smtp.mailfrom=raj.khem@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list libhugetlbfs@googlegroups.com; contact libhugetlbfs+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: libhugetlbfs@googlegroups.com X-Google-Group-Id: 864002673528 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Fixes gethugepagesizes.c:227:35: error: open with O_CREAT in second argument needs 3 arguments | fd = open(fname, O_WRONLY|O_CREAT); | ^ Signed-off-by: Khem Raj --- tests/gethugepagesizes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- You received this message because you are subscribed to the Google Groups "libhugetlbfs" group. To unsubscribe from this group and stop receiving emails from it, send an email to libhugetlbfs+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/libhugetlbfs/20200226061550.2561231-1-raj.khem%40gmail.com. diff --git a/tests/gethugepagesizes.c b/tests/gethugepagesizes.c index 9551b38..5777265 100644 --- a/tests/gethugepagesizes.c +++ b/tests/gethugepagesizes.c @@ -223,7 +223,7 @@ void setup_fake_data(long sizes[], int n_elem) FAIL("mkdtemp: %s", strerror(errno)); sprintf(fname, "%s/meminfo-none", fake_meminfo); - fd = open(fname, O_WRONLY|O_CREAT); + fd = open(fname, O_WRONLY|O_CREAT, 0600); if (fd < 0) FAIL("open: %s", strerror(errno)); if (write(fd, meminfo_base, @@ -233,7 +233,7 @@ void setup_fake_data(long sizes[], int n_elem) FAIL("close: %s", strerror(errno)); sprintf(fname, "%s/meminfo-hugepages", fake_meminfo); - fd = open(fname, O_WRONLY|O_CREAT); + fd = open(fname, O_WRONLY|O_CREAT, 0600); if (fd < 0) FAIL("open: %s", strerror(errno)); if (write(fd, meminfo_base,