Suppose we are given a smooth function $z: \mathbb{R}^n \to \mathbb{R}$, a point $x_0 \in \mathbb{R}^n$ and a set $\mathcal{F}$ consisting of certain paths in $\mathbb{R}^n$, i.e. $f: [0,1] \to \mathbb{R}^n$ for $f \in \mathcal{F}$. Assume that for each $f \in \mathcal{F}$, there exists a $t \in [0,1]$ such that $f(t) = x_0$, and that the function $z \circ f: [0,1] \to \mathbb{R}$ has a local minimum in $t$. Under what conditions on $\mathcal{F}$ does it follow that $z$ has a local minimum at $x_0$?
Is is easily seen that it is enough if $\mathcal{F}$ consists of all continuous paths going through $x_0$. However, the set of straight lines going through $x_0$ is not enough (consider $x_0 = (0,0)$ and $z(x,y) = (y^2 - 2x)(y^2 - x)$, by Peano).
The standard argument to see that continuous paths are sufficient, is to assume not; i.e. there are points $(x_k)_{k\in\mathbb{N}}$ such that $x_k \to x_0$ and $z(x_k) < z(x_0)$. Now construct a continuous path along going through $(x_k)$ and you are done. So one may also consider which $\mathcal{F}$ are such that for each converging sequence of points $(x_k)$ one can find a subsequence $(x_{k_l})$ and an $f \in \mathcal{F}$ such that $f$ goes through $(x_{k_l})$.
Can we classify sets $\mathcal{F}$ for which the local minimality of $z$ holds? More specifically, I am interested in paths for which each component is twice differentiable.