All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 00/26] subject: fs: fat: extend FAT write operations
@ 2018-09-11  6:58 Akashi, Takahiro
  2018-09-11  6:58 ` [U-Boot] [PATCH v3 01/26] fs: fat: guard the content of include/fat.h Akashi, Takahiro
                   ` (24 more replies)
  0 siblings, 25 replies; 51+ messages in thread
From: Akashi, Takahiro @ 2018-09-11  6:58 UTC (permalink / raw)
  To: u-boot

This patch series[1] is an attempt to address FAT write related issues
in an effort of running UEFI SCT (Self-Certification Test) to verify
UEFI support on u-boot.

SCT is a test platform as well as an extensive collection of test
cases for UEFI specification. It can run all the tests automatically
and save test results to dedicated log files.

AFAIK, what's missing in the current fat file system to safely run
SCT without errors (I don't mean test case failures) are:
* write a file located under sub-directories
* write a file with non-zero offset
* delete a file
* create a directory

What's more, this series contains a file system test; "basic" test
is directly derived from test/test-fs.sh. The others, "ext" and "mkdir,"
are solely for newly added functionality in this patch series.

Patch#1 to patch#7 are some sort of preparatory ones.
Patch#8 implements write with sub-directories path.
Patch#9 to patch#11 implement write with non-zero offset.
Patch#12 to patch#16 are related to creating a directory.
Patch#17 to patch#20 allows for deleting a file or directory.
Patch#21 fixes a minor bug in fs-test.sh.
Patch#22 updates a test result summary.
Patch#23 to patch#26 add a file system test in U-boot pytest suite.

I applied this patch series on top of v2018.09-rc along with a couple
of yet-to--be-upstreamed UEFI-related patches, and could successfully
run unmodified SCT[2] on qemu-arm(arm64).

=== future TODO list ===
1. set creation (,access and modification) time
2. debug() vs. printf()
3. open()'s parameter checks
4. precisely detect and prevent write() beyond out-of-space
5. create an unique short name from a long file name
6. fat32's fsInfo support

Without (5) or (6), fsck may issue warnings.

[1] https://git.linaro.org/people/takahiro.akashi/u-boot.git fat_write
[2] http://uefi.org/testtools

Changes in v3 (Sep 11, 2018)
* remove v2's patch#4 which tries to make iterator symbols global
* add unlink operation along with a pytest script
* use guestmount, if available, for non-root user
* remove all the filesystem images created in tests

Changes in v2 (Sep 4, 2018)
* guard the whole content of fat.h with CONFIG_FS_FAT against a compiler
  warning
* determine total_sect in struct fsdata correctly, depending on fat type
  (12/16 or 32)
* explicitly revert "fs: fat: cannot write to subdirectories"
* add test scripts with pytest, mostly the same as RFC, but
  removing "sudo" for ext4 case

AKASHI Takahiro (25):
  fs: fat: guard the content of include/fat.h
  fs: fat: extend get_fs_info() for write use
  fs: fat: handle "." and ".." of root dir correctly with
    fat_itr_resolve()
  fs: fat: assure iterator's ->dent belongs to ->clust
  Revert "fs: fat: cannot write to subdirectories"
  fs: fat: check and normalize file name
  fs: fat: write returns error code instead of -1
  fs: fat: support write with sub-directory path
  fs: fat: refactor write interface for a file offset
  fs: fat: support write with non-zero offset
  cmd: fat: add offset parameter to fatwrite
  fs: add mkdir interface
  fs: fat: remember the starting cluster number of directory
  fs: fat: support mkdir
  cmd: fat: add fatmkdir command
  efi_loader: file: support creating a directory
  fs: add unlink interface
  fs: fat: support unlink
  cmd: fat: add fatrm command
  efi_loader: implement a file delete
  fs-test: fix false positive error at Test Case 12
  fs-test: update the test result as of v2018.09
  test/py: convert fs-test.sh to pytest
  test/py: fs: add extended write operation test
  test/py: fs: add fstest/mkdir test

Akashi, Takahiro (1):
  test/py: fs: add fstest/unlink test

 cmd/fat.c                            |   34 +-
 fs/fat/fat.c                         |   65 +-
 fs/fat/fat_write.c                   | 1183 +++++++++++++++++---------
 fs/fs.c                              |   87 ++
 include/fat.h                        |    7 +
 include/fs.h                         |   22 +
 lib/efi_loader/efi_file.c            |   28 +-
 test/fs/fs-test.sh                   |   24 +-
 test/py/tests/test_fs/conftest.py    |  392 +++++++++
 test/py/tests/test_fs/fstest_defs.py |   13 +
 test/py/tests/test_fs/test_basic.py  |  287 +++++++
 test/py/tests/test_fs/test_ext.py    |  224 +++++
 test/py/tests/test_fs/test_mkdir.py  |  112 +++
 test/py/tests/test_fs/test_unlink.py |  109 +++
 14 files changed, 2136 insertions(+), 451 deletions(-)
 create mode 100644 test/py/tests/test_fs/conftest.py
 create mode 100644 test/py/tests/test_fs/fstest_defs.py
 create mode 100644 test/py/tests/test_fs/test_basic.py
 create mode 100644 test/py/tests/test_fs/test_ext.py
 create mode 100644 test/py/tests/test_fs/test_mkdir.py
 create mode 100644 test/py/tests/test_fs/test_unlink.py

-- 
2.18.0

^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2019-03-22  9:13 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11  6:58 [U-Boot] [PATCH v3 00/26] subject: fs: fat: extend FAT write operations Akashi, Takahiro
2018-09-11  6:58 ` [U-Boot] [PATCH v3 01/26] fs: fat: guard the content of include/fat.h Akashi, Takahiro
2018-09-11 10:12   ` Alexander Graf
2018-09-12  0:53     ` Akashi, Takahiro
2018-09-12  5:41       ` Alexander Graf
2018-09-12  6:55   ` [U-Boot] [PATCH v3.1 " Akashi, Takahiro
2018-09-23 14:42     ` Alexander Graf
2018-09-25  4:54       ` Akashi, Takahiro
2018-09-11  6:58 ` [U-Boot] [PATCH v3 02/26] fs: fat: extend get_fs_info() for write use Akashi, Takahiro
2018-09-11  6:58 ` [U-Boot] [PATCH v3 03/26] fs: fat: handle "." and ".." of root dir correctly with fat_itr_resolve() Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 04/26] fs: fat: assure iterator's ->dent belongs to ->clust Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 05/26] Revert "fs: fat: cannot write to subdirectories" Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 06/26] fs: fat: check and normalize file name Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 07/26] fs: fat: write returns error code instead of -1 Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 08/26] fs: fat: support write with sub-directory path Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 09/26] fs: fat: refactor write interface for a file offset Akashi, Takahiro
2019-03-12  8:41   ` [U-Boot] [BUG] cb8af8af5ba0 "fs: fat: support write with non-zero offset" fatwrite followed by fatload and then cmp fails Faiz Abbas
2019-03-13 17:11     ` Rizvi, Mohammad Faiz Abbas
2019-03-13 17:25       ` Tom Rini
2019-03-18  1:42     ` Akashi, Takahiro
2019-03-18  1:44       ` Tom Rini
2019-03-18  1:57         ` Akashi, Takahiro
2019-03-18  1:59           ` Tom Rini
2019-03-21  6:50             ` Faiz Abbas
2019-03-22  9:13               ` Faiz Abbas
2018-09-11  6:59 ` [U-Boot] [PATCH v3 10/26] fs: fat: support write with non-zero offset Akashi, Takahiro
2018-09-11 11:09   ` Alexander Graf
2018-09-12  2:14     ` Akashi, Takahiro
2018-09-12  5:42       ` Alexander Graf
2018-10-15 11:42   ` Jean-Jacques Hiblot
2018-10-31 10:00     ` Clément Péron
2018-10-31 12:22       ` Alexander Graf
2018-10-31 20:54         ` Heinrich Schuchardt
2018-11-01  5:11           ` AKASHI Takahiro
2018-11-05 16:44             ` Clément Péron
2019-02-25 18:20   ` [U-Boot] [BUG] cb8af8af5ba0 "fs: fat: support write with non-zero offset" leads to link error Heinrich Schuchardt
2018-09-11  6:59 ` [U-Boot] [PATCH v3 11/26] cmd: fat: add offset parameter to fatwrite Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 12/26] fs: add mkdir interface Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 13/26] fs: fat: remember the starting cluster number of directory Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 14/26] fs: fat: support mkdir Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 15/26] cmd: fat: add fatmkdir command Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 16/26] efi_loader: file: support creating a directory Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 17/26] fs: add unlink interface Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 18/26] fs: fat: support unlink Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 19/26] cmd: fat: add fatrm command Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 20/26] efi_loader: implement a file delete Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 21/26] fs-test: fix false positive error at Test Case 12 Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 22/26] fs-test: update the test result as of v2018.09 Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 23/26] test/py: convert fs-test.sh to pytest Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 24/26] test/py: fs: add extended write operation test Akashi, Takahiro
2018-09-11  6:59 ` [U-Boot] [PATCH v3 25/26] test/py: fs: add fstest/mkdir test Akashi, Takahiro

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.