  Using an $e^+e^-$ annihilation data sample corresponding to an integrated
luminosity of $2.93\,\rm fb^{-1}$ collected at the center-of-mass energy of
3.773\,GeV with the BESIII detector, we measure the absolute branching
fractions of $D^+\to\eta\eta\pi^+$, $D^+\to\eta\pi^+\pi^0$, and
$D^0\to\eta\pi^+\pi^-$ to be $(2.96 \pm 0.24 \pm 0.13)\times 10^{-3}$, $(2.23
\pm 0.15 \pm 0.11)\times 10^{-3}$, and $(1.20 \pm 0.07 \pm 0.04)\times
10^{-3}$, respectively, where the first uncertainties are statistical and the
second ones systematic. The $D^+\to\eta\eta\pi^+$ decay is observed for the
first time and the branching fractions of $D^{+(0)}\to\eta\pi^+\pi^{0(-)}$ are
measured with much improved precision. In addition we test for $CP$ asymmetries
in the separated charge-conjugate branching fractions; no evidence of $CP$
violation is found.
