Re: [Lldb-commits] New llvm build server account request

2015-10-20 Thread Ying Chen via lldb-commits
Hello Kamil, Galina,

If you would like to build LLDB with cmake and ninja, I suggest to consider
the following two factory functions.
Depends on what you described, I feel the first one works better for you.

1. getLLDBUbuntuCMakeBuildFactory
If you only run local lldb tests, this is the factory to use.

For example, if you would like to build host lldb with clang and Release
config, and run tests with clang on x86_64 host,
then call the function this way,

getLLDBUbuntuCMakeBuildFactory(build_compiler = "clang",
   build_type = "Release",
   local_test_archs=["x86_64"],
   local_test_compilers=["clang"])
If you would like to run local tests with gcc compiler as well, then pass
local_test_compilers=["clang", "gcc"]

Dependency: You need to have the required packages to build lldb.

Note*: please disable the last step in this function
"archiveLLDBTestTraces", this steps will upload the log files to a cloud
storage that you might not have access to.

2. getLLDBScriptCommandsFactory

If you have multiple targets to run tests against, for example, remote
linux, remote android targets and etc, you should choose this factory.
The advantage of this factory is that it calls a script in each step, so
it's highly configurable and easy to make changes.
You just need to make sure the scripts are in builder machine and have the
correct commands.
For your reference, the ones that we're currently using could be found here.
https://android.googlesource.com/platform/external/lldb-utils/+/lldb-master-dev/buildbotScripts/bashShell/svntotbuild/
updateScript as the first step, is just copy the scripts to local builders.

Please let me know if you have further questions.

Thanks,
Ying


On Tue, Oct 20, 2015 at 1:46 PM, Kamil Rytarowski  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Hello Ying,
>
> I'm in trouble with my attempts to connect my NetBSD/amd64 machine to
> the LLDB/LLVM build zone.
>
> My host is NetBSD-7.0 (with buildslave ID: lldb-amd64-ninja-netbsd7).
> I use pkgsrc (2015Q3) to ship packages. I'm attaching a list of
> installed ones to this mail.
>
> I talked with Joerg and it was decided to go for CMake and Ninja, we
> don't want to change it for now (at least till single machine will be
> plugged in).
>
> Please try to spawn local NetBSD session and connect to the staging
> buildbot and debug it locally, to cut the number of iterations between
> me and the Galina.
>
> I'm adding here a short tutorial to get to reproduce quickly the setup
> of mine. It will take you like 2-5 minutes to get into installed
> system (depends of an internet connection).
>
> 1. Prepare a disk image.
> $ qemu-img create -f qcow2 netbsd7.0_amd64 10G
>
> 2. Get an installation media.
> $ $FETCH_TOOL
> ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-7.0/amd64/installation/cdrom/boot
> - -com.iso
>
> 3. Spawn installation
> $ qemu-system-x86_64 \
> -enable-kvm \
> -net user \
> -m 2G \
> -cdrom boot-com.iso \
> -nographic \
> -smp cores=2 \
> -hda netbsd7.0_amd64 \
> -boot d
>
> 4. Inside the installer push ctrl-c and get the command line.
>
> 5. Setup network connection:
> # dhcpcd
>
> 6. Go to a writable dir, like /tmp
> # cd /tmp
>
> 7. Fetch the autoinst.sh script of mine
> # ftp ftp://ftp.netbsd.org/pub/NetBSD/misc/kamil/autoinst.sh
>
> # sh autoinst.sh -s 128 -r mypass -c com0 -C 9600 -p wd0
>
> (take a coffee break)
>
> 8. If everything went OK, just type:
> # poweroff
>
> 9. Start your newly installed system
> qemu-system-x86_64 \
> -enable-kvm \
> -net user \
> -m 2G \
> -nographic \
> -smp cores=2 \
> -hda netbsd7.0_amd64 \
> -boot c
> (root password is empty)
>
> 10. Install dependencies from pkgsrc, like:
> # cd /usr/pkgsrc/devel/cmake && make install
>
> Please install packags needed for buildslave, create dedicated user
> and try to connect it to the salve.
>
> Thank you in advance,
>
> On 20.10.2015 21:40, Galina Kistanova wrote:
> > Hello Kamil,
> >
> > It looks like you are missing dependencies for the LLDB builder
> > you have chosen.
> > http://lab.llvm.org:8014/builders/lldb-amd64-ninja-netbsd7/builds/75/s
> teps/update%20scripts/logs/stdio
> >
> >
> >
> The getLLDBScriptCommandsFactory build factory does not document
> > the assumed dependency, so you may want to contact Ying Chen, who
> > is the author for the complete list of dependencies.
> >
> > Another thing you may want to do is to reconsider the builder you
> > want to use. Maybe LLDBBuilder.getLLDBBuildFactory would work
> > better for you, though it requires autoconfig and make.
> >
> > I'm adding the LLDB mail list in case somebody has an idea of what
> > would be the easiest way to get the NetBSD builder for LLDB up and
> > running.
> >
> > Hello everyone,
> >
> > Kamil is on the mission of getting LLDB builder for NetBSDwhich
> > woul

Re: [Lldb-commits] New llvm build server account request

2015-10-20 Thread Ying Chen via lldb-commits
Please check again.
Please note that this file needs to be included in your PATH. The rest of
the scripts don't have to.
Sample of test configuration file could be found here.
https://android.googlesource.com/platform/external/lldb-utils/+/lldb-master-dev/buildbotScripts/testCfg/

On Tue, Oct 20, 2015 at 3:50 PM, Kamil Rytarowski  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Where can I find this updateScripts.sh? It's missing under your link:
>
> https://android.googlesource.com/platform/external/lldb-utils/+/lldb-mas
> ter-dev/buildbotScripts/bashShell/svntotbuild/
>
> On 21.10.2015 00:29, Ying Chen wrote:
> > Hello Kamil, Galina,
> >
> > If you would like to build LLDB with cmake and ninja, I suggest to
> > consider the following two factory functions. Depends on what you
> > described, I feel the first one works better for you.
> >
> > 1. getLLDBUbuntuCMakeBuildFactory If you only run local lldb tests,
> > this is the factory to use.
> >
> > For example, if you would like to build host lldb with clang and
> > Release config, and run tests with clang on x86_64 host, then call
> > the function this way,
> >
> > getLLDBUbuntuCMakeBuildFactory(build_compiler = "clang", build_type
> > = "Release", local_test_archs=["x86_64"],
> > local_test_compilers=["clang"]) If you would like to run local
> > tests with gcc compiler as well, then pass
> > local_test_compilers=["clang", "gcc"]
> >
> > Dependency: You need to have the required packages to build lldb.
> >
> > Note*: please disable the last step in this function
> > "archiveLLDBTestTraces", this steps will upload the log files to a
> > cloud storage that you might not have access to.
> >
> > 2. getLLDBScriptCommandsFactory
> >
> > If you have multiple targets to run tests against, for example,
> > remote linux, remote android targets and etc, you should choose
> > this factory. The advantage of this factory is that it calls a
> > script in each step, so it's highly configurable and easy to make
> > changes. You just need to make sure the scripts are in builder
> > machine and have the correct commands. For your reference, the ones
> > that we're currently using could be found here.
> > https://android.googlesource.com/platform/external/lldb-utils/+/lldb-m
> aster-dev/buildbotScripts/bashShell/svntotbuild/
> >
> >
> updateScript as the first step, is just copy the scripts to local builde
> rs.
> >
> > Please let me know if you have further questions.
> >
> > Thanks, Ying
> >
> >
> > On Tue, Oct 20, 2015 at 1:46 PM, Kamil Rytarowski  > > wrote:
> >
> > Hello Ying,
> >
> > I'm in trouble with my attempts to connect my NetBSD/amd64 machine
> > to the LLDB/LLVM build zone.
> >
> > My host is NetBSD-7.0 (with buildslave ID:
> > lldb-amd64-ninja-netbsd7). I use pkgsrc (2015Q3) to ship packages.
> > I'm attaching a list of installed ones to this mail.
> >
> > I talked with Joerg and it was decided to go for CMake and Ninja,
> > we don't want to change it for now (at least till single machine
> > will be plugged in).
> >
> > Please try to spawn local NetBSD session and connect to the
> > staging buildbot and debug it locally, to cut the number of
> > iterations between me and the Galina.
> >
> > I'm adding here a short tutorial to get to reproduce quickly the
> > setup of mine. It will take you like 2-5 minutes to get into
> > installed system (depends of an internet connection).
> >
> > 1. Prepare a disk image. $ qemu-img create -f qcow2 netbsd7.0_amd64
> > 10G
> >
> > 2. Get an installation media. $ $FETCH_TOOL
> > ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-7.0/amd64/installation/cdrom/bo
> ot
> >
> >
> - -com.iso
> >
> > 3. Spawn installation $ qemu-system-x86_64 \ -enable-kvm \ -net
> > user \ -m 2G \ -cdrom boot-com.iso \ -nographic \ -smp cores=2 \
> > -hda netbsd7.0_amd64 \ -boot d
> >
> > 4. Inside the installer push ctrl-c and get the command line.
> >
> > 5. Setup network connection: # dhcpcd
> >
> > 6. Go to a writable dir, like /tmp # cd /tmp
> >
> > 7. Fetch the autoinst.sh script of mine # ftp
> > ftp://ftp.netbsd.org/pub/NetBSD/misc/kamil/autoinst.sh
> >
> > # sh autoinst.sh -s 128 -r mypass -c com0 -C 9600 -p wd0
> >
> > (take a coffee break)
> >
> > 8. If everything went OK, just type: # poweroff
> >
> > 9. Start your newly installed system qemu-system-x86_64 \
> > -enable-kvm \ -net user \ -m 2G \ -nographic \ -smp cores=2 \ -hda
> > netbsd7.0_amd64 \ -boot c (root password is empty)
> >
> > 10. Install dependencies from pkgsrc, like: # cd
> > /usr/pkgsrc/devel/cmake && make install
> >
> > Please install packags needed for buildslave, create dedicated
> > user and try to connect it to the salve.
> >
> > Thank you in advance,
> >
> > On 20.10.2015 21:40, Galina Kistanova wrote:
> >> Hello Kamil,
> >
> >> It looks like you are missing dependencies for the LLDB builder
> >> you have chosen.
> >> http://lab.llvm.org:8014/builders/lldb-amd64-ninja-netbsd7/builds/75/
> s
> >
> >>
> teps/update%20scripts/logs/stdio
> > 

Re: [Lldb-commits] New llvm build server account request

2015-10-20 Thread Ying Chen via lldb-commits
On Tue, Oct 20, 2015 at 4:46 PM, Kamil Rytarowski  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> It just appeared there.
>
> I took your updateScripts.sh, moved it to my $PATH. Is it everything?


Please also put the test_cfg.json to this location,
/home/motus/build/build/. A dummy file is ok if you don't want to run any
test.



Will the rest of the scripts from
> https://android.googlesource.com/platform/external/lldb-utils/+/lldb-mas
> ter-dev/buildbotScripts/bashShell/svntotbuild/
> be fetched/used automatically?
>
> Do I need a local copy of it? If so, do I need to fetch the whole
> directory
> https://android.googlesource.com/platform/external/lldb-utils/+/lldb-mas
> ter-dev/buildbotScripts
> ?


You don't need a local copy of any of it. updateScripts.sh will fetch
everything automatically.



According to builders.py (
> https://github.com/llvm-mirror/zorg/commit/c901503848e900fc1af0c43c93c98
> daddd2f23fd
> )
>
> I use: 'factory':LLDBBuilder.getLLDBScriptCommandsFactory(runTest=False)
> }
>
>
Please also add "downloadBinary=False"

