In qualitative analysis, in order to detect second group basic radical, $H_2S$ gas is passed in the presence of dilute HCl to [KCET 2004]
In qualitative analysis, the passage of $H_2S$ gas in the presence of dilute HCl is used to detect second group basic radicals (like $Cu^{2+}$, $Pb^{2+}$, etc.). The presence of HCl decreases the dissociation of $H_2S$ due to the common ion effect. This ensures that only the second group radicals, which form insoluble sulfides, precipitate out.
$$ H_2S ightleftharpoons 2H^+ + S^{2-} $$
The addition of HCl increases the concentration of $H^+$ ions, shifting the equilibrium to the left and thus decreasing the dissociation of $H_2S$.