Add a basic exfat test.
This commit is contained in:
parent
c5dd1673af
commit
d59c8d5f55
39
img/makefile
39
img/makefile
@ -8,7 +8,7 @@ TEMP_DIR:=$(shell mktemp -d)
|
||||
all: s05k s4k unicode v5 kolibri.img fat32_test0.img coverage
|
||||
rmdir $(TEMP_DIR)
|
||||
|
||||
s05k: xfs_v4_ftype0_s05k_b2k_n8k.img xfs_v4_ftype1_s05k_b2k_n8k.img xfs_v4_xattr.img xfs_v4_files_s05k_b4k_n8k.img xfs_v4_ftype0_s05k_b2k_n8k_xattr.img xfs_v4_btrees_l2.img xfs_short_dir_i8.img
|
||||
s05k: xfs_v4_ftype0_s05k_b2k_n8k.img xfs_v4_ftype1_s05k_b2k_n8k.img xfs_v4_xattr.img xfs_v4_files_s05k_b4k_n8k.img xfs_v4_ftype0_s05k_b2k_n8k_xattr.img xfs_v4_btrees_l2.img xfs_short_dir_i8.img exfat_s05k_c16k_b16k.img
|
||||
|
||||
s4k: xfs_v4_ftype0_s4k_b4k_n8k.img
|
||||
|
||||
@ -27,14 +27,14 @@ kolibri.img: ../default.skn
|
||||
jfs.img:
|
||||
fallocate -l 16MiB $@
|
||||
mkfs.jfs -q $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
parted --script $@ mktable gpt
|
||||
parted --script --align optimal $@ mkpart primary 1MiB 100%
|
||||
|
||||
xfs_borg_bit.img:
|
||||
fallocate -l 16MiB $@
|
||||
mkfs.xfs -n version=ci $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
parted --script $@ mktable gpt
|
||||
parted --script --align optimal $@ mkpart primary 1MiB 100%
|
||||
|
||||
@ -52,7 +52,7 @@ xfs_short_dir_i8.img:
|
||||
$(MKDIRRANGE) $(TEMP_DIR)/sf/d0000000002_xx 7 10 0 244
|
||||
#
|
||||
sudo umount $(TEMP_DIR)
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
parted --script $@ mktable gpt
|
||||
parted --script --align optimal $@ mkpart primary 1MiB 100%
|
||||
|
||||
@ -83,7 +83,7 @@ xfs_v4_ftype0_s05k_b2k_n8k.img:
|
||||
$(MKDIRRANGE) $(TEMP_DIR)/btree_leaf_free 0 1200 201 43
|
||||
#
|
||||
sudo umount $(TEMP_DIR)
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
parted --script $@ mktable gpt
|
||||
parted --script --align optimal $@ mkpart primary 1MiB 100%
|
||||
|
||||
@ -114,7 +114,7 @@ xfs_v4_ftype1_s05k_b2k_n8k.img:
|
||||
$(MKDIRRANGE) $(TEMP_DIR)/btree_leaf_free 0 1200 201 43
|
||||
#
|
||||
sudo umount $(TEMP_DIR)
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
parted --script $@ mktable gpt
|
||||
parted --script --align optimal $@ mkpart primary 1MiB 100%
|
||||
|
||||
@ -137,7 +137,7 @@ xfs_v4_xattr.img:
|
||||
$(MKDIRRANGE) $(TEMP_DIR)/btree 0 600 0 244
|
||||
#
|
||||
sudo umount $(TEMP_DIR)
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
parted --script $@ mktable gpt
|
||||
parted --script --align optimal $@ mkpart primary 1MiB 100%
|
||||
|
||||
@ -158,7 +158,7 @@ xfs_v4_btrees_l2.img:
|
||||
$(MKFILEPATTERN) $(TEMP_DIR)/file_btree_l2 0 16388096
|
||||
#
|
||||
sudo umount $(TEMP_DIR)
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
parted --script $@ mktable gpt
|
||||
parted --script --align optimal $@ mkpart primary 1MiB 100%
|
||||
|
||||
@ -193,7 +193,7 @@ xfs_v4_files_s05k_b4k_n8k.img:
|
||||
$(MKFILEPATTERN) $(TEMP_DIR)/4GiB_plus 0x4000 0x4000
|
||||
#
|
||||
sudo umount $(TEMP_DIR)
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
parted --script $@ mktable gpt
|
||||
parted --script --align optimal $@ mkpart primary 1MiB 100%
|
||||
|
||||
@ -224,7 +224,7 @@ xfs_v4_ftype0_s4k_b4k_n8k.img:
|
||||
$(MKDIRRANGE) $(TEMP_DIR)/btree_leaf_free 0 1200 201 43
|
||||
#
|
||||
sudo umount $(TEMP_DIR)
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
sudo losetup -b 4096 /dev/loop8 $@
|
||||
sudo parted --script /dev/loop8 mktable gpt
|
||||
sudo parted --script --align optimal /dev/loop8 mkpart primary 1MiB 100%
|
||||
@ -266,7 +266,7 @@ xfs_v4_ftype0_s05k_b2k_n8k_xattr.img:
|
||||
$(MKDIRRANGE) $(TEMP_DIR)/btree_leaf_free 0 1200 201 43
|
||||
#
|
||||
sudo umount $(TEMP_DIR)
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
parted --script $@ mktable gpt
|
||||
parted --script --align optimal $@ mkpart primary 1MiB 100%
|
||||
|
||||
@ -291,7 +291,7 @@ xfs_v4_unicode.img:
|
||||
echo привет❦💗мир > $(TEMP_DIR)/дир3/файл33
|
||||
#
|
||||
sudo umount $(TEMP_DIR)
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
parted --script $@ mktable gpt
|
||||
parted --script --align optimal $@ mkpart primary 1MiB 100%
|
||||
|
||||
@ -322,7 +322,7 @@ xfs_v5_ftype1_s05k_b2k_n8k.img:
|
||||
$(MKDIRRANGE) $(TEMP_DIR)/btree_leaf_free 0 1200 201 43
|
||||
#
|
||||
sudo umount $(TEMP_DIR)
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
parted --script $@ mktable gpt
|
||||
parted --script --align optimal $@ mkpart primary 1MiB 100%
|
||||
|
||||
@ -351,7 +351,7 @@ xfs_v5_files_s05k_b4k_n8k.img:
|
||||
$(MKFILEPATTERN) $(TEMP_DIR)/btree_l1_no_hole 0 8196096
|
||||
#
|
||||
sudo umount $(TEMP_DIR)
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
parted --script $@ mktable gpt
|
||||
parted --script --align optimal $@ mkpart primary 1MiB 100%
|
||||
|
||||
@ -365,4 +365,15 @@ fat32_test0.img:
|
||||
du -sh $(TEMP_DIR)
|
||||
sudo umount $(TEMP_DIR)
|
||||
|
||||
exfat_s05k_c16k_b16k.img:
|
||||
fallocate -l 64MiB $@
|
||||
mkfs.exfat -L KOLIBRIOS -c 16k -b 16k $@
|
||||
sudo mount -o codepage=866,iocharset=utf8,umask=111,dmask=000 $@ $(TEMP_DIR)
|
||||
mkdir $(TEMP_DIR)/dir_empty
|
||||
mkdir $(TEMP_DIR)/dir_one
|
||||
touch $(TEMP_DIR)/dir_one/file000
|
||||
sudo umount $(TEMP_DIR)
|
||||
fallocate -i -o 0 -l 1MiB $@
|
||||
parted --script $@ mktable msdos
|
||||
parted --script --align optimal $@ mkpart primary 1MiB 100%
|
||||
|
||||
|
2
shell.c
2
shell.c
@ -324,6 +324,8 @@ disk_list_partitions(disk_t *d) {
|
||||
fputs("ext\n", fout);
|
||||
} else if (d->partitions[i]->fs_user_functions == fat_user_functions) {
|
||||
fputs("fat\n", fout);
|
||||
} else if (d->partitions[i]->fs_user_functions == exfat_user_functions) {
|
||||
fputs("exfat\n", fout);
|
||||
} else if (d->partitions[i]->fs_user_functions == ntfs_user_functions) {
|
||||
fputs("ntfs\n", fout);
|
||||
} else {
|
||||
|
@ -34,7 +34,7 @@ font smoothing: 0 - off
|
||||
0x00586786 frame
|
||||
0x00fefefe grab
|
||||
0x00c5bdb9 work_3d_dark
|
||||
0x00ece9e5 work_3d_light
|
||||
0x00f2efec work_3d_light
|
||||
0x00333333 grab_text
|
||||
0x00ddd7cf work
|
||||
0x007887a6 work_button
|
||||
|
44
test/046_#f70_#f70s1_#fat_#exfat_#s05k_ls.ref.log
Normal file
44
test/046_#f70_#f70s1_#fat_#exfat_#s05k_ls.ref.log
Normal file
@ -0,0 +1,44 @@
|
||||
/> umka_init
|
||||
/> disk_add ../img/exfat_s05k_c16k_b16k.img hd0 -c 0
|
||||
/hd0/1: exfat
|
||||
|
||||
/> ls70 /hd0/1/dir_empty -f 0 -c 0
|
||||
/> ls70 /hd0/1/dir_empty -f 0 -c 1
|
||||
status = 0 success, count = 1
|
||||
----f ..
|
||||
/> ls70 /hd0/1/dir_empty -f 0 -c 2
|
||||
status = 6 end_of_file, count = 1
|
||||
----f ..
|
||||
/> ls70 /hd0/1/dir_empty -f 0 -c 0xffffffff
|
||||
status = 6 end_of_file, count = 1
|
||||
----f ..
|
||||
/> ls70 /hd0/1/dir_empty -f 1 -c 0
|
||||
/> ls70 /hd0/1/dir_empty -f 1 -c 1
|
||||
status = 6 end_of_file, count = 0
|
||||
/> ls70 /hd0/1/dir_empty -f 1 -c 2
|
||||
status = 6 end_of_file, count = 0
|
||||
/> ls70 /hd0/1/dir_empty -f 1 -c 0xffffffff
|
||||
status = 6 end_of_file, count = 0
|
||||
/> ls70 /hd0/1/dir_one -f 0 -c 0
|
||||
/> ls70 /hd0/1/dir_one -f 0 -c 1
|
||||
status = 0 success, count = 1
|
||||
----f ..
|
||||
/> ls70 /hd0/1/dir_one -f 0 -c 2
|
||||
status = 0 success, count = 2
|
||||
----f ..
|
||||
----- file000
|
||||
/> ls70 /hd0/1/dir_one -f 0 -c 0xffffffff
|
||||
status = 6 end_of_file, count = 2
|
||||
----f ..
|
||||
----- file000
|
||||
/> ls70 /hd0/1/dir_one -f 1 -c 0
|
||||
/> ls70 /hd0/1/dir_one -f 1 -c 1
|
||||
status = 0 success, count = 1
|
||||
----- file000
|
||||
/> ls70 /hd0/1/dir_one -f 1 -c 2
|
||||
status = 6 end_of_file, count = 1
|
||||
----- file000
|
||||
/> ls70 /hd0/1/dir_one -f 1 -c 0xffffffff
|
||||
status = 6 end_of_file, count = 1
|
||||
----- file000
|
||||
/> disk_del hd0
|
20
test/046_#f70_#f70s1_#fat_#exfat_#s05k_ls.t
Normal file
20
test/046_#f70_#f70s1_#fat_#exfat_#s05k_ls.t
Normal file
@ -0,0 +1,20 @@
|
||||
umka_init
|
||||
disk_add ../img/exfat_s05k_c16k_b16k.img hd0 -c 0
|
||||
|
||||
ls70 /hd0/1/dir_empty -f 0 -c 0
|
||||
ls70 /hd0/1/dir_empty -f 0 -c 1
|
||||
ls70 /hd0/1/dir_empty -f 0 -c 2
|
||||
ls70 /hd0/1/dir_empty -f 0 -c 0xffffffff
|
||||
ls70 /hd0/1/dir_empty -f 1 -c 0
|
||||
ls70 /hd0/1/dir_empty -f 1 -c 1
|
||||
ls70 /hd0/1/dir_empty -f 1 -c 2
|
||||
ls70 /hd0/1/dir_empty -f 1 -c 0xffffffff
|
||||
ls70 /hd0/1/dir_one -f 0 -c 0
|
||||
ls70 /hd0/1/dir_one -f 0 -c 1
|
||||
ls70 /hd0/1/dir_one -f 0 -c 2
|
||||
ls70 /hd0/1/dir_one -f 0 -c 0xffffffff
|
||||
ls70 /hd0/1/dir_one -f 1 -c 0
|
||||
ls70 /hd0/1/dir_one -f 1 -c 1
|
||||
ls70 /hd0/1/dir_one -f 1 -c 2
|
||||
ls70 /hd0/1/dir_one -f 1 -c 0xffffffff
|
||||
disk_del hd0
|
@ -9,6 +9,7 @@ UMKA_SHELL ?= sudo taskset 1 ../umka_shell -c
|
||||
endif
|
||||
|
||||
xfs_tests := $(addsuffix .out.log, $(basename $(wildcard *\#xfs_*.t)))
|
||||
exfat_tests := $(addsuffix .out.log, $(basename $(wildcard *\#exfat_*.t)))
|
||||
s05k_tests := $(addsuffix .out.log, $(basename $(wildcard *\#s05k_*.t)))
|
||||
s4k_tests := $(addsuffix .out.log, $(basename $(wildcard *\#s4k_*.t)))
|
||||
f30_tests := $(addsuffix .out.log, $(basename $(wildcard *\#f30_*.t)))
|
||||
@ -28,10 +29,11 @@ net_tests := $(addsuffix .out.log, $(basename $(wildcard *\#net_*.t)))
|
||||
arp_tests := $(addsuffix .out.log, $(basename $(wildcard *\#arp_*.t)))
|
||||
acpi_tests := $(addsuffix .out.log, $(basename $(wildcard *\#acpi_*.t)))
|
||||
|
||||
all: xfs s05k s4k f30 f70 f70s0 f70s1 f70s5 lookup bug xattr unicode v5 draw coverage i40 net arp acpi
|
||||
all: xfs exfat s05k s4k f30 f70 f70s0 f70s1 f70s5 lookup bug xattr unicode v5 draw coverage i40 net arp acpi
|
||||
@echo all tests passed
|
||||
|
||||
xfs: $(xfs_tests)
|
||||
exfat: $(exfat_tests)
|
||||
s05k: $(s05k_tests)
|
||||
s4k: $(s4k_tests)
|
||||
f30: $(f30_tests)
|
||||
|
7
umka.asm
7
umka.asm
@ -87,6 +87,7 @@ pubsym disk_media_changed, 8
|
||||
pubsym xfs._.user_functions, 'xfs_user_functions'
|
||||
pubsym ext_user_functions
|
||||
pubsym fat_user_functions
|
||||
pubsym exFAT_user_functions, 'exfat_user_functions'
|
||||
pubsym ntfs_user_functions
|
||||
|
||||
pubsym i40, no_mangle
|
||||
@ -852,10 +853,8 @@ macro format [x] {}
|
||||
|
||||
include 'kernel.asm'
|
||||
|
||||
purge org,mov
|
||||
restore add,org,mov
|
||||
purge sys_msg_board,delay_ms
|
||||
restore sys_msg_board,delay_ms
|
||||
purge org,sys_msg_board,delay_ms
|
||||
restore org,sys_msg_board,delay_ms
|
||||
|
||||
coverage_end:
|
||||
|
||||
|
1
umka.h
1
umka.h
@ -433,6 +433,7 @@ hash_oneshot(void *ctx, void *data, size_t len);
|
||||
extern uint8_t xfs_user_functions[];
|
||||
extern uint8_t ext_user_functions[];
|
||||
extern uint8_t fat_user_functions[];
|
||||
extern uint8_t exfat_user_functions[];
|
||||
extern uint8_t ntfs_user_functions[];
|
||||
|
||||
extern uint8_t kos_ramdisk[2880*512];
|
||||
|
Loading…
Reference in New Issue
Block a user