All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/4] syscalls/sync01: Remove it
Date: Sat, 7 Nov 2020 17:55:18 +0100	[thread overview]
Message-ID: <20201107165518.GB10159@pevik> (raw)
In-Reply-To: <f99d3484-f86d-dd8a-e64e-7d9d94533de4@163.com>

Hi,

> On 11/7/20 12:47 AM, Cyril Hrubis wrote:
> > Hi!
> > > I have a doubt after reading Xu's patch[1] and Martin's patch[2]:

> > > 1) Xu removed sync01 because sync() always return 0.
> > Actually sync() is defined as void function, so the tests were bogusly
> > checking the TST_RET value which haven't been set at all.

> Hi Cyril,

> Oops, I gave a wrong example. :-(

> On error, I just wonder if we need to check all return value(i.e. negative
> value except -1).

> IOW, Is it possible for syscall to get a error value which is not -1?
There are probably other examples, but I've found only these:

man malloc_get_state(3)

	If the implementation detects that state does not point to a correctly
	formed data structure, malloc_set_state() returns -1.
	If the implementation detects that the version of the data structure
	referred to by state is a more recent version than this implementation knows
	about, malloc_set_state() returns -2.

man mmap(2)
	On error, the value MAP_FAILED (that is, (void *) -1) is returned.

> Best Regards,

> Xiao Yang


Kind regards,
Petr

  parent reply	other threads:[~2020-11-07 16:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26  5:48 [LTP] [PATCH 1/4] syscalls/sync01: Remove it Yang Xu
2020-10-26  5:48 ` [LTP] [PATCH 2/4] syscalls/sync02: " Yang Xu
2020-10-26  5:48 ` [LTP] [PATCH 3/4] syscalls/sync03: Remove useless judgement Yang Xu
2020-10-26  5:48 ` [LTP] [PATCH 4/4] syscalls/sync: Rename sync03.c to sync01.c Yang Xu
2020-11-04  3:06 ` [LTP] [PATCH 1/4] syscalls/sync01: Remove it Yang Xu
2020-11-06 12:36   ` Cyril Hrubis
2020-11-06 16:14     ` Xiao Yang
2020-11-06 16:47       ` Cyril Hrubis
2020-11-06 23:46         ` Xiao Yang
2020-11-07  0:53           ` Yang Xu
2020-11-07 16:55           ` Petr Vorel [this message]
2020-11-09  3:56             ` Xiao Yang
2020-11-09  6:37               ` Petr Vorel
2020-11-09 12:42               ` Cyril Hrubis
2020-11-09 18:15                 ` Radoslav Kolev
2020-11-11 18:25                   ` Petr Vorel
2020-11-12 10:43                     ` 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=20201107165518.GB10159@pevik \
    --to=pvorel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.