Not income for means test. You have cash value in the policy. It is an asset worth $xxx. (and quite possibly exempt in bankruptcy). When you cash out, you have an asset worth $xxx - no different than taking cash out of your bank account or your wallet, which is not income - it has already been "counted" as income way back when you paid the insurance premium. If you take a loan out, your asset is worth $xxx-loan amount, plus you now have the loan amount in hand, so, you still only have $xxx total. Since you owe yourself the money, it is not discharged, same as a 401(k) loan, but the insurance company can deduct the outstanding loan amount from insurance proceeds someday or 401(k) plan can declare a taxable event if you do not pay it back.
If you borrow against your insurance policy I would think that the insurance co. has the right to offset the loan against the cash value of the policy. The terms of the policy would probably discuss this issue. Insurance companies would not permit loans against cash value if a person could simply discharge them in BK.
If you cash out the insurance policy, I do not believe it is income to you. Although it could analyzed as return of capital/investment and anything above that earnings on investment.
If you need assistance with Chapter 7 BK, I have an office in LA.
Pay attention to the cash that you receive for these loans you are contemplating. Your insurance policy cash value and your 401k are exempt. CASH IS NOT. You can only exempt a relatively small amount of cash in bankruptcy. You can not expect to waltz into bankruptcy with pockets full of cash.
In my state, Ohio, we can exempt $400.00 cash and $1,150.00 of whatever else we choose. You can double that if a spouse files also. California has similar, but different exemptions. If you cash out of a policy or 401k loan, you will have to account for the cash you borrowed. And yes, they will ask. Honest answers are the only way to go.
By the way, I never advise my clients to borrow against their 401k. You are robbing yourself in the future if you do. Good luck.