It does depend on the state you are in. Being a landlord myself, I'm fairly familiar with the British Columbia (Canada) Residential Tenancy Act. You should be able to find the similar document for your state online.
Here, if I sell my rental house, the new owners must give 2 months notice to the tenants that they are going to move into it, and I think they have to give the tenants one month of free rent.
Tenants are supposed to cooperate with the landlord with regards to having the house ready to view, and are always supposed to be given 24 hours notice.
Check into the rules in your area. You may have some protection, but, if a landlord wants to move in, or sell again, there's only so much you can do.
Hugs and butterflies,
~T~