From ff52ae4683401fddf07dd7926605ad025ec87929 Mon Sep 17 00:00:00 2001 From: Biagio Dipalma <112320534+Biagio-Dipalma@users.noreply.github.com> Date: Tue, 12 Nov 2024 02:43:41 +0100 Subject: [PATCH] improve suite (#2964) Co-authored-by: Hare Sudhan --- atomics/T1562.003/T1562.003.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/atomics/T1562.003/T1562.003.yaml b/atomics/T1562.003/T1562.003.yaml index 9db238c08a..6ea6beb668 100644 --- a/atomics/T1562.003/T1562.003.yaml +++ b/atomics/T1562.003/T1562.003.yaml @@ -90,7 +90,6 @@ atomic_tests: history -c ls -la $HISTFILE # " ls -la $HISTFILE" if [ $(history |wc -l) -eq 1 ]; then echo "ls -la is not in history cache"; fi - # -> ls -la is not in history cache if [ "$HISTCONTROL" != "erasedups" ]; then export HISTCONTROL="erasedups"; fi history -c ls -la $HISTFILE @@ -114,8 +113,10 @@ atomic_tests: TEST=$(echo $HISTFILESIZE) echo $HISTFILESIZE export HISTFILESIZE=0 - if [ $(echo $HISTFILESIZE) -eq 0 ]; then echo "\$HISTFILESIZE is zero"; fi - # -> $HISTFILESIZE is zero + echo "runnning some commands to populate the history" + whoami + groups + if [ $(echo $HISTFILESIZE) -eq 0 ]; then echo "\$HISTFILESIZE is zero"; else HIST_LENGHT=$(wc -l $HISTFILE); echo "\$HISTFILESIZE is not zero, history lenght is $HIST_LENGHT"; fi cleanup_command: | export HISTCONTROL=$(echo $TEST) - name: Setting the HISTSIZE environment variable @@ -132,8 +133,10 @@ atomic_tests: command: | echo $HISTSIZE export HISTSIZE=0 - if [ $(echo $HISTSIZE) -eq 0 ]; then echo "\$HISTSIZE is zero"; fi - # -> $HISTSIZE is zero + echo "runnning some commands to populate the history" + whoami + groups + if [ $(echo $HISTSIZE) -eq 0 ]; then echo "\$HISTSIZE is zero"; else HIST_LENGTH=$(wc -l $HISTFILE); echo "\$HISTSIZE is not zero, history size is $HIST_LENGTH"; fi cleanup_command: | export HISTSIZE=100 @@ -152,8 +155,10 @@ atomic_tests: TEST=$(echo $HISTFILE) echo $HISTFILE export HISTFILE="/dev/null" - if [ $(echo $HISTFILE) == "/dev/null" ]; then echo "\$HISTFILE is /dev/null"; fi - # -> $HISTFILE is /dev/null + echo "runnning some commands to populate the history" + whoami + groups + if [ $(echo $HISTFILE) == "/dev/null" ]; then echo "\$HISTFILE is /dev/null"; else HIST_LENGHT=$(wc -l $HISTFILE); echo "\$HISTFILE is not /dev/null, history lenght is $HIST_LENGHT"; fi cleanup_command: | export HISTFILE=$(echo $TEST) - name: Setting the HISTFILE environment variable (freebsd) @@ -171,7 +176,6 @@ atomic_tests: echo $HISTFILE export HISTFILE="/dev/null" if [ $(echo $HISTFILE) == "/dev/null" ]; then echo "\$HISTFILE is /dev/null"; fi - # -> $HISTFILE is /dev/null cleanup_command: | export HISTFILE=~/.sh_history - name: Setting the HISTIGNORE environment variable