[hwasan] Omit tag check for null pointers (#122206)
[llvm-project.git] / llvm / utils / lit / tests / Inputs / test_retry_attempts / test.py
bloba139976cc49ec52f3609b048591bc248eea75855
1 # RUN: "%python" "%s" "%counter"
3 import sys
4 import os
6 counter_file = sys.argv[1]
8 # The first time the test is run, initialize the counter to 1.
9 if not os.path.exists(counter_file):
10 with open(counter_file, "w") as counter:
11 counter.write("1")
13 # Succeed if this is the fourth time we're being run.
14 with open(counter_file, "r") as counter:
15 num = int(counter.read())
16 if num == 4:
17 sys.exit(0)
19 # Otherwise, increment the counter and fail
20 with open(counter_file, "w") as counter:
21 counter.write(str(num + 1))
22 sys.exit(1)