From: Cyril Hrubis <chrubis@suse.cz>
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] save_restore: Check whether path is writable
Date: Wed, 26 Oct 2022 15:10:25 +0200 [thread overview]
Message-ID: <Y1kxwfYPNZ/g5MEl@yuki> (raw)
In-Reply-To: <CAASaF6xHrcko8Wcq_UAaLY9hscYZAGrSSJe=P07HYoOFXaoTyw@mail.gmail.com>
Hi!
> The case 2) looks like it could apply to non-optional paths too. So maybe
> best option would be to drop "!" and "?" prefixes and turn them into flags/enums
> which can be then combined together.
>
> "/proc/sys/kernel/pid_max", 0, val // TCONF if path doesn't exist
> "/proc/sys/kernel/pid_max", SR_MUST_EXIST, val // TBROK if path doesn't exist
> "/proc/sys/kernel/pid_max", SR_MAY_EXIST, val // if exists, save it
> "/proc/sys/kernel/pid_max", SR_CONST_VAL, val // if already has val,
> skip saving it
> "/proc/sys/kernel/pid_max", SR_MAY_EXIST | SR_CONST_VAL, val // if
> exists check it already has val, otherwise save it
>
> What do you think? Would that make it easier to represent/implement all cases?
Ah Jan already proposed something similar to what I had in mind. I agree
with moving the attributes from the path to a separate field too.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-10-26 13:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 15:57 [LTP] [PATCH] save_restore: Check whether path is writable Martin Doucha
2022-10-21 20:34 ` Petr Vorel
2022-10-24 7:16 ` Jan Stancek
2022-10-25 16:13 ` Martin Doucha
2022-10-26 11:29 ` Jan Stancek
2022-10-26 13:10 ` Cyril Hrubis [this message]
2022-10-26 13:27 ` Martin Doucha
2022-10-26 13:08 ` Cyril Hrubis
2022-10-26 20:49 ` Petr Vorel
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=Y1kxwfYPNZ/g5MEl@yuki \
--to=chrubis@suse.cz \
--cc=jstancek@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox