Skip to content

Commit

Permalink
selftests: netfilter: fix current year
Browse files Browse the repository at this point in the history
[ Upstream commit a3005b0 ]

use date %Y instead of %G to read current year
Problem appeared when running lkp-tests on 01/01/2021

Fixes: 48d072c ("selftests: netfilter: add time counter check")
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Fabian Frederick authored and gregkh committed Feb 17, 2021
1 parent f035e97 commit ef8f281
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/netfilter/nft_meta.sh
Expand Up @@ -23,7 +23,7 @@ ip -net "$ns0" addr add 127.0.0.1 dev lo

trap cleanup EXIT

currentyear=$(date +%G)
currentyear=$(date +%Y)
lastyear=$((currentyear-1))
ip netns exec "$ns0" nft -f /dev/stdin <<EOF
table inet filter {
Expand Down

0 comments on commit ef8f281

Please sign in to comment.