public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] syscalls/open01: Cleanup && convert to new library
Date: Tue, 13 Jun 2017 13:43:39 +0200	[thread overview]
Message-ID: <20170613114339.GD29757@rei.lan> (raw)
In-Reply-To: <1497005761-1215-1-git-send-email-fenggw-fnst@cn.fujitsu.com>

Hi!
> +static struct tcase {
> +	char *filename;
> +	int flag;
> +	mode_t mode;
> +	unsigned short tst_bit;
> +	char *desc;
> +} tcases[] = {
> +	{TEST_FILE, O_RDWR | O_CREAT, 01444, S_ISVTX, "Sticky bit"},
> +	{TEST_DIR, O_DIRECTORY, NULL, S_IFDIR, "Directory bit"}
                                  ^
				  This should be just 0 or 00 but not
				  NULL.

Also it would be a bit safer if we opened a directory created in a the
test temporary directory instead of "/tmp". We just have to do
SAFE_MKDIR() in setup() and use it's name as a relative path.

-- 
Cyril Hrubis
chrubis@suse.cz

  parent reply	other threads:[~2017-06-13 11:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-09 10:56 [LTP] [PATCH 1/2] syscalls/open01: Cleanup && convert to new library Guangwen Feng
2017-06-09 10:56 ` [LTP] [PATCH 2/2] syscalls/open02: " Guangwen Feng
2017-06-13 12:25   ` Cyril Hrubis
2017-06-13 11:43 ` Cyril Hrubis [this message]
2017-06-14  3:27   ` [LTP] [PATCH v2] syscalls/open01: " Guangwen Feng
2017-06-14 13:22     ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170613114339.GD29757@rei.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox