@@ -2170,7 +2170,7 @@ code = '''
21702170 "espresso/latte") => LFS3_ERR_INVAL;
21712171 lfs3_rename(&lfs3,
21722172 "coffee/vietnamese/../..",
2173- "espresso/cappuccino") => LFS3_ERR_INVAL ;
2173+ "espresso/cappuccino") => LFS3_ERR_BUSY ;
21742174 // this one works
21752175 lfs3_rename(&lfs3,
21762176 "coffee/thai/..",
@@ -2195,7 +2195,7 @@ code = '''
21952195 }
21962196 lfs3_rename(&lfs3,
21972197 "coffee/coldbrew",
2198- "espresso/americano/../..") => LFS3_ERR_INVAL ;
2198+ "espresso/americano/../..") => LFS3_ERR_BUSY ;
21992199 lfs3_rename(&lfs3,
22002200 "coffee/turkish",
22012201 "espresso/macchiato/../../..") => LFS3_ERR_INVAL;
@@ -2224,14 +2224,14 @@ code = '''
22242224 "espresso/latte/../../../..") => LFS3_ERR_INVAL;
22252225 lfs3_rename(&lfs3,
22262226 "coffee/vietnamese/../..",
2227- "espresso/cappuccino/../../../../..") => LFS3_ERR_INVAL ;
2227+ "espresso/cappuccino/../../../../..") => LFS3_ERR_BUSY ;
22282228 lfs3_rename(&lfs3,
22292229 "coffee/thai/..",
22302230 "espresso/mocha/../../../../../..") => LFS3_ERR_INVAL;
22312231
22322232 // remove paths
22332233 lfs3_remove(&lfs3, "coffee/drip/..") => LFS3_ERR_NOTEMPTY;
2234- lfs3_remove(&lfs3, "coffee/coldbrew/../..") => LFS3_ERR_INVAL ;
2234+ lfs3_remove(&lfs3, "coffee/coldbrew/../..") => LFS3_ERR_BUSY ;
22352235 lfs3_remove(&lfs3, "coffee/turkish/../../..") => LFS3_ERR_INVAL;
22362236 lfs3_remove(&lfs3, "coffee/tubruk/../../../..") => LFS3_ERR_INVAL;
22372237 lfs3_remove(&lfs3, "coffee/vietnamese/../../../../..") => LFS3_ERR_INVAL;
@@ -4441,7 +4441,7 @@ code = '''
44414441 "espresso/latte") => LFS3_ERR_INVAL;
44424442 lfs3_rename(&lfs3,
44434443 "coffee/_vietnamese/../..",
4444- "espresso/cappuccino") => LFS3_ERR_INVAL ;
4444+ "espresso/cappuccino") => LFS3_ERR_BUSY ;
44454445 // this one works
44464446 lfs3_rename(&lfs3,
44474447 "coffee/thai_/..",
@@ -4485,7 +4485,7 @@ code = '''
44854485 "espresso/latte/../../../..") => LFS3_ERR_INVAL;
44864486 lfs3_rename(&lfs3,
44874487 "coffee/_vietnamese/../..",
4488- "espresso/cappuccino/../../../../..") => LFS3_ERR_INVAL ;
4488+ "espresso/cappuccino/../../../../..") => LFS3_ERR_BUSY ;
44894489 lfs3_rename(&lfs3,
44904490 "coffee/thai_/..",
44914491 "espresso/mocha/../../../../../..") => LFS3_ERR_INVAL;
@@ -4505,14 +4505,14 @@ code = '''
45054505 "coffee/tub_uk/../../..") => LFS3_ERR_INVAL;
45064506 lfs3_rename(&lfs3,
45074507 "coffee/_vietnamese/../..",
4508- "coffee/_vietnamese/../..") => LFS3_ERR_INVAL ;
4508+ "coffee/_vietnamese/../..") => LFS3_ERR_BUSY ;
45094509 lfs3_rename(&lfs3,
45104510 "coffee/thai_/..",
45114511 "coffee/thai_/..") => 0;
45124512
45134513 // remove paths
45144514 lfs3_remove(&lfs3, "coffee/_rip/..") => LFS3_ERR_NOTEMPTY;
4515- lfs3_remove(&lfs3, "coffee/c_ldbrew/../..") => LFS3_ERR_INVAL ;
4515+ lfs3_remove(&lfs3, "coffee/c_ldbrew/../..") => LFS3_ERR_BUSY ;
45164516 lfs3_remove(&lfs3, "coffee/tu_kish/../../..") => LFS3_ERR_INVAL;
45174517 lfs3_remove(&lfs3, "coffee/tub_uk/../../../..") => LFS3_ERR_INVAL;
45184518 lfs3_remove(&lfs3, "coffee/_vietnamese/../../../../..") => LFS3_ERR_INVAL;
@@ -5621,7 +5621,7 @@ code = '''
56215621 "espresso/latte") => LFS3_ERR_INVAL;
56225622 lfs3_rename(&lfs3,
56235623 "coffee/vietnamese/../..",
5624- "espresso/cappuccino") => LFS3_ERR_INVAL ;
5624+ "espresso/cappuccino") => LFS3_ERR_BUSY ;
56255625 // this one works
56265626 lfs3_rename(&lfs3,
56275627 "coffee/thai/..",
@@ -5636,7 +5636,7 @@ code = '''
56365636 "espresso/espresso/..") => LFS3_ERR_ISDIR;
56375637 lfs3_rename(&lfs3,
56385638 "coffee/coldbrew",
5639- "espresso/americano/../..") => LFS3_ERR_INVAL ;
5639+ "espresso/americano/../..") => LFS3_ERR_BUSY ;
56405640 lfs3_rename(&lfs3,
56415641 "coffee/turkish",
56425642 "espresso/macchiato/../../..") => LFS3_ERR_INVAL;
@@ -5665,7 +5665,7 @@ code = '''
56655665 "espresso/latte/../../../..") => LFS3_ERR_INVAL;
56665666 lfs3_rename(&lfs3,
56675667 "coffee/vietnamese/../..",
5668- "espresso/cappuccino/../../../../..") => LFS3_ERR_INVAL ;
5668+ "espresso/cappuccino/../../../../..") => LFS3_ERR_BUSY ;
56695669 lfs3_rename(&lfs3,
56705670 "coffee/thai/..",
56715671 "espresso/mocha/../../../../../..") => LFS3_ERR_INVAL;
@@ -5685,14 +5685,14 @@ code = '''
56855685 "coffee/tubruk/../../..") => LFS3_ERR_INVAL;
56865686 lfs3_rename(&lfs3,
56875687 "coffee/vietnamese/../..",
5688- "coffee/vietnamese/../..") => LFS3_ERR_INVAL ;
5688+ "coffee/vietnamese/../..") => LFS3_ERR_BUSY ;
56895689 lfs3_rename(&lfs3,
56905690 "coffee/thai/..",
56915691 "coffee/thai/..") => 0;
56925692
56935693 // remove paths
56945694 lfs3_remove(&lfs3, "coffee/drip/..") => LFS3_ERR_NOTEMPTY;
5695- lfs3_remove(&lfs3, "coffee/coldbrew/../..") => LFS3_ERR_INVAL ;
5695+ lfs3_remove(&lfs3, "coffee/coldbrew/../..") => LFS3_ERR_BUSY ;
56965696 lfs3_remove(&lfs3, "coffee/turkish/../../..") => LFS3_ERR_INVAL;
56975697 lfs3_remove(&lfs3, "coffee/tubruk/../../../..") => LFS3_ERR_INVAL;
56985698 lfs3_remove(&lfs3, "coffee/vietnamese/../../../../..") => LFS3_ERR_INVAL;
@@ -5833,21 +5833,21 @@ code = '''
58335833 lfs3_dir_close(&lfs3, &dir) => 0;
58345834
58355835 // rename root, this should error
5836- lfs3_rename(&lfs3, "/", "coffee") => LFS3_ERR_INVAL ;
5836+ lfs3_rename(&lfs3, "/", "coffee") => LFS3_ERR_BUSY ;
58375837
58385838 lfs3_mkdir(&lfs3, "coffee") => 0;
5839- lfs3_rename(&lfs3, "coffee", "/") => LFS3_ERR_INVAL ;
5839+ lfs3_rename(&lfs3, "coffee", "/") => LFS3_ERR_BUSY ;
58405840 lfs3_remove(&lfs3, "coffee") => 0;
58415841
5842- lfs3_rename(&lfs3, "/", "/") => LFS3_ERR_INVAL ;
5842+ lfs3_rename(&lfs3, "/", "/") => LFS3_ERR_BUSY ;
58435843
58445844 // stat root
58455845 lfs3_stat(&lfs3, "/", &info) => 0;
58465846 assert(strcmp(info.name, "/") == 0);
58475847 assert(info.type == LFS3_TYPE_DIR);
58485848
58495849 // remove root, this should error
5850- lfs3_remove(&lfs3, "/") => LFS3_ERR_INVAL ;
5850+ lfs3_remove(&lfs3, "/") => LFS3_ERR_BUSY ;
58515851
58525852 // stat root
58535853 lfs3_stat(&lfs3, "/", &info) => 0;
@@ -5953,26 +5953,26 @@ code = '''
59535953 lfs3_dir_close(&lfs3, &dir) => 0;
59545954
59555955 // rename root, this should error
5956- lfs3_rename(&lfs3, "/", "coffee") => LFS3_ERR_INVAL ;
5957- lfs3_rename(&lfs3, ".", "coffee") => LFS3_ERR_INVAL ;
5958- lfs3_rename(&lfs3, "./", "coffee") => LFS3_ERR_INVAL ;
5959- lfs3_rename(&lfs3, "/.", "coffee") => LFS3_ERR_INVAL ;
5960- lfs3_rename(&lfs3, "//", "coffee") => LFS3_ERR_INVAL ;
5956+ lfs3_rename(&lfs3, "/", "coffee") => LFS3_ERR_BUSY ;
5957+ lfs3_rename(&lfs3, ".", "coffee") => LFS3_ERR_BUSY ;
5958+ lfs3_rename(&lfs3, "./", "coffee") => LFS3_ERR_BUSY ;
5959+ lfs3_rename(&lfs3, "/.", "coffee") => LFS3_ERR_BUSY ;
5960+ lfs3_rename(&lfs3, "//", "coffee") => LFS3_ERR_BUSY ;
59615961
59625962 lfs3_mkdir(&lfs3, "coffee") => 0;
5963- lfs3_rename(&lfs3, "coffee", "/") => LFS3_ERR_INVAL ;
5964- lfs3_rename(&lfs3, "coffee", ".") => LFS3_ERR_INVAL ;
5965- lfs3_rename(&lfs3, "coffee", "./") => LFS3_ERR_INVAL ;
5966- lfs3_rename(&lfs3, "coffee", "/.") => LFS3_ERR_INVAL ;
5967- lfs3_rename(&lfs3, "coffee", "//") => LFS3_ERR_INVAL ;
5963+ lfs3_rename(&lfs3, "coffee", "/") => LFS3_ERR_BUSY ;
5964+ lfs3_rename(&lfs3, "coffee", ".") => LFS3_ERR_BUSY ;
5965+ lfs3_rename(&lfs3, "coffee", "./") => LFS3_ERR_BUSY ;
5966+ lfs3_rename(&lfs3, "coffee", "/.") => LFS3_ERR_BUSY ;
5967+ lfs3_rename(&lfs3, "coffee", "//") => LFS3_ERR_BUSY ;
59685968 lfs3_remove(&lfs3, "coffee") => 0;
59695969
5970- lfs3_rename(&lfs3, "/", "/") => LFS3_ERR_INVAL ;
5971- lfs3_rename(&lfs3, ".", ".") => LFS3_ERR_INVAL ;
5970+ lfs3_rename(&lfs3, "/", "/") => LFS3_ERR_BUSY ;
5971+ lfs3_rename(&lfs3, ".", ".") => LFS3_ERR_BUSY ;
59725972 lfs3_rename(&lfs3, "..", "..") => LFS3_ERR_INVAL;
5973- lfs3_rename(&lfs3, "./", "./") => LFS3_ERR_INVAL ;
5974- lfs3_rename(&lfs3, "/.", "/.") => LFS3_ERR_INVAL ;
5975- lfs3_rename(&lfs3, "//", "//") => LFS3_ERR_INVAL ;
5973+ lfs3_rename(&lfs3, "./", "./") => LFS3_ERR_BUSY ;
5974+ lfs3_rename(&lfs3, "/.", "/.") => LFS3_ERR_BUSY ;
5975+ lfs3_rename(&lfs3, "//", "//") => LFS3_ERR_BUSY ;
59765976
59775977 // stat root
59785978 lfs3_stat(&lfs3, "/", &info) => 0;
@@ -5992,11 +5992,11 @@ code = '''
59925992 assert(info.type == LFS3_TYPE_DIR);
59935993
59945994 // remove root, this should error
5995- lfs3_remove(&lfs3, "/") => LFS3_ERR_INVAL ;
5996- lfs3_remove(&lfs3, ".") => LFS3_ERR_INVAL ;
5997- lfs3_remove(&lfs3, "./") => LFS3_ERR_INVAL ;
5998- lfs3_remove(&lfs3, "/.") => LFS3_ERR_INVAL ;
5999- lfs3_remove(&lfs3, "//") => LFS3_ERR_INVAL ;
5995+ lfs3_remove(&lfs3, "/") => LFS3_ERR_BUSY ;
5996+ lfs3_remove(&lfs3, ".") => LFS3_ERR_BUSY ;
5997+ lfs3_remove(&lfs3, "./") => LFS3_ERR_BUSY ;
5998+ lfs3_remove(&lfs3, "/.") => LFS3_ERR_BUSY ;
5999+ lfs3_remove(&lfs3, "//") => LFS3_ERR_BUSY ;
60006000
60016001 // stat root
60026002 lfs3_stat(&lfs3, "/", &info) => 0;
0 commit comments