]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc: Use date instead of EPOCHSECONDS in mitigation-patching.sh
authorRussell Currey <ruscur@russell.cc>
Mon, 25 Oct 2021 10:24:36 +0000 (20:24 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 27 Oct 2021 11:34:02 +0000 (22:34 +1100)
commit6bd385d7d7ca5668792c2bdd0ad4a9e86d102d46
tree54883c0503e4d246a08b5766a1bf69f9596d9f61
parent0da8b69caa56f89c0ecf9c04624802280d7f76a7
selftests/powerpc: Use date instead of EPOCHSECONDS in mitigation-patching.sh

The EPOCHSECONDS environment variable was added in bash 5.0 (released
2019).  Some distributions of the "stable" and "long-term" variety ship
older versions of bash than this, so swap to using the date command
instead.

"%s" was added to coreutils `date` in 1993 so we should be good, but who
knows, it is a GNU extension and not part of the POSIX spec for `date`.

Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211025102436.19177-1-ruscur@russell.cc
tools/testing/selftests/powerpc/security/mitigation-patching.sh