From: Cyril Hrubis <chrubis@suse.cz>
To: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Cc: vasily.isaenko@oracle.com, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH 2/5] acl_test01: Verify the exit code of the second test case
Date: Tue, 9 Jun 2015 14:03:50 +0200 [thread overview]
Message-ID: <20150609120350.GA26692@rei.suse.de> (raw)
In-Reply-To: <5576D3E3.5020600@oracle.com>
Hi!
> > We should probably wrap the su into a script that makes sure that the
> > return value is compatible with LTP. Because it may set bogus test
> > return status if su reported anything else than 0 or 1.
>
> Ehm, but -c "$0" will execute the same script which, in turn, will exit
> using tst_exit.
Yep, but the su man page specifies return values:
128 + signal_nr - command terminated by signal
127 - command cannot be executed (this one is actually handled in test.sh)
126 - command not found
255 - su was asked to terminate and had to kill the program
And if none of the abowe happens it retuns the return value from the
script.
So if the script gets killed by signal of failed to executed (or cannot
be found in $PATH) the return value will be wrong.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2015-06-09 12:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 9:49 [LTP] [PATCH 1/5] acl_test01: Fixes Stanislav Kholmanskikh
2015-06-09 9:49 ` [LTP] [PATCH 2/5] acl_test01: Verify the exit code of the second test case Stanislav Kholmanskikh
2015-06-09 9:49 ` [LTP] [PATCH 3/5] acl_test01: Hide unnecessary output Stanislav Kholmanskikh
2015-06-09 9:49 ` [LTP] [PATCH 4/5] tools/apicmd: Add tst_fs_type Stanislav Kholmanskikh
2015-06-09 9:49 ` [LTP] [RFC PATCH 5/5] acl_test01: Wait until the loop device is detached Stanislav Kholmanskikh
2015-06-09 10:10 ` Cyril Hrubis
2015-06-09 10:11 ` Cyril Hrubis
[not found] ` <5576D352.4040004@oracle.com>
2015-06-09 12:50 ` Cyril Hrubis
2015-06-09 10:01 ` [LTP] [PATCH 4/5] tools/apicmd: Add tst_fs_type Cyril Hrubis
2015-06-09 10:04 ` [LTP] [PATCH 3/5] acl_test01: Hide unnecessary output Cyril Hrubis
2015-06-09 10:54 ` [LTP] [PATCH 2/5] acl_test01: Verify the exit code of the second test case Cyril Hrubis
[not found] ` <5576D3E3.5020600@oracle.com>
2015-06-09 12:03 ` Cyril Hrubis [this message]
2015-06-09 10:00 ` [LTP] [PATCH 1/5] acl_test01: Fixes Cyril Hrubis
[not found] ` <5576BB8A.2030809@oracle.com>
2015-06-09 10:17 ` 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=20150609120350.GA26692@rei.suse.de \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=stanislav.kholmanskikh@oracle.com \
--cc=vasily.isaenko@oracle.com \
/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