When you have the following line in smb.conf:
the share name is set to "test[foo".
On SVN you can see that both samba 3.0.x (iniparser.c) and samba 4.0 (params.c) truncate the name at the first ']'.
Shouldn't '[' and ']' be both invalid or valid ?
Windows systems can perfectly see and access shares containing '[' and ']' characters, but can't share themselves such share.