All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: Avinesh Kumar <akumar@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] setfsuid02: Rewrite using new LTP API
Date: Tue, 25 Oct 2022 08:59:36 +0100	[thread overview]
Message-ID: <87bkq0xqas.fsf@suse.de> (raw)
In-Reply-To: <20221019071706.25416-1-akumar@suse.de>

hello,

Avinesh Kumar <akumar@suse.de> writes:

> Rewrite using new API and add setfsuid(-1) call to verify that preceding
> setfsuid() call with an invalid fsuid had failed.

Merged with a couple of changes.

> +	TST_EXP_VAL_SILENT(setfsuid(invalid_uid), current_uid);

Need to use the SETFSUID macro for 16-bit (as pvorel said).

> +	TST_EXP_VAL(setfsuid(-1), current_uid,
> +				"setfsuid(invalid_fsuid) test for
> expected failure:");

Substituted invalid_uid for -1 because -1 (UINT_MAX or USHORT_MAX) could
be a valid UID AFAICT.

>  }
>  
> -static void setup(void)
> -{
> -	tst_sig(NOFORK, DEF_HANDLER, cleanup);
> -
> -	TEST_PAUSE;
> -}
> -
> -static void cleanup(void)
> -{
> -}
> +static struct tst_test test = {
> +	.test_all = run
> +};
> -- 
> 2.37.3


-- 
Thank you,
Richard.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-10-25  8:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19  7:17 [LTP] [PATCH] setfsuid02: Rewrite using new LTP API Avinesh Kumar
2022-10-25  7:59 ` Richard Palethorpe [this message]
2022-10-27  7:47   ` Avinesh Kumar

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=87bkq0xqas.fsf@suse.de \
    --to=rpalethorpe@suse.de \
    --cc=akumar@suse.de \
    --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.