All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: LTP List <ltp@lists.linux.it>
Subject: Re: [LTP] [Question] Why test C API failed in github CI
Date: Tue, 21 Dec 2021 14:03:43 +0100	[thread overview]
Message-ID: <YcHQr22KuWECB1aa@yuki> (raw)
In-Reply-To: <CAEemH2eZDBODpZwjcCq=M=wT0uiSUSM+iS88F7-OQP-pkYRn=A@mail.gmail.com>

Hi!
> Firstly, I'm sorry to push the patchset about oom protection cursorily.

No problem.

> The GitHub CI complained about the following failures, I feel confused
> when I add a bit of debug code in my private branch then. It gets passed
> in access(score_path, R_OK|W_OK) but failed in closing the file and
> give no EACCESS errno, that's wired.
> 
> Did I miss anything?
> 
> https://github.com/wangli5665/ltp/runs/4594473907?check_suite_focus=true

It does fail the same for me locally when I run the test05 under an
unpriviledged user. I guess that the error when we write negative number
to the file actually manifests when we attempt to close the file because
we use the FILE interface in safe_file_printf(). That way the actuall
write is buffered and deffered until the fclose() call.

So it looks like writing negative value to the file does return with
error for an unprivileged user.

I was looking at file_printf() as a potential solution, but that one
does produce warnings. But it looks like we do not actually use the
file_printf() function anywhere in the code so we may as well change it
so that it just returns if the operation was successful or not and make
it silent so that it does not produce any messages at all.

-- 
Cyril Hrubis
chrubis@suse.cz

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

  parent reply	other threads:[~2021-12-21 13:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21 12:35 [LTP] [Question] Why test C API failed in github CI Li Wang
2021-12-21 12:59 ` Petr Vorel
2021-12-21 13:03 ` Cyril Hrubis [this message]
2021-12-22  6:35   ` Li Wang

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=YcHQr22KuWECB1aa@yuki \
    --to=chrubis@suse.cz \
    --cc=liwang@redhat.com \
    --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.