]> git.proxmox.com Git - rustc.git/blame - src/compiler-rt/test/xray/TestCases/Linux/argv0-log-file-name.cc
New upstream version 1.19.0+dfsg3
[rustc.git] / src / compiler-rt / test / xray / TestCases / Linux / argv0-log-file-name.cc
CommitLineData
7cac9316
XL
1// Check to make sure argv[0] is contained within the (randomised) XRay log file
2// name.
3
4// RUN: %clangxx_xray -std=c++11 %s -o %t
5// RUN: %run %t > xray.log.file.name 2>&1
6// RUN: ls | FileCheck xray.log.file.name
7// RUN: rm xray-log.* xray.log.file.name
8
9#include <cstdio>
10#include <libgen.h>
11
12[[clang::xray_always_instrument]] int main(int argc, char *argv[]) {
13 printf("// CHECK: xray-log.%s.{{.*}}\n", basename(argv[0]));
14}