@@ -269,6 +269,51 @@ def test_cs_not_empty_set_insensitive(self):
269269 else :
270270 self .fail ("should fail" )
271271
272+
273+ class TestCharMapRecovery (CephFSTestCase , CharMapMixin ):
274+ CLIENTS_REQUIRED = 1
275+ MDSS_REQUIRED = 1
276+
277+ def test_primary_altname_recovery (self ):
278+ """
279+ That the MDS can recovery the alternate_name from the primary link
280+ encoded in the fullbit.
281+ """
282+
283+ dname = "Grüßen"
284+ self .mount_a .run_shell_payload ("mkdir foo/" )
285+ self .mount_a .setfattr ("foo/" , "ceph.dir.casesensitive" , "0" )
286+ self .mount_a .run_shell_payload (f"dd if=/dev/urandom of=foo/{ dname } conv=fsync bs=1 count=1" )
287+ self .mount_a .umount_wait ()
288+
289+ self .fs .fail ()
290+ self .fs .set_joinable ()
291+ self .fs .wait_for_daemons ()
292+
293+ self .mount_a .mount ()
294+ self .mount_a .run_shell_payload ("ls -l foo" )
295+
296+ def test_remote_altname_recovery (self ):
297+ """
298+ That the MDS can recovery the alternate_name from the remote link
299+ encoded in the fullbit.
300+ """
301+
302+ dname = "Grüßen"
303+ self .mount_a .run_shell_payload ("mkdir foo/" )
304+ self .mount_a .setfattr ("foo/" , "ceph.dir.casesensitive" , "0" )
305+ self .mount_a .run_shell_payload ("dd if=/dev/urandom of=foo/file conv=fsync bs=1 count=1" )
306+ self .mount_a .run_shell_payload (f"ln -T foo/file foo/{ dname } " )
307+ self .mount_a .umount_wait ()
308+
309+ self .fs .fail ()
310+ self .fs .set_joinable ()
311+ self .fs .wait_for_daemons ()
312+
313+ self .mount_a .mount ()
314+ self .mount_a .run_shell_payload ("ls -l foo" )
315+
316+
272317class TestNormalization (CephFSTestCase , CharMapMixin ):
273318 """
274319 Test charmap normalization.
0 commit comments