All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: qemu-devel@nongnu.org
Cc: Greg Kurz <groug@kaod.org>
Subject: Re: [PATCH 7/8] tests/9pfs: add local Tlink test
Date: Tue, 20 Oct 2020 02:01:30 +0200	[thread overview]
Message-ID: <4187116.WyENfdrYhA@silver> (raw)
In-Reply-To: <ee6d9e1147d05bcf0b51b02ef6757f4b4691ba2d.1603149434.git.qemu_oss@crudebyte.com>

On Dienstag, 20. Oktober 2020 01:13:24 CEST Christian Schoenebeck wrote:
> This test case uses a Tlink request to create a hard link to a regular
> file using the 9pfs 'local' fs driver.
> 
> Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
> ---
>  tests/qtest/virtio-9p-test.c | 61 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 61 insertions(+)
> 
> diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c
> index f7d18f6274..447d8e3344 100644
> --- a/tests/qtest/virtio-9p-test.c
> +++ b/tests/qtest/virtio-9p-test.c
> @@ -260,6 +260,7 @@ static const char *rmessage_name(uint8_t id)
>          id == P9_RMKDIR ? "RMKDIR" :
>          id == P9_RLCREATE ? "RLCREATE" :
>          id == P9_RSYMLINK ? "RSYMLINK" :
> +        id == P9_RLINK ? "RLINK" :
>          id == P9_RUNLINKAT ? "RUNLINKAT" :
>          id == P9_RFLUSH ? "RFLUSH" :
>          id == P9_RREADDIR ? "READDIR" :
> @@ -742,6 +743,33 @@ static void v9fs_rsymlink(P9Req *req, v9fs_qid *qid)
>      v9fs_req_free(req);
>  }
> 
> +/* size[4] Tlink tag[2] dfid[4] fid[4] name[s] */
> +static P9Req *v9fs_tlink(QVirtio9P *v9p, uint32_t dfid, uint32_t fid,
> +                         const char *name, uint16_t tag)
> +{

This hard-link test was actually motived by an issue that I recently 
encountered on a machine: it fails to create any hard links with 9p. This 
particular test case succeeds though.

I think the problem is that recent libvirt versions enable qemu's sandbox 
feature by default which filters syscalls. Fact is, any linkat() call fails on 
that machine with EACCES now. I couldn't reproduce it on my development 
machine yet though. I guess it's a difference in white/black-list seccomp 
config or something. Not sure yet if there is some change required on 9p side 
or whether it's really just a seccomp config issue.

P.S. Noisy days from my side, but this is probably the last batch of patches 
from my side in a while, unless I really need to fix something for that hard 
link isssue. We'll see ...

Best regards,
Christian Schoenebeck




  reply	other threads:[~2020-10-20  0:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 23:17 [PATCH 0/8] 9pfs: more local tests Christian Schoenebeck
2020-10-19 23:13 ` [PATCH 2/8] tests/9pfs: add local unlinkat directory test Christian Schoenebeck
2020-10-19 23:13 ` [PATCH 1/8] tests/9pfs: simplify fs_mkdir() Christian Schoenebeck
2020-10-20 13:35   ` Greg Kurz
2020-10-20 13:43     ` Christian Schoenebeck
2020-10-20 13:59       ` Greg Kurz
2020-10-20 18:03       ` Greg Kurz
2020-10-20 18:26         ` Christian Schoenebeck
2020-10-19 23:13 ` [PATCH 8/8] tests/9pfs: add local unlinkat hard link test Christian Schoenebeck
2020-10-19 23:13 ` [PATCH 7/8] tests/9pfs: add local Tlink test Christian Schoenebeck
2020-10-20  0:01   ` Christian Schoenebeck [this message]
2020-10-19 23:13 ` [PATCH 3/8] tests/9pfs: add local Tlcreate test Christian Schoenebeck
2020-10-19 23:13 ` [PATCH 5/8] tests/9pfs: add local Tsymlink test Christian Schoenebeck
2020-10-19 23:13 ` [PATCH 4/8] tests/9pfs: add local unlinkat file test Christian Schoenebeck
2020-10-19 23:13 ` [PATCH 6/8] tests/9pfs: add local unlinkat symlink test Christian Schoenebeck

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=4187116.WyENfdrYhA@silver \
    --to=qemu_oss@crudebyte.com \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    /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.