At the moment I don't want to run tests and leave it for later.
>
> I restarted the build bot with the staging server and this is what I get
> :
> 2015-10-20 23:43:33+ [-] Log opened.
> 2015-10-20 23:43:33+ [-] twistd 15.4.0 (/usr/pkg/bin/python2.7
> 2.7.10) starting up.
> 2015-10-20 23:43:33+ [-] reactor class:
> twisted.internet.pollreactor.PollReactor.
> 2015-10-20 23:43:33+ [-] Starting BuildSlave -- version: 0.8.8
> 2015-10-20 23:43:33+ [-] recording hostname in twistd.hostname
> 2015-10-20 23:43:33+ [-] Starting factory
> 
> 2015-10-20 23:43:33+ [-] Connecting to lab.llvm.org:9994
> 2015-10-20 23:43:34+ [Broker,client] message from master: attached
> 2015-10-20 23:43:35+ [Broker,client]
> SlaveBuilder.remote_print(lldb-amd64-ninja-netbsd7): message from
> master: attached
> 2015-10-20 23:43:35+ [Broker,client] Connected to
> lab.llvm.org:9994; slave is ready
> 2015-10-20 23:43:35+ [Broker,client] sending application-level
> keepalives every 600 seconds
>
>
> How to enforce it to start a test build now? I want to check quickly
> whether it works, not just send keepalives every 10 minutes..


Click force build button from this page to kick off a build right away.
http://lab.llvm.org:8014/builders/lldb-amd64-ninja-netbsd7


>

Thank you in advance,
>
>
> On 21.10.2015 01:17, Ying Chen wrote:
> > Please check again. Please note that this file needs to be included
> > in your PATH. The rest of the scripts don't have to. Sample of test
> > configuration file could be found here.
> > https://android.googlesource.com/platform/external/lldb-utils/+/lldb-m
> aster-dev/buildbotScripts/testCfg/
> >
> >  On Tue, Oct 20, 2015 at 3:50 PM, Kamil Rytarowski  > > wrote:
> >
> > Where can I find this updateScripts.sh? It's missing under your
> > link:
> >
> > https://android.googlesource.com/platform/external/lldb-utils/+/lldb-m
> as
> >
> >
> ter-dev/buildbotScripts/bashShell/svntotbuild/
> >  mas
> >
> >
> ter-dev/buildbotScripts/bashShell/svntotbuild/>
> >
> > On 21.10.2015 00:29, Ying Chen wrote:
> >> Hello Kamil, Galina,
> >
> >> If you would like to build LLDB with cmake and ninja, I suggest
> >> to consider the following two factory functions. Depends on what
> >> you described, I feel the first one works better for you.
> >
> >> 1. getLLDBUbuntuCMakeBuildFactory If you only run local lldb
> >> tests, this is the factory to use.
> >
> >> For example, if you would like to build host lldb with clang and
> >> Release config, and run tests with clang on x86_64 host, then
> >> call the function this way,
> >
> >> getLLDBUbuntuCMakeBuildFactory(build_compiler = "clang",
> >> build_type = "Release", local_test_archs=["x86_64"],
> >> local_test_compilers=["clang"]) If you would like to run local
> >> tests with gcc compiler as well, then pass
> >> local_test_compilers=["clang", "gcc"]
> >
> >> Dependency: You need to have the required packages to build
> >> lldb.
> >
> >> Note*: please disable the last step in this function
> >> "archiveLLDBTestTraces", this steps will upload the log files to
> >> a cloud storage that you might not have access to.
> >
> >> 2. getLLDBScriptCommandsFactory
> >
> >> If you have multiple targets to run tests against, for example,
> >> remote linux, remote android targets and etc, you should choose
> >> this factory. The advantage of this factory is that it calls a
> >> script in each step, so it's highly configurable and easy to
> >> make changes. You just need to make sure the scripts are in
> >> builder machine and have the correct commands. For your
> >> reference, the ones that we're currently using could be found
> >> here.
> >> https://android.googlesource.com/platform/external/lldb-utils/+/lldb-
> m
> >
> >>
> aster-dev/buildbotScripts/bashShell/svntotbuild/
> > 

Re: [Lldb-commits] New llvm build server account request

2015-10-20 Thread Ying Chen via lldb-commits
Submitted the change,
http://reviews.llvm.org/rL250871

The problem you mentioned has been resolved.
But clang is missing from your system. You need to make sure the system is
able to build and test lldb. Follow this
http://lldb.llvm.org/build.html#BuildingLldbOnLinux.


