For a smooth function $f: \mathbb{R}^n \to \mathbb{R}$, we can (usually) test whether a critical point ${\bf x}_0$ (at which ${\bf \nabla} f({\bf x}_0) = {\bf 0}$) is a local maximum, minimum, or saddle point via the second partial derivative test, which considers the signs of the eigenvalues of the Hessian matrix $H_{ij} := \partial_i \partial_j f$. This result can be generalized to successively more general domains of $f$:
If the domain of $f$ is an arbitrary Riemannian manifold, then the test still works, but we instead consider the eigenvalues of the tensor $H^i_{\ \ j} = g^{ik} H_{kj}$, where $H_{kj}$ is the Hessian tensor $H_{ij} := \nabla_i \nabla_j f = \partial_i \partial_j f - \Gamma_{ij}^k \partial_k f$, where $\Gamma_{ij}^k$ are the Christoffel symbols (of the second kind).
If the domain of $f$ is an arbitrary smooth manifold with a torsion-free connection, then the Hessian (as defined directly above) is a rank-$(2,0)$ tensor rather than a rank-$(1,1)$ tensor, so we can't talk about its eigenvalues. But we can still talk about the signature of the corresponding quadratic form by Sylvester's law of inertia, so I believe the test still works.
If the domain of $f$ is an arbitrary smooth manifold without a connection, then there's no natural way to define a Hessian tensor away from the critical points. But at a critical point the Hessian tensor becomes independent of the connection, so we can define it (in local coordinates) by the usual Euclidean-space formula $H_{ij} := \partial_i \partial_j f$ and use Sylvester's law of inertia as above.
Now if $f$ (which I will rename $S$) is a smooth functional $S[q]$, then its domain is an infinite-dimensional space of functions $q(t)$. In this case we can still talk about critical "points" of the functional, which are functions $q_0(t)$ at which $S[q]$ is stationary. For example, if $S$ takes the form $$S[q] = \int_a^b L \left( q(t), \frac{dq}{dt}, t \right) dt$$ for some constants $a$ and $b$ and differentiable function $L: \mathbb{R}^3 \to \mathbb{R}$, then the critical "points" $q_0(t)$ are given by the Euler-Lagrange equation $$\frac{\partial L}{\partial q} - \frac{d}{dt} \frac{\partial L}{\partial \dot{q}} = 0.$$
Is there a functional generalization of the second partial derivative test that tests whether these critical functions $q_0(t)$ are local minima, local maxima, or saddle points of the functional $F[q]$?
(I don't know anything about quadratic forms on infinite-dimensional vector spaces, so I have no idea if there's any notion of a signature, etc.)