# Test Data File for Command Line tests.
#
# Each test is a one-line entry of the form:
#
# <TestGroup>|<TestCmd>|<ExitCode>|<TestLog>|<ExpectedStringRegex>|<Comments>
#
# Where:
# <TestGroup> is an arbitrary name used to apply to a group of tests, allowing that group
# of tests to be executed independently of other configured tests. By default, all
# tests are executed; call run_cli_tests.sh with '-g <TestGroup>' to indicate that the
# specified group of tests are to be run. This is intended to speed up interactive testing
# for a focused group of tests.
#
# <TestCmd> is the Perforce command to execute. If it starts with 'p4 ', the
# 'p4 ' wll be substituted at runtime with 'p4 -p <port> -u <user> -c <client>',
# where the port/user/client values are dependint test configuration data in
# test_sdp.*.cfg files.
#
# Alternately, the <TestCmd> can start with 'p4:user:client ', to execute
# commands as a user or in a workspace defined in the test entry. The user
# is typically 'bruno' or some other user from the Perforce Sample Depot data set.
#
# If the <TestCmd> does not start with 'p4 ' or 'p4:user:client ', it is deemed
# to be an arbitrary command and it is executed as is.
#
# The <TestCmd> value can also be the special value 'no_cmd', meaning that no
# test command is executed. This allows additional checks of logs to be done based
# on the execution of the most recent executed test.
#
# <ExitCode> is the expected exit code, which must be a whole number (integer 0 or
# greater). If the actual test exist code is not match, the test is deemed to have
# failed. A special value of 'U' meaning Undefined can be given rather than a
# whole number to indicate that any exit code is accepted. (The test may still fail
# depending on the <Output>). A special value of 'N' can be given to indicate that
# any non-zero exit code is accepted.
#
# <TestLog> Specify the absolute path to the log containing the expected string,
# or the special value 'output' to scan the output of the command rather than
# a log file.
#
# <ExpectedStringRegex> is a string of text expected of the executed command in
# either the ouptutor a given logfile. The string can be a regular expression.
#
# <Comments> are short comments for the human reviewer of the test, describing what
# is expected in the output, what is being tested, etc.
#------------------------------------------------------------------------------
# Some of the defined "tests" are test setup, such as the call to DANGER_CLEAN.sh
# and install of the latest version of install_sdp.sh into /root/install_sdp.
# Each test group is intended to be executable independently. Thus, there is
# redundacy of test setup in each group.
#------------------------------------------------------------------------------
# Setup and basic tests of usage massage and early abort.
Usage|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
Usage|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
Usage|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -h|2|output||Usage synopsis for install_sdp.sh
Usage|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -man|2|output|DESCRIPTION|Usage: Full man page for install_sdp.sh.
Usage|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -empty -bogus_option|2|output|USAGE ERROR|Usage: Bogus usage test.
Usage|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -empty -init|2|output|USAGE ERROR: Specify exactly one of|Usage: Using more than one data handling parameter; abort expected.
Usage|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -init -sampledepot|2|output|USAGE ERROR: Specify exactly one of|Usage: Using more than one data handling parameter; abort expected.
Usage|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -empty -ued -init|2|output|USAGE ERROR: Specify exactly one of|Usage: Using more than one data handling parameter; abort expected.
#------------------------------------------------------------------------------
# Test preflight abort.
PreflightAbort|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
PreflightAbort|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
PreflightAbort|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
PreflightAbort|mkdir /opt/perforce/p4-sdp|0|output||Test Setup Step: Create /opt/perforce/p4-sdp directory; next call to install_sdp.sh should abort.
PreflightAbort|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -demo -empty -no_cron -no_ppr -no_firewall -no_sudo|N|/root/install_sdp/install_sdp.log|Aborting because|Preflight abort test
#------------------------------------------------------------------------------
# SDP Install Dry Run.
DryRun|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
DryRun|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
DryRun|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
DryRun|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -demo -d -empty -sdp_dir /opt/perforce/dev/sdp -no_cron -no_ppr -no_firewall -no_sudo|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Dry Run.
DryRun|no_cmd|0|/root/install_sdp/install_sdp.log|rsync -a --exclude=.p4root --exclude=.p4config.local --exclude=.p4ignore.local /opt/perforce/p4-sdp/sdp/ /opt/perforce/p4-sdp/p4/sdp|Check that the rsync looks right.
#------------------------------------------------------------------------------
# SDP Install Test - Online Basic
OnlineInstallBasic|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
OnlineInstallBasic|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
OnlineInstallBasic|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
OnlineInstallBasic|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -demo -d -empty -sdp_dir /opt/perforce/dev/sdp -no_cron -no_ppr -no_firewall|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - Basic Online.
OnlineInstallBasic|no_cmd|0|/root/install_sdp/install_sdp.log|^Online mode|Verify online mode.
OnlineInstallBasic|no_cmd|0|/root/install_sdp/install_sdp.log|^Acquiring binary /opt/perforce/p4-sdp/p4_binaries/p4d|Verify p4d downloaded.
#------------------------------------------------------------------------------
# SDP Install Test - Online Basic with Old P4D
OnlineInstallBasicOldP4D|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
OnlineInstallBasicOldP4D|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
OnlineInstallBasicOldP4D|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
OnlineInstallBasicOldP4D|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -C > sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4BinRel=|Test generation of sdp_install.cfg config file.
OnlineInstallBasicOldP4D|sed -E -i -e s/^P4BinRel=.*/P4BinRel=r25.1/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4BinRel=r25.1|Test setup: Change target p4d version to r25.1.
OnlineInstallBasicOldP4D|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -c sdp_install.cfg -y -demo -d -empty -sdp_dir /opt/perforce/dev/sdp -no_cron -no_ppr -no_firewall|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - Basic Online with old P4D.
OnlineInstallBasicOldP4D|no_cmd|0|/root/install_sdp/install_sdp.log|^Online mode|Verify online mode.
OnlineInstallBasicOldP4D|no_cmd|0|/root/install_sdp/install_sdp.log|^Acquiring binary /opt/perforce/p4-sdp/p4_binaries/p4d|Verify p4d downloaded.
OnlineInstallBasicOldP4D|su - perforce -c '/p4/common/bin/p4d -V'|0|output|/2025.1/|Confirm old binary was installed.
#------------------------------------------------------------------------------
# SDP Install Test - Online with Sample Depot
OnlineInstallWithSD|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
OnlineInstallWithSD|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
OnlineInstallWithSD|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
OnlineInstallWithSD|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -demo -d -sampledepot -sdp_dir /opt/perforce/dev/sdp -no_cron -no_ppr -no_firewall -limited_sudo|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - Online with Sample Depot.
OnlineInstallWithSD|no_cmd|0|/root/install_sdp/install_sdp.log|^Online mode|Verify online mode.
OnlineInstallWithSD|no_cmd|0|/root/install_sdp/install_sdp.log|^Acquiring binary /opt/perforce/p4-sdp/p4_binaries/p4d|Verify p4d downloaded.
OnlineInstallWithSD|no_cmd|0|/root/install_sdp/install_sdp.log|Sample Depot configured successfully for instance 1|Verify Sample Depot load.
OnlineInstallWithSD|su - perforce -c /p4/common/bin/p4sanity_check.sh|0|output|PASS: Sanity checks look OK|Sanity check on Sample Depot server.
OnlineInstallWithSD|su - perforce -c /p4/common/bin/p4verify.sh|U|/p4/1/logs/p4verify.log|Submitted File Errors:.*0|Depot load check.
OnlineInstallWithSD|su - perforce -c '/p4/common/bin/verify_sdp.sh -online -skip cron,license'|0|/p4/1/logs/verify_sdp.log||SDP verify check.
#------------------------------------------------------------------------------
# Local Install Test - Empty Depot and No Init
LocalInstallEmptyNoSystemdOrSudo|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
LocalInstallEmptyNoSystemdOrSudo|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
LocalInstallEmptyNoSystemdOrSudo|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
LocalInstallEmptyNoSystemdOrSudo|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -local -d -empty -sdp_dir /opt/perforce/dev/sdp -no_cron -no_ppr -no_firewall -no_sudo -no_systemd|N|/root/install_sdp/install_sdp.log|Aborting|SDP Install Dry Run - Basic Local, abort expected.
LocalInstallEmptyNoSystemdOrSudo|mkdir -p /opt/perforce/p4-sdp/downloads /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Create dirs for local install.
LocalInstallEmptyNoSystemdOrSudo|cd /root && rsync -a /root/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Get p4_binaries.
LocalInstallEmptyNoSystemdOrSudo|cd /root && rsync -a --exclude=.p4root --exclude=.p4config.local /opt/perforce/dev/sdp/ /opt/perforce/p4-sdp/downloads/sdp|0|output||Test Setup: Get SDP dir
LocalInstallEmptyNoSystemdOrSudo|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -local -demo -d -empty -sdp_dir /opt/perforce/dev/sdp -no_cron -no_ppr -no_firewall -no_sudo -no_systemd|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - Basic Local, No Init or sudoers.
LocalInstallEmptyNoSystemdOrSudo|su - perforce -c '/p4/common/bin/verify_sdp.sh -skip p4root,offline_db,p4t_files,cron'|0|/p4/1/logs/verify_sdp.log|ALL CLEAN:|SDP Install Live Run - Basic Local.
LocalInstallEmptyNoSystemdOrSudo|[[ ! -r /etc/sudoers.d/perforce ]]|0|output||Ensure no sudoers file for perforce per -no_sudo.
LocalInstallEmptyNoSystemdOrSudo|[[ ! -r /etc/systemd/system/p4d_1.service ]]|0|output||Ensure p4d_1.service is not available per '-no_sudo'.
LocalInstallEmptyNoSystemdOrSudo|[[ ! -r /etc/systemd/system/p4broker_1.service ]]|0|output||Ensure p4broker_1.service is not available per '-no_sudo'.
#------------------------------------------------------------------------------
# Local Install Test - Empty Depot
LocalInstallEmpty|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
LocalInstallEmpty|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
LocalInstallEmpty|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
LocalInstallEmpty|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -local -d -empty -sdp_dir /opt/perforce/dev/sdp -no_cron -no_ppr -no_firewall|N|/root/install_sdp/install_sdp.log|Aborting|SDP Install Dry Run - Basic Local, abort expected.
LocalInstallEmpty|mkdir -p /opt/perforce/p4-sdp/downloads /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Create dirs for local install.
LocalInstallEmpty|cd /root && rsync -a /root/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Get p4_binaries.
LocalInstallEmpty|cd /root && rsync -a --exclude=.p4root --exclude=.p4config.local /opt/perforce/dev/sdp/ /opt/perforce/p4-sdp/downloads/sdp|0|output||Test Setup: Get SDP dir
LocalInstallEmpty|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -local -demo -d -empty -sdp_dir /opt/perforce/dev/sdp -no_cron -no_ppr -no_firewall |0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - Basic Local.
LocalInstallEmpty|su - perforce -c '/p4/common/bin/verify_sdp.sh -skip p4root,offline_db,p4t_files,cron'|0|/p4/1/logs/verify_sdp.log|ALL CLEAN:|SDP Install Live Run - Basic Local.
#------------------------------------------------------------------------------
# Local Install Test - Empty and No Broker
LocalInstallEmptyNoBroker|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
LocalInstallEmptyNoBroker|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
LocalInstallEmptyNoBroker|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
LocalInstallEmptyNoBroker|mkdir -p /opt/perforce/p4-sdp/downloads /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Create dirs for local install.
LocalInstallEmptyNoBroker|cd /root && rsync -a /root/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Get p4_binaries.
LocalInstallEmptyNoBroker|cd /root && rsync -a --exclude=.p4root --exclude=.p4config.local /opt/perforce/dev/sdp/ /opt/perforce/p4-sdp/downloads/sdp|0|output||Test Setup: Get SDP dir
LocalInstallEmptyNoBroker|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -C > sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4BinRel=|Test generation of sdp_install.cfg config file.
LocalInstallEmptyNoBroker|sed -E -i -e 's@^DeployBrokerWithP4D=.*@DeployBrokerWithP4D=0@g' /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^DeployBrokerWithP4D=0|Test Setup: Set to drop the broker for this test.
LocalInstallEmptyNoBroker|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -local -c sdp_install.cfg -demo -d -empty -sdp_dir /opt/perforce/dev/sdp -no_cron -no_ppr -no_firewall|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - Basic Local, No Init or sudoers.
LocalInstallEmptyNoBroker|su - perforce -c '/p4/common/bin/verify_sdp.sh -skip p4root,offline_db,p4t_files,cron'|0|/p4/1/logs/verify_sdp.log|ALL CLEAN:|SDP Install Live Run - Basic Local.
LocalInstallEmptyNoBroker|[[ ! -r /p4/1/bin/p4broker_1_init ]]|0|output||Ensure no p4broker_1_init file per config option DeployBrokerWithP4D=0.
LocalInstallEmptyNoBroker|[[ ! -r /p4/common/config/p4_1.broker.cfg ]]|0|output||Ensure no p4_1.broker.cfg file per config option DeployBrokerWithP4D=0.
LocalInstallEmptyNoBroker|[[ -r /etc/systemd/system/p4d_1.service ]]|0|output||Ensure p4d_1.service is available.
LocalInstallEmptyNoBroker|[[ ! -r /etc/systemd/system/p4broker_1.service ]]|0|output||Ensure p4broker_1.service is not available per config option DeployBrokerWithP4D=0.
#------------------------------------------------------------------------------
# Local Install Test - Initialize Data Set
LocalInstallInitData|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
LocalInstallInitData|mkdir -p /opt/perforce/p4-sdp/downloads /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Create dirs for local install.
LocalInstallInitData|cd /root && rsync -a /root/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Get p4_binaries.
LocalInstallInitData|cd /root && rsync -a --exclude=.p4root --exclude=.p4config.local /opt/perforce/dev/sdp/ /opt/perforce/p4-sdp/downloads/sdp|0|output||Test Setup: Get SDP dir
LocalInstallInitData|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
LocalInstallInitData|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
LocalInstallInitData|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -demo -local -d -init -sdp_dir /opt/perforce/dev/sdp -no_ppr -limited_sudo|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - Basic Local.
LocalInstallInitData|no_cmd|0|/root/install_sdp/install_sdp.log|New sudoers file successfully installed.|Verify sudoers.
LocalInstallInitData|no_cmd|0|/etc/sudoers.d/perforce|Cmnd_Alias P4_SVC|Sudoers file sanity check.
LocalInstallInitData|no_cmd|0|/root/install_sdp/install_sdp.log|User perforce saved|Verify perforce P4USER created.
LocalInstallInitData|no_cmd|0|/root/install_sdp/install_sdp.log|Protections saved.|Verify Protections updated.
LocalInstallInitData|no_cmd|0|/root/install_sdp/install_sdp.log|Group Automation created.|Verify Automation group created.
LocalInstallInitData|no_cmd|0|/root/install_sdp/install_sdp.log|Depot spec saved.|Verify spec depot created.
LocalInstallInitData|no_cmd|0|/root/install_sdp/install_sdp.log|Depot unload saved.|Verify unload depot created.
LocalInstallInitData|ls -lrt /root/install_sdp|0|output|install_sdp.sh|Test Setup: Confirm /root/sdp_install still there BEFORE DANGER_CLEAN.sh with '-ued'.
LocalInstallInitData|/opt/perforce/dev/bin/DANGER_CLEAN.sh -ued -y|0|output|Skipping cleanup of mount points and backup dirs due to '-ued'|Test Setup: Remove all SDP structures except mount points so we can test '-ued' next.
LocalInstallInitData|ls -lrt /root/install_sdp|0|output|install_sdp.sh|Test Setup: Confirm /root/sdp_install still there AFTER DANGER_CLEAN.sh with '-ued'.
LocalInstallInitData|mkdir -p /opt/perforce/p4-sdp/downloads /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Create dirs for local install.
LocalInstallInitData|cd /root && rsync -a /root/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Get p4_binaries.
LocalInstallInitData|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -demo -local -d -ued -sdp_dir /opt/perforce/dev/sdp -no_ppr -limited_sudo|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - Local using '-ued' to use Sample Depot from an earlier install.
### This test of 'p4 monitor show -L' works on Rocky 9, SLES, and Ubuntu 20.04, but fails on Ubuntu 22.04 and Ubuntu 24.04.
### The test doesn't actually "fail", but instead it found a real issue in p4d.
### For deets, see: https://perforce.slack.com/archives/C8PSLC9RD/p1752967022022109
###LocalInstallInitData|su - perforce -c 'p4 monitor show -L'|0|output|db1|Verify 'p4 monitor show -L' works.
#------------------------------------------------------------------------------
# Local Install Test - Initialize Data Set with Config Changes
LocalInstallInitDataConfigChg|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
LocalInstallInitDataConfigChg|mkdir -p /opt/perforce/p4-sdp/downloads /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Create dirs for local install.
LocalInstallInitDataConfigChg|cd /root && rsync -a /root/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Get p4_binaries.
LocalInstallInitDataConfigChg|cd /root && rsync -a --exclude=.p4root --exclude=.p4config.local /opt/perforce/dev/sdp/ /opt/perforce/p4-sdp/downloads/sdp|0|output||Test Setup: Get SDP dir
LocalInstallInitDataConfigChg|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
LocalInstallInitDataConfigChg|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
LocalInstallInitDataConfigChg|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -C > sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4BinRel=|Test generation of sdp_install.cfg config file.
LocalInstallInitDataConfigChg|sed -E -i -e s/^CaseSensitive=1/CaseSensitive=0/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^CaseSensitive=0|Test Setup: Change config to case insensitive.
LocalInstallInitDataConfigChg|sed -E -i -e s/^Instance=1/Instance=fgs/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^Instance=fgs|Test Setup: Change SDP instance to fgs.
LocalInstallInitDataConfigChg|sed -E -i -e s/^ServerID=.*/ServerID=commit.fgs/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^ServerID=commit.fgs|Test Setup: Change Commit ServerID to commit.fgs.
LocalInstallInitDataConfigChg|sed -E -i -e 's+^Password=.*+Password=Complex$u.t$a!#%3$CRx+g' /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^Password=Complex|Test Setup: Change Password to something complex.
LocalInstallInitDataConfigChg|sed -E -i -e 's@^UseEncryptedPassword=.*@UseEncryptedPassword=0@g' /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^UseEncryptedPassword=0|Test Setup: Set to use cleartext password for this test.
LocalInstallInitDataConfigChg|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -demo -local -d -c sdp_install.cfg -init -sdp_dir /opt/perforce/dev/sdp -no_ppr -limited_sudo|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - Basic Local with Config Changes.
LocalInstallInitDataConfigChg|no_cmd|0|/root/install_sdp/install_sdp.log|New sudoers file successfully installed.|Verify sudoers.
LocalInstallInitDataConfigChg|no_cmd|0|/etc/sudoers.d/perforce|Cmnd_Alias P4_SVC|Sudoers file sanity check.
LocalInstallInitDataConfigChg|no_cmd|0|/root/install_sdp/install_sdp.log|User perforce saved|Verify perforce P4USER created.
LocalInstallInitDataConfigChg|no_cmd|0|/root/install_sdp/install_sdp.log|Protections saved.|Verify Protections updated.
LocalInstallInitDataConfigChg|no_cmd|0|/root/install_sdp/install_sdp.log|Group Automation created.|Verify Automation group created.
LocalInstallInitDataConfigChg|no_cmd|0|/root/install_sdp/install_sdp.log|Depot spec saved.|Verify spec depot created.
LocalInstallInitDataConfigChg|no_cmd|0|/root/install_sdp/install_sdp.log|Depot unload saved.|Verify unload depot created.
LocalInstallInitDataConfigChg|no_cmd|0|/root/install_sdp/install_sdp.log|/p4/fgs/root|Verify P4ROOT for fgs instance.
LocalInstallInitDataConfigChg|no_cmd|0|/p4/common/config/.p4passwd.p4_fgs.admin|Complex|Verify complex password was set.
LocalInstallInitDataConfigChg|[[ ! -r /p4/common/config/.p4passwd.p4_fgs.admin.enc ]]|0|output||Ensure encrypted password file does not exist in cleartext mode.
LocalInstallInitDataConfigChg|[[ -r /p4/common/config/.p4passwd.p4_fgs.admin ]]|0|output||Ensure cleartext password file exists in cleartext mode.
LocalInstallInitDataConfigChg|grep -q Complex /p4/common/config/.p4passwd.p4_fgs.admin|0|output||Ensure cleartext password file contains unencrypted password.
#------------------------------------------------------------------------------
# Local Install Test - Initialize Data Set with Config Changes
LocalInstallSampleDepotDeepCfgChanges|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
LocalInstallSampleDepotDeepCfgChanges|mkdir -p /opt/perforce/p4-sdp/downloads /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Create dirs for local install.
LocalInstallSampleDepotDeepCfgChanges|cd /root && rsync -a /root/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Get p4_binaries.
LocalInstallSampleDepotDeepCfgChanges|cd /root && rsync -a /root/downloads/ /opt/perforce/p4-sdp/downloads|0|output||Test Setup: Get Sample Depot tarball.
LocalInstallSampleDepotDeepCfgChanges|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
LocalInstallSampleDepotDeepCfgChanges|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
LocalInstallSampleDepotDeepCfgChanges|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -C > sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4BinRel=|Test generation of sdp_install.cfg config file.
LocalInstallSampleDepotDeepCfgChanges|sed -E -i -e s/^P4BinRel=.*/P4BinRel=r25.1/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4BinRel=r25.1|Test setup: Change target p4d version to r25.1.
LocalInstallSampleDepotDeepCfgChanges|sed -E -i -e s/^P4USER=.*/P4USER=p4admin/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4USER=p4admin|Test Setup: Change SDP P4USER to p4admin.
LocalInstallSampleDepotDeepCfgChanges|sed -E -i -e s/^Instance=1/Instance=fgs/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^Instance=fgs|Test Setup: Change SDP instance to fgs.
LocalInstallSampleDepotDeepCfgChanges|sed -E -i -e s/^ServerID=.*/ServerID=commit.fgs/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^ServerID=commit.fgs|Test Setup: Change Commit ServerID to commit.fgs.
LocalInstallSampleDepotDeepCfgChanges|sed -E -i -e s@^P4Depots=.*@P4Depots=/BigDisk@g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4Depots=/BigDisk|Test Setup: Change /mnt/p4depots -> /BigDisk.
LocalInstallSampleDepotDeepCfgChanges|sed -E -i -e s@^P4Checkpoints=.*@P4Checkpoints=/BigDisk@g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4Checkpoints=/BigDisk|Test Setup: Change P4Checkpoints -> /BigDisk.
LocalInstallSampleDepotDeepCfgChanges|sed -E -i -e s@^P4DB1=.*@P4DB1=/DBs@g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4DB1=/DBs|Test Setup: Change /mnt/p4db-1 -> /DBs.
LocalInstallSampleDepotDeepCfgChanges|sed -E -i -e s@^P4DB2=.*@P4DB2=/DBs@g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4DB2=/DBs|Test Setup: Change /mnt/p4db-2 -> /DBs.
LocalInstallSampleDepotDeepCfgChanges|sed -E -i -e s@^P4Logs=.*@P4Logs=/Journals@g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4Logs=/Journals|Test Setup: Change /mnt/p4logs -> /Journals.
LocalInstallSampleDepotDeepCfgChanges|sed -E -i -e s/^OSUSER=.*/OSUSER=dude/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^OSUSER=dude|Test Setup: Change OSUSER from perforce to dude.
LocalInstallSampleDepotDeepCfgChanges|sed -E -i -e s@^OSUSER_HOME=.*@OSUSER_HOME=/home/dude@g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^OSUSER_HOME=/home/dude|Test Setup: Change OSUSER_HOME from /home/perforce to /home/dude.
LocalInstallSampleDepotDeepCfgChanges|sed -E -i -e s/^OSGROUP=.*/OSGROUP=p4admin/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^OSGROUP=p4admin|Test Setup: Change OSGROUP from perforce to p4admin.
LocalInstallSampleDepotDeepCfgChanges|sed -E -i -e 's/^OSUSER_ADDITIONAL_GROUPS=.*/OSUSER_ADDITIONAL_GROUPS=p4staff friends/g' /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^OSUSER_ADDITIONAL_GROUPS=p4staff|Test Setup: Change OSUSER_ADDITIONAL_GROUPS from empty to p4staff friends.
LocalInstallSampleDepotDeepCfgChanges|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -demo -local -d -c sdp_install.cfg -sampledepot -sdp_dir /opt/perforce/dev/sdp -no_ppr -limited_sudo|1|/root/install_sdp/install_sdp.log|Error: OSUSER_ADDITIONAL_GROUPS group p4staff does not exist|SDP Install Live Run with missing group; failure expected.
LocalInstallSampleDepotDeepCfgChanges|groupadd p4staff|0|output||Test Setup: Create group p4staff.
LocalInstallSampleDepotDeepCfgChanges|groupadd friends|0|output||Test Setup: Create group friends.
LocalInstallSampleDepotDeepCfgChanges|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -demo -local -d -c sdp_install.cfg -sampledepot -sdp_dir /opt/perforce/dev/sdp -no_ppr -limited_sudo|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - Local Sample Depot with Deep Config Changes.
LocalInstallSampleDepotDeepCfgChanges|no_cmd|0|/root/install_sdp/install_sdp.log|New sudoers file successfully installed.|Verify sudoers.
LocalInstallSampleDepotDeepCfgChanges|no_cmd|0|/etc/sudoers.d/dude|Cmnd_Alias P4_SVC|Sudoers file sanity check.
LocalInstallSampleDepotDeepCfgChanges|no_cmd|0|/root/install_sdp/install_sdp.log|User p4admin saved|Verify p4admin P4USER created.
LocalInstallSampleDepotDeepCfgChanges|no_cmd|0|/root/install_sdp/install_sdp.log|Protections saved.|Verify Protections updated.
LocalInstallSampleDepotDeepCfgChanges|no_cmd|0|/root/install_sdp/install_sdp.log|Group Automation created.|Verify Automation group created.
LocalInstallSampleDepotDeepCfgChanges|no_cmd|0|/root/install_sdp/install_sdp.log|Depot spec saved.|Verify spec depot created.
LocalInstallSampleDepotDeepCfgChanges|no_cmd|0|/root/install_sdp/install_sdp.log|Depot unload saved.|Verify unload depot created.
LocalInstallSampleDepotDeepCfgChanges|no_cmd|0|/root/install_sdp/install_sdp.log|/p4/fgs/root|Verify P4ROOT for fgs instance.
LocalInstallSampleDepotDeepCfgChanges|systemctl start opt_perforce_sdp_backup.service|0|output||Start backup service.
LocalInstallSampleDepotDeepCfgChanges|journalctl -u opt_perforce_sdp_backup.service --no-pager -n 500|0|output|SUCCESS: P4 SDP Backup completed|Confirm Backup successful.
#------------------------------------------------------------------------------
# Backup/Recovery with Multiple Instances. Start with Local Install
BackupRecoveryMultiInstance|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
BackupRecoveryMultiInstance|mkdir -p /opt/perforce/p4-sdp/downloads /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Create dirs for local install.
BackupRecoveryMultiInstance|cd /root && rsync -a /root/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Get p4_binaries.
BackupRecoveryMultiInstance|cd /root && rsync -a /root/downloads/ /opt/perforce/p4-sdp/downloads|0|output||Test Setup: Get Sample Depot tarball.
BackupRecoveryMultiInstance|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
BackupRecoveryMultiInstance|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
BackupRecoveryMultiInstance|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -C > sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4BinRel=|Test generation of sdp_install.cfg config file.
BackupRecoveryMultiInstance|sed -E -i -e s/^P4BinRel=.*/P4BinRel=r25.1/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4BinRel=r25.1|Test setup: Change target p4d version to r25.1.
BackupRecoveryMultiInstance|sed -E -i -e s/^P4USER=.*/P4USER=p4admin/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^P4USER=p4admin|Test Setup: Change SDP P4USER to p4admin.
BackupRecoveryMultiInstance|sed -E -i -e s/^Instance=1/Instance=fgs/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^Instance=fgs|Test Setup: Change SDP instance to fgs.
BackupRecoveryMultiInstance|sed -E -i -e s/^ServerID=.*/ServerID=commit.fgs/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^ServerID=commit.fgs|Test Setup: Change Commit ServerID to commit.fgs.
BackupRecoveryMultiInstance|sed -E -i -e s@^OSUSER_HOME=.*@OSUSER_HOME=/home/dude@g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^OSUSER_HOME=/home/dude|Test Setup: Change OSUSER_HOME from /home/perforce to /home/dude.
BackupRecoveryMultiInstance|sed -E -i -e s/^OSUSER=.*/OSUSER=dude/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^OSUSER=dude|Test Setup: Change OSUSER from perforce to dude.
BackupRecoveryMultiInstance|sed -E -i -e s/^OSGROUP=.*/OSGROUP=p4admin/g /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^OSGROUP=p4admin|Test Setup: Change OSGROUP from perforce to p4admin.
BackupRecoveryMultiInstance|sed -E -i -e 's/^OSUSER_ADDITIONAL_GROUPS=.*/OSUSER_ADDITIONAL_GROUPS=p4staff friends/g' /root/install_sdp/sdp_install.cfg|0|/root/install_sdp/sdp_install.cfg|^OSUSER_ADDITIONAL_GROUPS=p4staff|Test Setup: Change OSUSER_ADDITIONAL_GROUPS from empty to p4staff friends.
BackupRecoveryMultiInstance|groupadd p4staff|0|output||Test Setup: Create group p4staff.
BackupRecoveryMultiInstance|groupadd friends|0|output||Test Setup: Create group friends.
BackupRecoveryMultiInstance|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -demo -local -d -c sdp_install.cfg -sampledepot -sdp_dir /opt/perforce/dev/sdp -no_ppr -limited_sudo|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - Local Sample Depot with Deep Config Changes.
BackupRecoveryMultiInstance|sleep 5 && su - dude -c "p4login -v"|0|output||Test Setup: Doing a login to generate a tickets file.
BackupRecoveryMultiInstance|[[ -r /p4/fgs/.p4tickets ]]|0|output||Ensure .p4tickets file exists after having done 'p4login -v'.
BackupRecoveryMultiInstance|[[ -r /home/dude/.p4-sdp.home_dir_backup ]]|0|output||BackupHomeDir indicator file should exist in 'dude' user home dir.
BackupRecoveryMultiInstance|[[ -r /etc/sudoers.d/dude ]]|0|output||Sudoers file should exist due to '-limited_sudoers' install option.
BackupRecoveryMultiInstance|grep -q Full /home/dude/.p4-sdp.home_dir_backup|0|output||BackupHomeDir indicator file should be 'Full'.
BackupRecoveryMultiInstance|no_cmd|0|/root/install_sdp/install_sdp.log|New sudoers file successfully installed.|Verify sudoers.
BackupRecoveryMultiInstance|no_cmd|0|/etc/sudoers.d/dude|Cmnd_Alias P4_SVC|Sudoers file sanity check.
BackupRecoveryMultiInstance|no_cmd|0|/root/install_sdp/install_sdp.log|User p4admin saved|Verify p4admin P4USER created.
BackupRecoveryMultiInstance|no_cmd|0|/root/install_sdp/install_sdp.log|Protections saved.|Verify Protections updated.
BackupRecoveryMultiInstance|no_cmd|0|/root/install_sdp/install_sdp.log|Group Automation created.|Verify Automation group created.
BackupRecoveryMultiInstance|no_cmd|0|/root/install_sdp/install_sdp.log|Depot spec saved.|Verify spec depot created.
BackupRecoveryMultiInstance|no_cmd|0|/root/install_sdp/install_sdp.log|Depot unload saved.|Verify unload depot created.
BackupRecoveryMultiInstance|no_cmd|0|/root/install_sdp/install_sdp.log|/p4/fgs/root|Verify P4ROOT for fgs instance.
BackupRecoveryMultiInstance|sed -E -e 's/^OSUSER=.*/OSUSER=dude/g' -e 's/^OSGROUP=.*/OSGROUP=p4admin/g' -e 's/^P4_PORT=.*/P4_PORT=2666/g' -e 's/^P4BROKER_PORT=.*/P4BROKER_PORT=2999/g' -e 's/^MASTER_ID=.*/MASTER_ID=commit.2/g' /p4/sdp/Server/Unix/setup/mkdirs.fgs.cfg > /p4/sdp/Server/Unix/setup/mkdirs.2.cfg|0|/p4/sdp/Server/Unix/setup/mkdirs.2.cfg|OSUSER=dude|Test Setup: Prepare mkdirs.2.cfg.
BackupRecoveryMultiInstance|cd /p4/sdp/Server/Unix/setup && ./mkdirs.sh 2 -no_broker|0|output|mkdirs.sh: EXITCODE: 0|Add second SDP instance 2.
BackupRecoveryMultiInstance|[[ -x /p4/fgs/bin/p4broker_fgs_init ]]|0|output||Broker init script exists and executable for SDP instance fgs.
BackupRecoveryMultiInstance|[[ -r /etc/systemd/system/p4broker_fgs.service ]]|0|output||Broker service exists for SDP instance fgs.
BackupRecoveryMultiInstance|[[ ! -r /p4/2/bin/p4broker_2_init ]]|0|output||No broker init script for SDP instance 2.
BackupRecoveryMultiInstance|[[ ! -r /etc/systemd/system/p4broker_2.service ]]|0|output||No broker service for SDP instance 2.
BackupRecoveryMultiInstance|systemctl start opt_perforce_sdp_backup.service|0|output||Start backup service.
BackupRecoveryMultiInstance|journalctl -u opt_perforce_sdp_backup.service --no-pager -n 500|0|output|SUCCESS: P4 SDP Backup completed|Confirm Backup successful.
BackupRecoveryMultiInstance|su - dude -c ccheck.sh|0|/p4/fgs/logs/ccheck.log|Result: PASS with Grade|Test ccheck.sh; should pass with grade of A or B.
BackupRecoveryMultiInstance|[[ -x /mnt/p4depots/backup/opt_perforce_p4-sdp.${HOSTNAME%%.*}/recover_opt_perforce_sdp.sh ]]|0|output||SDP Recovery Script ready to use.
BackupRecoveryMultiInstance|diff /mnt/p4depots/backup/opt_perforce_p4-sdp.${HOSTNAME%%.*}/recover_opt_perforce_sdp*|1|output|/p4/2|Confirm SDP Recovery script backup was created and has expected diffs due to instance 2 being added.
BackupRecoveryMultiInstance|rsync -a /var/log/opt_perforce_sdp_backup/ /tmp/opt_perforce_sdp_backup|0|output||Test Support: Copy log from run of opt_perforce_sdp_backup.service to /tmp before DANGER_CLEANS.sh fries it.
BackupRecoveryMultiInstance|/opt/perforce/dev/bin/DANGER_CLEAN.sh -ued -y|0|output|Skipping cleanup of mount points and backup dirs due to '-ued'|Test Setup: Remove all SDP structures except mount points so we can test recovery.
BackupRecoveryMultiInstance|getent passwd dude|2|output||The user 'dude' should NOT exist after DANGER_CLEAN.sh.
BackupRecoveryMultiInstance|getent group p4admin|2|output||The group 'p4admin' should NOT exist after DANGER_CLEAN.sh.
BackupRecoveryMultiInstance|[[ ! -d /p4 ]]|0|output||The /p4 directory should NOT exist after DANGER_CLEAN.sh with -ued.
BackupRecoveryMultiInstance|[[ ! -d /p4/fgs ]]|0|output||The /p4/fgs directory should NOT exist after DANGER_CLEAN.sh with -ued.
BackupRecoveryMultiInstance|[[ ! -f /p4/fgs/.p4tickets ]]|0|output||The /p4/fgs/.p4tickets file should NOT exist after DANGER_CLEAN.sh with -ued.
BackupRecoveryMultiInstance|[[ -r /etc/sudoers.d/dude ]]|1|output||Sudoers file should NOT exist after DANGER_CLEAN.sh.
BackupRecoveryMultiInstance|mkdir /root/opt_perforce_sdp_backup && cd /root/opt_perforce_sdp_backup && cp /mnt/p4depots/backup/opt_perforce_p4-sdp.${HOSTNAME%%.*}/sdp_backup.${HOSTNAME%%.*}.tgz . && tar -xzvpf sdp_backup.${HOSTNAME%%.*}.tgz && cd opt_perforce_p4-sdp.${HOSTNAME%%.*} && ./recover_opt_perforce_sdp.sh|0|output||Testing recovery procedure as documented in 'opt_perforce_sdp_backup.sh -man' in RECOVERY PROCEDURE section.
BackupRecoveryMultiInstance|getent passwd dude|0|output||The user 'dude' should be recovered.
BackupRecoveryMultiInstance|getent group p4admin|0|output||The group 'p4admin' should be recovered.
BackupRecoveryMultiInstance|[[ -d /p4 ]]|0|output||The /p4 directory should be recovered.
BackupRecoveryMultiInstance|[[ -d /p4/fgs ]]|0|output||The /p4/fgs directory should be recovered.
BackupRecoveryMultiInstance|[[ -f /p4/fgs/.p4tickets ]]|0|output||The /p4/fgs/.p4tickets file should be recovered.
BackupRecoveryMultiInstance|[[ -f /home/dude/.p4aliases ]]|0|output||The ~dude/.p4aliases file should be recovered.
BackupRecoveryMultiInstance|[[ -r /etc/sudoers.d/dude ]]|0|output||Sudoers file should be recovered.
BackupRecoveryMultiInstance|su - dude -c recreate_offline_db.sh|0|/p4/fgs/logs/recreate_offline_db.log||Test recreate_offline_db.sh after recovery.
BackupRecoveryMultiInstance|su - dude -c "timeout 10s sudo systemctl start p4d_fgs" && sleep 5|0|/p4/fgs/logs/p4d_init.log|Starting /p4/fgs/bin/p4d_fgs|Test service start after recovery.
###TO DO: Re-enable this net test after enhancing edge_dump.sh to use the standard LogLink logic.
###BackupRecoveryMultiInstance|su - dude -c "edge_dump.sh fgs p4d_edge_syd"|1|/p4/fgs/logs/edge_dump.log|Could not confirm that p4d_edge_syd is an edge server|Test edge_dump.sh after recovery.
#------------------------------------------------------------------------------
# Local Install Test - Initialize Data Set - High Security
LocalInstallInitDataHighSec|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
LocalInstallInitDataHighSec|/opt/perforce/dev/bin/toggle_security_features.sh 1|0|output||Test Setup: Emulate Security Hardening
LocalInstallInitDataHighSec|mkdir -p /opt/perforce/p4-sdp/downloads /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Create dirs for local install.
LocalInstallInitDataHighSec|cd /root && rsync -a /root/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Get p4_binaries.
LocalInstallInitDataHighSec|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
LocalInstallInitDataHighSec|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
LocalInstallInitDataHighSec|tss-remove_rsync.sh|U|output||Test Setup: Remove rsync package with apt-get, dnf, or zypper.
LocalInstallInitDataHighSec|cd /root/install_sdp && umask 0027 && ./install_sdp.sh -y -demo -local -d -init -sdp_dir /opt/perforce/dev/sdp -no_ppr -limited_sudo|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - Basic Local with umask 0027.
LocalInstallInitDataHighSec|no_cmd|0|/root/install_sdp/install_sdp.log|New sudoers file successfully installed.|Verify sudoers.
LocalInstallInitDataHighSec|no_cmd|0|/etc/sudoers.d/perforce|Cmnd_Alias P4_SVC|Sudoers file sanity check.
LocalInstallInitDataHighSec|no_cmd|0|/root/install_sdp/install_sdp.log|User perforce saved|Verify perforce P4USER created.
LocalInstallInitDataHighSec|no_cmd|0|/root/install_sdp/install_sdp.log|Protections saved.|Verify Protections updated.
LocalInstallInitDataHighSec|no_cmd|0|/root/install_sdp/install_sdp.log|Group Automation created.|Verify Automation group created.
LocalInstallInitDataHighSec|no_cmd|0|/root/install_sdp/install_sdp.log|Depot spec saved.|Verify spec depot created.
LocalInstallInitDataHighSec|no_cmd|0|/root/install_sdp/install_sdp.log|Depot unload saved.|Verify unload depot created.
#------------------------------------------------------------------------------
# Local Install Test - Initialize Sample Depot
LocalInstallWithSD|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
LocalInstallWithSD|mkdir -p /opt/perforce/p4-sdp/downloads /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Create dirs for local install.
LocalInstallWithSD|cd /root && rsync -a /root/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Get p4_binaries.
LocalInstallWithSD|cd /root && rsync -a /root/downloads/ /opt/perforce/p4-sdp/downloads|0|output||Test Setup: Get Sample Depot tarball.
LocalInstallWithSD|cd /root && rsync -a --exclude=.p4root --exclude=.p4config.local /opt/perforce/dev/sdp/ /opt/perforce/p4-sdp/downloads/sdp|0|output||Test Setup: Get SDP dir
LocalInstallWithSD|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
LocalInstallWithSD|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
### These next few lines are intended test the safety feature where we fail
### doing a production install (i.e. not using '-demo') and the SDP mounts
### for /hx{depots,logs,metadata} are not real mount points. However, this
### test will fail to display the expected message if the machine well and
### truly does have valid /hx* mounts. Since this feature is already proven
### and not likley to break, for now we'll comment these tests out.
###LocalInstallWithSD|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -local -d -sampledepot -sdp_dir /opt/perforce/dev/sdp -no_ppr -limited_sudo|N|/root/install_sdp/install_sdp.log|Aborting due to failed storage configuration checks.|Attempt with bad storage for production.
####LocalInstallWithSD|no_cmd|N|/root/install_sdp/install_sdp.log|Error: Directory /mnt/p4depots should be a mounted volume|Missing /mnt/p4depots.
####LocalInstallWithSD|no_cmd|N|/root/install_sdp/install_sdp.log|Error: Directory /mnt/p4db should be a mounted volume|Missing /mnt/p4db.
####LocalInstallWithSD|no_cmd|N|/root/install_sdp/install_sdp.log|Error: Directory /mnt/p4logs should be a mounted volume|Missing /mnt/p4logs.
LocalInstallWithSD|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -demo -local -d -sampledepot -sdp_dir /opt/perforce/dev/sdp -no_ppr|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - Basic Local.
LocalInstallWithSD|no_cmd|0|/root/install_sdp/install_sdp.log|^Local mode|Verify local mode.
LocalInstallWithSD|no_cmd|0|/root/install_sdp/install_sdp.log|Using existing binary: /opt/perforce/p4-sdp/p4_binaries/p4d|Verify existing p4d binary used, no download.
LocalInstallWithSD|no_cmd|0|/root/install_sdp/install_sdp.log|Sample Depot configured successfully for instance 1|Verify Sample Depot load.
LocalInstallWithSD|no_cmd|0|/p4/1/logs/checkpoint.log|End p4_1 Checkpoint|Verify Sample Depot first checkpoint.
LocalInstallWithSD|su - perforce -c /p4/common/bin/p4sanity_check.sh|0|output|PASS: Sanity checks look OK|Sanity check on Sample Depot server.
LocalInstallWithSD|su - perforce -c /p4/common/bin/p4verify.sh|U|/p4/1/logs/p4verify.log|Submitted File Errors:.*0|Depot load check.
LocalInstallWithSD|su - perforce -c '/p4/common/bin/verify_sdp.sh -online -skip cron,license'|0|/p4/1/logs/verify_sdp.log||SDP verify check.
#------------------------------------------------------------------------------
# Online Install Test With Packages And Sample Depot
OnlineInstallWithPkgs|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
OnlineInstallWithPkgs|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
OnlineInstallWithPkgs|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
OnlineInstallWithPkgs|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -demo -extra_pkgs -d -sampledepot -sdp_dir /opt/perforce/dev/sdp -no_ppr -no_pkgs|2|output|USAGE ERROR: The '-no_pkgs' and '-extra_pkgs' options are mutually exclusive|SDP Install with package-related usage error.
OnlineInstallWithPkgs|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -demo -extra_pkgs -d -sampledepot -sdp_dir /opt/perforce/dev/sdp -no_ppr|0|/root/install_sdp/install_sdp.log|^SUCCESS:|SDP Install Live Run - With Extra Packages
OnlineInstallWithPkgs|no_cmd|0|/root/install_sdp/install_sdp.log|^Online mode|Verify online mode.
OnlineInstallWithPkgs|no_cmd|0|/root/install_sdp/install_sdp.log|^Acquiring binary /opt/perforce/p4-sdp/p4_binaries/p4d|Verify p4d downloaded.
OnlineInstallWithPkgs|no_cmd|0|/root/install_sdp/install_sdp.log|Sample Depot configured successfully for instance 1|Verify Sample Depot load.
OnlineInstallWithPkgs|no_cmd|0|/p4/1/logs/checkpoint.log|End p4_1 Checkpoint|Verify Sample Depot first checkpoint.
OnlineInstallWithPkgs|su - perforce -c /p4/common/bin/p4sanity_check.sh|0|output|PASS: Sanity checks look OK|Sanity check on Sample Depot server.
OnlineInstallWithPkgs|su - perforce -c /p4/common/bin/p4verify.sh|U|/p4/1/logs/p4verify.log|Submitted File Errors:.*0|Depot load check.
OnlineInstallWithPkgs|su - perforce -c '/p4/common/bin/verify_sdp.sh -online -skip cron,license'|0|/p4/1/logs/verify_sdp.log||SDP verify check.
#------------------------------------------------------------------------------
# Online Proxy Install
ProxyInstall|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
ProxyInstall|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
ProxyInstall|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
ProxyInstall|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -t p4p -sdp_dir /opt/perforce/dev/sdp -no_ppr|2|output|ServerType is p4p, but ListenPort is undefined|Proxy install usage error.
ProxyInstall|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -t p4p -lp 1666 -sdp_dir /opt/perforce/dev/sdp -no_ppr|2|output|ServerType is p4p, but TargetPort is undefined|Proxy install usage error.
ProxyInstall|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -t p4p -lp 1666 -tp public.perforce.com:1666 -sdp_dir /opt/perforce/dev/sdp|0|/root/install_sdp/install_sdp.log|SUCCESS:|Dry Run - Proxy Online Install.
ProxyInstall|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -t p4p -lp 1666 -tp public.perforce.com:1666 -sdp_dir /opt/perforce/dev/sdp|0|/root/install_sdp/install_sdp.log|SUCCESS:|Live Run - Proxy Online Install.
#------------------------------------------------------------------------------
# Local Proxy Install
LocalProxyInstall|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
LocalProxyInstall|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
LocalProxyInstall|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
LocalProxyInstall|mkdir -p /opt/perforce/p4-sdp/downloads /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Create dirs for local install.
LocalProxyInstall|cd /root && rsync -a /root/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Get p4_binaries.
LocalProxyInstall|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -t p4p -local -sdp_dir /opt/perforce/dev/sdp -no_ppr|2|output|ServerType is p4p, but ListenPort is undefined|Proxy install usage error.
LocalProxyInstall|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -t p4p -local -lp 1666 -sdp_dir /opt/perforce/dev/sdp -no_ppr|2|output|ServerType is p4p, but TargetPort is undefined|Proxy install usage error.
LocalProxyInstall|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -t p4p -local -lp 1670 -tp ssl:ppn.perforce.com:1670 -sdp_dir /opt/perforce/dev/sdp|0|/root/install_sdp/install_sdp.log|SUCCESS:|Dry Run - Proxy Local Install.
LocalProxyInstall|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -t p4p -local -lp ssl:1670 -tp ssl:ppn.perforce.com:1670 -sdp_dir /opt/perforce/dev/sdp -full_sudo|0|/root/install_sdp/install_sdp.log|SUCCESS:|Live Run - Proxy Local Install.
LocalProxyInstall|su - perforce -c '/p4/common/bin/verify_sdp.sh -skip p4t_files'|0|/p4/1/logs/verify_sdp.log|ALL CLEAN:|SDP verify check.
#------------------------------------------------------------------------------
# Local Broker Install
LocalBrokerInstall|/opt/perforce/dev/bin/DANGER_CLEAN.sh -y|0|output||Test Setup: Remove all SDP structures.
LocalBrokerInstall|mkdir -p /root/install_sdp|0|output||Test Setup Step: Create /root/install_sdp directory.
LocalBrokerInstall|cp -p /opt/perforce/dev/sdp/Server/Unix/setup/install_sdp.sh /root/install_sdp/.|0|output||Test Setup: Copy install_sdp.sh script to /root/install_sdp.
LocalBrokerInstall|mkdir -p /opt/perforce/p4-sdp/downloads /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Create dirs for local install.
LocalBrokerInstall|cd /root && rsync -a /root/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||Test Setup: Get p4_binaries.
LocalBrokerInstall|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -t p4broker -local -sdp_dir /opt/perforce/dev/sdp -no_ppr|2|output|ServerType is p4broker, but ListenPort is undefined|Broker install usage error.
LocalBrokerInstall|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -t p4broker -local -lp 1666 -sdp_dir /opt/perforce/dev/sdp -no_ppr|2|output|ServerType is p4broker, but TargetPort is undefined|Broker install usage error.
LocalBrokerInstall|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -t p4broker -local -lp 1666 -tp public.perforce.com:1666 -sdp_dir /opt/perforce/dev/sdp|0|/root/install_sdp/install_sdp.log|SUCCESS:|Dry Run - Broker Install.
LocalBrokerInstall|cd /root/install_sdp && umask 0022 && ./install_sdp.sh -y -t p4broker -local -lp ssl:1666 -tp public.perforce.com:1666 -sdp_dir /opt/perforce/dev/sdp|0|/root/install_sdp/install_sdp.log|SUCCESS:|Live Run - Broker Install.
LocalBrokerInstall|su - perforce -c '/p4/common/bin/verify_sdp.sh -skip p4t_files'|0|/p4/1/logs/verify_sdp.log|ALL CLEAN:|SDP verify check.
LocalBrokerInstall|stat -c %U /p4/common|0|output|perforce|Check that 'chown -h' delivers POSIX-compliant results. Owner should be 'perforce', not 'root'. The first release of Ubuntu 26.04 fails this test.
#------------------------------------------------------------------------------
# Special: Battle School Workshop Reset
#
# Note that these BSW* "tests" are skipped when using the 'r' wrapper without
# specifying a TestGroup, since these are not part of the SDP regression test
# suite. Rather than being tests, these use the test suite harness (which
# contains DANGER_CLEAN.sh and similar scripts useful for BSW lab resets) to
# the lab environment between labs.
#
# These are intended to be called by other automation, not directly called
# by humans. The automation will call:
# r BSW_Commit on the BSW commit server.
# r BSW_OtherHosts on all other BSW P4 server machines.
#
BSW_Commit|/opt/perforce/.dev/bin/DANGER_CLEAN.sh -bsw -y|0|output||BSW Setup: Remove SDP and BSW dirs.
BSW_Commit|mkdir -p /opt/perforce/p4-sdp/downloads|0|output||BSW Setup: Create /opt/perforce/p4-sdp for '-local' install.
BSW_Commit|rsync -a --delete /opt/perforce/.dev/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||BSW Setup for '-local' install, populate p4_binaries.
BSW_Commit|rsync -a --delete /opt/perforce/.dev/downloads/ /opt/perforce/p4-sdp/downloads|0|output||BSW Setup for '-local' install, populate downloads.
BSW_Commit|rsync -a /opt/perforce/.dev/sdp/Server/Unix/setup/install_sdp.sh /root/sdp_install/install_sdp.sh|0|output||BSW Setup - Get latest install_sdp.sh
BSW_Commit|cd /root/sdp_install && umask 0022 && ./install_sdp.sh -c sdp_install.${HOSTNAME%%.*}.cfg -y -local -keep_env -d -sampledepot -sdp_dir /opt/perforce/.dev/sdp -sdp_overlay_dir /usr/local/p4battleschool/sdp.overlay -no_ppr -no_pkgs|0|/root/sdp_install/install_sdp.log|^SUCCESS:|BSW Reset: install_sdp is done.
BSW_OtherHosts|/opt/perforce/.dev/bin/DANGER_CLEAN.sh -bsw -y|0|output||BSW Setup: Remove SDP and BSW dirs.
BSW_OtherHosts|mkdir -p /opt/perforce/p4-sdp/downloads|0|output||BSW Setup: Create /opt/perforce/p4-sdp for '-local' install.
BSW_OtherHosts|rsync -a --delete /opt/perforce/.dev/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||BSW Setup for '-local' install, populate p4_binaries.
BSW_OtherHosts|rsync -a --delete /opt/perforce/.dev/downloads/ /opt/perforce/p4-sdp/downloads|0|output||BSW Setup for '-local' install, populate downloads.
BSW_OtherHosts|rsync -a /opt/perforce/.dev/sdp/Server/Unix/setup/install_sdp.sh /root/sdp_install/install_sdp.sh|0|output||BSW Setup - Get latest install_sdp.sh
BSW_OtherHosts|cd /root/sdp_install && umask 0022 && ./install_sdp.sh -c sdp_install.${HOSTNAME%%.*}.cfg -y -local -keep_env -d -empty -sdp_dir /opt/perforce/.dev/sdp -sdp_overlay_dir /usr/local/p4battleschool/sdp.overlay -no_ppr -no_pkgs|0|/root/sdp_install/install_sdp.log|^SUCCESS:|BSW Reset: install_sdp is done.
# EFS Secondary servers (bos-02 shares EFS with bos-01; syd-05 shares EFS with syd-04)
# use this group instead of BSW_OtherHosts. Skips DANGER_CLEAN (which would wipe
# EFS-shared depot content) and uses install_sdp.sh -ued (use existing data) to
# preserve EFS contents while refreshing SDP scripts and binaries.
BSW_EFSSecondary|mkdir -p /opt/perforce/p4-sdp/downloads|0|output||BSW EFS Secondary: Create /opt/perforce/p4-sdp for -local install.
BSW_EFSSecondary|rsync -a --delete /opt/perforce/.dev/p4_binaries/ /opt/perforce/p4-sdp/p4_binaries|0|output||BSW EFS Secondary: populate p4_binaries.
BSW_EFSSecondary|rsync -a --delete /opt/perforce/.dev/downloads/ /opt/perforce/p4-sdp/downloads|0|output||BSW EFS Secondary: populate downloads.
BSW_EFSSecondary|rsync -a /opt/perforce/.dev/sdp/Server/Unix/setup/install_sdp.sh /root/sdp_install/install_sdp.sh|0|output||BSW EFS Secondary: Get latest install_sdp.sh
BSW_EFSSecondary|rm -f /root/sdp_install/install_sdp.log|0|output||BSW EFS Secondary: Remove stale install_sdp.log symlink.
BSW_EFSSecondary|rm -rf /opt/perforce/p4-sdp/p4|0|output||BSW EFS Secondary: Remove stale p4-sdp/p4 dir so install_sdp.sh can recreate it.
BSW_EFSSecondary|cd /root/sdp_install && umask 0022 && ./install_sdp.sh -c sdp_install.${HOSTNAME%%.*}.efs.cfg -y -local -keep_env -d -ued -sdp_dir /opt/perforce/.dev/sdp -sdp_overlay_dir /usr/local/p4battleschool/sdp.overlay -no_ppr -no_pkgs|0|/root/sdp_install/install_sdp.log|^SUCCESS:|BSW EFS Secondary Reset: install_sdp done.
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #4 | 33179 | Claude (AI Agent by Anthropic) |
Rename /root/helix_binaries to /root/p4_binaries consistently; fix init_root_dirs_for_local_installs.sh's stale duplicate-download logic. cli_tests.cfg used /root/helix_binaries as its rsync source in all 14 Sample-Depot/local-install test-setup steps, while bootstrap_test_machine.sh (new this session) independently creates and populates that same cache directory for its own initial-clone bootstrap need -- both under the old pre-SDP-1379 Helix-branded name. Renamed to /root/p4_binaries in both. init_root_dirs_for_local_installs.sh (older, predates bootstrap_test_machine.sh) created BOTH /root/helix_binaries and /root/p4_binaries as a redundant duplicate download; its own comment mislabeled helix_binaries as the 'legacy' name even though it was the only one cli_tests.cfg ever actually used. Its preflight check also unconditionally bailed if either already existed, meaning it could no longer run on any machine already bootstrapped via bootstrap_test_machine.sh. Simplified to a single /root/p4_binaries (skipping the download if bootstrap_test_machine.sh already populated it) and /root/downloads (the Sample Depot tarball cache, which nothing else populates). Verified on the r9x86_64 canary: LocalInstallWithSD (Sample Depot group) 15/15, and a full suite run of 287/287 with zero failures. Agent: Claude Code (Sonnet 5, claude-sonnet-5) |
||
| #3 | 33168 | Claude (AI Agent by Anthropic) |
Adapt cli_tests.cfg to the SDP-1379 Helix->P4 rebranding, confirmed authoritative by the user: /hxdepots -> /mnt/p4depots, /hxlogs -> /mnt/p4logs, /hxmetadata[1,2] -> /mnt/p4db-1/-2 (single volume: /mnt/p4db); config variable names also changed (HxDepots/HxCheckpoints/HxMetadata1/HxMetadata2/HxLogs -> P4Depots/P4Checkpoints/P4DB1/P4DB2/P4Logs, confirmed against install_sdp.sh's own Config[] keys in //p4-sdp/dev_rebrand); package base /opt/perforce/helix-sdp -> /opt/perforce/p4-sdp and its helix_binaries subdir -> p4_binaries (confirmed against SDPPackageBase/LocalInstallBinDir); backup dir naming opt_perforce_helix-sdp.<host> -> opt_perforce_p4-sdp.<host> (confirmed against opt_perforce_sdp_backup.sh). Left /root/helix_binaries untouched -- that's this test suite's own bootstrap-time staging directory (see bootstrap_test_machine.sh), unrelated to the SDP's internal package structure. This is a broader fix than what unblocked the immediate PreflightAbort failure (change 33167) -- found while running the r9x86_64 canary's full suite (Task 1.3) and pursuing the user's direction to proactively hunt for rebranding-related staleness across the whole test suite, not just the one failing test. Agent: Claude Code, Model: Claude Sonnet 5 (claude-sonnet-5), operating as bot_Claude_Anthropic. |
||
| #2 | 33167 | Claude (AI Agent by Anthropic) |
Fix PreflightAbort test in cli_tests.cfg: install_sdp.sh in //p4-sdp/dev_rebrand now defaults to /opt/perforce/p4-sdp (SDP-1379 Helix->P4 rebranding already landed there), not /opt/perforce/helix-sdp. The test's setup step still created the old path, so its precondition for the expected abort never actually matched, and the test silently passed through instead of aborting as expected. Found while running the full suite on the r9x86_64 canary (Task 1.3). Note: many other cli_tests.cfg test groups further down still reference /opt/perforce/helix-sdp and helix_binaries -- this fix only addresses the one test actually reached so far; a fuller audit is likely needed as more of the suite is exercised against dev_rebrand. Agent: Claude Code, Model: Claude Sonnet 5 (claude-sonnet-5), operating as bot_Claude_Anthropic. |
||
| #1 | 33144 | C. Thomas Tyler | Initialized //test-install_sdp/dev with p4 populate -b test-install_sdp_Classic_to_Streams | ||
| //guest/tom_tyler/sw/main/install_sdp/dev/bin/cli_tests.cfg | |||||
| #73 | 33079 | C. Thomas Tyler | Added more clarity to failing test. | ||
| #72 | 33051 | C. Thomas Tyler | Added test for POSIX compliant 'chown -h'; currently fails on Ubuntu 26.04. | ||
| #71 | 33015 | C. Thomas Tyler |
Test suite robustness: Use journalctl for backup service check. Tests 157 and its BackupRecoveryMultiInstance equivalent were checking 'sleep 20 && systemctl status opt_perforce_sdp_backup.service' for the SUCCESS message, which failed intermittently due to two issues: 1. systemctl status shows only the last 10 journal lines by default. If the backup script produces more output after the SUCCESS message, the message is pushed out of the window. 2. The backup script uses 'exec > >(tee "$Log")' for logging. A race condition between bash exiting and the tee subprocess flushing its buffer can cause the last few output lines (including the SUCCESS summary) to never reach the journal at all. This is the primary cause of the transient failure. Fix: Replace the fragile systemctl status check with: journalctl -u opt_perforce_sdp_backup.service --no-pager -n 500 This also removes the unnecessary 'sleep 20': systemctl start blocks until a Type=oneshot service completes, so the service is already done before this test runs. The expected exit code changes from N (NonZero) to 0, since journalctl exits 0 on success rather than the 3 returned by systemctl status for an inactive service. Note: The tee race condition root cause will be addressed separately in logging.lib for SDP 2026.1 Patch 1 using a targeted wait on the tee PID. |
||
| #70 | 33009 | C. Thomas Tyler |
Using a longer sleep to give opt_perforce_sdp_backup more time to display SUCCESS. This is to fix a transient text failure that seems to be a timing issue, since a manual check after the test failure does display the required SUCCESS message. The test failure that occaisonally occurs is accompanied by this indicator: Expected string [SUCCESS: P4 SDP Backup completed] NOT found in command output. |
||
| #69 | 32948 | C. Thomas Tyler |
Changed tests for non-default p4d version that used r23.1 and r23.2 versions to use r25.1 (the default is r25.2 currently). This was done to enable testing on aarch64 platform; r25.1 is the first version to support the aarch64 platform. |
||
| #68 | 32660 | C. Thomas Tyler |
BSW_EFSSecondary: rm stale p4-sdp/p4 dir before install_sdp.sh Without DANGER_CLEAN, the /opt/perforce/p4-sdp/p4 dir from the AMI persists, causing install_sdp.sh to fail at mkdir. Remove it before running install_sdp.sh so it can properly create the directory with the right ServerType structure. |
||
| #67 | 32657 | C. Thomas Tyler |
Fix BSW_Commit/BSW_OtherHosts: restore .cfg suffix (only EFSSecondary uses .efs.cfg) Change 285 inadvertently changed all three groups to use .efs.cfg. This reverts BSW_Commit and BSW_OtherHosts back to .cfg while keeping BSW_EFSSecondary on .efs.cfg as intended. |
||
| #66 | 32656 | C. Thomas Tyler |
BSW_EFSSecondary: use .efs.cfg configs, fix install_sdp.log symlink conflict - Use sdp_install.HOSTNAME.efs.cfg (ServerType=p4d_filtered_replica) for EFS secondary servers so install_sdp.sh creates checkpoints.<suffix> dirs. - Add rm -f install_sdp.log before install_sdp.sh to clear stale symlink. |
||
| #65 | 32654 | C. Thomas Tyler |
Added BSW_EFSSecondary test group for EFS lab secondary servers (bos-02, syd-05). EFS secondary servers share a depot volume with their primary (bos-02 shares with bos-01; syd-05 shares with syd-04). BSW_OtherHosts runs DANGER_CLEAN which wipes all SDP mount points including the shared EFS depot, destroying the seed checkpoint. BSW_EFSSecondary skips DANGER_CLEAN and uses install_sdp.sh -ued (use existing data) to refresh SDP scripts/binaries while preserving the EFS-shared depot content. Note: lab_engine handles removal of any stray license files on edge/downstream servers after checkpoint replay (per BSW-43 fix). Related: BSW-43 |
||
| #64 | 32159 | C. Thomas Tyler | Adapted test suite to use new recovery procedure. | ||
| #63 | 32118 | C. Thomas Tyler | Increased all sleep delays to 5s to improve test suite reliability. | ||
| #62 | 32084 | C. Thomas Tyler | Disabled broken test. | ||
| #61 | 32083 | C. Thomas Tyler | Test correction. | ||
| #60 | 32070 | C. Thomas Tyler | Expanded tests. | ||
| #59 | 32067 | C. Thomas Tyler | Disabled broken tests for the moment. | ||
| #58 | 32066 | C. Thomas Tyler | Refined tests for group BackupRecoveryMultiInstance. | ||
| #57 | 32065 | C. Thomas Tyler | Added test group: BackupRecoveryMultiInstance | ||
| #56 | 32063 | C. Thomas Tyler | Added new test group BackupRecoveryMultiInstance | ||
| #55 | 32013 | C. Thomas Tyler | Added 'BackupRecoveryMultiInstance' test group, WIP. | ||
| #54 | 32012 | C. Thomas Tyler | Removed obsolete ###DELETE commented-out entries. | ||
| #53 | 32011 | C. Thomas Tyler |
Established 'tss-' prefix for Test Support Scripts, and added a doc note in the InstallSDP-TestServerSetup.md doc file. |
||
| #52 | 31949 | C. Thomas Tyler | Test refinement to remove extranneous errors. | ||
| #51 | 31946 | C. Thomas Tyler | Added tests for when systemd services are expected/not expected. | ||
| #50 | 31945 | C. Thomas Tyler | Added tests to ensure cleartext behaves as expected. | ||
| #49 | 31936 | C. Thomas Tyler | Added new test group LocalInstallEmptyNoBroker. | ||
| #48 | 31900 | C. Thomas Tyler |
Added test for '-ued' option. Added usage tests to ensure specifying multiple of 'specify only one' options results in usage error. Optimized '-local' installs to use local copy of Sample Depot tarball. |
||
| #47 | 31898 | C. Thomas Tyler | Added test for SDP backup script. | ||
| #46 | 31888 | C. Thomas Tyler | Adjusted test expectations. | ||
| #45 | 31871 | C. Thomas Tyler | Optimized test setup to avoid unnecessary rsync of .p4root and .p4config* files. | ||
| #44 | 31841 | C. Thomas Tyler | Workaround for issue with 'p4 monitor show -L' not working on some platforms. | ||
| #43 | 31785 | C. Thomas Tyler | Added new '-keep_env' option to install_sdp.sh calls. | ||
| #42 | 31765 | C. Thomas Tyler | Corrected test configuration. | ||
| #41 | 31762 | C. Thomas Tyler | Tweaked standalone broker and proxy install tests. | ||
| #40 | 31759 | C. Thomas Tyler | Refined Battle School Workshop init step. | ||
| #39 | 31720 | C. Thomas Tyler | Added test to ensure 'p4 monitor show -L' works. | ||
| #38 | 31693 | C. Thomas Tyler |
For BSW usage only, change the DEV_HOME from /opt/perforce/dev to /opt/perforce/.dev. |
||
| #37 | 31687 | C. Thomas Tyler | Added '-sdp_overlay_dir' option to BSW entries. | ||
| #36 | 31685 | C. Thomas Tyler | Separated BSW into BSW_Commit and BSW_OtherHosts. | ||
| #35 | 31684 | C. Thomas Tyler | Performance optimization for BSW lab reset. | ||
| #34 | 31680 | C. Thomas Tyler |
Added special 'BSW' to test suite for Battle School purposes; this is excluded from routine SDP regression test suite runs as it is is used only for Battle School. |
||
| #33 | 31465 | C. Thomas Tyler | Added test to confirm complex password was written. | ||
| #32 | 31450 | C. Thomas Tyler | Added test of complex password. | ||
| #31 | 31438 | C. Thomas Tyler | Fixed typo in test config. | ||
| #30 | 31296 | C. Thomas Tyler | Added test for deep config changes. | ||
| #29 | 31291 | C. Thomas Tyler | Added more config change tests. | ||
| #28 | 31280 | C. Thomas Tyler | Added new tests with more config file changes. | ||
| #27 | 31250 | C. Thomas Tyler | Corrected formatting issue for new test setup entries to remove rsync (as a test). | ||
| #26 | 31247 | C. Thomas Tyler |
Enhanced test setup step to uninstall rsync so it works with all supported package repos. |
||
| #25 | 31239 | C. Thomas Tyler |
Added new LocalInstallInitDataHighSec test to test with "high security" umask 0027. Modified supporting script toggle_security_features.sh. Modified all tests that call install_sdp.sh to set umask explicitly; 0022 for standard security, 0027 for high security. |
||
| #24 | 31221 | C. Thomas Tyler |
Removed '-no_systemd' from most tests, as that limits other kinds of testing. Now there is just one test to exercise the combination of '-no_systemd' and '-no_sudo'. |
||
| #23 | 31146 | C. Thomas Tyler | Commented out tests that fail if /hx* are really mount points. | ||
| #22 | 31145 | C. Thomas Tyler |
Adapted test to avoid using '-no_pkgs' to avoid getting unnecessary errors due to missing pacakges that the script knows how to install. The original idea was that tests would start very minimalistic, e.g. having earlier tests do as little as possible with various '-no_this' and '-no_that' options (e.g. 'no_pkgs'). However, now that we have test groups and each test group should be exeutable indepdently with no dependency on order of tests done, this had to change. Now each test will try to install needed packages. |
||
| #21 | 31117 | C. Thomas Tyler |
Added new test group OnlineInstallBasicOldP4D, needed to test fix to SDP-1182 (bug in install_sdp.sh ignoring when an old p4d version was specified). Changed test setup commands to make it more robust after recent changes to DANGER_CLEAN.sh. |
||
| #20 | 31114 | C. Thomas Tyler | Change 'cp -p' to 'cp -f -p' in test setup commands. | ||
| #19 | 30896 | C. Thomas Tyler |
Made tests less brittle by allowing verify_sdp.sh to display NO ERRORS or ALL CLEAN by requiring only a non-zero exit code. |
||
| #18 | 30791 | C. Thomas Tyler | Added call to verify_sdp.sh after proxy and broker install tests. | ||
| #17 | 30790 | C. Thomas Tyler | Adapted to changed command lines. | ||
| #16 | 30779 | C. Thomas Tyler | Adapted to changed command line options. | ||
| #15 | 30778 | C. Thomas Tyler | Added proxy and broker install tests. | ||
| #14 | 30776 | C. Thomas Tyler | Added test with packages. | ||
| #13 | 30771 | C. Thomas Tyler |
Refactored to use /root/install_sdp rather than /tmp/install_sdp, to better reflect production usage. Also tweaked to preserver logs for a series of test runs. |
||
| #12 | 30767 | C. Thomas Tyler | Fixed typo. | ||
| #11 | 30763 | C. Thomas Tyler |
Added more tests. Added redundant tests to enable some groups to be called independently. |
||
| #10 | 30750 | C. Thomas Tyler | Added test groups. | ||
| #9 | 30745 | C. Thomas Tyler | Decent set of basic tests. | ||
| #8 | 30733 | C. Thomas Tyler | Revised tests to use DANGER_CLEAN.sh for test prep. | ||
| #7 | 30727 | C. Thomas Tyler | Refined tests. | ||
| #6 | 30725 | C. Thomas Tyler | Added more tests and took advantage of new 'no_cmd' test suite feature. | ||
| #5 | 30723 | C. Thomas Tyler | Refined tests. | ||
| #4 | 30707 | C. Thomas Tyler | Adjusted test setup. | ||
| #3 | 30705 | C. Thomas Tyler | Tests WIP. | ||
| #2 | 30694 | C. Thomas Tyler | Refined tests. | ||
| #1 | 30693 | C. Thomas Tyler | Added dev utils and tests. | ||