Branch: refs/heads/staging Home: https://github.com/qemu/qemu Commit: 9472a68965433dde3d30184863fbaf0b66776d4a https://github.com/qemu/qemu/commit/9472a68965433dde3d30184863fbaf0b66776d4a Author: Christian Schoenebeck <qemu_...@crudebyte.com> Date: 2022-06-16 (Thu, 16 Jun 2022)
Changed paths: M tests/qtest/virtio-9p-test.c Log Message: ----------- tests/9pfs: walk to non-existent dir Expect ENOENT Rlerror response when trying to walk to a non-existent directory. Signed-off-by: Christian Schoenebeck <qemu_...@crudebyte.com> Reviewed-by: Greg Kurz <gr...@kaod.org> Based-on: <e1ntpyu-0000yr...@lizzy.crudebyte.com> Message-Id: <1f5aa50ace3ba3861ea31e8888367518282065a6.1647339025.git.qemu_...@crudebyte.com> Commit: c1668948e8b74cd8f912054ba4412a1cbf0cd03c https://github.com/qemu/qemu/commit/c1668948e8b74cd8f912054ba4412a1cbf0cd03c Author: Christian Schoenebeck <qemu_...@crudebyte.com> Date: 2022-06-16 (Thu, 16 Jun 2022) Changed paths: M tests/qtest/virtio-9p-test.c Log Message: ----------- tests/9pfs: Twalk with nwname=0 Send Twalk request with nwname=0. In this case no QIDs should be returned by 9p server; this is equivalent to walking to dot. Signed-off-by: Christian Schoenebeck <qemu_...@crudebyte.com> Reviewed-by: Greg Kurz <gr...@kaod.org> Message-Id: <b5ead2775000203607801f09bcefc04c493d8bfa.1647339025.git.qemu_...@crudebyte.com> Commit: a6821b828404abdc18a0d9e21275ad1d7fd6ed05 https://github.com/qemu/qemu/commit/a6821b828404abdc18a0d9e21275ad1d7fd6ed05 Author: Christian Schoenebeck <qemu_...@crudebyte.com> Date: 2022-06-16 (Thu, 16 Jun 2022) Changed paths: M tests/qtest/virtio-9p-test.c Log Message: ----------- tests/9pfs: compare QIDs in fs_walk_none() test Extend previously added fs_walk_none() test by comparing the QID of the root fid with the QID of the cloned fid. They should be equal. Signed-off-by: Christian Schoenebeck <qemu_...@crudebyte.com> Reviewed-by: Greg Kurz <gr...@kaod.org> Message-Id: <5bbe9c6931b4600a9a23742f5ff2d38c1188237d.1647339025.git.qemu_...@crudebyte.com> Commit: fd6c979e651a2163062b746e01adf6f267c8e874 https://github.com/qemu/qemu/commit/fd6c979e651a2163062b746e01adf6f267c8e874 Author: Christian Schoenebeck <qemu_...@crudebyte.com> Date: 2022-06-16 (Thu, 16 Jun 2022) Changed paths: M hw/9pfs/9p.c Log Message: ----------- 9pfs: refactor 'name_idx' -> 'nwalked' in v9fs_walk() The local variable 'name_idx' is used in two loops in function v9fs_walk(). Let the first loop use its own variable 'nwalked' instead, which we will use in subsequent patch as the number of (requested) path components successfully walked by background I/O thread. Signed-off-by: Christian Schoenebeck <qemu_...@crudebyte.com> Reviewed-by: Greg Kurz <gr...@kaod.org> Message-Id: <d506308e7e343023c4db95d0e6053dd2627ed3c1.1647339025.git.qemu_...@crudebyte.com> Commit: a93d2e89e59e67ac5796679fdcef9467e6b2cc55 https://github.com/qemu/qemu/commit/a93d2e89e59e67ac5796679fdcef9467e6b2cc55 Author: Christian Schoenebeck <qemu_...@crudebyte.com> Date: 2022-06-16 (Thu, 16 Jun 2022) Changed paths: M hw/9pfs/9p.c Log Message: ----------- 9pfs: fix 'Twalk' to only send error if no component walked Current implementation of 'Twalk' request handling always sends an 'Rerror' response if any error occured. The 9p2000 protocol spec says though: " If the first element cannot be walked for any reason, Rerror is returned. Otherwise, the walk will return an Rwalk message containing nwqid qids corresponding, in order, to the files that are visited by the nwqid successful elementwise walks; nwqid is therefore either nwname or the index of the first elementwise walk that failed. " http://ericvh.github.io/9p-rfc/rfc9p2000.html#anchor33 For that reason we are no longer leaving from an error path in function v9fs_walk(), unless really no path component could be walked successfully or if the request has been interrupted. Local variable 'nwalked' counts and reflects the number of path components successfully processed by background I/O thread, whereas local variable 'name_idx' subsequently counts and reflects the number of path components eventually accepted successfully by 9p server controller portion. New local variable 'any_err' is an aggregate variable reflecting whether any error occurred at all, while already existing variable 'err' only reflects the last error. Despite QIDs being delivered to client in a more relaxed way now, it is important to note though that fid still must remain unaffected if any error occurred. Signed-off-by: Christian Schoenebeck <qemu_...@crudebyte.com> Reviewed-by: Greg Kurz <gr...@kaod.org> Message-Id: <bc73e24258a75dc29458024c7936c8a036c3eac5.1647339025.git.qemu_...@crudebyte.com> Commit: 15fbff488a908af01210071ffad70f9254d077fc https://github.com/qemu/qemu/commit/15fbff488a908af01210071ffad70f9254d077fc Author: Christian Schoenebeck <qemu_...@crudebyte.com> Date: 2022-06-16 (Thu, 16 Jun 2022) Changed paths: M tests/qtest/virtio-9p-test.c Log Message: ----------- tests/9pfs: guard recent 'Twalk' behaviour fix Previous 9p patch fixed 'Twalk' request handling, which was previously not behaving as specified by the 9p2000 protocol spec. This patch adds a new test case which guards the new 'Twalk' behaviour in question. More specifically: it sends a 'Twalk' request where the 1st path component is valid, whereas the 2nd path component transmitted to server does not exist. The expected behaviour is that 9p server would respond by sending a 'Rwalk' response with exactly 1 QID (instead of 'Rlerror' response). Signed-off-by: Christian Schoenebeck <qemu_...@crudebyte.com> Reviewed-by: Greg Kurz <gr...@kaod.org> Message-Id: <61bde2f44b87e24b70ec098dfb81765665b2dfcb.1647339025.git.qemu_...@crudebyte.com> Commit: 0e43495d3b4a50fc5e22f7b71261fdd5b56fdfcb https://github.com/qemu/qemu/commit/0e43495d3b4a50fc5e22f7b71261fdd5b56fdfcb Author: Christian Schoenebeck <qemu_...@crudebyte.com> Date: 2022-06-16 (Thu, 16 Jun 2022) Changed paths: M tests/qtest/virtio-9p-test.c Log Message: ----------- tests/9pfs: check fid being unaffected in fs_walk_2nd_nonexistent Extend previously added test case by checking that fid was unaffected by 'Twalk' request (i.e. when 2nd path component of request being invalid). Do that by subsequently sending a 'Tgetattr' request with the fid previously used for 'Twalk'; that 'Tgetattr' request should return an 'Rlerror' response by 9p server with error code ENOENT as that fid is basically invalid. And as we are at it, also check that the QID returned by 'Twalk' is not identical to the root node's QID. Signed-off-by: Christian Schoenebeck <qemu_...@crudebyte.com> Reviewed-by: Greg Kurz <gr...@kaod.org> Message-Id: <6f0813cafdbf683cdac8b1492dd4ef8699c5b1d9.1647339025.git.qemu_...@crudebyte.com> Commit: 213fda642dd5c2c132ebb7898d96e2991d0bd891 https://github.com/qemu/qemu/commit/213fda642dd5c2c132ebb7898d96e2991d0bd891 Author: Richard Henderson <richard.hender...@linaro.org> Date: 2022-06-16 (Thu, 16 Jun 2022) Changed paths: M hw/9pfs/9p.c M tests/qtest/virtio-9p-test.c Log Message: ----------- Merge tag 'pull-9p-20220616' of https://github.com/cschoenebeck/qemu into staging 9pfs: fix 'Twalk' protocol violation Actual fix is patch 5, whereas patch 4 being preparatory, all other patches are test cases to guard this Twalk issue. # -----BEGIN PGP SIGNATURE----- # # iQJLBAABCgA1FiEEltjREM96+AhPiFkBNMK1h2Wkc5UFAmKrDSAXHHFlbXVfb3Nz # QGNydWRlYnl0ZS5jb20ACgkQNMK1h2Wkc5VgoQ//bA/lXYa6hds4f73+opq7iiJ/ # 88gnJO8uPctNWXJ5f6ufXcTFtC99QRcl97jgSQhSIUdaZCfcpg7Pq3fONc060cMt # MNxi5Da31Fq7xz4UhSQHgWlgAfomfClYoBSOtrrxjVbXChA2rB7FXhD9aewimUtt # TlolXdJuPbGR3F6H0glN1itij12Ay5c0DMqFPy5npYlzjNhxmPb8QgFZ8E+lxhcT # hG+OMmS9O5Mk7WKYWC1Iij7tWm45RbThPEUsfCPt6jIJYQqheOQs0ohJG9wyCZu3 # JUCgSBPG1nNY0hgBJ/X7un7e89BoRw8edwqP+sSigfDf+LquUggqRFgz+joTbfvj # Prq+1NTDIckDRZF6CDUSkZE3+Gq3qlIhw/2vS+bjYZrk04lP4x8d9JYPSkT3i8xc # +YT/apDUkT68FjJ6PudfS2j6xRtYt86nOuWuhYukTZ2z5FJ0c9XAJlJX2ZS9Az3n # AqKFCT+8UE4VYKnAJ61xDdqvAdEmKJUi5YutfuwH+j6sS4peLX0gg8mGlNi7y8JK # bsqNjE1ve8rkp24DuUoHmivs/m1ogJi9Jxp5IjB4d26MPhgojrxOpaYUVg98QS7d # os2ES47CSn4KFxqsFMZnZpgzKxIvRQ4C9bBbSClDOffHWHRJub6PCw5F9eCTH4dO # z/QPJ+smDY7bolF+gSg= # =3ejn # -----END PGP SIGNATURE----- # gpg: Signature made Thu 16 Jun 2022 03:59:44 AM PDT # gpg: using RSA key 96D8D110CF7AF8084F88590134C2B58765A47395 # gpg: issuer "qemu_...@crudebyte.com" # gpg: Good signature from "Christian Schoenebeck <qemu_...@crudebyte.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: ECAB 1A45 4014 1413 BA38 4926 30DB 47C3 A012 D5F4 # Subkey fingerprint: 96D8 D110 CF7A F808 4F88 5901 34C2 B587 65A4 7395 * tag 'pull-9p-20220616' of https://github.com/cschoenebeck/qemu: tests/9pfs: check fid being unaffected in fs_walk_2nd_nonexistent tests/9pfs: guard recent 'Twalk' behaviour fix 9pfs: fix 'Twalk' to only send error if no component walked 9pfs: refactor 'name_idx' -> 'nwalked' in v9fs_walk() tests/9pfs: compare QIDs in fs_walk_none() test tests/9pfs: Twalk with nwname=0 tests/9pfs: walk to non-existent dir Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Compare: https://github.com/qemu/qemu/compare/def6fd6c9ce9...213fda642dd5