On Tue, Oct 20, 2015 at 5:47 PM, Kamil Rytarowski  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> http://lab.llvm.org:8014/builders/lldb-amd64-ninja-netbsd7/builds/90
>
> cmake.sh is still wrong:
>
> #!/bin/bash -e
> set -x
> host=$(uname)
> if [[ $host != Linux ]];
> then
>   echo "Skip cmake step for" $host
> else
>   source setEnv.sh
>   mkdir -p $buildDir
>   cd $buildDir
>   cmake -GNinja -DCMAKE_BUILD_TYPE=Release $llvmDir
> - -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
> fi
>
>
> The uname result on NetBSD is 'NetBSD' and we need to use cmake. The
> correct check is:
>
> if [[ $host != Linux ]] && [[ $host != NetBSD ]]
>
>
> I noticed also a check for ${OS} in
> /home/motus/build/build/scripts/lldb-utils/build.sh
>
> case "$(uname -s)" in
> Linux)  OS=linux;;
> Darwin) OS=darwin;;
> *_NT-*) OS=windows;;
> esac
>
> There is need for NetBSD) OS=netbsd;; and new file build-netbsd.sh.
>
> This is why, I suggested you to install NetBSD locally and adapt the
> scripts for this system. Ping-pong overmails can take another 2 weeks.
>
> On 21.10.2015 02:05, Kamil Rytarowski via lldb-commits wrote:
> > On 21.10.2015 02:03, Ying Chen wrote:
> >
> >
> >> On Tue, Oct 20, 2015 at 4:46 PM, Kamil Rytarowski  >> > wrote:
> >
> >> It just appeared there.
> >
> >> I took your updateScripts.sh, moved it to my $PATH. Is it
> >> everything?
> >
> >
> >>> Please also put the test_cfg.json to this location,
> >>> /home/motus/build/build/. A dummy file is ok if you don't want
> >>> to run any test.
> >
> >
> > I added there a dummy literally empty file (of size 0) there.
> >
> >
> >
> >> Will the rest of the scripts from
> >> https://android.googlesource.com/platform/external/lldb-utils/+/lldb-
> m
> >
> >>
> as
> >
> >
> > ter-dev/buildbotScripts/bashShell/svntotbuild/
> >>  - -
> >
> >>
> mas
> >
> >
> > ter-dev/buildbotScripts/bashShell/svntotbuild/>
> >> be fetched/used automatically?
> >
> >> Do I need a local copy of it? If so, do I need to fetch the whole
> >>  directory
> >> https://android.googlesource.com/platform/external/lldb-utils/+/lldb-
> m
> >
> >>
> as
> >
> >
> > ter-dev/buildbotScripts
> >>  - -
> >
> >>
> mas
> >
> >
> > ter-dev/buildbotScripts>
> >> ?
> >
> >
> >>> You don't need a local copy of any of it. updateScripts.sh
> >>> will fetch everything automatically.
> >
> >
> > Thank you!
> >
> > I also linked /bin/bash to /usr/pkg/bin/bash on my NetBSD host.
> >
> > If there are some GNU tools used there, gawk please let me know.
> >
> >
> >
> >> According to builders.py (
> >> https://github.com/llvm-mirror/zorg/commit/c901503848e900fc1af0c43c93
> c
> >
> >>
> 98
> >
> >
> > daddd2f23fd
> >>  3
> >
> >>
> c98
> >
> >
> > daddd2f23fd>
> >> )
> >
> >> I use:
> >> 'factory':LLDBBuilder.getLLDBScriptCommandsFactory(runTest=False)
> >>  }
> >
> >
> >>> Please also add "downloadBinary=False"
> >
> >
> > Please add this change there to the zorg repository and commit (I
> > don't have a commit bit).
> >
> >> At the moment I don't want to run tests and leave it for later.
> >
> >> I restarted the build bot with the staging server and this is
> >> what I get : 2015-10-20 23:43:33+ [-] Log opened. 2015-10-20
> >> 23:43:33+ [-] twistd 15.4.0 (/usr/pkg/bin/python2.7 2.7.10)
> >> starting up. 2015-10-20 23:43:33+ [-] reactor class:
> >> twisted.internet.pollreactor.PollReactor. 2015-10-20
> >> 23:43:33+ [-] Starting BuildSlave -- version: 0.8.8
> >> 2015-10-20 23:43:33+ [-] recording hostname in
> >> twistd.hostname 2015-10-20 23:43:33+ [-] Starting factory
> >>  2015-10-20
> >> 23:43:33+ [-] Connecting to lab.llvm.org:9994
> >>  2015-10-20 23:43:34+
> >> [Broker,client] message from master: attached 2015-10-20
> >> 23:43:35+ [Broker,client]
> >> SlaveBuilder.remote_print(lldb-amd64-ninja-netbsd7): message from
> >>  master: attached 2015-10-20 23:43:35+ [Broker,client]
> >> Connected to lab.llvm.org:9994 ; slave
> >> is ready 2015-10-20 23:43:35+ [Broker,client] sending
> >> application-level keepalives every 600 seconds
> >
> >
> >> How to enforce it to start a test build now? I want to check
> >> quickly whether it works, not just send keepalives every 10
> >> minutes..
> >
> >
> >>> Click force build button from this page to kick off a build
> >>> right away.
> >>> http://lab.llvm.org:8014/builders/lldb-amd64-ninja-netbsd7
> >
> >
> > I will do, thank you!
> >
> >
> >
> >

[Lldb-commits] [lldb] r252980 - Revert "Another little stepping optimization: if any of the source step commands are running through a range "

2015-11-12 Thread Ying Chen via lldb-commits
Author: chying
Date: Thu Nov 12 18:31:21 2015
New Revision: 252980

URL: http://llvm.org/viewvc/llvm-project?rev=252980&view=rev
Log:
Revert "Another little stepping optimization: if any of the source step 
commands are running through a range "

- Revert because this commit introduce several failures in lldb test suite
- http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/8391
- This reverts commit 78943bb678c2893703ee4e8b41969372740c8a6f.

Modified:
lldb/trunk/source/Target/ThreadPlanStepRange.cpp

Modified: lldb/trunk/source/Target/ThreadPlanStepRange.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepRange.cpp?rev=252980&r1=252979&r2=252980&view=diff
==
--- lldb/trunk/source/Target/ThreadPlanStepRange.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepRange.cpp Thu Nov 12 18:31:21 2015
@@ -390,19 +390,12 @@ ThreadPlanStepRange::SetNextBranchBreakp
 if (branch_index == UINT32_MAX)
 {
 branch_index = instructions->GetSize() - 1;
-InstructionSP last_inst = 
instructions->GetInstructionAtIndex(branch_index);
-size_t last_inst_size = last_inst->GetOpcode().GetByteSize();
-run_to_address = last_inst->GetAddress();
-run_to_address.Slide(last_inst_size);
-}
-else if (branch_index - pc_index > 1)
-{
-run_to_address = 
instructions->GetInstructionAtIndex(branch_index)->GetAddress();
 }
 
-if (run_to_address.IsValid())
+if (branch_index - pc_index > 1)
 {
 const bool is_internal = true;
+run_to_address = 
instructions->GetInstructionAtIndex(branch_index)->GetAddress();
 m_next_branch_bp_sp = GetTarget().CreateBreakpoint(run_to_address, 
is_internal, false);
 if (m_next_branch_bp_sp)
 {


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r252963 - Another little stepping optimization: if any of the source step commands are running through a range

2015-11-12 Thread Ying Chen via lldb-commits
I reverted this patch for now.
Please resubmit if you have a fix.

Thanks,
Ying

On Thu, Nov 12, 2015 at 4:36 PM, Jim Ingham via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> If you can debug a failing case, and do whatever step operation got you to
> the wrong place, then run up to that step, and do:
>
> (lldb) log enable -f  lldb step
>
> and then do the step, then send me that log plus the disassembly for the
> function you were stepping in and the output of:
>
> (lldb) image dump line-table 
>
> for the source file you were stepping in.
>
> I should be able to see from there why we were stepping to the wrong place.
>
> Jim
>
> > On Nov 12, 2015, at 4:03 PM, Zachary Turner  wrote:
> >
> > The error messages are always different because the error message is
> printed by the test.  I'm going to try to load up the executable for
> TestStepNoDebug in the debugger and get a disassembly and do the step
> >
> > On Thu, Nov 12, 2015 at 4:01 PM Jim Ingham  wrote:
> > Is the line they stepped to - instead of the expected line - always line
> 0?
> >
> > Jim
> >
> > > On Nov 12, 2015, at 3:52 PM, Zachary Turner 
> wrote:
> > >
> > > Hi Jim,
> > >
> > > This breaks about 12 tests on Windows.  The patch looks simple, but
> this isn't really my area, is there anything I can give you to help
> diagnose what might be wrong?  The following tests fail:
> > >
> > > FAIL: LLDB (suite) :: Test-rdar-9974002.py (Windows zturner-win81 8
> 6.2.9200 AMD64 Intel64 Family 6 Model 45 Stepping 7, GenuineIntel)
> > > FAIL: LLDB (suite) :: TestDataFormatterHexCaps.py (Windows
> zturner-win81 8 6.2.9200 AMD64 Intel64 Family 6 Model 45 Stepping 7,
> GenuineIntel)
> > > FAIL: LLDB (suite) :: TestDataFormatterNamedSummaries.py (Windows
> zturner-win81 8 6.2.9200 AMD64 Intel64 Family 6 Model 45 Stepping 7,
> GenuineIntel)
> > > FAIL: LLDB (suite) :: TestDataFormatterPythonSynth.py (Windows
> zturner-win81 8 6.2.9200 AMD64 Intel64 Family 6 Model 45 Stepping 7,
> GenuineIntel)
> > > FAIL: LLDB (suite) :: TestDataFormatterSynth.py (Windows zturner-win81
> 8 6.2.9200 AMD64 Intel64 Family 6 Model 45 Stepping 7, GenuineIntel)
> > > FAIL: LLDB (suite) :: TestDiamond.py (Windows zturner-win81 8 6.2.9200
> AMD64 Intel64 Family 6 Model 45 Stepping 7, GenuineIntel)
> > > FAIL: LLDB (suite) :: TestFormatPropagation.py (Windows zturner-win81
> 8 6.2.9200 AMD64 Intel64 Family 6 Model 45 Stepping 7, GenuineIntel)
> > > FAIL: LLDB (suite) :: TestFrames.py (Windows zturner-win81 8 6.2.9200
> AMD64 Intel64 Family 6 Model 45 Stepping 7, GenuineIntel)
> > > FAIL: LLDB (suite) :: TestInlineStepping.py (Windows zturner-win81 8
> 6.2.9200 AMD64 Intel64 Family 6 Model 45 Stepping 7, GenuineIntel)
> > > FAIL: LLDB (suite) :: TestSBData.py (Windows zturner-win81 8 6.2.9200
> AMD64 Intel64 Family 6 Model 45 Stepping 7, GenuineIntel)
> > > FAIL: LLDB (suite) :: TestStepNoDebug.py (Windows zturner-win81 8
> 6.2.9200 AMD64 Intel64 Family 6 Model 45 Stepping 7, GenuineIntel)
> > > FAIL: LLDB (suite) :: TestThreadJump.py (Windows zturner-win81 8
> 6.2.9200 AMD64 Intel64 Family 6 Model 45 Stepping 7, GenuineIntel)
> > >
> > > And here's the error I get from one of the failing tests, although I
> don't know how much insight it provides.
> > >
> > > Traceback (most recent call last):
> > >   File
> "D:\src\llvm\tools\lldb\packages\Python\lldbsuite\test\lldbtest.py", line
> 536, in wrapper
> > > return func(self, *args, **kwargs)
> > >   File
> "D:\src\llvm\tools\lldb\packages\Python\lldbsuite\test\lldbtest.py", line
> 2228, in dwarf_test_method
> > > return attrvalue(self)
> > >   File
> "D:\src\llvm\tools\lldb\packages\Python\lldbsuite\test\lldbtest.py", line
> 608, in wrapper
> > > func(*args, **kwargs)
> > >   File
> "D:\src\llvm\tools\lldb\packages\Python\lldbsuite\test\functionalities\step-avoids-no-debug\TestStepNoDebug.py",
> line 41, in test_step_in_with_python
> > > self.do_step_in_past_nodebug()
> > >   File
> "D:\src\llvm\tools\lldb\packages\Python\lldbsuite\test\functionalities\step-avoids-no-debug\TestStepNoDebug.py",
> line 105, in do_step_in_past_nodebug
> > > self.hit_correct_line ("intermediate_return_value =
> called_from_nodebug_actual(some_value)")
> > >   File
> "D:\src\llvm\tools\lldb\packages\Python\lldbsuite\test\functionalities\step-avoids-no-debug\TestStepNoDebug.py",
> line 57, in hit_correct_line
> > > self.assertTrue (cur_line == target_line, "Stepped to line %d
> instead of expected %d with pattern '%s'."%(cur_line, target_line, pattern))
> > > AssertionError: False is not True : Stepped to line 0 instead of
> expected 19 with pattern 'intermediate_return_value =
> called_from_nodebug_actual(some_value)'.
> > > Config=i686-d:\src\llvmbuild\ninja_release\bin\clang.exe
> > > Session info generated @ Thu Nov 12 15:44:43 2015
> > > To rerun this test, issue the following command from the 'test'
> directory:
> > >
> > > If it's not obvious what the problem is, can we revert this until we
> figure it out and then reland

[Lldb-commits] [PATCH] D14673: Fix buildbot breakage after r253106

2015-11-13 Thread Ying Chen via lldb-commits
chying created this revision.
chying added a reviewer: jingham.
chying added a subscriber: lldb-commits.

- expectedFailureAll takes single compiler name rather than compiler list 
because it also takes version which only apply to single compiler
- Don't try to access self.debug_info if debug_info is None
- Link to broken build, 
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/8441

http://reviews.llvm.org/D14673

Files:
  packages/Python/lldbsuite/test/lldbtest.py

Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -636,8 +636,8 @@
 def expectedFailureAll(bugnumber=None, oslist=None, compiler=None, 
compiler_version=None, archs=None, triple=None, debug_info=None):
 def fn(self):
 os_list_passes = check_list_or_lambda(oslist, self.getPlatform())
-compiler_passes = check_list_or_lambda(compiler, self.getCompiler()) 
and self.expectedCompilerVersion(compiler_version)
-debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)
+compiler_passes = compiler is None or 
(check_list_or_lambda(self.getCompiler(), compiler) and 
self.expectedCompilerVersion(compiler_version))
+debug_info_passes = debug_info is None or 
check_list_or_lambda(debug_info, self.debug_info)
 
 return (os_list_passes  and
 compiler_passes and


Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -636,8 +636,8 @@
 def expectedFailureAll(bugnumber=None, oslist=None, compiler=None, compiler_version=None, archs=None, triple=None, debug_info=None):
 def fn(self):
 os_list_passes = check_list_or_lambda(oslist, self.getPlatform())
-compiler_passes = check_list_or_lambda(compiler, self.getCompiler()) and self.expectedCompilerVersion(compiler_version)
-debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)
+compiler_passes = compiler is None or (check_list_or_lambda(self.getCompiler(), compiler) and self.expectedCompilerVersion(compiler_version))
+debug_info_passes = debug_info is None or check_list_or_lambda(debug_info, self.debug_info)
 
 return (os_list_passes  and
 compiler_passes and
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r253106 - Add a "not_in()" function you can apply to the list type arguments to expectedFailureAll to reverse

2015-11-13 Thread Ying Chen via lldb-commits
Hello Jim,

It seems this patch breaks the tests that are decorated by
expectedFailureAll.
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/8441

I had a patch to fix it, could you help to review?
http://reviews.llvm.org/D14673

Thanks,
Ying

On Fri, Nov 13, 2015 at 4:20 PM, Jim Ingham via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: jingham
> Date: Fri Nov 13 18:20:33 2015
> New Revision: 253106
>
> URL: http://llvm.org/viewvc/llvm-project?rev=253106&view=rev
> Log:
> Add a "not_in()" function you can apply to the list type arguments to
> expectedFailureAll to reverse
> the sense of the test.
>
> Modified:
>
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
> lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
>
> Modified:
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py?rev=253106&r1=253105&r2=253106&view=diff
>
> ==
> ---
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
> (original)
> +++
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
> Fri Nov 13 18:20:33 2015
> @@ -15,7 +15,7 @@ class ConsecutiveBreakpoitsTestCase(Test
>
>  mydir = TestBase.compute_mydir(__file__)
>
> -@unittest2.expectedFailure("llvm.org/pr23478")
> +@expectedFailureAll("llvm.org/pr23478", oslist = not_in(["macosx"]))
>  def test (self):
>  self.build ()
>  self.consecutive_breakpoints_tests()
>
> Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=253106&r1=253105&r2=253106&view=diff
>
> ==
> --- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
> +++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Fri Nov 13
> 18:20:33 2015
> @@ -620,13 +620,30 @@ def expectedFailure(expected_fn, bugnumb
>  # @expectedFailureAll, xfail for all platform/compiler/arch,
>  # @expectedFailureAll(compiler='gcc'), xfail for gcc on all
> platform/architecture
>  # @expectedFailureAll(bugnumber, ["linux"], "gcc", ['>=', '4.9'],
> ['i386']), xfail for gcc>=4.9 on linux with i386
> +
> +# You can also pass not_in(list) to reverse the sense of the test for the
> arguments that
> +# are simple lists, namely oslist, compiler and debug_info.
> +
> +def not_in (iterable):
> +return lambda x : x not in iterable
> +
> +def check_list_or_lambda (list_or_lambda, value):
> +if six.callable(list_or_lambda):
> +return list_or_lambda(value)
> +else:
> +return list_or_lambda is None or value in list_or_lambda
> +
>  def expectedFailureAll(bugnumber=None, oslist=None, compiler=None,
> compiler_version=None, archs=None, triple=None, debug_info=None):
>  def fn(self):
> -return ((oslist is None or self.getPlatform() in oslist) and
> -(compiler is None or (compiler in self.getCompiler() and
> self.expectedCompilerVersion(compiler_version))) and
> +os_list_passes = check_list_or_lambda(oslist, self.getPlatform())
> +compiler_passes = check_list_or_lambda(compiler,
> self.getCompiler()) and self.expectedCompilerVersion(compiler_version)
> +debug_info_passes = check_list_or_lambda(debug_info,
> self.debug_info)
> +
> +return (os_list_passes  and
> +compiler_passes and
>  self.expectedArch(archs) and
>  (triple is None or re.match(triple,
> lldb.DBG.GetSelectedPlatform().GetTriple())) and
> -(debug_info is None or self.debug_info in debug_info))
> +debug_info_passes)
>  return expectedFailure(fn, bugnumber)
>
>  def expectedFailureDwarf(bugnumber=None):
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14673: Fix buildbot breakage after r253106

2015-11-13 Thread Ying Chen via lldb-commits
chying added a comment.

In http://reviews.llvm.org/D14673#289408, @zturner wrote:

> I guess this is ok.  I don't like raising the `None` check outside the 
> function, but I don't see another way that isn't more convoluted.
>
> However, I think you still need to fix the grouping of the parentheses.  the 
> `compiler is None` should not override the version check.


I thought a call of expectedFailureAll(..compiler=None, compiler_version=['>=', 
'3.7']...) doesn't make much sense at the first place, so maybe just ignore 
compiler check in such cases?
Do you suggest to check current compiler(no matter clang or gcc or others) 
version against given version?


http://reviews.llvm.org/D14673



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14673: Fix buildbot breakage after r253106

2015-11-16 Thread Ying Chen via lldb-commits
chying added a comment.

The compiler None check is because inside of check_list_or_lambda function, it 
checks for "value in list_or_lamda", which will throw exception if value is None
I agree that the code will be cleaner if debug_info is initialized to None.
Will try to upload another patch soon.


http://reviews.llvm.org/D14673



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14673: Fix buildbot breakage after r253106

2015-11-16 Thread Ying Chen via lldb-commits
chying updated this revision to Diff 40347.
chying added a comment.

Recommit r253106 - Add a "not_in()" function you can apply to the list type 
arguments to expectedFailureAll ... 
Initialize self.debug_info in Base::setUp()
Check for None before calling "value in list"


http://reviews.llvm.org/D14673

Files:
  
packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
  packages/Python/lldbsuite/test/lldbtest.py

Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -620,13 +620,30 @@
 # @expectedFailureAll, xfail for all platform/compiler/arch,
 # @expectedFailureAll(compiler='gcc'), xfail for gcc on all 
platform/architecture
 # @expectedFailureAll(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), 
xfail for gcc>=4.9 on linux with i386
+
+# You can also pass not_in(list) to reverse the sense of the test for the 
arguments that
+# are simple lists, namely oslist, compiler and debug_info.
+
+def not_in (iterable):
+return lambda x : x not in iterable
+
+def check_list_or_lambda (list_or_lambda, value):
+if six.callable(list_or_lambda):
+return list_or_lambda(value)
+else:
+return list_or_lambda is None or value is None or value in 
list_or_lambda
+
 def expectedFailureAll(bugnumber=None, oslist=None, compiler=None, 
compiler_version=None, archs=None, triple=None, debug_info=None):
 def fn(self):
-return ((oslist is None or self.getPlatform() in oslist) and
-(compiler is None or (compiler in self.getCompiler() and 
self.expectedCompilerVersion(compiler_version))) and
+os_list_passes = check_list_or_lambda(oslist, self.getPlatform())
+compiler_passes = check_list_or_lambda(self.getCompiler(), compiler) 
and self.expectedCompilerVersion(compiler_version)
+debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)
+
+return (os_list_passes  and
+compiler_passes and
 self.expectedArch(archs) and
 (triple is None or re.match(triple, 
lldb.DBG.GetSelectedPlatform().GetTriple())) and
-(debug_info is None or self.debug_info in debug_info))
+debug_info_passes)
 return expectedFailure(fn, bugnumber)
 
 def expectedFailureDwarf(bugnumber=None):
@@ -1459,6 +1476,9 @@
 
 self.enableLogChannelsForCurrentTest()
 
+#Initialize debug_info
+self.debug_info = None
+
 def runHooks(self, child=None, child_prompt=None, use_cmd_api=False):
 """Perform the run hooks to bring lldb debugger to the desired state.
 
Index: 
packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
===
--- 
packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
+++ 
packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
@@ -15,7 +15,7 @@
 
 mydir = TestBase.compute_mydir(__file__)
 
-@unittest2.expectedFailure("llvm.org/pr23478")
+@expectedFailureAll("llvm.org/pr23478", oslist = not_in(["macosx"]))
 def test (self):
 self.build ()
 self.consecutive_breakpoints_tests()


Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -620,13 +620,30 @@
 # @expectedFailureAll, xfail for all platform/compiler/arch,
 # @expectedFailureAll(compiler='gcc'), xfail for gcc on all platform/architecture
 # @expectedFailureAll(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), xfail for gcc>=4.9 on linux with i386
+
+# You can also pass not_in(list) to reverse the sense of the test for the arguments that
+# are simple lists, namely oslist, compiler and debug_info.
+
+def not_in (iterable):
+return lambda x : x not in iterable
+
+def check_list_or_lambda (list_or_lambda, value):
+if six.callable(list_or_lambda):
+return list_or_lambda(value)
+else:
+return list_or_lambda is None or value is None or value in list_or_lambda
+
 def expectedFailureAll(bugnumber=None, oslist=None, compiler=None, compiler_version=None, archs=None, triple=None, debug_info=None):
 def fn(self):
-return ((oslist is None or self.getPlatform() in oslist) and
-(compiler is None or (compiler in self.getCompiler() and self.expectedCompilerVersion(compiler_version))) and
+os_list_passes = check_list_or_lambda(oslist, self.getPlatform())
+compiler_passes = check_list_or_lambda(self.getCompiler(), compiler) and self.expectedCompilerVersion(compiler_version)
+debug_info_passes =

Re: [Lldb-commits] [PATCH] D14673: Fix buildbot breakage after r253106

2015-11-16 Thread Ying Chen via lldb-commits
chying added a comment.

In http://reviews.llvm.org/D14673#290556, @zturner wrote:

> Ahh, sorry.  I litearlly just committed a change to the same function.  You 
> may have to do a merge, sorry about that.


Ahh, I see, will merge again.


http://reviews.llvm.org/D14673



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14673: Fix buildbot breakage after r253106

2015-11-16 Thread Ying Chen via lldb-commits
chying updated this revision to Diff 40353.
chying added a comment.

Rebase on the latest commit.


http://reviews.llvm.org/D14673

Files:
  
packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
  packages/Python/lldbsuite/test/lldbtest.py

Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -638,19 +638,31 @@
 else:
 return expectedFailure_impl
 
+# You can also pass not_in(list) to reverse the sense of the test for the 
arguments that
+# are simple lists, namely oslist, compiler, and debug_info.
+
+def not_in (iterable):
+return lambda x : x not in iterable
+
+def check_list_or_lambda (list_or_lambda, value):
+if six.callable(list_or_lambda):
+return list_or_lambda(value)
+else:
+return list_or_lambda is None or value is None or value in 
list_or_lambda
+
 # provide a function to xfail on defined oslist, compiler version, and archs
 # if none is specified for any argument, that argument won't be checked and 
thus means for all
 # for example,
 # @expectedFailureAll, xfail for all platform/compiler/arch,
 # @expectedFailureAll(compiler='gcc'), xfail for gcc on all 
platform/architecture
 # @expectedFailureAll(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), 
xfail for gcc>=4.9 on linux with i386
 def expectedFailureAll(bugnumber=None, oslist=None, compiler=None, 
compiler_version=None, archs=None, triple=None, debug_info=None, 
swig_version=None, py_version=None):
 def fn(self):
-oslist_passes = oslist is None or self.getPlatform() in oslist
-compiler_passes = compiler is None or (compiler in self.getCompiler() 
and self.expectedCompilerVersion(compiler_version))
+oslist_passes = check_list_or_lambda(oslist, self.getPlatform())
+compiler_passes = check_list_or_lambda(self.getCompiler(), compiler) 
and self.expectedCompilerVersion(compiler_version)
 arch_passes = self.expectedArch(archs)
 triple_passes = triple is None or re.match(triple, 
lldb.DBG.GetSelectedPlatform().GetTriple())
-debug_info_passes = debug_info is None or self.debug_info in debug_info
+debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)
 swig_version_passes = (swig_version is None) or (not hasattr(lldb, 
'swig_version')) or (check_expected_version(swig_version[0], swig_version[1], 
lldb.swig_version))
 py_version_passes = (py_version is None) or 
check_expected_version(py_version[0], py_version[1], sys.version_info)
 
@@ -1502,6 +1514,9 @@
 
 self.enableLogChannelsForCurrentTest()
 
+#Initialize debug_info
+self.debug_info = None
+
 def runHooks(self, child=None, child_prompt=None, use_cmd_api=False):
 """Perform the run hooks to bring lldb debugger to the desired state.
 
Index: 
packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
===
--- 
packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
+++ 
packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
@@ -15,7 +15,7 @@
 
 mydir = TestBase.compute_mydir(__file__)
 
-@unittest2.expectedFailure("llvm.org/pr23478")
+@expectedFailureAll("llvm.org/pr23478", oslist = not_in(["macosx"]))
 def test (self):
 self.build ()
 self.consecutive_breakpoints_tests()


Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -638,19 +638,31 @@
 else:
 return expectedFailure_impl
 
+# You can also pass not_in(list) to reverse the sense of the test for the arguments that
+# are simple lists, namely oslist, compiler, and debug_info.
+
+def not_in (iterable):
+return lambda x : x not in iterable
+
+def check_list_or_lambda (list_or_lambda, value):
+if six.callable(list_or_lambda):
+return list_or_lambda(value)
+else:
+return list_or_lambda is None or value is None or value in list_or_lambda
+
 # provide a function to xfail on defined oslist, compiler version, and archs
 # if none is specified for any argument, that argument won't be checked and thus means for all
 # for example,
 # @expectedFailureAll, xfail for all platform/compiler/arch,
 # @expectedFailureAll(compiler='gcc'), xfail for gcc on all platform/architecture
 # @expectedFailureAll(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), xfail for gcc>=4.9 on linux with i386
 def expectedFailureAll(bugnumber=None, oslist=None, compiler=None, compiler_version=None, archs=None, triple=None, debu

[Lldb-commits] [lldb] r253272 - Re-Apply "Add a "not_in()" function you can apply to the list type arguments to expectedFailureAll ..." with fix

2015-11-16 Thread Ying Chen via lldb-commits
Author: chying
Date: Mon Nov 16 17:41:02 2015
New Revision: 253272

URL: http://llvm.org/viewvc/llvm-project?rev=253272&view=rev
Log:
Re-Apply "Add a "not_in()" function you can apply to the list type arguments to 
expectedFailureAll ..." with fix

Summary:
- Re-Commit r253106
- Initialize self.debug_info in Base::setUp()
- Fix argument order when calling check_list_or_lambda for compiler

Reviewers: jingham

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D14673

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py?rev=253272&r1=253271&r2=253272&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
 Mon Nov 16 17:41:02 2015
@@ -15,7 +15,7 @@ class ConsecutiveBreakpoitsTestCase(Test
 
 mydir = TestBase.compute_mydir(__file__)
 
-@unittest2.expectedFailure("llvm.org/pr23478")
+@expectedFailureAll("llvm.org/pr23478", oslist = not_in(["macosx"]))
 def test (self):
 self.build ()
 self.consecutive_breakpoints_tests()

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=253272&r1=253271&r2=253272&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Mon Nov 16 17:41:02 
2015
@@ -638,6 +638,18 @@ def expectedFailure(expected_fn, bugnumb
 else:
 return expectedFailure_impl
 
+# You can also pass not_in(list) to reverse the sense of the test for the 
arguments that
+# are simple lists, namely oslist, compiler, and debug_info.
+
+def not_in (iterable):
+return lambda x : x not in iterable
+
+def check_list_or_lambda (list_or_lambda, value):
+if six.callable(list_or_lambda):
+return list_or_lambda(value)
+else:
+return list_or_lambda is None or value is None or value in 
list_or_lambda
+
 # provide a function to xfail on defined oslist, compiler version, and archs
 # if none is specified for any argument, that argument won't be checked and 
thus means for all
 # for example,
@@ -646,11 +658,11 @@ def expectedFailure(expected_fn, bugnumb
 # @expectedFailureAll(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), 
xfail for gcc>=4.9 on linux with i386
 def expectedFailureAll(bugnumber=None, oslist=None, compiler=None, 
compiler_version=None, archs=None, triple=None, debug_info=None, 
swig_version=None, py_version=None):
 def fn(self):
-oslist_passes = oslist is None or self.getPlatform() in oslist
-compiler_passes = compiler is None or (compiler in self.getCompiler() 
and self.expectedCompilerVersion(compiler_version))
+oslist_passes = check_list_or_lambda(oslist, self.getPlatform())
+compiler_passes = check_list_or_lambda(self.getCompiler(), compiler) 
and self.expectedCompilerVersion(compiler_version)
 arch_passes = self.expectedArch(archs)
 triple_passes = triple is None or re.match(triple, 
lldb.DBG.GetSelectedPlatform().GetTriple())
-debug_info_passes = debug_info is None or self.debug_info in debug_info
+debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)
 swig_version_passes = (swig_version is None) or (not hasattr(lldb, 
'swig_version')) or (check_expected_version(swig_version[0], swig_version[1], 
lldb.swig_version))
 py_version_passes = (py_version is None) or 
check_expected_version(py_version[0], py_version[1], sys.version_info)
 
@@ -1502,6 +1514,9 @@ class Base(unittest2.TestCase):
 
 self.enableLogChannelsForCurrentTest()
 
+#Initialize debug_info
+self.debug_info = None
+
 def runHooks(self, child=None, child_prompt=None, use_cmd_api=False):
 """Perform the run hooks to bring lldb debugger to the desired state.
 


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14673: Fix buildbot breakage after r253106

2015-11-16 Thread Ying Chen via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL253272: Re-Apply "Add a "not_in()" function you can apply to 
the list type arguments… (authored by chying).

Changed prior to commit:
  http://reviews.llvm.org/D14673?vs=40353&id=40357#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14673

Files:
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
  lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Index: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
@@ -638,19 +638,31 @@
 else:
 return expectedFailure_impl
 
+# You can also pass not_in(list) to reverse the sense of the test for the 
arguments that
+# are simple lists, namely oslist, compiler, and debug_info.
+
+def not_in (iterable):
+return lambda x : x not in iterable
+
+def check_list_or_lambda (list_or_lambda, value):
+if six.callable(list_or_lambda):
+return list_or_lambda(value)
+else:
+return list_or_lambda is None or value is None or value in 
list_or_lambda
+
 # provide a function to xfail on defined oslist, compiler version, and archs
 # if none is specified for any argument, that argument won't be checked and 
thus means for all
 # for example,
 # @expectedFailureAll, xfail for all platform/compiler/arch,
 # @expectedFailureAll(compiler='gcc'), xfail for gcc on all 
platform/architecture
 # @expectedFailureAll(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), 
xfail for gcc>=4.9 on linux with i386
 def expectedFailureAll(bugnumber=None, oslist=None, compiler=None, 
compiler_version=None, archs=None, triple=None, debug_info=None, 
swig_version=None, py_version=None):
 def fn(self):
-oslist_passes = oslist is None or self.getPlatform() in oslist
-compiler_passes = compiler is None or (compiler in self.getCompiler() 
and self.expectedCompilerVersion(compiler_version))
+oslist_passes = check_list_or_lambda(oslist, self.getPlatform())
+compiler_passes = check_list_or_lambda(self.getCompiler(), compiler) 
and self.expectedCompilerVersion(compiler_version)
 arch_passes = self.expectedArch(archs)
 triple_passes = triple is None or re.match(triple, 
lldb.DBG.GetSelectedPlatform().GetTriple())
-debug_info_passes = debug_info is None or self.debug_info in debug_info
+debug_info_passes = check_list_or_lambda(debug_info, self.debug_info)
 swig_version_passes = (swig_version is None) or (not hasattr(lldb, 
'swig_version')) or (check_expected_version(swig_version[0], swig_version[1], 
lldb.swig_version))
 py_version_passes = (py_version is None) or 
check_expected_version(py_version[0], py_version[1], sys.version_info)
 
@@ -1502,6 +1514,9 @@
 
 self.enableLogChannelsForCurrentTest()
 
+#Initialize debug_info
+self.debug_info = None
+
 def runHooks(self, child=None, child_prompt=None, use_cmd_api=False):
 """Perform the run hooks to bring lldb debugger to the desired state.
 
Index: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
===
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoins/TestConsecutiveBreakpoints.py
@@ -15,7 +15,7 @@
 
 mydir = TestBase.compute_mydir(__file__)
 
-@unittest2.expectedFailure("llvm.org/pr23478")
+@expectedFailureAll("llvm.org/pr23478", oslist = not_in(["macosx"]))
 def test (self):
 self.build ()
 self.consecutive_breakpoints_tests()


Index: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
@@ -638,19 +638,31 @@
 else:
 return expectedFailure_impl
 
+# You can also pass not_in(list) to reverse the sense of the test for the arguments that
+# are simple lists, namely oslist, compiler, and debug_info.
+
+def not_in (iterable):
+return lambda x : x not in iterable
+
+def check_list_or_lambda (list_or_lambda, value):
+if six.callable(list_or_lambda):
+return list_or_lambda(value)
+else:
+return list_or_lambda is None or value is None or value in list_or_lambda
+
 # provide a function to xfail on defined oslist, compiler version, and archs
 # if none is specified for any argument, that argument won't be checked and thus means for all
 # for example,
 # @expectedFailureAll, xfail for all platform/compil

Re: [Lldb-commits] New llvm build server account request

2015-11-17 Thread Ying Chen via lldb-commits
Done.
Please let me know if it works for you.

Thanks,
Ying

On Tue, Nov 17, 2015 at 3:34 AM, Kamil Rytarowski  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Hello Ying,
>
> Regarding the NetBSD buildbot for LLDB one NetBSD we need a tweak.
>
> Please test for the existence (only on NetBSD) of a file
> /usr/include/panel.h. If it's missing please add
> '-DLLDB_DISABLE_CURSES' to CMake configure arguments.
>
> if [ ! -f /usr/include/panel.h ]; then
> # Add this line to the CMake configure arguments on NetBSD
> echo "-DLLDB_DISABLE_CURSES"
> fi
>
> This change is for both: staging and master build farm. I'm going to
> switch the NetBSD7 buildbot to the master one soon, once it will build
> the sources properly.
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v2
>
> iQIcBAEBCAAGBQJWSxDFAAoJEEuzCOmwLnZsvDQQAKJKGGvRUIVACZmcYQbhcWuE
> Ee6iH+aWFp0fg+my6krKGEPHFSgQ0J5/Hq7Ud/lJZLeJq990UNMhybXFlntPDZgb
> GmGTHgNgTzH/J1+QXE4/3rqO4oKWMqynPPfDDvNyv0D8CDlFzToL+40lFdKk1We+
> icRJM1L4eUzPa3NDFKoPB17KS4l9unb1A0WdrK8XHwuxaxrkTtA79teXc+5bWjvX
> DyDk/Q9Awnjx6M30WL2yqQ1AWaMKUEjAPh4nl29b/q4vr+JxP0xEhOfq1bOqs4z8
> NsNwd3bLJN9xlngWL12RFwOSeB4o4LTzvfRrA1shZhPN1dwYs5oH7T/0GtnC2i4U
> FMVQDpYTXpymZXJznuzGvTDYhUO2On76BklUevLxciPhpwhap+80aLq44kP3XxTK
> +BonLN35thYlruHoPD52OFds+nXbytU6tC9vCVZXgK+4Nhryag/ffmQ8XGkyxL9c
> CrTmAQVV5FsVuwwZVLKR7U6ohHJAkHEbHXchP0Y9DHWCh7eSpI4OYcBhWUEtrWYq
> EddvRoSqbD5P5tmiOMExIh9SdYCgMSf9FHJ7wdTZY6Ye5kmmP305+JZu4QGdbrgx
> 4LW0rzBOVRScaKm6KGrJDYIyPQBDY5J8vIuWSlUK7oYVq7/3/9Lny9dcyPhGmrS4
> EUJ/75S1VItcntQhqX4l
> =QhzH
> -END PGP SIGNATURE-
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D14765: Support unix-abstract-connect scheme as platform url in lldb testsuite

2015-11-17 Thread Ying Chen via lldb-commits
chying created this revision.
chying added a reviewer: ovyalov.
chying added a subscriber: lldb-commits.

http://reviews.llvm.org/D14765

Files:
  packages/Python/lldbsuite/test/lldbtest.py
  packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

Index: packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -61,8 +61,12 @@
 self.named_pipe_fd = None
 self.stub_sends_two_stop_notifications_on_kill = False
 if lldb.platform_url:
-scheme, host = re.match('(.+)://(.+):\d+', 
lldb.platform_url).groups()
-if scheme == 'adb':
+if lldb.platform_url.startswith('unix-abstract-connect'):
+url_pattern = '(.+)://\[?(.+?)\]?/.*'
+else:
+url_pattern = '(.+)://(.+):\d+'
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if scheme in ['adb', 'unix-abstract-connect']:
 self.stub_device = host
 self.stub_hostname = 'localhost'
 else:
Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -461,8 +461,10 @@
 assert lldb.platform_url is not None
 device_id = None
 parsed_url = urlparse.urlparse(lldb.platform_url)
-if parsed_url.scheme == "adb":
+if parsed_url.scheme in ["adb", "unix-abstract-connect"]:
 device_id = parsed_url.netloc.split(":")[0]
+if device_id.startswith('[') and device_id.endswith(']'):
+device_id = device_id[1:-1]
 retcode, stdout, stderr = run_adb_command(
 ["shell", "getprop", "ro.build.version.sdk"], device_id)
 if retcode == 0:


Index: packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -61,8 +61,12 @@
 self.named_pipe_fd = None
 self.stub_sends_two_stop_notifications_on_kill = False
 if lldb.platform_url:
-scheme, host = re.match('(.+)://(.+):\d+', lldb.platform_url).groups()
-if scheme == 'adb':
+if lldb.platform_url.startswith('unix-abstract-connect'):
+url_pattern = '(.+)://\[?(.+?)\]?/.*'
+else:
+url_pattern = '(.+)://(.+):\d+'
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if scheme in ['adb', 'unix-abstract-connect']:
 self.stub_device = host
 self.stub_hostname = 'localhost'
 else:
Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -461,8 +461,10 @@
 assert lldb.platform_url is not None
 device_id = None
 parsed_url = urlparse.urlparse(lldb.platform_url)
-if parsed_url.scheme == "adb":
+if parsed_url.scheme in ["adb", "unix-abstract-connect"]:
 device_id = parsed_url.netloc.split(":")[0]
+if device_id.startswith('[') and device_id.endswith(']'):
+device_id = device_id[1:-1]
 retcode, stdout, stderr = run_adb_command(
 ["shell", "getprop", "ro.build.version.sdk"], device_id)
 if retcode == 0:
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14765: Support unix-abstract-connect scheme as platform url in lldb testsuite

2015-11-17 Thread Ying Chen via lldb-commits
chying updated this revision to Diff 40469.
chying added a comment.
Herald added subscribers: srhines, danalbert, tberghammer.

Address comments.


http://reviews.llvm.org/D14765

Files:
  packages/Python/lldbsuite/test/lldbtest.py
  packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

Index: packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -61,8 +61,12 @@
 self.named_pipe_fd = None
 self.stub_sends_two_stop_notifications_on_kill = False
 if lldb.platform_url:
-scheme, host = re.match('(.+)://(.+):\d+', 
lldb.platform_url).groups()
-if scheme == 'adb':
+if lldb.platform_url.startswith('unix-'):
+url_pattern = '(.+)://\[?(.+?)\]?/.*'
+else:
+url_pattern = '(.+)://(.+):\d+'
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if lldb.remote_platform_name == 'remote-android' and host != 
'localhost':
 self.stub_device = host
 self.stub_hostname = 'localhost'
 else:
Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -461,8 +461,10 @@
 assert lldb.platform_url is not None
 device_id = None
 parsed_url = urlparse.urlparse(lldb.platform_url)
-if parsed_url.scheme == "adb":
+if parsed_url.netloc.split(":")[0] != 'localhost':
 device_id = parsed_url.netloc.split(":")[0]
+if device_id.startswith('[') and device_id.endswith(']'):
+device_id = device_id[1:-1]
 retcode, stdout, stderr = run_adb_command(
 ["shell", "getprop", "ro.build.version.sdk"], device_id)
 if retcode == 0:


Index: packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -61,8 +61,12 @@
 self.named_pipe_fd = None
 self.stub_sends_two_stop_notifications_on_kill = False
 if lldb.platform_url:
-scheme, host = re.match('(.+)://(.+):\d+', lldb.platform_url).groups()
-if scheme == 'adb':
+if lldb.platform_url.startswith('unix-'):
+url_pattern = '(.+)://\[?(.+?)\]?/.*'
+else:
+url_pattern = '(.+)://(.+):\d+'
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if lldb.remote_platform_name == 'remote-android' and host != 'localhost':
 self.stub_device = host
 self.stub_hostname = 'localhost'
 else:
Index: packages/Python/lldbsuite/test/lldbtest.py
===
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -461,8 +461,10 @@
 assert lldb.platform_url is not None
 device_id = None
 parsed_url = urlparse.urlparse(lldb.platform_url)
-if parsed_url.scheme == "adb":
+if parsed_url.netloc.split(":")[0] != 'localhost':
 device_id = parsed_url.netloc.split(":")[0]
+if device_id.startswith('[') and device_id.endswith(']'):
+device_id = device_id[1:-1]
 retcode, stdout, stderr = run_adb_command(
 ["shell", "getprop", "ro.build.version.sdk"], device_id)
 if retcode == 0:
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14765: Support unix-abstract-connect scheme as platform url in lldb testsuite

2015-11-17 Thread Ying Chen via lldb-commits
chying marked 2 inline comments as done.


Comment at: 
packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py:69
@@ -66,1 +68,3 @@
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if lldb.remote_platform_name == 'remote-android' and host != 
'localhost':
 self.stub_device = host

As discussed offline, add check for remote platform is android as well.


http://reviews.llvm.org/D14765



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14765: Support unix-abstract-connect scheme as platform url in lldb testsuite

2015-11-18 Thread Ying Chen via lldb-commits
chying marked an inline comment as done.
chying added a comment.

http://reviews.llvm.org/D14765



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r253488 - Support unix-abstract-connect scheme as platform url in lldb testsuite

2015-11-18 Thread Ying Chen via lldb-commits
Author: chying
Date: Wed Nov 18 13:03:20 2015
New Revision: 253488

URL: http://llvm.org/viewvc/llvm-project?rev=253488&view=rev
Log:
Support unix-abstract-connect scheme as platform url in lldb testsuite

Reviewers: ovyalov

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D14765

Modified:
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=253488&r1=253487&r2=253488&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Wed Nov 18 13:03:20 
2015
@@ -461,8 +461,11 @@ def android_device_api():
 assert lldb.platform_url is not None
 device_id = None
 parsed_url = urlparse.urlparse(lldb.platform_url)
-if parsed_url.scheme == "adb":
-device_id = parsed_url.netloc.split(":")[0]
+host_name = parsed_url.netloc.split(":")[0]
+if host_name != 'localhost':
+device_id = host_name
+if device_id.startswith('[') and device_id.endswith(']'):
+device_id = device_id[1:-1]
 retcode, stdout, stderr = run_adb_command(
 ["shell", "getprop", "ro.build.version.sdk"], device_id)
 if retcode == 0:

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py?rev=253488&r1=253487&r2=253488&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
 Wed Nov 18 13:03:20 2015
@@ -61,8 +61,12 @@ class GdbRemoteTestCaseBase(TestBase):
 self.named_pipe_fd = None
 self.stub_sends_two_stop_notifications_on_kill = False
 if lldb.platform_url:
-scheme, host = re.match('(.+)://(.+):\d+', 
lldb.platform_url).groups()
-if scheme == 'adb':
+if lldb.platform_url.startswith('unix-'):
+url_pattern = '(.+)://\[?(.+?)\]?/.*'
+else:
+url_pattern = '(.+)://(.+):\d+'
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if lldb.remote_platform_name == 'remote-android' and host != 
'localhost':
 self.stub_device = host
 self.stub_hostname = 'localhost'
 else:


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14765: Support unix-abstract-connect scheme as platform url in lldb testsuite

2015-11-18 Thread Ying Chen via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL253488: Support unix-abstract-connect scheme as platform url 
in lldb testsuite (authored by chying).

Changed prior to commit:
  http://reviews.llvm.org/D14765?vs=40469&id=40535#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14765

Files:
  lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
  
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

Index: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
@@ -461,8 +461,11 @@
 assert lldb.platform_url is not None
 device_id = None
 parsed_url = urlparse.urlparse(lldb.platform_url)
-if parsed_url.scheme == "adb":
-device_id = parsed_url.netloc.split(":")[0]
+host_name = parsed_url.netloc.split(":")[0]
+if host_name != 'localhost':
+device_id = host_name
+if device_id.startswith('[') and device_id.endswith(']'):
+device_id = device_id[1:-1]
 retcode, stdout, stderr = run_adb_command(
 ["shell", "getprop", "ro.build.version.sdk"], device_id)
 if retcode == 0:
Index: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
===
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -61,8 +61,12 @@
 self.named_pipe_fd = None
 self.stub_sends_two_stop_notifications_on_kill = False
 if lldb.platform_url:
-scheme, host = re.match('(.+)://(.+):\d+', 
lldb.platform_url).groups()
-if scheme == 'adb':
+if lldb.platform_url.startswith('unix-'):
+url_pattern = '(.+)://\[?(.+?)\]?/.*'
+else:
+url_pattern = '(.+)://(.+):\d+'
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if lldb.remote_platform_name == 'remote-android' and host != 
'localhost':
 self.stub_device = host
 self.stub_hostname = 'localhost'
 else:


Index: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
@@ -461,8 +461,11 @@
 assert lldb.platform_url is not None
 device_id = None
 parsed_url = urlparse.urlparse(lldb.platform_url)
-if parsed_url.scheme == "adb":
-device_id = parsed_url.netloc.split(":")[0]
+host_name = parsed_url.netloc.split(":")[0]
+if host_name != 'localhost':
+device_id = host_name
+if device_id.startswith('[') and device_id.endswith(']'):
+device_id = device_id[1:-1]
 retcode, stdout, stderr = run_adb_command(
 ["shell", "getprop", "ro.build.version.sdk"], device_id)
 if retcode == 0:
Index: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -61,8 +61,12 @@
 self.named_pipe_fd = None
 self.stub_sends_two_stop_notifications_on_kill = False
 if lldb.platform_url:
-scheme, host = re.match('(.+)://(.+):\d+', lldb.platform_url).groups()
-if scheme == 'adb':
+if lldb.platform_url.startswith('unix-'):
+url_pattern = '(.+)://\[?(.+?)\]?/.*'
+else:
+url_pattern = '(.+)://(.+):\d+'
+scheme, host = re.match(url_pattern, lldb.platform_url).groups()
+if lldb.remote_platform_name == 'remote-android' and host != 'localhost':
 self.stub_device = host
 self.stub_hostname = 'localhost'
 else:
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D21159: [zorg] Add a step to run unit tests to the scripted LLDB builder

2016-06-08 Thread Ying Chen via lldb-commits
chying accepted this revision.
chying added a comment.
This revision is now accepted and ready to land.

thanks for making the changes, look good.


http://reviews.llvm.org/D21159



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D22097: [zorg] Remove flunkOnFailure=False from the scripted LLDB builder

2016-07-07 Thread Ying Chen via lldb-commits
chying accepted this revision.
chying added a comment.
This revision is now accepted and ready to land.

Looks good.


http://reviews.llvm.org/D22097



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D24062: Removed warnOnFailure flag for the step for running NDK update script.

2016-08-30 Thread Ying Chen via lldb-commits
chying added a comment.

Could you also set haltOnFailure=False, so that build continues if this step 
fails?


https://reviews.llvm.org/D24062



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D24062: Removed warnOnFailure flag for the step for running NDK update script.

2016-08-30 Thread Ying Chen via lldb-commits
chying accepted this revision.
chying added a comment.
This revision is now accepted and ready to land.

looks good.


https://reviews.llvm.org/D24062



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r257228 - Fix TestDebugBreak.py failure with gcc, for loop declarations are not allowed by default with gcc

2016-01-08 Thread Ying Chen via lldb-commits
Author: chying
Date: Fri Jan  8 17:10:56 2016
New Revision: 257228

URL: http://llvm.org/viewvc/llvm-project?rev=257228&view=rev
Log:
Fix TestDebugBreak.py failure with gcc, for loop declarations are not allowed 
by default with gcc

- fix buildbot breakage after r257186
- move declaration outside of for loop

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c?rev=257228&r1=257227&r2=257228&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c
 Fri Jan  8 17:10:56 2016
@@ -8,8 +8,8 @@
 int
 bar(int const *foo)
 {
-int count = 0;
-for (int i = 0; i < 10; ++i)
+int count = 0, i = 0;
+for (; i < 10; ++i)
 {
 count += 1;
 BREAKPOINT_INTRINSIC();


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r257644 - Fix an issue where scripted commands would not actually print any of their output if an immediate output file was set in the result object via a Python file object

2016-01-13 Thread Ying Chen via lldb-commits
Hello Enrico,

The new test has been failing on Ubuntu buildbot. But it's passing on some
offline Ubuntu machines, I don't understand what caused the difference.
Could you please help to take a look?

http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/10299

Thanks,
Ying

On Wed, Jan 13, 2016 at 11:32 AM, Enrico Granata via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

>
> On Jan 13, 2016, at 11:26 AM, Zachary Turner  wrote:
>
> Thanks!  btw would having the command write its output to a file instead
> of stdout solve the pexpect problme as well?
>
>
> That’s possible - but I would need to play with it a little bit to
> convince myself that it really is a faithful reproduction of my original
> issue
> It’ll take me a little while to get to it - stay tuned.
>
> On Wed, Jan 13, 2016 at 11:22 AM Enrico Granata 
> wrote:
>
>>
>> On Jan 13, 2016, at 10:34 AM, Zachary Turner  wrote:
>>
>>
>>
>> On Wed, Jan 13, 2016 at 10:25 AM Enrico Granata 
>> wrote:
>>
>>> On Jan 13, 2016, at 10:21 AM, Zachary Turner  wrote:
>>>
>>>
>>> On Wed, Jan 13, 2016 at 10:15 AM Enrico Granata via lldb-commits <
>>> lldb-commits@lists.llvm.org> wrote:
>>>
 +
 +class CommandScriptImmediateOutputTestCase (PExpectTest):

>>> Does the bug that you were trying to fix occur only when using the
>>> command_script.py file from the lldb command line?  If you load it from
>>> within lldb via an LLDB command, does the problem still occur?  If the
>>> problem you are fixing is not specific to the LLDB command line, I would
>>> prefer if you write this not as a pexpect test.
>>>
>>>
>>> I would love to not touch pexpect :-) But in this case, I can’t see a
>>> way around it. I am trying to detect whether some text is “physically”
>>> printed to stdout. And pexpect seems the most obvious straightforward way
>>> to get that to happen. Note that, in this bug, the result object is filled
>>> in correctly even if nothing gets printed, so looking at the result won’t
>>> quite cut it - it really needs to detect output to stdout.
>>>
>> You're calling result.SetImmediateOutputFile(sys.__stdout__).  Wouldn't
>> it work to use a file on the file system here, and then you open that file
>> and look at it after running the commands?  It wouldn't work in remote
>> cases, but it already doesn't work on remote cases anyway (as you point out
>> below)
>>
>>
>>>
>>>
>>>
 +
 +mydir = TestBase.compute_mydir(__file__)
 +
 +def setUp(self):
 +# Call super's setUp().
 +PExpectTest.setUp(self)
 +
 +@skipIfRemote # test not remote-ready llvm.org/pr24813
 +@expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the
 buildbot")
 +@expectedFlakeyLinux("llvm.org/pr25172")

>>> Are these necessary?  The windows one is necessary (but not if you
>>> change this to not being a pexpect test as I've requested above), but why
>>> are the other ones necessary?
>>>
>>>
>>> Do we support remote pexpect? As for FreeBSD and Linux, they might not
>>> be necessary, but I’d rather much remove them (or let the relevant platform
>>> owners) remove them in a separate commit
>>>
>>> No remote pexpect, so the @skipIfRemote probably needs to be there.  But
>> I think everyone should be checking in tests enabled by default in the
>> widest set of environments possible that you aren't completely sure are
>> broken.  It should be up to the platform holders to disable broken tests,
>> not to enable working tests.  Because it's much easier to notice a broken
>> test going in than it is to notice a working test went in disabled (because
>> who's going to think to test it out?).
>>
>>
>> This is a fair point. I’ll enable those platforms in a subsequent commit
>> ASAP
>>
>>
>> Thanks,
>> *- Enrico*
>> 📩 egranata@.com ☎️ 27683
>>
>>
>
> Thanks,
> *- Enrico*
> 📩 egranata@.com ☎️ 27683
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r257644 - Fix an issue where scripted commands would not actually print any of their output if an immediate output file was set in the result object via a Python file object

2016-01-13 Thread Ying Chen via lldb-commits
Please see attached log file.

Thanks,
Ying

On Wed, Jan 13, 2016 at 5:39 PM, Enrico Granata  wrote:

> From the buildbot log it’s quite hard to tell what could be going on
>
> Is there any chance you guys could run the test by hand with the “-t -v”
> flags to the dotest.py driver and attach the output of the run?
>
> That might help figure out where the issue lies
>
> On Jan 13, 2016, at 5:35 PM, Ying Chen  wrote:
>
> Hello Enrico,
>
> The new test has been failing on Ubuntu buildbot. But it's passing on some
> offline Ubuntu machines, I don't understand what caused the difference.
> Could you please help to take a look?
>
>
> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/10299
>
> Thanks,
> Ying
>
> On Wed, Jan 13, 2016 at 11:32 AM, Enrico Granata via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
>
>>
>> On Jan 13, 2016, at 11:26 AM, Zachary Turner  wrote:
>>
>> Thanks!  btw would having the command write its output to a file instead
>> of stdout solve the pexpect problme as well?
>>
>>
>> That’s possible - but I would need to play with it a little bit to
>> convince myself that it really is a faithful reproduction of my original
>> issue
>> It’ll take me a little while to get to it - stay tuned.
>>
>> On Wed, Jan 13, 2016 at 11:22 AM Enrico Granata 
>> wrote:
>>
>>>
>>> On Jan 13, 2016, at 10:34 AM, Zachary Turner  wrote:
>>>
>>>
>>>
>>> On Wed, Jan 13, 2016 at 10:25 AM Enrico Granata 
>>> wrote:
>>>
 On Jan 13, 2016, at 10:21 AM, Zachary Turner 
 wrote:


 On Wed, Jan 13, 2016 at 10:15 AM Enrico Granata via lldb-commits <
 lldb-commits@lists.llvm.org> wrote:

> +
> +class CommandScriptImmediateOutputTestCase (PExpectTest):
>
 Does the bug that you were trying to fix occur only when using the
 command_script.py file from the lldb command line?  If you load it from
 within lldb via an LLDB command, does the problem still occur?  If the
 problem you are fixing is not specific to the LLDB command line, I would
 prefer if you write this not as a pexpect test.


 I would love to not touch pexpect :-) But in this case, I can’t see a
 way around it. I am trying to detect whether some text is “physically”
 printed to stdout. And pexpect seems the most obvious straightforward way
 to get that to happen. Note that, in this bug, the result object is filled
 in correctly even if nothing gets printed, so looking at the result won’t
 quite cut it - it really needs to detect output to stdout.

>>> You're calling result.SetImmediateOutputFile(sys.__stdout__).  Wouldn't
>>> it work to use a file on the file system here, and then you open that file
>>> and look at it after running the commands?  It wouldn't work in remote
>>> cases, but it already doesn't work on remote cases anyway (as you point out
>>> below)
>>>
>>>



> +
> +mydir = TestBase.compute_mydir(__file__)
> +
> +def setUp(self):
> +# Call super's setUp().
> +PExpectTest.setUp(self)
> +
> +@skipIfRemote # test not remote-ready llvm.org/pr24813
> +@expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the
> buildbot")
> +@expectedFlakeyLinux("llvm.org/pr25172")
>
 Are these necessary?  The windows one is necessary (but not if you
 change this to not being a pexpect test as I've requested above), but why
 are the other ones necessary?


 Do we support remote pexpect? As for FreeBSD and Linux, they might not
 be necessary, but I’d rather much remove them (or let the relevant platform
 owners) remove them in a separate commit

 No remote pexpect, so the @skipIfRemote probably needs to be there.
>>> But I think everyone should be checking in tests enabled by default in the
>>> widest set of environments possible that you aren't completely sure are
>>> broken.  It should be up to the platform holders to disable broken tests,
>>> not to enable working tests.  Because it's much easier to notice a broken
>>> test going in than it is to notice a working test went in disabled (because
>>> who's going to think to test it out?).
>>>
>>>
>>> This is a fair point. I’ll enable those platforms in a subsequent commit
>>> ASAP
>>>
>>>
>>> Thanks,
>>> *- Enrico*
>>> 📩 egranata@.com ☎️ 27683
>>>
>>>
>>
>> Thanks,
>> *- Enrico*
>> 📩 egranata@.com ☎️ 27683
>>
>>
>> ___
>> lldb-commits mailing list
>> lldb-commits@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>>
>>
>
>
> Thanks,
> *- Enrico*
> 📩 egranata@.com ☎️ 27683
>
>
lldb version 3.9.0 ( http://llvm.org/svn/llvm-project/lldb/trunk revision 257733 clang revision 257733 llvm revision 257733)

Session logs for test failures/errors/unexpected successes will go into directory 'logs-clang-3.5-i386'
Command invoked: /lldb-buildbot/lldbSlave/buildWorkingDir/scripts/../llvm/tools/lldb/test/dotest

Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.

2016-03-02 Thread Ying Chen via lldb-commits
chying added a subscriber: chying.
chying added a comment.

Seems this patch breaks OSX build. I guess the new files were not added to 
xcode project file.
Could you please take a look?
http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/8892/steps/ninja%20build%20local/logs/stdio


http://reviews.llvm.org/D17363



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D17363: Add SymbolFilePDB with basic support for line tables.

2016-03-02 Thread Ying Chen via lldb-commits
chying added a comment.

Yes, it is fixed now. Thank you!


http://reviews.llvm.org/D17363



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D18481: Add argument to expectedFailureAll decorator to xfail for environment variables, and xfail tests for hard float abi and -mthumb on android arm

2016-03-25 Thread Ying Chen via lldb-commits
chying created this revision.
chying added reviewers: chaoren, zturner.
chying added a subscriber: lldb-commits.
Herald added subscribers: danalbert, tberghammer, rengolin, aemerson.

xfail TestCallUserAnonTypedef.test for -mthumb, 
TestReturnValue.test_with_python for hard fp, 
TestLldbGdbServer.software_breakpoint_set_and_remove_work for hard fp.

http://reviews.llvm.org/D18481

Files:
  packages/Python/lldbsuite/test/decorators.py
  
packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py
  packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py
  packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py

Index: packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py
@@ -1122,6 +1122,7 @@
 self.set_inferior_startup_launch()
 self.qMemoryRegionInfo_reports_heap_address_as_readable_writeable()
 
+@expectedFailureAll(bugnumber="llvm.org/pr27075", compiler="gcc", 
archs=["arm"], env_flags={"CFLAGS_EXTRAS": "-mthumb"})
 def software_breakpoint_set_and_remove_work(self):
 # Start up the inferior.
 procs = self.prep_debug_monitor_and_inferior(
Index: 
packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py
===
--- 
packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py
+++ 
packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py
@@ -21,6 +21,7 @@
 @expectedFailureAll(oslist=["linux"], compiler="clang", 
compiler_version=["<=", "3.6"], archs=["i386"])
 @expectedFailureAll(bugnumber="llvm.org/pr25785", hostoslist=["windows"], 
compiler="gcc", archs=["i386"], triple='.*-android')
 @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
+@expectedFailureAll(bugnumber="llvm.org/pr27073", compiler="gcc", 
archs=["arm"], env_flags={"CFLAGS_EXTRAS": "-mfloat-abi=hard"})
 @add_test_categories(['pyapi'])
 def test_with_python(self):
 """Test getting return values from stepping out."""
Index: 
packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py
===
--- 
packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py
+++ 
packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py
@@ -23,6 +23,7 @@
 # Find the breakpoint
 self.line = line_number('main.cpp', '// lldb testsuite break')
 
+@expectedFailureAll(bugnumber="llvm.org/pr27074", compiler="gcc", 
archs=["arm"], env_flags={"CFLAGS_EXTRAS": "-mfloat-abi=hard"})
 def test(self):
 """Test typedeffed untagged struct arguments for function call 
expressions"""
 self.build()
Index: packages/Python/lldbsuite/test/decorators.py
===
--- packages/Python/lldbsuite/test/decorators.py
+++ packages/Python/lldbsuite/test/decorators.py
@@ -132,13 +132,20 @@
 else:
 return skipTestIfFn_impl
 
+def _check_expected_env_flag(env_flags):
+for env, value in env_flags.iteritems():
+env_val = os.environ.get(env)
+if env_val is None or value not in env_val.split():
+return False
+return True
+
 def _decorateTest(mode,
  bugnumber=None, oslist=None, hostoslist=None,
  compiler=None, compiler_version=None,
  archs=None, triple=None,
  debug_info=None,
  swig_version=None, py_version=None,
- remote=None):
+ remote=None, env_flags=None):
 def fn(self):
 skip_for_os = 
_match_decorator_property(lldbplatform.translate(oslist), self.getPlatform())
 skip_for_hostos = 
_match_decorator_property(lldbplatform.translate(hostoslist), 
lldbplatformutil.getHostPlatform())
@@ -151,6 +158,8 @@
 skip_for_swig_version = (swig_version is None) or (not hasattr(lldb, 
'swig_version')) or (_check_expected_version(swig_version[0], swig_version[1], 
lldb.swig_version))
 skip_for_py_version = (py_version is None) or 
_check_expected_version(py_version[0], py_version[1], sys.version_info)
 
+skip_for_env_flags = (env_flags is None) or 
_check_expected_env_flag(env_flags)
+
 # For the test to be skipped, all specified (e.g. not None) parameters 
must be True.
 # An unspecified parameter means "any", so those are marked skip by 
default.  And we skip
 # the final test if all conditions are True.
@@ -162,7 +171,8 @@
   (triple, skip_for_triple, "target triple"),
   (swig_versi

Re: [Lldb-commits] [PATCH] D18481: Add argument to expectedFailureAll decorator to xfail for environment variables, and xfail tests for hard float abi and -mthumb on android arm

2016-03-25 Thread Ying Chen via lldb-commits
chying added a comment.

In http://reviews.llvm.org/D18481#383718, @zturner wrote:

> Couldn't we have a way to say in the Makefile "never use these flags", then 
> the test suite could check the environment and remove them if they are 
> present.  This woudl allow the test to run.
>
> architecture, compiler, etc are things we don't really have control over.  If 
> a flag or an environment variable is causing a test to fail, it seems like 
> the right thing to do is not to use that flag or environment variable.


I don't find a way to pass compiler flags to test suite by current dotest 
options (please let me know if there is), so they're passed by CFLAGS_EXTRAS 
variable, which is checked and applied in the main Makefile. Alternative would 
be adding new dotest options to take compiler flags, then we add xfail based on 
compiler flag, please let me know how you think about this approach.

In http://reviews.llvm.org/D18481#383720, @zturner wrote:

> I'll still wait and see what Pavel and/or Tamas say, but if we are going to 
> go this route, I would rather the argument be called `cflags` and not 
> `env_flags`.  Xfailing a test based on an arbitrary environment variable just 
> seems like something we shouldn't be doing.  I'd rather prime the environment 
> however we need in order to get the test to run, than disable it and lose 
> test coverage.


Yes, let's get more opinions on this.


http://reviews.llvm.org/D18481



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D18819: Reduce code duplication in ProcessGDBRemote

2016-04-06 Thread Ying Chen via lldb-commits
chying added a subscriber: chying.
chying added a comment.

TestRegisters.py and TestDebugBreak.py are broken after this change. Could you 
take a look?
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/13090


Repository:
  rL LLVM

http://reviews.llvm.org/D18819



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D11962: Mark TestCModules as XFAIL on OSX

2015-08-11 Thread Ying Chen via lldb-commits
chying added a comment.

Could you add the related bug to comments or argument? 
llvm.org/pr24302


http://reviews.llvm.org/D11962



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D11962: Mark TestCModules as XFAIL on OSX

2015-08-11 Thread Ying Chen via lldb-commits
chying accepted this revision.
chying added a comment.
This revision is now accepted and ready to land.

Sorry I mean in the code, like,
@expectedFailureDarwin('llvm.org/pr24302')
Otherwise, looks good to me.


http://reviews.llvm.org/D11962



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D11947: Improve instruction emulation based stack unwinding

2015-08-20 Thread Ying Chen via lldb-commits
chying added a subscriber: chying.
chying added a comment.

It seems a bunch of darwin->android_arm tests are broken after this patch.
Could you take a look?
Here is the first build after this patch. 
http://lab.llvm.org:8011/builders/lldb-x86_64-darwin-13.4/builds/4977/steps/test7/logs/stdio


Repository:
  rL LLVM

http://reviews.llvm.org/D11947



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D12584: Fix TestCompletion.py failure on Darwin after r246639

2015-09-02 Thread Ying Chen via lldb-commits
chying created this revision.
chying added a reviewer: tberghammer.
chying added a subscriber: lldb-commits.

- send empty line for multiple commands to complete

http://reviews.llvm.org/D12584

Files:
  test/functionalities/completion/TestCompletion.py

Index: test/functionalities/completion/TestCompletion.py
===
--- test/functionalities/completion/TestCompletion.py
+++ test/functionalities/completion/TestCompletion.py
@@ -269,6 +269,8 @@
 child.send("%s\t" % str_input)
 child.sendline('')
 child.expect_exact(prompt)
+child.sendline('')
+child.expect_exact(prompt)
 
 # Now that the necessary logging is done, restore logfile to None to
 # stop further logging.


Index: test/functionalities/completion/TestCompletion.py
===
--- test/functionalities/completion/TestCompletion.py
+++ test/functionalities/completion/TestCompletion.py
@@ -269,6 +269,8 @@
 child.send("%s\t" % str_input)
 child.sendline('')
 child.expect_exact(prompt)
+child.sendline('')
+child.expect_exact(prompt)
 
 # Now that the necessary logging is done, restore logfile to None to
 # stop further logging.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12584: Fix TestCompletion.py failure on Darwin after r246639

2015-09-03 Thread Ying Chen via lldb-commits
chying added a comment.

Based on experiment I had, we need to send empty lines the same times as the 
number of lines in original commands on Darwin.
But on Linux, only one empty line is needed for multiple lines of commands.
It seems on Darwin, lldb doesn't automatically execute commands separated by 
new line.


http://reviews.llvm.org/D12584



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12584: Fix TestCompletion.py failure on Darwin after r246639

2015-09-03 Thread Ying Chen via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246791: Fix TestCompletion.py failure on Darwin after 
r246639 (authored by chying).

Changed prior to commit:
  http://reviews.llvm.org/D12584?vs=33898&id=33960#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12584

Files:
  lldb/trunk/test/functionalities/completion/TestCompletion.py

Index: lldb/trunk/test/functionalities/completion/TestCompletion.py
===
--- lldb/trunk/test/functionalities/completion/TestCompletion.py
+++ lldb/trunk/test/functionalities/completion/TestCompletion.py
@@ -269,6 +269,8 @@
 child.send("%s\t" % str_input)
 child.sendline('')
 child.expect_exact(prompt)
+child.sendline('')
+child.expect_exact(prompt)
 
 # Now that the necessary logging is done, restore logfile to None to
 # stop further logging.


Index: lldb/trunk/test/functionalities/completion/TestCompletion.py
===
--- lldb/trunk/test/functionalities/completion/TestCompletion.py
+++ lldb/trunk/test/functionalities/completion/TestCompletion.py
@@ -269,6 +269,8 @@
 child.send("%s\t" % str_input)
 child.sendline('')
 child.expect_exact(prompt)
+child.sendline('')
+child.expect_exact(prompt)
 
 # Now that the necessary logging is done, restore logfile to None to
 # stop further logging.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r246791 - Fix TestCompletion.py failure on Darwin after r246639

2015-09-03 Thread Ying Chen via lldb-commits
Author: chying
Date: Thu Sep  3 13:29:27 2015
New Revision: 246791

URL: http://llvm.org/viewvc/llvm-project?rev=246791&view=rev
Log:
Fix TestCompletion.py failure on Darwin after r246639

Summary: - send empty line for multiple commands to complete

Reviewers: tberghammer

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D12584

Modified:
lldb/trunk/test/functionalities/completion/TestCompletion.py

Modified: lldb/trunk/test/functionalities/completion/TestCompletion.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/completion/TestCompletion.py?rev=246791&r1=246790&r2=246791&view=diff
==
--- lldb/trunk/test/functionalities/completion/TestCompletion.py (original)
+++ lldb/trunk/test/functionalities/completion/TestCompletion.py Thu Sep  3 
13:29:27 2015
@@ -269,6 +269,8 @@ class CommandLineCompletionTestCase(Test
 child.send("%s\t" % str_input)
 child.sendline('')
 child.expect_exact(prompt)
+child.sendline('')
+child.expect_exact(prompt)
 
 # Now that the necessary logging is done, restore logfile to None to
 # stop further logging.


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Ying Chen via lldb-commits
chying added a comment.

Sorry, coming late to this thread.
This change works ok on linux and darwin systems.

But it has some problem on Windows, the main code has to be protected with the 
following statement on Windows,
if __name__ == '__main__': 
Otherwise it creates subprocesses recursively.


http://reviews.llvm.org/D12587



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12587: Roll dosep.py parallel test runner into dotest.py command line

2015-09-03 Thread Ying Chen via lldb-commits
chying added a comment.

Sorry, coming late to this thread.
This change works ok on linux and darwin systems.

But it has some problem on Windows, the main code has to be protected with the 
following statement on Windows,
if __name__ == '__main__': 
Otherwise it creates subprocesses recursively.

In http://reviews.llvm.org/D12587#239644, @tfiala wrote:

> In http://reviews.llvm.org/D12587#239625, @chying wrote:
>
> > Sorry, coming late to this thread.
> >  This change works ok on linux and darwin systems.
>
>
> Hi @chying,
>
> > But it has some problem on Windows, the main code has to be protected with 
> > the following statement on Windows,
>
> >  if __name__ == '__main__': 
>
> >  Otherwise it creates subprocesses recursively.
>
>
> Can you tell me more about this?  How are you calling it?  Which one 
> (dotest.py or dosep.py) is going recursively out of control?  On what kind of 
> machine?  Did you used to run it with dosep,py or dotest.py?  If you used to 
> use dotest.py, you'll start seeing a bunch of dotest.py test runners (one per 
> core, which you can control with the -t or --threads option).  If you're on a 
> machine that has 48 cores, you'll get 48 dotest runner processes.  Are you 
> sure that it is not running?


I call dotest directly, like "python.exe dotest.py --executable ..." on a 
Windows 7 machine.
I set LLDB_TEST_THREADS=8, and see 8 test runners from task manager. That has 
no problem.
But it seems each thread keeps calling dotest->dosep->dotest-... recursively.

> If it is not running and is truly recursing out of control, can you capture 
> the command line args for several of the processes?  All of the inferior 
> dotest.py worker bees should have been kicked off with the --inferior flag 
> added.  If *not*, then something sounds like it is going wrong.

> 

> Do you have a patch that fixes this?  (I'm not sure exactly which part you're 
> wanting to protect).


I don't have a patch yet, because the functions in dotest.py is pretty 
scattered.
I'm not sure which part to guard yet. I'm still looking at it.

> One more question - I recall sometimes having .pyc files not get cleared out 
> properly, and get used even when they're stale on some platforms in the past. 
>  Is it possible you have stale .pyc files that possibly don't have the 
> updated code (i.e. .py file is fresh, but .pyc file is getting used 
> accidentally)?  Easiest way to rule that out is to blow away the .pyc files 
> in the directory.  Having stale files in this case could go really badly.


Yes, I had a clean run.


http://reviews.llvm.org/D12587



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D12612: Fix dotest on Windows after multiprocessing refactor

2015-09-03 Thread Ying Chen via lldb-commits
chying accepted this revision.
chying added a comment.

This patch works for me.
Although I thought we could put less code in main() function.
Then have 
if __name__ == "__main__":

  main()

But that will require some more work to refactor the code. Probably that could 
wait for Todd's clean up.


http://reviews.llvm.org/D12612



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D13114: Check existence of SIGHUP before using it

2015-09-23 Thread Ying Chen via lldb-commits
chying created this revision.
chying added a reviewer: tfiala.
chying added a subscriber: lldb-commits.

-SIGHUP doesn't exist on Windows

http://reviews.llvm.org/D13114

Files:
  test/dosep.py

Index: test/dosep.py
===
--- test/dosep.py
+++ test/dosep.py
@@ -285,7 +285,8 @@
 
 # Shut off interrupt handling in the child process.
 signal.signal(signal.SIGINT, signal.SIG_IGN)
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 # Setup the global state for the worker process.
 setup_global_variables(
@@ -1268,7 +1269,8 @@
 """
 
 # Do not shut down on sighup.
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 dotest_argv = sys.argv[1:]
 


Index: test/dosep.py
===
--- test/dosep.py
+++ test/dosep.py
@@ -285,7 +285,8 @@
 
 # Shut off interrupt handling in the child process.
 signal.signal(signal.SIGINT, signal.SIG_IGN)
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 # Setup the global state for the worker process.
 setup_global_variables(
@@ -1268,7 +1269,8 @@
 """
 
 # Do not shut down on sighup.
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 dotest_argv = sys.argv[1:]
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r248434 - Check existence of SIGHUP before using it

2015-09-23 Thread Ying Chen via lldb-commits
Author: chying
Date: Wed Sep 23 16:53:18 2015
New Revision: 248434

URL: http://llvm.org/viewvc/llvm-project?rev=248434&view=rev
Log:
Check existence of SIGHUP before using it

Summary: -SIGHUP doesn't exist on Windows

Reviewers: tfiala

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D13114

Modified:
lldb/trunk/test/dosep.py

Modified: lldb/trunk/test/dosep.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=248434&r1=248433&r2=248434&view=diff
==
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Wed Sep 23 16:53:18 2015
@@ -285,7 +285,8 @@ def process_dir_worker_multiprocessing(
 
 # Shut off interrupt handling in the child process.
 signal.signal(signal.SIGINT, signal.SIG_IGN)
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 # Setup the global state for the worker process.
 setup_global_variables(
@@ -1268,7 +1269,8 @@ def main(print_details_on_success, num_t
 """
 
 # Do not shut down on sighup.
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 dotest_argv = sys.argv[1:]
 


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13114: Check existence of SIGHUP before using it

2015-09-23 Thread Ying Chen via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL248434: Check existence of SIGHUP before using it (authored 
by chying).

Changed prior to commit:
  http://reviews.llvm.org/D13114?vs=35543&id=35557#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13114

Files:
  lldb/trunk/test/dosep.py

Index: lldb/trunk/test/dosep.py
===
--- lldb/trunk/test/dosep.py
+++ lldb/trunk/test/dosep.py
@@ -285,7 +285,8 @@
 
 # Shut off interrupt handling in the child process.
 signal.signal(signal.SIGINT, signal.SIG_IGN)
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 # Setup the global state for the worker process.
 setup_global_variables(
@@ -1268,7 +1269,8 @@
 """
 
 # Do not shut down on sighup.
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 dotest_argv = sys.argv[1:]
 


Index: lldb/trunk/test/dosep.py
===
--- lldb/trunk/test/dosep.py
+++ lldb/trunk/test/dosep.py
@@ -285,7 +285,8 @@
 
 # Shut off interrupt handling in the child process.
 signal.signal(signal.SIGINT, signal.SIG_IGN)
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 # Setup the global state for the worker process.
 setup_global_variables(
@@ -1268,7 +1269,8 @@
 """
 
 # Do not shut down on sighup.
-signal.signal(signal.SIGHUP, signal.SIG_IGN)
+if hasattr(signal, 'SIGHUP'):
+signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
 dotest_argv = sys.argv[1:]
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits