From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: Richard Palethorpe <rpalethorpe@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 3/3] libltpswap: TCONF on EPERM
Date: Sun, 10 Dec 2023 17:24:57 +0100 [thread overview]
Message-ID: <20231210162457.GB381401@pevik> (raw)
In-Reply-To: <ZXM-KwDvvNOpm64O@yuki>
Hi Cyril,
> Hi!
> > + if (fibmap == 1) {
> > + if (errno == EINVAL)
> > + tst_brk(TCONF, "Swapfile on %s not implemented", fstype);
> > + if (errno == EPERM)
> > + tst_brk(TCONF, "No permission for swapon() on %s", fstype);
> I'm not sure if we actually need to print the filesystem type in the
> case that we do not have a permission to do swapon.
> Also this kind of works because the fibmap ioctl() fails as well,
> however I guess that this should really be:
> if (errno == EPERM)
> tst_brk(TCONF, "Permission denied for swapon()");
> else if (fibmap == 1 && errno == EINVAL)
> tst_brk(TCONF, "Swapfile on %s not implemented", fstype);
> else
> tst_brk(TFAIL | TTERNO, ...);
Ah, that's actually better, thanks!
Tomorrow, I'll modify it and merge with your RBT.
Kind regards,
Petr
> > + } else {
> > tst_brk(TFAIL | TTERRNO, "swapon on %s failed", fstype);
> > + }
> > }
> > TEST(tst_syscall(__NR_swapoff, filename, 0));
> > --
> > 2.42.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-12-10 16:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 16:08 [LTP] [PATCH 0/3] Cleanup tst_ioctl.c, libswap.c Petr Vorel
2023-10-11 16:08 ` [LTP] [PATCH 1/3] tst_ioctl: Cleanup the code Petr Vorel
2023-12-08 15:48 ` Cyril Hrubis
2023-12-10 16:22 ` Petr Vorel
2023-10-11 16:08 ` [LTP] [PATCH 2/3] tst_fs.h: Improve tst_fibmap() doc Petr Vorel
2024-01-19 11:20 ` Cyril Hrubis
2024-01-19 13:15 ` Petr Vorel
2023-10-11 16:08 ` [LTP] [PATCH 3/3] libltpswap: TCONF on EPERM Petr Vorel
2023-12-08 16:02 ` Cyril Hrubis
2023-12-10 16:24 ` Petr Vorel [this message]
2023-12-11 5:28 ` Petr Vorel
2023-10-11 16:18 ` [LTP] [PATCH 0/3] Cleanup tst_ioctl.c, libswap.c Marius Kittler
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=20231210162457.GB381401@pevik \
--to=pvorel@suse.cz \
--cc=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=rpalethorpe@suse.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 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.